@mastra/core 0.9.3 → 0.9.4-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 (143) hide show
  1. package/a2a.d.ts +1 -0
  2. package/dist/a2a/index.cjs +79 -0
  3. package/dist/a2a/index.d.cts +780 -0
  4. package/dist/a2a/index.d.ts +780 -0
  5. package/dist/a2a/index.js +68 -0
  6. package/dist/agent/index.cjs +2 -2
  7. package/dist/agent/index.d.cts +4 -3
  8. package/dist/agent/index.d.ts +4 -3
  9. package/dist/agent/index.js +1 -1
  10. package/dist/{base-CeEVvwRi.d.ts → base-4Z34GQL8.d.ts} +1 -1
  11. package/dist/{base-BCnFhShR.d.ts → base-4hc3EYVz.d.ts} +144 -10
  12. package/dist/{base-VMWGZau0.d.cts → base-DvwYl4To.d.cts} +144 -10
  13. package/dist/{base-D9APQt4V.d.cts → base-H7siSAfu.d.cts} +1 -1
  14. package/dist/base.cjs +2 -2
  15. package/dist/base.d.cts +2 -2
  16. package/dist/base.d.ts +2 -2
  17. package/dist/base.js +1 -1
  18. package/dist/bundler/index.cjs +2 -2
  19. package/dist/bundler/index.d.cts +2 -2
  20. package/dist/bundler/index.d.ts +2 -2
  21. package/dist/bundler/index.js +1 -1
  22. package/dist/{chunk-NDAW47QQ.js → chunk-235X76GC.js} +1 -1
  23. package/dist/{chunk-BMSBIZKD.cjs → chunk-2GXSTMD7.cjs} +2 -2
  24. package/dist/{chunk-Q6ZDDQOB.js → chunk-2OC4YT6C.js} +1 -1
  25. package/dist/{chunk-R652KYQW.js → chunk-4OTKXCGD.js} +1 -1
  26. package/dist/{chunk-OGNJRWRQ.cjs → chunk-5DUFC7TV.cjs} +2 -2
  27. package/dist/{chunk-SONEVGEJ.js → chunk-62M2N34A.js} +1 -1
  28. package/dist/{chunk-QQFFJTJ4.cjs → chunk-7EXZJ7KS.cjs} +2 -2
  29. package/dist/{chunk-2BVZNKLX.js → chunk-CMPPXW4U.js} +2 -1
  30. package/dist/{chunk-CPONI4EX.js → chunk-CTKNWYK2.js} +1 -1
  31. package/dist/{chunk-JCBDQUQY.js → chunk-D6GO3MBG.js} +1 -1
  32. package/dist/{chunk-ZMMZXEOL.cjs → chunk-DFZXG6NK.cjs} +9 -9
  33. package/dist/{chunk-6NUAJ6AB.cjs → chunk-E4FAXBUV.cjs} +2 -2
  34. package/dist/{chunk-RO52JMKQ.cjs → chunk-EG74VBSP.cjs} +6 -6
  35. package/dist/{chunk-EYMLOJ2Q.js → chunk-EGZ7J727.js} +4 -4
  36. package/dist/{chunk-ZQ7FXUGY.js → chunk-GFFVEANU.js} +34 -22
  37. package/dist/{chunk-5ENQX4BI.cjs → chunk-GXKODTLA.cjs} +42 -9
  38. package/dist/{chunk-FXAV2WYX.cjs → chunk-IETVW7QJ.cjs} +35 -24
  39. package/dist/{chunk-QFJY3MEL.js → chunk-JBJ7KXN5.js} +1 -1
  40. package/dist/{chunk-6YITFTRU.cjs → chunk-KSCPMPZT.cjs} +2 -2
  41. package/dist/{chunk-TCL7XDJL.js → chunk-NLBJOFNG.js} +1 -1
  42. package/dist/{chunk-FVYYXFPR.js → chunk-NOPY74PV.js} +1 -1
  43. package/dist/{chunk-O7IW545H.cjs → chunk-O44MSFMZ.cjs} +2 -1
  44. package/dist/{chunk-2PLTE53B.cjs → chunk-OYK2RU6Y.cjs} +50 -25
  45. package/dist/{chunk-KPOUHZFJ.js → chunk-R2JX75H2.js} +3 -3
  46. package/dist/{chunk-RE5MNHDE.cjs → chunk-RAQBTCIR.cjs} +2 -2
  47. package/dist/{chunk-CRHH7KRS.cjs → chunk-RGE4UF6A.cjs} +2 -2
  48. package/dist/{chunk-KXWR3FNX.cjs → chunk-S7J63JOG.cjs} +2 -2
  49. package/dist/{chunk-IKZWOULI.js → chunk-SOLXHDNQ.js} +35 -2
  50. package/dist/{chunk-T5V4W7WU.js → chunk-TAFOICHR.js} +1 -1
  51. package/dist/{chunk-GUMHVPHG.cjs → chunk-V2Q2FEVO.cjs} +2 -2
  52. package/dist/{chunk-XYP6MY7U.js → chunk-VG2VXLOG.js} +34 -9
  53. package/dist/{chunk-37HZ77Z5.cjs → chunk-W3FGUGQZ.cjs} +11 -11
  54. package/dist/{chunk-DWD7X4KB.js → chunk-W4BSLENO.js} +1 -1
  55. package/dist/{chunk-ITFMXU6H.cjs → chunk-ZPFKNO6J.cjs} +2 -2
  56. package/dist/deployer/index.cjs +2 -2
  57. package/dist/deployer/index.d.cts +2 -2
  58. package/dist/deployer/index.d.ts +2 -2
  59. package/dist/deployer/index.js +1 -1
  60. package/dist/eval/index.d.cts +4 -3
  61. package/dist/eval/index.d.ts +4 -3
  62. package/dist/{index-CquI0inB.d.ts → index-QV27jkxQ.d.cts} +1 -0
  63. package/dist/{index-CquI0inB.d.cts → index-QV27jkxQ.d.ts} +1 -0
  64. package/dist/index.cjs +99 -99
  65. package/dist/index.d.cts +7 -6
  66. package/dist/index.d.ts +7 -6
  67. package/dist/index.js +18 -18
  68. package/dist/integration/index.cjs +3 -3
  69. package/dist/integration/index.d.cts +4 -3
  70. package/dist/integration/index.d.ts +4 -3
  71. package/dist/integration/index.js +1 -1
  72. package/dist/llm/index.d.cts +4 -3
  73. package/dist/llm/index.d.ts +4 -3
  74. package/dist/logger/index.cjs +9 -9
  75. package/dist/logger/index.d.cts +1 -1
  76. package/dist/logger/index.d.ts +1 -1
  77. package/dist/logger/index.js +1 -1
  78. package/dist/mastra/index.cjs +2 -2
  79. package/dist/mastra/index.d.cts +4 -3
  80. package/dist/mastra/index.d.ts +4 -3
  81. package/dist/mastra/index.js +1 -1
  82. package/dist/mcp/index.cjs +42 -0
  83. package/dist/mcp/index.d.cts +26 -0
  84. package/dist/mcp/index.d.ts +26 -0
  85. package/dist/mcp/index.js +40 -0
  86. package/dist/memory/index.cjs +4 -4
  87. package/dist/memory/index.d.cts +4 -3
  88. package/dist/memory/index.d.ts +4 -3
  89. package/dist/memory/index.js +1 -1
  90. package/dist/network/index.cjs +8 -8
  91. package/dist/network/index.d.cts +4 -3
  92. package/dist/network/index.d.ts +4 -3
  93. package/dist/network/index.js +4 -4
  94. package/dist/relevance/index.cjs +4 -4
  95. package/dist/relevance/index.d.cts +4 -3
  96. package/dist/relevance/index.d.ts +4 -3
  97. package/dist/relevance/index.js +1 -1
  98. package/dist/server/index.d.cts +4 -3
  99. package/dist/server/index.d.ts +4 -3
  100. package/dist/storage/index.cjs +2 -2
  101. package/dist/storage/index.d.cts +4 -3
  102. package/dist/storage/index.d.ts +4 -3
  103. package/dist/storage/index.js +1 -1
  104. package/dist/storage/libsql/index.cjs +2 -2
  105. package/dist/storage/libsql/index.d.cts +4 -3
  106. package/dist/storage/libsql/index.d.ts +4 -3
  107. package/dist/storage/libsql/index.js +1 -1
  108. package/dist/telemetry/index.d.cts +4 -3
  109. package/dist/telemetry/index.d.ts +4 -3
  110. package/dist/tools/index.cjs +4 -4
  111. package/dist/tools/index.d.cts +4 -3
  112. package/dist/tools/index.d.ts +4 -3
  113. package/dist/tools/index.js +1 -1
  114. package/dist/tts/index.cjs +2 -2
  115. package/dist/tts/index.d.cts +2 -2
  116. package/dist/tts/index.d.ts +2 -2
  117. package/dist/tts/index.js +1 -1
  118. package/dist/utils.cjs +12 -12
  119. package/dist/utils.d.cts +5 -4
  120. package/dist/utils.d.ts +5 -4
  121. package/dist/utils.js +1 -1
  122. package/dist/vector/index.cjs +2 -2
  123. package/dist/vector/index.d.cts +2 -2
  124. package/dist/vector/index.d.ts +2 -2
  125. package/dist/vector/index.js +1 -1
  126. package/dist/vector/libsql/index.cjs +3 -3
  127. package/dist/vector/libsql/index.d.cts +2 -2
  128. package/dist/vector/libsql/index.d.ts +2 -2
  129. package/dist/vector/libsql/index.js +1 -1
  130. package/dist/voice/index.cjs +4 -4
  131. package/dist/voice/index.d.cts +4 -3
  132. package/dist/voice/index.d.ts +4 -3
  133. package/dist/voice/index.js +1 -1
  134. package/dist/workflows/index.cjs +22 -22
  135. package/dist/workflows/index.d.cts +5 -4
  136. package/dist/workflows/index.d.ts +5 -4
  137. package/dist/workflows/index.js +1 -1
  138. package/dist/workflows/vNext/index.cjs +10 -10
  139. package/dist/workflows/vNext/index.d.cts +5 -4
  140. package/dist/workflows/vNext/index.d.ts +5 -4
  141. package/dist/workflows/vNext/index.js +4 -4
  142. package/mcp.d.ts +1 -0
  143. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- import { az as VariableReference, aG as StepResult, K as Step, L as Workflow, F as Agent, aJ as WorkflowContext, b3 as ToolsInput, a as Mastra, au as StepAction, aI as WorkflowRunResult } from '../base-BCnFhShR.js';
2
- export { aB as ActionContext, aA as BaseCondition, aP as DependencyCheckOutput, aW as ExtractSchemaFromStep, aZ as ExtractSchemaType, aX as ExtractStepResult, a_ as PathsToStringProps, aM as ResolverFunctionInput, aN as ResolverFunctionOutput, ay as RetryConfig, aE as StepCondition, aF as StepConfig, aD as StepDef, at as StepExecutionContext, ax as StepGraph, aV as StepId, aY as StepInputType, aw as StepNode, aQ as StepResolverOutput, av as StepVariableType, aH as StepsRecord, aO as SubscriberFunctionOutput, aC as WhenConditionReturnValue, aS as WorkflowActionParams, aT as WorkflowActions, aR as WorkflowActors, aL as WorkflowEvent, aK as WorkflowLogMessage, O as WorkflowOptions, b0 as WorkflowResumeResult, a$ as WorkflowRunState, aU as WorkflowState } from '../base-BCnFhShR.js';
1
+ import { aA as VariableReference, aH as StepResult, K as Step, L as Workflow, F as Agent, aK as WorkflowContext, b4 as ToolsInput, a as Mastra, av as StepAction, aJ as WorkflowRunResult } from '../base-4hc3EYVz.js';
2
+ export { aC as ActionContext, aB as BaseCondition, aQ as DependencyCheckOutput, aX as ExtractSchemaFromStep, a_ as ExtractSchemaType, aY as ExtractStepResult, a$ as PathsToStringProps, aN as ResolverFunctionInput, aO as ResolverFunctionOutput, az as RetryConfig, aF as StepCondition, aG as StepConfig, aE as StepDef, au as StepExecutionContext, ay as StepGraph, aW as StepId, aZ as StepInputType, ax as StepNode, aR as StepResolverOutput, aw as StepVariableType, aI as StepsRecord, aP as SubscriberFunctionOutput, aD as WhenConditionReturnValue, aT as WorkflowActionParams, aU as WorkflowActions, aS as WorkflowActors, aM as WorkflowEvent, aL as WorkflowLogMessage, O as WorkflowOptions, b1 as WorkflowResumeResult, b0 as WorkflowRunState, aV as WorkflowState } from '../base-4hc3EYVz.js';
3
3
  import { z } from 'zod';
4
4
  import { a as Metric } from '../types-BtMyV38I.js';
5
- import { L as Logger } from '../index-CquI0inB.js';
6
- import '../base-CeEVvwRi.js';
5
+ import { L as Logger } from '../index-QV27jkxQ.js';
6
+ import '../base-4Z34GQL8.js';
7
7
  import 'ai';
8
8
  import 'sift';
9
9
  import 'json-schema';
@@ -17,6 +17,7 @@ import 'stream';
17
17
  import 'pino';
18
18
  import '@opentelemetry/sdk-trace-base';
19
19
  import '../tts/index.js';
20
+ import 'node:http';
20
21
  import 'events';
21
22
  import '../deployer/index.js';
22
23
  import '../bundler/index.js';
@@ -1 +1 @@
1
- export { Step, WhenConditionReturnValue, Workflow, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from '../chunk-XYP6MY7U.js';
1
+ export { Step, WhenConditionReturnValue, Workflow, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from '../chunk-VG2VXLOG.js';
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunk2PLTE53B_cjs = require('../../chunk-2PLTE53B.cjs');
4
- var chunkFXAV2WYX_cjs = require('../../chunk-FXAV2WYX.cjs');
5
- var chunkRO52JMKQ_cjs = require('../../chunk-RO52JMKQ.cjs');
6
- var chunkO7IW545H_cjs = require('../../chunk-O7IW545H.cjs');
3
+ var chunkOYK2RU6Y_cjs = require('../../chunk-OYK2RU6Y.cjs');
4
+ var chunkIETVW7QJ_cjs = require('../../chunk-IETVW7QJ.cjs');
5
+ var chunkEG74VBSP_cjs = require('../../chunk-EG74VBSP.cjs');
6
+ var chunkO44MSFMZ_cjs = require('../../chunk-O44MSFMZ.cjs');
7
7
  var chunkLABUWBKX_cjs = require('../../chunk-LABUWBKX.cjs');
8
8
  var crypto = require('crypto');
9
9
  var EventEmitter = require('events');
@@ -15,10 +15,10 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
15
  var EventEmitter__default = /*#__PURE__*/_interopDefault(EventEmitter);
16
16
 
17
17
  // src/workflows/vNext/execution-engine.ts
18
- var ExecutionEngine = class extends chunkRO52JMKQ_cjs.MastraBase {
18
+ var ExecutionEngine = class extends chunkEG74VBSP_cjs.MastraBase {
19
19
  mastra;
20
20
  constructor({ mastra }) {
21
- super({ name: "ExecutionEngine", component: chunkO7IW545H_cjs.RegisteredLogger.WORKFLOW });
21
+ super({ name: "ExecutionEngine", component: chunkO44MSFMZ_cjs.RegisteredLogger.WORKFLOW });
22
22
  this.mastra = mastra;
23
23
  }
24
24
  __registerMastra(mastra) {
@@ -649,7 +649,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
649
649
 
650
650
  // src/workflows/vNext/workflow.ts
651
651
  function createStep(params) {
652
- if (params instanceof chunk2PLTE53B_cjs.Agent) {
652
+ if (params instanceof chunkOYK2RU6Y_cjs.Agent) {
653
653
  return {
654
654
  id: params.name,
655
655
  // @ts-ignore
@@ -673,7 +673,7 @@ function createStep(params) {
673
673
  }
674
674
  };
675
675
  }
676
- if (params instanceof chunkFXAV2WYX_cjs.Tool) {
676
+ if (params instanceof chunkIETVW7QJ_cjs.Tool) {
677
677
  if (!params.inputSchema || !params.outputSchema) {
678
678
  throw new Error("Tool must have input and output schemas defined");
679
679
  }
@@ -725,7 +725,7 @@ function cloneWorkflow(workflow, opts) {
725
725
  wf.commit();
726
726
  return wf;
727
727
  }
728
- var NewWorkflow = class extends chunkRO52JMKQ_cjs.MastraBase {
728
+ var NewWorkflow = class extends chunkEG74VBSP_cjs.MastraBase {
729
729
  id;
730
730
  description;
731
731
  inputSchema;
@@ -749,7 +749,7 @@ var NewWorkflow = class extends chunkRO52JMKQ_cjs.MastraBase {
749
749
  retryConfig,
750
750
  steps
751
751
  }) {
752
- super({ name: id, component: chunkO7IW545H_cjs.RegisteredLogger.WORKFLOW });
752
+ super({ name: id, component: chunkO44MSFMZ_cjs.RegisteredLogger.WORKFLOW });
753
753
  this.id = id;
754
754
  this.description = description;
755
755
  this.inputSchema = inputSchema;
@@ -1,10 +1,10 @@
1
- import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-VMWGZau0.cjs';
2
- export { D as DynamicMapping, z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-VMWGZau0.cjs';
1
+ import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-DvwYl4To.cjs';
2
+ export { D as DynamicMapping, z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-DvwYl4To.cjs';
3
3
  import { Span } from '@opentelemetry/api';
4
4
  import { RuntimeContext } from '../../runtime-context/index.cjs';
5
5
  import 'ai';
6
- import '../../base-D9APQt4V.cjs';
7
- import '../../index-CquI0inB.cjs';
6
+ import '../../base-H7siSAfu.cjs';
7
+ import '../../index-QV27jkxQ.cjs';
8
8
  import 'stream';
9
9
  import 'pino';
10
10
  import '@opentelemetry/sdk-trace-base';
@@ -17,6 +17,7 @@ import 'node:events';
17
17
  import '../../vector/index.cjs';
18
18
  import '../../vector/filter/index.cjs';
19
19
  import '../../tts/index.cjs';
20
+ import 'node:http';
20
21
  import 'events';
21
22
  import '../../deployer/index.cjs';
22
23
  import '../../bundler/index.cjs';
@@ -1,10 +1,10 @@
1
- import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-BCnFhShR.js';
2
- export { D as DynamicMapping, z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-BCnFhShR.js';
1
+ import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-4hc3EYVz.js';
2
+ export { D as DynamicMapping, z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-4hc3EYVz.js';
3
3
  import { Span } from '@opentelemetry/api';
4
4
  import { RuntimeContext } from '../../runtime-context/index.js';
5
5
  import 'ai';
6
- import '../../base-CeEVvwRi.js';
7
- import '../../index-CquI0inB.js';
6
+ import '../../base-4Z34GQL8.js';
7
+ import '../../index-QV27jkxQ.js';
8
8
  import 'stream';
9
9
  import 'pino';
10
10
  import '@opentelemetry/sdk-trace-base';
@@ -17,6 +17,7 @@ import 'node:events';
17
17
  import '../../vector/index.js';
18
18
  import '../../vector/filter/index.js';
19
19
  import '../../tts/index.js';
20
+ import 'node:http';
20
21
  import 'events';
21
22
  import '../../deployer/index.js';
22
23
  import '../../bundler/index.js';
@@ -1,7 +1,7 @@
1
- import { Agent } from '../../chunk-XYP6MY7U.js';
2
- import { Tool } from '../../chunk-ZQ7FXUGY.js';
3
- import { MastraBase } from '../../chunk-NDAW47QQ.js';
4
- import { RegisteredLogger } from '../../chunk-2BVZNKLX.js';
1
+ import { Agent } from '../../chunk-VG2VXLOG.js';
2
+ import { Tool } from '../../chunk-GFFVEANU.js';
3
+ import { MastraBase } from '../../chunk-235X76GC.js';
4
+ import { RegisteredLogger } from '../../chunk-CMPPXW4U.js';
5
5
  import { RuntimeContext } from '../../chunk-SGGPJWRQ.js';
6
6
  import { randomUUID } from 'crypto';
7
7
  import EventEmitter from 'events';
package/mcp.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/mcp';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/core",
3
- "version": "0.9.3",
3
+ "version": "0.9.4-alpha.1",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -135,7 +135,7 @@
135
135
  "zod-to-json-schema": "^3.24.5"
136
136
  },
137
137
  "peerDependencies": {
138
- "zod": "^3.24.0"
138
+ "zod": "^3.0.0"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@ai-sdk/openai": "^1.3.20",