@mastra/core 1.1.0-alpha.0 → 1.1.0-alpha.1

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 (129) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-Z3XVFOTH.js → chunk-64LMKFD3.js} +4 -4
  5. package/dist/{chunk-Z3XVFOTH.js.map → chunk-64LMKFD3.js.map} +1 -1
  6. package/dist/{chunk-WBJMSOYD.cjs → chunk-66462UTX.cjs} +192 -140
  7. package/dist/chunk-66462UTX.cjs.map +1 -0
  8. package/dist/{chunk-N2FELMHU.cjs → chunk-BKUNHQZ4.cjs} +57 -24
  9. package/dist/chunk-BKUNHQZ4.cjs.map +1 -0
  10. package/dist/{chunk-DXTYXWYM.cjs → chunk-C6YO523J.cjs} +7 -7
  11. package/dist/{chunk-DXTYXWYM.cjs.map → chunk-C6YO523J.cjs.map} +1 -1
  12. package/dist/{chunk-OZFBUMI3.cjs → chunk-EZWVMAC6.cjs} +7 -7
  13. package/dist/{chunk-OZFBUMI3.cjs.map → chunk-EZWVMAC6.cjs.map} +1 -1
  14. package/dist/{chunk-ACEGVEZF.js → chunk-H4C5NORS.js} +66 -46
  15. package/dist/chunk-H4C5NORS.js.map +1 -0
  16. package/dist/{chunk-5VWOGZLE.js → chunk-HKD4NSHR.js} +49 -16
  17. package/dist/chunk-HKD4NSHR.js.map +1 -0
  18. package/dist/{chunk-3CXWVB55.cjs → chunk-IKS5Z56O.cjs} +39 -36
  19. package/dist/{chunk-3CXWVB55.cjs.map → chunk-IKS5Z56O.cjs.map} +1 -1
  20. package/dist/{chunk-YETWOFQL.js → chunk-KPIJA2R5.js} +21 -31
  21. package/dist/chunk-KPIJA2R5.js.map +1 -0
  22. package/dist/{chunk-XSRROONT.cjs → chunk-LMNHODU4.cjs} +5 -5
  23. package/dist/{chunk-XSRROONT.cjs.map → chunk-LMNHODU4.cjs.map} +1 -1
  24. package/dist/{chunk-ZZCLGEMJ.js → chunk-NVRAVZZM.js} +192 -139
  25. package/dist/chunk-NVRAVZZM.js.map +1 -0
  26. package/dist/{chunk-6FHHT22W.cjs → chunk-O7II2PSR.cjs} +44 -44
  27. package/dist/{chunk-6FHHT22W.cjs.map → chunk-O7II2PSR.cjs.map} +1 -1
  28. package/dist/{chunk-ARMHYWF5.js → chunk-QT56V3PE.js} +4 -4
  29. package/dist/{chunk-ARMHYWF5.js.map → chunk-QT56V3PE.js.map} +1 -1
  30. package/dist/{chunk-TV4DA7RI.cjs → chunk-RIPKI7ON.cjs} +21 -31
  31. package/dist/chunk-RIPKI7ON.cjs.map +1 -0
  32. package/dist/{chunk-5BEYS33K.js → chunk-RQGER4J4.js} +3 -3
  33. package/dist/{chunk-5BEYS33K.js.map → chunk-RQGER4J4.js.map} +1 -1
  34. package/dist/{chunk-REH5FX2O.js → chunk-SFICZTYL.js} +28 -25
  35. package/dist/chunk-SFICZTYL.js.map +1 -0
  36. package/dist/{chunk-CEYA6FNF.js → chunk-SJUNV5AS.js} +3 -3
  37. package/dist/{chunk-CEYA6FNF.js.map → chunk-SJUNV5AS.js.map} +1 -1
  38. package/dist/{chunk-ETSBNSRY.cjs → chunk-TO7IB5JE.cjs} +17 -9
  39. package/dist/chunk-TO7IB5JE.cjs.map +1 -0
  40. package/dist/{chunk-QGVPEZ5T.js → chunk-UJRSZGKO.js} +16 -8
  41. package/dist/chunk-UJRSZGKO.js.map +1 -0
  42. package/dist/{chunk-RFTFSXJY.cjs → chunk-YSFYUEEG.cjs} +72 -52
  43. package/dist/chunk-YSFYUEEG.cjs.map +1 -0
  44. package/dist/docs/README.md +1 -1
  45. package/dist/docs/SKILL.md +1 -1
  46. package/dist/docs/SOURCE_MAP.json +271 -271
  47. package/dist/docs/agents/01-overview.md +2 -2
  48. package/dist/docs/evals/01-overview.md +5 -5
  49. package/dist/docs/mcp/01-overview.md +2 -2
  50. package/dist/docs/observability/01-overview.md +1 -1
  51. package/dist/docs/observability/03-overview.md +3 -3
  52. package/dist/docs/rag/01-overview.md +1 -1
  53. package/dist/docs/tools-mcp/01-mcp-overview.md +2 -2
  54. package/dist/docs/voice/01-overview.md +1 -1
  55. package/dist/docs/workflows/01-overview.md +5 -5
  56. package/dist/docs/workspace/01-overview.md +32 -29
  57. package/dist/docs/workspace/02-filesystem.md +13 -0
  58. package/dist/docs/workspace/03-sandbox.md +11 -4
  59. package/dist/docs/workspace/05-search.md +1 -1
  60. package/dist/docs/workspace/06-reference.md +304 -12
  61. package/dist/evals/index.cjs +20 -20
  62. package/dist/evals/index.js +3 -3
  63. package/dist/evals/scoreTraces/index.cjs +5 -5
  64. package/dist/evals/scoreTraces/index.js +2 -2
  65. package/dist/index.cjs +2 -2
  66. package/dist/index.js +1 -1
  67. package/dist/llm/index.cjs +9 -9
  68. package/dist/llm/index.js +2 -2
  69. package/dist/llm/model/provider-types.generated.d.ts +6 -2
  70. package/dist/loop/index.cjs +12 -12
  71. package/dist/loop/index.js +1 -1
  72. package/dist/loop/network/index.d.ts.map +1 -1
  73. package/dist/mastra/index.cjs +2 -2
  74. package/dist/mastra/index.d.ts +3 -3
  75. package/dist/mastra/index.d.ts.map +1 -1
  76. package/dist/mastra/index.js +1 -1
  77. package/dist/memory/index.cjs +11 -11
  78. package/dist/memory/index.js +1 -1
  79. package/dist/processors/index.cjs +40 -40
  80. package/dist/processors/index.js +1 -1
  81. package/dist/provider-registry-JZ6QRIVL.cjs +40 -0
  82. package/dist/{provider-registry-63ZEAPKK.cjs.map → provider-registry-JZ6QRIVL.cjs.map} +1 -1
  83. package/dist/provider-registry-SQTJTKSM.js +3 -0
  84. package/dist/{provider-registry-4RA5NQGH.js.map → provider-registry-SQTJTKSM.js.map} +1 -1
  85. package/dist/provider-registry.json +14 -6
  86. package/dist/relevance/index.cjs +3 -3
  87. package/dist/relevance/index.js +1 -1
  88. package/dist/storage/constants.cjs +16 -16
  89. package/dist/storage/constants.d.ts.map +1 -1
  90. package/dist/storage/constants.js +1 -1
  91. package/dist/storage/domains/agents/base.d.ts +17 -23
  92. package/dist/storage/domains/agents/base.d.ts.map +1 -1
  93. package/dist/storage/domains/agents/inmemory.d.ts +1 -1
  94. package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
  95. package/dist/storage/index.cjs +101 -101
  96. package/dist/storage/index.js +2 -2
  97. package/dist/storage/types.d.ts +53 -37
  98. package/dist/storage/types.d.ts.map +1 -1
  99. package/dist/stream/index.cjs +8 -8
  100. package/dist/stream/index.js +1 -1
  101. package/dist/tool-loop-agent/index.cjs +4 -4
  102. package/dist/tool-loop-agent/index.js +1 -1
  103. package/dist/vector/index.cjs +7 -7
  104. package/dist/vector/index.js +1 -1
  105. package/dist/workflows/evented/index.cjs +10 -10
  106. package/dist/workflows/evented/index.js +1 -1
  107. package/dist/workflows/index.cjs +24 -24
  108. package/dist/workflows/index.js +1 -1
  109. package/dist/workspace/index.cjs +32 -32
  110. package/dist/workspace/index.js +1 -1
  111. package/dist/workspace/skills/schemas.d.ts +17 -47
  112. package/dist/workspace/skills/schemas.d.ts.map +1 -1
  113. package/dist/workspace/skills/types.d.ts +4 -4
  114. package/dist/workspace/skills/types.d.ts.map +1 -1
  115. package/package.json +4 -4
  116. package/src/llm/model/provider-types.generated.d.ts +6 -2
  117. package/dist/chunk-5VWOGZLE.js.map +0 -1
  118. package/dist/chunk-ACEGVEZF.js.map +0 -1
  119. package/dist/chunk-ETSBNSRY.cjs.map +0 -1
  120. package/dist/chunk-N2FELMHU.cjs.map +0 -1
  121. package/dist/chunk-QGVPEZ5T.js.map +0 -1
  122. package/dist/chunk-REH5FX2O.js.map +0 -1
  123. package/dist/chunk-RFTFSXJY.cjs.map +0 -1
  124. package/dist/chunk-TV4DA7RI.cjs.map +0 -1
  125. package/dist/chunk-WBJMSOYD.cjs.map +0 -1
  126. package/dist/chunk-YETWOFQL.js.map +0 -1
  127. package/dist/chunk-ZZCLGEMJ.js.map +0 -1
  128. package/dist/provider-registry-4RA5NQGH.js +0 -3
  129. package/dist/provider-registry-63ZEAPKK.cjs +0 -40
@@ -1,11 +1,11 @@
1
- import { extractLines, createWorkspaceTools } from './chunk-ZZCLGEMJ.js';
1
+ import { extractLines, createWorkspaceTools } from './chunk-NVRAVZZM.js';
2
2
  import { DefaultVoice } from './chunk-MQB7XFXP.js';
3
3
  import { PUBSUB_SYMBOL, STREAM_FORMAT_SYMBOL } from './chunk-YEQB4VUA.js';
4
- import { InMemoryStore } from './chunk-ACEGVEZF.js';
4
+ import { InMemoryStore } from './chunk-H4C5NORS.js';
5
5
  import { MessageList, coreContentToString, DefaultGeneratedFile, DefaultGeneratedFileWithType } from './chunk-HIP5W3LZ.js';
6
6
  import { parsePartialJson, isDeepEqualData, stepCountIs } from './chunk-UTLWS5LV.js';
7
7
  import { generateId, asSchema, jsonSchema, APICallError, tool } from './chunk-CPLRD2VP.js';
8
- import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-5BEYS33K.js';
8
+ import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-RQGER4J4.js';
9
9
  import { MastraLLMV1 } from './chunk-2CVY7S66.js';
10
10
  import { noopLogger } from './chunk-PSCMWPLC.js';
11
11
  import { PubSub } from './chunk-BVUMKER5.js';
@@ -14214,17 +14214,19 @@ async function createNetworkLoop({
14214
14214
  let input;
14215
14215
  try {
14216
14216
  input = JSON.parse(inputData.prompt);
14217
- } catch (e) {
14218
- const mastraError = new MastraError(
14219
- {
14220
- id: "WORKFLOW_EXECUTION_STEP_INVALID_TASK_INPUT",
14221
- domain: "AGENT_NETWORK" /* AGENT_NETWORK */,
14222
- category: "USER" /* USER */,
14223
- text: `Invalid task input: ${inputData.task}`
14224
- },
14225
- e
14217
+ } catch {
14218
+ const logger = mastra?.getLogger();
14219
+ logger?.warn(
14220
+ `Workflow execution step received invalid JSON prompt for workflow "${inputData.primitiveId}". Prompt was: "${inputData.prompt}". Returning error to routing agent for retry.`
14226
14221
  );
14227
- throw mastraError;
14222
+ return {
14223
+ task: inputData.task,
14224
+ primitiveId: inputData.primitiveId,
14225
+ primitiveType: inputData.primitiveType,
14226
+ result: `Error: The prompt provided for workflow "${inputData.primitiveId}" is not valid JSON. Received: "${inputData.prompt}". Workflows require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,
14227
+ isComplete: false,
14228
+ iteration: inputData.iteration
14229
+ };
14228
14230
  }
14229
14231
  const stepId = generateId2({
14230
14232
  idType: "step",
@@ -14511,17 +14513,18 @@ async function createNetworkLoop({
14511
14513
  let inputDataToUse;
14512
14514
  try {
14513
14515
  inputDataToUse = JSON.parse(inputData.prompt);
14514
- } catch (e) {
14515
- const mastraError = new MastraError(
14516
- {
14517
- id: "AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",
14518
- domain: "AGENT_NETWORK" /* AGENT_NETWORK */,
14519
- category: "USER" /* USER */,
14520
- text: `Invalid task input: ${inputData.task}`
14521
- },
14522
- e
14516
+ } catch {
14517
+ logger?.warn(
14518
+ `Tool execution step received invalid JSON prompt for tool "${toolId}". Prompt was: "${inputData.prompt}". Returning error to routing agent for retry.`
14523
14519
  );
14524
- throw mastraError;
14520
+ return {
14521
+ task: inputData.task,
14522
+ primitiveId: inputData.primitiveId,
14523
+ primitiveType: inputData.primitiveType,
14524
+ result: `Error: The prompt provided for tool "${toolId}" is not valid JSON. Received: "${inputData.prompt}". Tools require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,
14525
+ isComplete: false,
14526
+ iteration: inputData.iteration
14527
+ };
14525
14528
  }
14526
14529
  const toolCallId = generateId2({
14527
14530
  idType: "step",
@@ -24025,5 +24028,5 @@ var MockMemory = class extends MastraMemory {
24025
24028
  };
24026
24029
 
24027
24030
  export { Agent, BaseProcessor, BatchPartsProcessor, ChunkFrom, DefaultExecutionEngine, EventEmitterPubSub, ExecutionEngine, FilePartSchema, ImagePartSchema, LanguageDetector, MastraAgentNetworkStream, MastraMemory, MastraModelOutput, MastraScorer, MemoryProcessor, MessageContentSchema, MessageHistory, MessagePartSchema, MockMemory, ModerationProcessor, PIIDetector, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ReasoningPartSchema, Run, SemanticRecall, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, TripWire, UnicodeNormalizer, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, Workflow, WorkflowRunOutput, WorkingMemory, augmentWithInit, cloneStep, cloneWorkflow, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createDeprecationProxy, createScorer, createStep, createTimeTravelExecutionParams, createWorkflow, extractWorkingMemoryContent, extractWorkingMemoryTags, formatCheckFeedback, formatCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, getResumeLabelsByStepId, getStepIds, getStepResult, getZodErrors, globalEmbeddingCache, hydrateSerializedStepErrors, isProcessor, isProcessorWorkflow, isSupportedLanguageModel, loop, mapVariable, memoryDefaultOptions, parseMemoryRequestContext, removeWorkingMemoryTags, resolveThreadIdFromArgs, runChecks, runCompletionScorers, runCountDeprecationMessage, runDefaultCompletionCheck, runValidation, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback, validateStepInput, validateStepRequestContext, validateStepResumeData, validateStepStateData, validateStepSuspendData };
24028
- //# sourceMappingURL=chunk-REH5FX2O.js.map
24029
- //# sourceMappingURL=chunk-REH5FX2O.js.map
24031
+ //# sourceMappingURL=chunk-SFICZTYL.js.map
24032
+ //# sourceMappingURL=chunk-SFICZTYL.js.map