@mastra/core 1.26.0 → 1.26.1-alpha.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 (120) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/browser/index.cjs +2 -2
  5. package/dist/browser/index.js +1 -1
  6. package/dist/channels/index.cjs +4 -4
  7. package/dist/channels/index.js +1 -1
  8. package/dist/{chunk-CXW3Z2OL.js → chunk-4QTY73BW.js} +4 -4
  9. package/dist/chunk-4QTY73BW.js.map +1 -0
  10. package/dist/{chunk-VOP4TUHG.cjs → chunk-5HLY6ZVZ.cjs} +17 -17
  11. package/dist/{chunk-VOP4TUHG.cjs.map → chunk-5HLY6ZVZ.cjs.map} +1 -1
  12. package/dist/{chunk-GSVFJAVS.js → chunk-65IATTED.js} +3 -3
  13. package/dist/{chunk-GSVFJAVS.js.map → chunk-65IATTED.js.map} +1 -1
  14. package/dist/{chunk-PBGNXXU5.cjs → chunk-7432OHPH.cjs} +13 -13
  15. package/dist/chunk-7432OHPH.cjs.map +1 -0
  16. package/dist/{chunk-PLCLLPJL.js → chunk-BDGDMJRC.js} +9 -9
  17. package/dist/{chunk-PLCLLPJL.js.map → chunk-BDGDMJRC.js.map} +1 -1
  18. package/dist/{chunk-VYRRGSYO.cjs → chunk-BQN2KODN.cjs} +292 -292
  19. package/dist/{chunk-VYRRGSYO.cjs.map → chunk-BQN2KODN.cjs.map} +1 -1
  20. package/dist/{chunk-ZOCCZPSK.js → chunk-BVXKM2NV.js} +6 -6
  21. package/dist/{chunk-ZOCCZPSK.js.map → chunk-BVXKM2NV.js.map} +1 -1
  22. package/dist/{chunk-FFZJH35S.js → chunk-D4VTONCA.js} +3 -3
  23. package/dist/{chunk-FFZJH35S.js.map → chunk-D4VTONCA.js.map} +1 -1
  24. package/dist/{chunk-YZH6VQAS.cjs → chunk-DUJPIL2U.cjs} +5 -5
  25. package/dist/{chunk-YZH6VQAS.cjs.map → chunk-DUJPIL2U.cjs.map} +1 -1
  26. package/dist/{chunk-QNSBW2X4.js → chunk-EB7MYCTO.js} +3 -3
  27. package/dist/chunk-EB7MYCTO.js.map +1 -0
  28. package/dist/{chunk-HEAKZCPY.cjs → chunk-F3DC3HPB.cjs} +224 -224
  29. package/dist/{chunk-HEAKZCPY.cjs.map → chunk-F3DC3HPB.cjs.map} +1 -1
  30. package/dist/{chunk-PHQEKA3K.cjs → chunk-FKRKSEDS.cjs} +57 -57
  31. package/dist/{chunk-PHQEKA3K.cjs.map → chunk-FKRKSEDS.cjs.map} +1 -1
  32. package/dist/{chunk-2KWFY2Z4.cjs → chunk-IIV77JRY.cjs} +24 -30
  33. package/dist/chunk-IIV77JRY.cjs.map +1 -0
  34. package/dist/{chunk-EK2NCPVI.cjs → chunk-JZ4NE7PC.cjs} +7 -7
  35. package/dist/{chunk-EK2NCPVI.cjs.map → chunk-JZ4NE7PC.cjs.map} +1 -1
  36. package/dist/{chunk-Q5JACXBM.cjs → chunk-L24YAW4G.cjs} +3 -3
  37. package/dist/chunk-L24YAW4G.cjs.map +1 -0
  38. package/dist/{chunk-YHKM3BEY.cjs → chunk-MM7USNIY.cjs} +6 -6
  39. package/dist/{chunk-YHKM3BEY.cjs.map → chunk-MM7USNIY.cjs.map} +1 -1
  40. package/dist/{chunk-USTQPLUM.js → chunk-MZPEIW2H.js} +4 -4
  41. package/dist/{chunk-USTQPLUM.js.map → chunk-MZPEIW2H.js.map} +1 -1
  42. package/dist/{chunk-OUAM366B.cjs → chunk-NC4C5XMF.cjs} +9 -9
  43. package/dist/{chunk-OUAM366B.cjs.map → chunk-NC4C5XMF.cjs.map} +1 -1
  44. package/dist/{chunk-42ZT2Z2G.js → chunk-NQGCZAEB.js} +12 -18
  45. package/dist/chunk-NQGCZAEB.js.map +1 -0
  46. package/dist/{chunk-5L2Z472N.js → chunk-NYMU25CS.js} +3 -3
  47. package/dist/{chunk-5L2Z472N.js.map → chunk-NYMU25CS.js.map} +1 -1
  48. package/dist/{chunk-AW2NDGPK.js → chunk-QRZI6IPG.js} +3 -3
  49. package/dist/{chunk-AW2NDGPK.js.map → chunk-QRZI6IPG.js.map} +1 -1
  50. package/dist/{chunk-PKJJATBP.js → chunk-ZIURHKSV.js} +4 -4
  51. package/dist/{chunk-PKJJATBP.js.map → chunk-ZIURHKSV.js.map} +1 -1
  52. package/dist/datasets/index.cjs +11 -11
  53. package/dist/datasets/index.js +1 -1
  54. package/dist/docs/SKILL.md +1 -1
  55. package/dist/docs/assets/SOURCE_MAP.json +134 -134
  56. package/dist/evals/index.cjs +5 -5
  57. package/dist/evals/index.js +2 -2
  58. package/dist/evals/scoreTraces/index.cjs +3 -3
  59. package/dist/evals/scoreTraces/index.js +1 -1
  60. package/dist/harness/index.cjs +7 -7
  61. package/dist/harness/index.js +5 -5
  62. package/dist/index.cjs +2 -2
  63. package/dist/index.js +1 -1
  64. package/dist/llm/index.cjs +20 -20
  65. package/dist/llm/index.js +5 -5
  66. package/dist/llm/model/provider-types.generated.d.ts +2 -1
  67. package/dist/loop/index.cjs +14 -14
  68. package/dist/loop/index.js +1 -1
  69. package/dist/mastra/index.cjs +2 -2
  70. package/dist/mastra/index.js +1 -1
  71. package/dist/mastra-4PNTYVGX.js +3 -0
  72. package/dist/{mastra-GNYYE3LZ.js.map → mastra-4PNTYVGX.js.map} +1 -1
  73. package/dist/mastra-GD4IDWX2.cjs +12 -0
  74. package/dist/{mastra-TDQOUJVC.cjs.map → mastra-GD4IDWX2.cjs.map} +1 -1
  75. package/dist/memory/index.cjs +19 -19
  76. package/dist/memory/index.js +1 -1
  77. package/dist/models-dev-3XJMRBHD.js +3 -0
  78. package/dist/{models-dev-SWQOXATZ.js.map → models-dev-3XJMRBHD.js.map} +1 -1
  79. package/dist/models-dev-MO5D6ABH.cjs +12 -0
  80. package/dist/{models-dev-F44ZVNMB.cjs.map → models-dev-MO5D6ABH.cjs.map} +1 -1
  81. package/dist/netlify-7GWUCWBI.cjs +12 -0
  82. package/dist/{netlify-SM6JU5OO.cjs.map → netlify-7GWUCWBI.cjs.map} +1 -1
  83. package/dist/netlify-KWFGDMNK.js +3 -0
  84. package/dist/{netlify-CTXSBLLU.js.map → netlify-KWFGDMNK.js.map} +1 -1
  85. package/dist/processor-provider/index.cjs +10 -10
  86. package/dist/processor-provider/index.js +1 -1
  87. package/dist/processors/index.cjs +45 -45
  88. package/dist/processors/index.js +1 -1
  89. package/dist/provider-registry-IVDLHER6.js +3 -0
  90. package/dist/{provider-registry-CPP455MT.js.map → provider-registry-IVDLHER6.js.map} +1 -1
  91. package/dist/provider-registry-IXCOQD3Z.cjs +44 -0
  92. package/dist/{provider-registry-OKP5HT5E.cjs.map → provider-registry-IXCOQD3Z.cjs.map} +1 -1
  93. package/dist/provider-registry.json +4 -10
  94. package/dist/relevance/index.cjs +3 -3
  95. package/dist/relevance/index.js +1 -1
  96. package/dist/stream/index.cjs +8 -8
  97. package/dist/stream/index.js +1 -1
  98. package/dist/tool-loop-agent/index.cjs +4 -4
  99. package/dist/tool-loop-agent/index.js +1 -1
  100. package/dist/workflows/evented/index.cjs +10 -10
  101. package/dist/workflows/evented/index.js +1 -1
  102. package/dist/workflows/handlers/control-flow.d.ts.map +1 -1
  103. package/dist/workflows/index.cjs +24 -24
  104. package/dist/workflows/index.js +1 -1
  105. package/package.json +6 -6
  106. package/src/llm/model/provider-types.generated.d.ts +2 -1
  107. package/dist/chunk-2KWFY2Z4.cjs.map +0 -1
  108. package/dist/chunk-42ZT2Z2G.js.map +0 -1
  109. package/dist/chunk-CXW3Z2OL.js.map +0 -1
  110. package/dist/chunk-PBGNXXU5.cjs.map +0 -1
  111. package/dist/chunk-Q5JACXBM.cjs.map +0 -1
  112. package/dist/chunk-QNSBW2X4.js.map +0 -1
  113. package/dist/mastra-GNYYE3LZ.js +0 -3
  114. package/dist/mastra-TDQOUJVC.cjs +0 -12
  115. package/dist/models-dev-F44ZVNMB.cjs +0 -12
  116. package/dist/models-dev-SWQOXATZ.js +0 -3
  117. package/dist/netlify-CTXSBLLU.js +0 -3
  118. package/dist/netlify-SM6JU5OO.cjs +0 -12
  119. package/dist/provider-registry-CPP455MT.js +0 -3
  120. package/dist/provider-registry-OKP5HT5E.cjs +0 -44
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.26.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Update provider registry and model documentation with latest models and providers ([`f112db1`](https://github.com/mastra-ai/mastra/commit/f112db179557ae9b5a0f1d25dc47f928d7d61cd9))
8
+
9
+ - Fixed `foreach` parallel iterations losing their `suspendPayload` when a sibling iteration was resumed. Previously, every result entry written back to the workflow snapshot had its `suspendPayload` cleared, so iterations that were still suspended (e.g. parallel tool-call approvals each carrying an agent's `__streamState`) lost the context they needed to resume correctly. Suspended iterations now retain their `suspendPayload` across resume cycles; completed iterations still have it cleared to keep snapshots small. ([#15551](https://github.com/mastra-ai/mastra/pull/15551))
10
+
11
+ ```ts
12
+ const approvalWorkflow = createWorkflow({ id: 'approve' }).foreach(approveToolStep, { concurrency: 5 }).commit();
13
+
14
+ // Before: resuming the first approval wiped streamState on the others,
15
+ // so subsequent resumes lost conversation context.
16
+ // After: each suspended iteration keeps its suspendPayload (including
17
+ // streamState) until it is individually resumed.
18
+ ```
19
+
3
20
  ## 1.26.0
4
21
 
5
22
  ### Minor Changes
@@ -1,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkPBGNXXU5_cjs = require('../chunk-PBGNXXU5.cjs');
3
+ var chunk7432OHPH_cjs = require('../chunk-7432OHPH.cjs');
4
4
  var chunkUFKCK75F_cjs = require('../chunk-UFKCK75F.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkPBGNXXU5_cjs.Agent; }
10
+ get: function () { return chunk7432OHPH_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "TripWire", {
13
13
  enumerable: true,
14
- get: function () { return chunkPBGNXXU5_cjs.TripWire; }
14
+ get: function () { return chunk7432OHPH_cjs.TripWire; }
15
15
  });
16
16
  Object.defineProperty(exports, "isSupportedLanguageModel", {
17
17
  enumerable: true,
18
- get: function () { return chunkPBGNXXU5_cjs.isSupportedLanguageModel; }
18
+ get: function () { return chunk7432OHPH_cjs.isSupportedLanguageModel; }
19
19
  });
20
20
  Object.defineProperty(exports, "resolveThreadIdFromArgs", {
21
21
  enumerable: true,
22
- get: function () { return chunkPBGNXXU5_cjs.resolveThreadIdFromArgs; }
22
+ get: function () { return chunk7432OHPH_cjs.resolveThreadIdFromArgs; }
23
23
  });
24
24
  Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
25
25
  enumerable: true,
26
- get: function () { return chunkPBGNXXU5_cjs.supportedLanguageModelSpecifications; }
26
+ get: function () { return chunk7432OHPH_cjs.supportedLanguageModelSpecifications; }
27
27
  });
28
28
  Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
29
29
  enumerable: true,
30
- get: function () { return chunkPBGNXXU5_cjs.tryGenerateWithJsonFallback; }
30
+ get: function () { return chunk7432OHPH_cjs.tryGenerateWithJsonFallback; }
31
31
  });
32
32
  Object.defineProperty(exports, "tryStreamWithJsonFallback", {
33
33
  enumerable: true,
34
- get: function () { return chunkPBGNXXU5_cjs.tryStreamWithJsonFallback; }
34
+ get: function () { return chunk7432OHPH_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-CXW3Z2OL.js';
1
+ export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-4QTY73BW.js';
2
2
  export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-EFTNMBKQ.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 chunkPBGNXXU5_cjs = require('../chunk-PBGNXXU5.cjs');
3
+ var chunk7432OHPH_cjs = require('../chunk-7432OHPH.cjs');
4
4
  var chunkFCQNDFEW_cjs = require('../chunk-FCQNDFEW.cjs');
5
5
  var chunk7GW2TQXP_cjs = require('../chunk-7GW2TQXP.cjs');
6
6
  var fs = require('fs');
@@ -1145,7 +1145,7 @@ To fix this, either:
1145
1145
  */
1146
1146
  getInputProcessors(configuredProcessors = []) {
1147
1147
  const hasProcessor = configuredProcessors.some(
1148
- (p) => !chunkPBGNXXU5_cjs.isProcessorWorkflow(p) && "id" in p && p.id === "browser-context"
1148
+ (p) => !chunk7432OHPH_cjs.isProcessorWorkflow(p) && "id" in p && p.id === "browser-context"
1149
1149
  );
1150
1150
  if (hasProcessor) return [];
1151
1151
  return [new BrowserContextProcessor()];
@@ -1,4 +1,4 @@
1
- import { isProcessorWorkflow } from '../chunk-CXW3Z2OL.js';
1
+ import { isProcessorWorkflow } from '../chunk-4QTY73BW.js';
2
2
  import { MastraBase } from '../chunk-WENZPAHS.js';
3
3
  import { RegisteredLogger } from '../chunk-DBBWTK24.js';
4
4
  import { existsSync, readdirSync, lstatSync, unlinkSync } from 'fs';
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkPBGNXXU5_cjs = require('../chunk-PBGNXXU5.cjs');
3
+ var chunk7432OHPH_cjs = require('../chunk-7432OHPH.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "AgentChannels", {
8
8
  enumerable: true,
9
- get: function () { return chunkPBGNXXU5_cjs.AgentChannels; }
9
+ get: function () { return chunk7432OHPH_cjs.AgentChannels; }
10
10
  });
11
11
  Object.defineProperty(exports, "ChatChannelProcessor", {
12
12
  enumerable: true,
13
- get: function () { return chunkPBGNXXU5_cjs.ChatChannelProcessor; }
13
+ get: function () { return chunk7432OHPH_cjs.ChatChannelProcessor; }
14
14
  });
15
15
  Object.defineProperty(exports, "MastraStateAdapter", {
16
16
  enumerable: true,
17
- get: function () { return chunkPBGNXXU5_cjs.MastraStateAdapter; }
17
+ get: function () { return chunk7432OHPH_cjs.MastraStateAdapter; }
18
18
  });
19
19
  //# sourceMappingURL=index.cjs.map
20
20
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { AgentChannels, ChatChannelProcessor, MastraStateAdapter } from '../chunk-CXW3Z2OL.js';
1
+ export { AgentChannels, ChatChannelProcessor, MastraStateAdapter } from '../chunk-4QTY73BW.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -8,7 +8,7 @@ import { generateId, APICallError, tool, asSchema } from './chunk-6PALJNKG.js';
8
8
  import { noopLogger } from './chunk-7BVF2WMQ.js';
9
9
  import { EventEmitterPubSub } from './chunk-II5FASYS.js';
10
10
  import { executeHook } from './chunk-L54GIUCB.js';
11
- import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-ZOCCZPSK.js';
11
+ import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-BVXKM2NV.js';
12
12
  import { MastraLLMV1 } from './chunk-YHOV4F62.js';
13
13
  import { removeUndefinedValues, safeStringify, ensureToolProperties, makeCoreTool, createMastraProxy, deepMerge, generateEmptyFromSchema, selectFields, ensureSerializable, delay } from './chunk-XYWVTGZY.js';
14
14
  import { resolveObservabilityContext, createObservabilityContext, wrapMastra } from './chunk-WA5YOVRJ.js';
@@ -8098,7 +8098,7 @@ async function executeForeach(engine, params) {
8098
8098
  if (result?.output) {
8099
8099
  results[i + resultIndex] = result?.output;
8100
8100
  }
8101
- prevForeachOutput[i + resultIndex] = { ...result, suspendPayload: {} };
8101
+ prevForeachOutput[i + resultIndex] = result?.status === "suspended" ? result : { ...result, suspendPayload: {} };
8102
8102
  }
8103
8103
  if (Object.keys(foreachIndexObj).length > 0) {
8104
8104
  const suspendedIndices = Object.keys(foreachIndexObj).map(Number);
@@ -30729,5 +30729,5 @@ var MockMemory = class extends MastraMemory {
30729
30729
  };
30730
30730
 
30731
30731
  export { Agent, AgentChannels, AgentsMDInjector, BaseProcessor, BatchPartsProcessor, ChatChannelProcessor, ChunkFrom, DefaultExecutionEngine, ExecutionEngine, FilePartSchema, ImagePartSchema, LanguageDetector, MastraAgentNetworkStream, MastraMemory, MastraModelOutput, MastraScorer, MastraStateAdapter, MemoryProcessor, MessageContentSchema, MessageHistory, MessagePartSchema, MockMemory, ModerationProcessor, PIIDetector, PrefillErrorHandler, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ReasoningPartSchema, Run, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, SemanticRecall, SkillSearchProcessor, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, TripWire, UnicodeNormalizer, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, Workflow, WorkflowRunOutput, WorkingMemory, WorkspaceInstructionsProcessor, augmentWithInit, cleanStepResult, cloneStep, cloneWorkflow, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createDeprecationProxy, createScorer, createStep, createTimeTravelExecutionParams, createWorkflow, extractWorkingMemoryContent, extractWorkingMemoryTags, filterSystemReminderMessages, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, forwardAgentStreamChunk, generateFinalResult, generateStructuredFinalResult, getResumeLabelsByStepId, getStepIds, getStepResult, getThreadOMMetadata, globalEmbeddingCache, hydrateSerializedStepErrors, isObservationalMemoryEnabled, isProcessor, isProcessorWorkflow, isSupportedLanguageModel, isSystemReminderMessage, loop, mapVariable, memoryDefaultOptions, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, resolveThreadIdFromArgs, runChecks, runCompletionScorers, runCountDeprecationMessage, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation, setThreadOMMetadata, summarizeActiveToolsForSpan, summarizeProcessorModelForSpan, summarizeProcessorResultForSpan, summarizeProcessorToolsForSpan, summarizeToolChoiceForSpan, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback, validateStepInput, validateStepRequestContext, validateStepResumeData, validateStepStateData, validateStepSuspendData };
30732
- //# sourceMappingURL=chunk-CXW3Z2OL.js.map
30733
- //# sourceMappingURL=chunk-CXW3Z2OL.js.map
30732
+ //# sourceMappingURL=chunk-4QTY73BW.js.map
30733
+ //# sourceMappingURL=chunk-4QTY73BW.js.map