@mastra/core 0.9.1 → 0.9.2-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 (55) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.d.cts +1 -1
  3. package/dist/agent/index.d.ts +1 -1
  4. package/dist/agent/index.js +1 -1
  5. package/dist/{base-QJ_GwQxQ.d.cts → base-DI6ChaUK.d.cts} +35 -1
  6. package/dist/{base-BS0LLAna.d.ts → base-bWFiU8RL.d.ts} +35 -1
  7. package/dist/{chunk-7PRLYMXV.cjs → chunk-3BKYXIDL.cjs} +3 -0
  8. package/dist/{chunk-FA7FWCKH.js → chunk-GKTDO6XW.js} +1 -1
  9. package/dist/{chunk-ZWALP7T2.cjs → chunk-UPEXV5RA.cjs} +2 -2
  10. package/dist/{chunk-H2UWWO4L.js → chunk-UQ2VDYKC.js} +3 -0
  11. package/dist/eval/index.d.cts +1 -1
  12. package/dist/eval/index.d.ts +1 -1
  13. package/dist/index.cjs +27 -27
  14. package/dist/index.d.cts +2 -2
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.js +3 -3
  17. package/dist/integration/index.d.cts +1 -1
  18. package/dist/integration/index.d.ts +1 -1
  19. package/dist/llm/index.d.cts +1 -1
  20. package/dist/llm/index.d.ts +1 -1
  21. package/dist/mastra/index.d.cts +1 -1
  22. package/dist/mastra/index.d.ts +1 -1
  23. package/dist/memory/index.d.cts +1 -1
  24. package/dist/memory/index.d.ts +1 -1
  25. package/dist/network/index.cjs +2 -2
  26. package/dist/network/index.d.cts +1 -1
  27. package/dist/network/index.d.ts +1 -1
  28. package/dist/network/index.js +1 -1
  29. package/dist/relevance/index.cjs +4 -4
  30. package/dist/relevance/index.d.cts +1 -1
  31. package/dist/relevance/index.d.ts +1 -1
  32. package/dist/relevance/index.js +1 -1
  33. package/dist/server/index.d.cts +1 -1
  34. package/dist/server/index.d.ts +1 -1
  35. package/dist/storage/index.d.cts +1 -1
  36. package/dist/storage/index.d.ts +1 -1
  37. package/dist/storage/libsql/index.d.cts +1 -1
  38. package/dist/storage/libsql/index.d.ts +1 -1
  39. package/dist/telemetry/index.d.cts +1 -1
  40. package/dist/telemetry/index.d.ts +1 -1
  41. package/dist/tools/index.d.cts +1 -1
  42. package/dist/tools/index.d.ts +1 -1
  43. package/dist/utils.d.cts +1 -1
  44. package/dist/utils.d.ts +1 -1
  45. package/dist/voice/index.d.cts +1 -1
  46. package/dist/voice/index.d.ts +1 -1
  47. package/dist/workflows/index.cjs +22 -22
  48. package/dist/workflows/index.d.cts +2 -2
  49. package/dist/workflows/index.d.ts +2 -2
  50. package/dist/workflows/index.js +1 -1
  51. package/dist/workflows/vNext/index.cjs +82 -2
  52. package/dist/workflows/vNext/index.d.cts +2 -2
  53. package/dist/workflows/vNext/index.d.ts +2 -2
  54. package/dist/workflows/vNext/index.js +81 -1
  55. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk7PRLYMXV_cjs = require('../chunk-7PRLYMXV.cjs');
3
+ var chunk3BKYXIDL_cjs = require('../chunk-3BKYXIDL.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Agent", {
8
8
  enumerable: true,
9
- get: function () { return chunk7PRLYMXV_cjs.Agent; }
9
+ get: function () { return chunk3BKYXIDL_cjs.Agent; }
10
10
  });
@@ -1,7 +1,7 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as Agent, C as AgentConfig, bb as AgentGenerateOptions, bc as AgentStreamOptions, ba as DynamicArgument, a_ as MastraLanguageModel, a$ as ToolsInput, b9 as ToolsetsInput } from '../base-QJ_GwQxQ.cjs';
4
+ export { D as Agent, F as AgentConfig, bd as AgentGenerateOptions, be as AgentStreamOptions, bc as DynamicArgument, b0 as MastraLanguageModel, b1 as ToolsInput, bb as ToolsetsInput } from '../base-DI6ChaUK.cjs';
5
5
  import '../base-BihKcqDY.cjs';
6
6
  import '../types-BtMyV38I.cjs';
7
7
  import '../runtime-context/index.cjs';
@@ -1,7 +1,7 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as Agent, C as AgentConfig, bb as AgentGenerateOptions, bc as AgentStreamOptions, ba as DynamicArgument, a_ as MastraLanguageModel, a$ as ToolsInput, b9 as ToolsetsInput } from '../base-BS0LLAna.js';
4
+ export { D as Agent, F as AgentConfig, bd as AgentGenerateOptions, be as AgentStreamOptions, bc as DynamicArgument, b0 as MastraLanguageModel, b1 as ToolsInput, bb as ToolsetsInput } from '../base-bWFiU8RL.js';
5
5
  import '../base-DT2poiVK.js';
6
6
  import '../types-BtMyV38I.js';
7
7
  import '../runtime-context/index.js';
@@ -1 +1 @@
1
- export { Agent } from '../chunk-H2UWWO4L.js';
1
+ export { Agent } from '../chunk-UQ2VDYKC.js';
@@ -1271,6 +1271,38 @@ type StepFlowEntry = {
1271
1271
  concurrency: number;
1272
1272
  };
1273
1273
  };
1274
+ type SerializedStep = Pick<NewStep, 'id' | 'description'> & {
1275
+ component?: string;
1276
+ stepFlow?: SerializedStepFlowEntry[];
1277
+ };
1278
+ type SerializedStepFlowEntry = {
1279
+ type: 'step';
1280
+ step: SerializedStep;
1281
+ } | {
1282
+ type: 'parallel';
1283
+ steps: SerializedStepFlowEntry[];
1284
+ } | {
1285
+ type: 'conditional';
1286
+ steps: SerializedStepFlowEntry[];
1287
+ serializedConditions: {
1288
+ id: string;
1289
+ fn: string;
1290
+ }[];
1291
+ } | {
1292
+ type: 'loop';
1293
+ step: SerializedStep;
1294
+ serializedCondition: {
1295
+ id: string;
1296
+ fn: string;
1297
+ };
1298
+ loopType: 'dowhile' | 'dountil';
1299
+ } | {
1300
+ type: 'foreach';
1301
+ step: SerializedStep;
1302
+ opts: {
1303
+ concurrency: number;
1304
+ };
1305
+ };
1274
1306
  /**
1275
1307
  * Creates a new workflow step
1276
1308
  * @param params Configuration parameters for the step
@@ -1348,6 +1380,7 @@ declare class NewWorkflow<TSteps extends NewStep<string, any, any, any, any>[] =
1348
1380
  steps: Record<string, NewStep<string, any, any, any, any>>;
1349
1381
  stepDefs?: TSteps;
1350
1382
  protected stepFlow: StepFlowEntry[];
1383
+ protected serializedStepFlow: SerializedStepFlowEntry[];
1351
1384
  protected executionEngine: ExecutionEngine;
1352
1385
  protected executionGraph: ExecutionGraph;
1353
1386
  protected retryConfig: {
@@ -1462,6 +1495,7 @@ declare class NewWorkflow<TSteps extends NewStep<string, any, any, any, any>[] =
1462
1495
  */
1463
1496
  commit(): NewWorkflow<TSteps, TWorkflowId, TInput, TOutput, TOutput>;
1464
1497
  get stepGraph(): StepFlowEntry[];
1498
+ get serializedStepGraph(): SerializedStepFlowEntry[];
1465
1499
  /**
1466
1500
  * Creates a new workflow run instance
1467
1501
  * @param options Optional configuration for the run
@@ -2674,4 +2708,4 @@ declare abstract class MastraStorage extends MastraBase {
2674
2708
  }): Promise<WorkflowRun | null>;
2675
2709
  }
2676
2710
 
2677
- export { type BaseStructuredOutputType as $, type ApiRoute as A, Agent as B, type AgentConfig as C, MastraMemory as D, type EvalRow as E, type ToolExecutionContext as F, Tool as G, Step as H, Workflow as I, type WorkflowOptions as J, type CoreMessage as K, type LanguageModel as L, type Methods as M, type NewStep as N, type CoreSystemMessage as O, type PathsToStringProps as P, type CoreAssistantMessage as Q, Run as R, type StorageColumn as S, type TABLE_NAMES as T, type CoreUserMessage as U, type VariableReference as V, type WorkflowRuns as W, type CoreToolMessage as X, type EmbedResult as Y, type ZodPathType as Z, type EmbedManyResult as _, Mastra as a, type ToolsInput as a$, type StructuredOutputType as a0, type StructuredOutputArrayItem as a1, type StructuredOutput as a2, type GenerateReturn as a3, type StreamReturn as a4, type OutputType as a5, type DefaultLLMTextOptions as a6, type DefaultLLMTextObjectOptions as a7, type DefaultLLMStreamOptions as a8, type DefaultLLMStreamObjectOptions as a9, type StepDef as aA, type StepCondition as aB, type StepConfig as aC, type StepResult$1 as aD, type StepsRecord$1 as aE, type WorkflowRunResult as aF, type WorkflowContext as aG, type WorkflowLogMessage as aH, type WorkflowEvent as aI, type ResolverFunctionInput as aJ, type ResolverFunctionOutput as aK, type SubscriberFunctionOutput as aL, type DependencyCheckOutput as aM, type StepResolverOutput as aN, type WorkflowActors as aO, type WorkflowActionParams as aP, type WorkflowActions as aQ, type WorkflowState as aR, type StepId as aS, type ExtractSchemaFromStep$1 as aT, type ExtractStepResult as aU, type StepInputType as aV, type ExtractSchemaType$1 as aW, type PathsToStringProps$1 as aX, type WorkflowRunState as aY, type WorkflowResumeResult as aZ, type MastraLanguageModel as a_, type LLMTextOptions as aa, type LLMTextObjectOptions as ab, type LLMStreamOptions as ac, type LLMInnerStreamOptions as ad, type LLMStreamObjectOptions as ae, createMockModel as af, type Config as ag, type MessageResponse as ah, type MemoryConfig as ai, type SharedMemoryConfig as aj, type MemoryProcessorOpts as ak, MemoryProcessor as al, memoryDefaultOptions as am, createTool as an, type VercelTool as ao, type CoreTool as ap, type StepExecutionContext as aq, type StepAction as ar, type StepVariableType as as, type StepNode as at, type StepGraph as au, type RetryConfig as av, type VariableReference$1 as aw, type BaseCondition as ax, type ActionContext as ay, WhenConditionReturnValue as az, MastraStorage as b, type MastraPrimitives as b0, AgentNetwork as b1, type AgentNetworkConfig as b2, type VoiceEventType as b3, type VoiceEventMap as b4, type VoiceConfig as b5, MastraVoice as b6, CompositeVoice as b7, DefaultVoice as b8, type ToolsetsInput as b9, type DynamicArgument as ba, type AgentGenerateOptions as bb, type AgentStreamOptions as bc, TABLE_WORKFLOW_SNAPSHOT as bd, TABLE_EVALS as be, TABLE_MESSAGES as bf, TABLE_THREADS as bg, TABLE_TRACES as bh, TABLE_SCHEMAS as bi, type StorageThreadType as c, type MessageType as d, type StorageGetMessagesArg as e, type WorkflowRun as f, ExecutionEngine as g, type ExecutionGraph as h, type StepResult as i, type StepFlowEntry as j, type ExecuteFunction as k, createStep as l, cloneStep as m, createWorkflow as n, cloneWorkflow as o, type WorkflowResult as p, type NewWorkflowConfig as q, NewWorkflow as r, type StepSuccess as s, type StepFailure as t, type StepSuspended as u, type StepsRecord as v, type ExtractSchemaType as w, type ExtractSchemaFromStep as x, type WatchEvent as y, type ToolAction as z };
2711
+ export { type EmbedResult as $, type ApiRoute as A, type WatchEvent as B, type ToolAction as C, Agent as D, type EvalRow as E, type AgentConfig as F, MastraMemory as G, type ToolExecutionContext as H, Tool as I, Step as J, Workflow as K, type WorkflowOptions as L, type Methods as M, type NewStep as N, type LanguageModel as O, type PathsToStringProps as P, type CoreMessage as Q, Run as R, type StorageColumn as S, type TABLE_NAMES as T, type CoreSystemMessage as U, type VariableReference as V, type WorkflowRuns as W, type CoreAssistantMessage as X, type CoreUserMessage as Y, type ZodPathType as Z, type CoreToolMessage as _, Mastra as a, type WorkflowResumeResult as a$, type EmbedManyResult as a0, type BaseStructuredOutputType as a1, type StructuredOutputType as a2, type StructuredOutputArrayItem as a3, type StructuredOutput as a4, type GenerateReturn as a5, type StreamReturn as a6, type OutputType as a7, type DefaultLLMTextOptions as a8, type DefaultLLMTextObjectOptions as a9, type ActionContext as aA, WhenConditionReturnValue as aB, type StepDef as aC, type StepCondition as aD, type StepConfig as aE, type StepResult$1 as aF, type StepsRecord$1 as aG, type WorkflowRunResult as aH, type WorkflowContext as aI, type WorkflowLogMessage as aJ, type WorkflowEvent as aK, type ResolverFunctionInput as aL, type ResolverFunctionOutput as aM, type SubscriberFunctionOutput as aN, type DependencyCheckOutput as aO, type StepResolverOutput as aP, type WorkflowActors as aQ, type WorkflowActionParams as aR, type WorkflowActions as aS, type WorkflowState as aT, type StepId as aU, type ExtractSchemaFromStep$1 as aV, type ExtractStepResult as aW, type StepInputType as aX, type ExtractSchemaType$1 as aY, type PathsToStringProps$1 as aZ, type WorkflowRunState as a_, type DefaultLLMStreamOptions as aa, type DefaultLLMStreamObjectOptions as ab, type LLMTextOptions as ac, type LLMTextObjectOptions as ad, type LLMStreamOptions as ae, type LLMInnerStreamOptions as af, type LLMStreamObjectOptions as ag, createMockModel as ah, type Config as ai, type MessageResponse as aj, type MemoryConfig as ak, type SharedMemoryConfig as al, type MemoryProcessorOpts as am, MemoryProcessor as an, memoryDefaultOptions as ao, createTool as ap, type VercelTool as aq, type CoreTool as ar, type StepExecutionContext as as, type StepAction as at, type StepVariableType as au, type StepNode as av, type StepGraph as aw, type RetryConfig as ax, type VariableReference$1 as ay, type BaseCondition as az, MastraStorage as b, type MastraLanguageModel as b0, type ToolsInput as b1, type MastraPrimitives as b2, AgentNetwork as b3, type AgentNetworkConfig as b4, type VoiceEventType as b5, type VoiceEventMap as b6, type VoiceConfig as b7, MastraVoice as b8, CompositeVoice as b9, DefaultVoice as ba, type ToolsetsInput as bb, type DynamicArgument as bc, type AgentGenerateOptions as bd, type AgentStreamOptions as be, TABLE_WORKFLOW_SNAPSHOT as bf, TABLE_EVALS as bg, TABLE_MESSAGES as bh, TABLE_THREADS as bi, TABLE_TRACES as bj, TABLE_SCHEMAS as bk, type StorageThreadType as c, type MessageType as d, type StorageGetMessagesArg as e, type WorkflowRun as f, ExecutionEngine as g, type ExecutionGraph as h, type StepResult as i, type StepFlowEntry as j, type ExecuteFunction as k, type SerializedStep as l, type SerializedStepFlowEntry as m, createStep as n, cloneStep as o, createWorkflow as p, cloneWorkflow as q, type WorkflowResult as r, type NewWorkflowConfig as s, NewWorkflow as t, type StepSuccess as u, type StepFailure as v, type StepSuspended as w, type StepsRecord as x, type ExtractSchemaType as y, type ExtractSchemaFromStep as z };
@@ -1271,6 +1271,38 @@ type StepFlowEntry = {
1271
1271
  concurrency: number;
1272
1272
  };
1273
1273
  };
1274
+ type SerializedStep = Pick<NewStep, 'id' | 'description'> & {
1275
+ component?: string;
1276
+ stepFlow?: SerializedStepFlowEntry[];
1277
+ };
1278
+ type SerializedStepFlowEntry = {
1279
+ type: 'step';
1280
+ step: SerializedStep;
1281
+ } | {
1282
+ type: 'parallel';
1283
+ steps: SerializedStepFlowEntry[];
1284
+ } | {
1285
+ type: 'conditional';
1286
+ steps: SerializedStepFlowEntry[];
1287
+ serializedConditions: {
1288
+ id: string;
1289
+ fn: string;
1290
+ }[];
1291
+ } | {
1292
+ type: 'loop';
1293
+ step: SerializedStep;
1294
+ serializedCondition: {
1295
+ id: string;
1296
+ fn: string;
1297
+ };
1298
+ loopType: 'dowhile' | 'dountil';
1299
+ } | {
1300
+ type: 'foreach';
1301
+ step: SerializedStep;
1302
+ opts: {
1303
+ concurrency: number;
1304
+ };
1305
+ };
1274
1306
  /**
1275
1307
  * Creates a new workflow step
1276
1308
  * @param params Configuration parameters for the step
@@ -1348,6 +1380,7 @@ declare class NewWorkflow<TSteps extends NewStep<string, any, any, any, any>[] =
1348
1380
  steps: Record<string, NewStep<string, any, any, any, any>>;
1349
1381
  stepDefs?: TSteps;
1350
1382
  protected stepFlow: StepFlowEntry[];
1383
+ protected serializedStepFlow: SerializedStepFlowEntry[];
1351
1384
  protected executionEngine: ExecutionEngine;
1352
1385
  protected executionGraph: ExecutionGraph;
1353
1386
  protected retryConfig: {
@@ -1462,6 +1495,7 @@ declare class NewWorkflow<TSteps extends NewStep<string, any, any, any, any>[] =
1462
1495
  */
1463
1496
  commit(): NewWorkflow<TSteps, TWorkflowId, TInput, TOutput, TOutput>;
1464
1497
  get stepGraph(): StepFlowEntry[];
1498
+ get serializedStepGraph(): SerializedStepFlowEntry[];
1465
1499
  /**
1466
1500
  * Creates a new workflow run instance
1467
1501
  * @param options Optional configuration for the run
@@ -2674,4 +2708,4 @@ declare abstract class MastraStorage extends MastraBase {
2674
2708
  }): Promise<WorkflowRun | null>;
2675
2709
  }
2676
2710
 
2677
- export { type BaseStructuredOutputType as $, type ApiRoute as A, Agent as B, type AgentConfig as C, MastraMemory as D, type EvalRow as E, type ToolExecutionContext as F, Tool as G, Step as H, Workflow as I, type WorkflowOptions as J, type CoreMessage as K, type LanguageModel as L, type Methods as M, type NewStep as N, type CoreSystemMessage as O, type PathsToStringProps as P, type CoreAssistantMessage as Q, Run as R, type StorageColumn as S, type TABLE_NAMES as T, type CoreUserMessage as U, type VariableReference as V, type WorkflowRuns as W, type CoreToolMessage as X, type EmbedResult as Y, type ZodPathType as Z, type EmbedManyResult as _, Mastra as a, type ToolsInput as a$, type StructuredOutputType as a0, type StructuredOutputArrayItem as a1, type StructuredOutput as a2, type GenerateReturn as a3, type StreamReturn as a4, type OutputType as a5, type DefaultLLMTextOptions as a6, type DefaultLLMTextObjectOptions as a7, type DefaultLLMStreamOptions as a8, type DefaultLLMStreamObjectOptions as a9, type StepDef as aA, type StepCondition as aB, type StepConfig as aC, type StepResult$1 as aD, type StepsRecord$1 as aE, type WorkflowRunResult as aF, type WorkflowContext as aG, type WorkflowLogMessage as aH, type WorkflowEvent as aI, type ResolverFunctionInput as aJ, type ResolverFunctionOutput as aK, type SubscriberFunctionOutput as aL, type DependencyCheckOutput as aM, type StepResolverOutput as aN, type WorkflowActors as aO, type WorkflowActionParams as aP, type WorkflowActions as aQ, type WorkflowState as aR, type StepId as aS, type ExtractSchemaFromStep$1 as aT, type ExtractStepResult as aU, type StepInputType as aV, type ExtractSchemaType$1 as aW, type PathsToStringProps$1 as aX, type WorkflowRunState as aY, type WorkflowResumeResult as aZ, type MastraLanguageModel as a_, type LLMTextOptions as aa, type LLMTextObjectOptions as ab, type LLMStreamOptions as ac, type LLMInnerStreamOptions as ad, type LLMStreamObjectOptions as ae, createMockModel as af, type Config as ag, type MessageResponse as ah, type MemoryConfig as ai, type SharedMemoryConfig as aj, type MemoryProcessorOpts as ak, MemoryProcessor as al, memoryDefaultOptions as am, createTool as an, type VercelTool as ao, type CoreTool as ap, type StepExecutionContext as aq, type StepAction as ar, type StepVariableType as as, type StepNode as at, type StepGraph as au, type RetryConfig as av, type VariableReference$1 as aw, type BaseCondition as ax, type ActionContext as ay, WhenConditionReturnValue as az, MastraStorage as b, type MastraPrimitives as b0, AgentNetwork as b1, type AgentNetworkConfig as b2, type VoiceEventType as b3, type VoiceEventMap as b4, type VoiceConfig as b5, MastraVoice as b6, CompositeVoice as b7, DefaultVoice as b8, type ToolsetsInput as b9, type DynamicArgument as ba, type AgentGenerateOptions as bb, type AgentStreamOptions as bc, TABLE_WORKFLOW_SNAPSHOT as bd, TABLE_EVALS as be, TABLE_MESSAGES as bf, TABLE_THREADS as bg, TABLE_TRACES as bh, TABLE_SCHEMAS as bi, type StorageThreadType as c, type MessageType as d, type StorageGetMessagesArg as e, type WorkflowRun as f, ExecutionEngine as g, type ExecutionGraph as h, type StepResult as i, type StepFlowEntry as j, type ExecuteFunction as k, createStep as l, cloneStep as m, createWorkflow as n, cloneWorkflow as o, type WorkflowResult as p, type NewWorkflowConfig as q, NewWorkflow as r, type StepSuccess as s, type StepFailure as t, type StepSuspended as u, type StepsRecord as v, type ExtractSchemaType as w, type ExtractSchemaFromStep as x, type WatchEvent as y, type ToolAction as z };
2711
+ export { type EmbedResult as $, type ApiRoute as A, type WatchEvent as B, type ToolAction as C, Agent as D, type EvalRow as E, type AgentConfig as F, MastraMemory as G, type ToolExecutionContext as H, Tool as I, Step as J, Workflow as K, type WorkflowOptions as L, type Methods as M, type NewStep as N, type LanguageModel as O, type PathsToStringProps as P, type CoreMessage as Q, Run as R, type StorageColumn as S, type TABLE_NAMES as T, type CoreSystemMessage as U, type VariableReference as V, type WorkflowRuns as W, type CoreAssistantMessage as X, type CoreUserMessage as Y, type ZodPathType as Z, type CoreToolMessage as _, Mastra as a, type WorkflowResumeResult as a$, type EmbedManyResult as a0, type BaseStructuredOutputType as a1, type StructuredOutputType as a2, type StructuredOutputArrayItem as a3, type StructuredOutput as a4, type GenerateReturn as a5, type StreamReturn as a6, type OutputType as a7, type DefaultLLMTextOptions as a8, type DefaultLLMTextObjectOptions as a9, type ActionContext as aA, WhenConditionReturnValue as aB, type StepDef as aC, type StepCondition as aD, type StepConfig as aE, type StepResult$1 as aF, type StepsRecord$1 as aG, type WorkflowRunResult as aH, type WorkflowContext as aI, type WorkflowLogMessage as aJ, type WorkflowEvent as aK, type ResolverFunctionInput as aL, type ResolverFunctionOutput as aM, type SubscriberFunctionOutput as aN, type DependencyCheckOutput as aO, type StepResolverOutput as aP, type WorkflowActors as aQ, type WorkflowActionParams as aR, type WorkflowActions as aS, type WorkflowState as aT, type StepId as aU, type ExtractSchemaFromStep$1 as aV, type ExtractStepResult as aW, type StepInputType as aX, type ExtractSchemaType$1 as aY, type PathsToStringProps$1 as aZ, type WorkflowRunState as a_, type DefaultLLMStreamOptions as aa, type DefaultLLMStreamObjectOptions as ab, type LLMTextOptions as ac, type LLMTextObjectOptions as ad, type LLMStreamOptions as ae, type LLMInnerStreamOptions as af, type LLMStreamObjectOptions as ag, createMockModel as ah, type Config as ai, type MessageResponse as aj, type MemoryConfig as ak, type SharedMemoryConfig as al, type MemoryProcessorOpts as am, MemoryProcessor as an, memoryDefaultOptions as ao, createTool as ap, type VercelTool as aq, type CoreTool as ar, type StepExecutionContext as as, type StepAction as at, type StepVariableType as au, type StepNode as av, type StepGraph as aw, type RetryConfig as ax, type VariableReference$1 as ay, type BaseCondition as az, MastraStorage as b, type MastraLanguageModel as b0, type ToolsInput as b1, type MastraPrimitives as b2, AgentNetwork as b3, type AgentNetworkConfig as b4, type VoiceEventType as b5, type VoiceEventMap as b6, type VoiceConfig as b7, MastraVoice as b8, CompositeVoice as b9, DefaultVoice as ba, type ToolsetsInput as bb, type DynamicArgument as bc, type AgentGenerateOptions as bd, type AgentStreamOptions as be, TABLE_WORKFLOW_SNAPSHOT as bf, TABLE_EVALS as bg, TABLE_MESSAGES as bh, TABLE_THREADS as bi, TABLE_TRACES as bj, TABLE_SCHEMAS as bk, type StorageThreadType as c, type MessageType as d, type StorageGetMessagesArg as e, type WorkflowRun as f, ExecutionEngine as g, type ExecutionGraph as h, type StepResult as i, type StepFlowEntry as j, type ExecuteFunction as k, type SerializedStep as l, type SerializedStepFlowEntry as m, createStep as n, cloneStep as o, createWorkflow as p, cloneWorkflow as q, type WorkflowResult as r, type NewWorkflowConfig as s, NewWorkflow as t, type StepSuccess as u, type StepFailure as v, type StepSuspended as w, type StepsRecord as x, type ExtractSchemaType as y, type ExtractSchemaFromStep as z };
@@ -511,6 +511,9 @@ exports.Agent = class Agent extends (_a = chunkD63P5O4Q_cjs.MastraBase) {
511
511
  });
512
512
  return messagesBySanitizedContent.filter(message => {
513
513
  if (typeof message.content === `string`) {
514
+ if (message.role === "assistant") {
515
+ return true;
516
+ }
514
517
  return message.content !== "";
515
518
  }
516
519
  if (Array.isArray(message.content)) {
@@ -1,4 +1,4 @@
1
- import { Agent } from './chunk-H2UWWO4L.js';
1
+ import { Agent } from './chunk-UQ2VDYKC.js';
2
2
  import { CohereClient } from 'cohere-ai';
3
3
 
4
4
  var CohereRelevanceScorer = class {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7PRLYMXV_cjs = require('./chunk-7PRLYMXV.cjs');
3
+ var chunk3BKYXIDL_cjs = require('./chunk-3BKYXIDL.cjs');
4
4
  var cohereAi = require('cohere-ai');
5
5
 
6
6
  var CohereRelevanceScorer = class {
@@ -38,7 +38,7 @@ Relevance score (0-1):`;
38
38
  var MastraAgentRelevanceScorer = class {
39
39
  agent;
40
40
  constructor(name, model) {
41
- this.agent = new chunk7PRLYMXV_cjs.Agent({
41
+ this.agent = new chunk3BKYXIDL_cjs.Agent({
42
42
  name: `Relevance Scorer ${name}`,
43
43
  instructions: `You are a specialized agent for evaluating the relevance of text to queries.
44
44
  Your task is to rate how well a text passage answers a given query.
@@ -504,6 +504,9 @@ var Agent = class extends (_a = MastraBase) {
504
504
  });
505
505
  return messagesBySanitizedContent.filter(message => {
506
506
  if (typeof message.content === `string`) {
507
+ if (message.role === "assistant") {
508
+ return true;
509
+ }
507
510
  return message.content !== "";
508
511
  }
509
512
  if (Array.isArray(message.content)) {
@@ -1,6 +1,6 @@
1
1
  import { a as Metric, T as TestInfo, E as EvaluationResult } from '../types-BtMyV38I.cjs';
2
2
  export { M as MetricResult } from '../types-BtMyV38I.cjs';
3
- import { B as Agent } from '../base-QJ_GwQxQ.cjs';
3
+ import { D as Agent } from '../base-DI6ChaUK.cjs';
4
4
  import 'ai';
5
5
  import '../base-BihKcqDY.cjs';
6
6
  import '@opentelemetry/api';
@@ -1,6 +1,6 @@
1
1
  import { a as Metric, T as TestInfo, E as EvaluationResult } from '../types-BtMyV38I.js';
2
2
  export { M as MetricResult } from '../types-BtMyV38I.js';
3
- import { B as Agent } from '../base-BS0LLAna.js';
3
+ import { D as Agent } from '../base-bWFiU8RL.js';
4
4
  import 'ai';
5
5
  import '../base-DT2poiVK.js';
6
6
  import '@opentelemetry/api';
package/dist/index.cjs CHANGED
@@ -7,8 +7,8 @@ var chunk33XQ5DGU_cjs = require('./chunk-33XQ5DGU.cjs');
7
7
  var chunkVI3IQINW_cjs = require('./chunk-VI3IQINW.cjs');
8
8
  var chunkYAJVZMZH_cjs = require('./chunk-YAJVZMZH.cjs');
9
9
  var chunkXNBNJEES_cjs = require('./chunk-XNBNJEES.cjs');
10
- var chunkZWALP7T2_cjs = require('./chunk-ZWALP7T2.cjs');
11
- var chunk7PRLYMXV_cjs = require('./chunk-7PRLYMXV.cjs');
10
+ var chunkUPEXV5RA_cjs = require('./chunk-UPEXV5RA.cjs');
11
+ var chunk3BKYXIDL_cjs = require('./chunk-3BKYXIDL.cjs');
12
12
  var chunkMYHX5XVW_cjs = require('./chunk-MYHX5XVW.cjs');
13
13
  var chunk7JRVDC7F_cjs = require('./chunk-7JRVDC7F.cjs');
14
14
  var chunkRZCYBC7D_cjs = require('./chunk-RZCYBC7D.cjs');
@@ -18,7 +18,7 @@ var chunk3C6V2FEP_cjs = require('./chunk-3C6V2FEP.cjs');
18
18
  var chunkST5RMVLG_cjs = require('./chunk-ST5RMVLG.cjs');
19
19
 
20
20
  // src/agent/index.warning.ts
21
- var Agent2 = class extends chunk7PRLYMXV_cjs.Agent {
21
+ var Agent2 = class extends chunk3BKYXIDL_cjs.Agent {
22
22
  constructor(config) {
23
23
  super(config);
24
24
  this.logger.warn('Please import "Agent from "@mastra/core/agent" instead of "@mastra/core"');
@@ -106,7 +106,7 @@ var MastraVector2 = class extends chunkYAJVZMZH_cjs.MastraVector {
106
106
  };
107
107
 
108
108
  // src/workflows/workflow.warning.ts
109
- var Workflow2 = class extends chunk7PRLYMXV_cjs.Workflow {
109
+ var Workflow2 = class extends chunk3BKYXIDL_cjs.Workflow {
110
110
  constructor(args) {
111
111
  super(args);
112
112
  this.logger.warn('Please import "Workflow" from "@mastra/core/workflows" instead of "@mastra/core"');
@@ -131,95 +131,95 @@ Object.defineProperty(exports, "memoryDefaultOptions", {
131
131
  });
132
132
  Object.defineProperty(exports, "CohereRelevanceScorer", {
133
133
  enumerable: true,
134
- get: function () { return chunkZWALP7T2_cjs.CohereRelevanceScorer; }
134
+ get: function () { return chunkUPEXV5RA_cjs.CohereRelevanceScorer; }
135
135
  });
136
136
  Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
137
137
  enumerable: true,
138
- get: function () { return chunkZWALP7T2_cjs.MastraAgentRelevanceScorer; }
138
+ get: function () { return chunkUPEXV5RA_cjs.MastraAgentRelevanceScorer; }
139
139
  });
140
140
  Object.defineProperty(exports, "createSimilarityPrompt", {
141
141
  enumerable: true,
142
- get: function () { return chunkZWALP7T2_cjs.createSimilarityPrompt; }
142
+ get: function () { return chunkUPEXV5RA_cjs.createSimilarityPrompt; }
143
143
  });
144
144
  Object.defineProperty(exports, "Step", {
145
145
  enumerable: true,
146
- get: function () { return chunk7PRLYMXV_cjs.Step; }
146
+ get: function () { return chunk3BKYXIDL_cjs.Step; }
147
147
  });
148
148
  Object.defineProperty(exports, "WhenConditionReturnValue", {
149
149
  enumerable: true,
150
- get: function () { return chunk7PRLYMXV_cjs.WhenConditionReturnValue; }
150
+ get: function () { return chunk3BKYXIDL_cjs.WhenConditionReturnValue; }
151
151
  });
152
152
  Object.defineProperty(exports, "agentToStep", {
153
153
  enumerable: true,
154
- get: function () { return chunk7PRLYMXV_cjs.agentToStep; }
154
+ get: function () { return chunk3BKYXIDL_cjs.agentToStep; }
155
155
  });
156
156
  Object.defineProperty(exports, "getActivePathsAndStatus", {
157
157
  enumerable: true,
158
- get: function () { return chunk7PRLYMXV_cjs.getActivePathsAndStatus; }
158
+ get: function () { return chunk3BKYXIDL_cjs.getActivePathsAndStatus; }
159
159
  });
160
160
  Object.defineProperty(exports, "getResultActivePaths", {
161
161
  enumerable: true,
162
- get: function () { return chunk7PRLYMXV_cjs.getResultActivePaths; }
162
+ get: function () { return chunk3BKYXIDL_cjs.getResultActivePaths; }
163
163
  });
164
164
  Object.defineProperty(exports, "getStepResult", {
165
165
  enumerable: true,
166
- get: function () { return chunk7PRLYMXV_cjs.getStepResult; }
166
+ get: function () { return chunk3BKYXIDL_cjs.getStepResult; }
167
167
  });
168
168
  Object.defineProperty(exports, "getSuspendedPaths", {
169
169
  enumerable: true,
170
- get: function () { return chunk7PRLYMXV_cjs.getSuspendedPaths; }
170
+ get: function () { return chunk3BKYXIDL_cjs.getSuspendedPaths; }
171
171
  });
172
172
  Object.defineProperty(exports, "isAgent", {
173
173
  enumerable: true,
174
- get: function () { return chunk7PRLYMXV_cjs.isAgent; }
174
+ get: function () { return chunk3BKYXIDL_cjs.isAgent; }
175
175
  });
176
176
  Object.defineProperty(exports, "isConditionalKey", {
177
177
  enumerable: true,
178
- get: function () { return chunk7PRLYMXV_cjs.isConditionalKey; }
178
+ get: function () { return chunk3BKYXIDL_cjs.isConditionalKey; }
179
179
  });
180
180
  Object.defineProperty(exports, "isErrorEvent", {
181
181
  enumerable: true,
182
- get: function () { return chunk7PRLYMXV_cjs.isErrorEvent; }
182
+ get: function () { return chunk3BKYXIDL_cjs.isErrorEvent; }
183
183
  });
184
184
  Object.defineProperty(exports, "isFinalState", {
185
185
  enumerable: true,
186
- get: function () { return chunk7PRLYMXV_cjs.isFinalState; }
186
+ get: function () { return chunk3BKYXIDL_cjs.isFinalState; }
187
187
  });
188
188
  Object.defineProperty(exports, "isLimboState", {
189
189
  enumerable: true,
190
- get: function () { return chunk7PRLYMXV_cjs.isLimboState; }
190
+ get: function () { return chunk3BKYXIDL_cjs.isLimboState; }
191
191
  });
192
192
  Object.defineProperty(exports, "isTransitionEvent", {
193
193
  enumerable: true,
194
- get: function () { return chunk7PRLYMXV_cjs.isTransitionEvent; }
194
+ get: function () { return chunk3BKYXIDL_cjs.isTransitionEvent; }
195
195
  });
196
196
  Object.defineProperty(exports, "isVariableReference", {
197
197
  enumerable: true,
198
- get: function () { return chunk7PRLYMXV_cjs.isVariableReference; }
198
+ get: function () { return chunk3BKYXIDL_cjs.isVariableReference; }
199
199
  });
200
200
  Object.defineProperty(exports, "isWorkflow", {
201
201
  enumerable: true,
202
- get: function () { return chunk7PRLYMXV_cjs.isWorkflow; }
202
+ get: function () { return chunk3BKYXIDL_cjs.isWorkflow; }
203
203
  });
204
204
  Object.defineProperty(exports, "mergeChildValue", {
205
205
  enumerable: true,
206
- get: function () { return chunk7PRLYMXV_cjs.mergeChildValue; }
206
+ get: function () { return chunk3BKYXIDL_cjs.mergeChildValue; }
207
207
  });
208
208
  Object.defineProperty(exports, "recursivelyCheckForFinalState", {
209
209
  enumerable: true,
210
- get: function () { return chunk7PRLYMXV_cjs.recursivelyCheckForFinalState; }
210
+ get: function () { return chunk3BKYXIDL_cjs.recursivelyCheckForFinalState; }
211
211
  });
212
212
  Object.defineProperty(exports, "resolveVariables", {
213
213
  enumerable: true,
214
- get: function () { return chunk7PRLYMXV_cjs.resolveVariables; }
214
+ get: function () { return chunk3BKYXIDL_cjs.resolveVariables; }
215
215
  });
216
216
  Object.defineProperty(exports, "updateStepInHierarchy", {
217
217
  enumerable: true,
218
- get: function () { return chunk7PRLYMXV_cjs.updateStepInHierarchy; }
218
+ get: function () { return chunk3BKYXIDL_cjs.updateStepInHierarchy; }
219
219
  });
220
220
  Object.defineProperty(exports, "workflowToStep", {
221
221
  enumerable: true,
222
- get: function () { return chunk7PRLYMXV_cjs.workflowToStep; }
222
+ get: function () { return chunk3BKYXIDL_cjs.workflowToStep; }
223
223
  });
224
224
  Object.defineProperty(exports, "InstrumentClass", {
225
225
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as Metric } from './types-BtMyV38I.cjs';
2
2
  export { E as EvaluationResult, M as MetricResult, T as TestInfo } from './types-BtMyV38I.cjs';
3
- import { z as ToolAction, B as Agent$1, C as AgentConfig, b as MastraStorage$1, D as MastraMemory$1, F as ToolExecutionContext, G as Tool$1, H as Step, I as Workflow$1, J as WorkflowOptions } from './base-QJ_GwQxQ.cjs';
4
- export { ay as ActionContext, ax as BaseCondition, $ as BaseStructuredOutputType, ag as Config, Q as CoreAssistantMessage, K as CoreMessage, O as CoreSystemMessage, ap as CoreTool, X as CoreToolMessage, U as CoreUserMessage, a9 as DefaultLLMStreamObjectOptions, a8 as DefaultLLMStreamOptions, a7 as DefaultLLMTextObjectOptions, a6 as DefaultLLMTextOptions, aM as DependencyCheckOutput, _ as EmbedManyResult, Y as EmbedResult, E as EvalRow, aT as ExtractSchemaFromStep, aW as ExtractSchemaType, aU as ExtractStepResult, a3 as GenerateReturn, ad as LLMInnerStreamOptions, ae as LLMStreamObjectOptions, ac as LLMStreamOptions, ab as LLMTextObjectOptions, aa as LLMTextOptions, L as LanguageModel, a as Mastra, ai as MemoryConfig, al as MemoryProcessor, ak as MemoryProcessorOpts, ah as MessageResponse, d as MessageType, a5 as OutputType, aX as PathsToStringProps, aJ as ResolverFunctionInput, aK as ResolverFunctionOutput, av as RetryConfig, aj as SharedMemoryConfig, ar as StepAction, aB as StepCondition, aC as StepConfig, aA as StepDef, aq as StepExecutionContext, au as StepGraph, aS as StepId, aV as StepInputType, at as StepNode, aN as StepResolverOutput, aD as StepResult, as as StepVariableType, aE as StepsRecord, S as StorageColumn, e as StorageGetMessagesArg, c as StorageThreadType, a4 as StreamReturn, a2 as StructuredOutput, a1 as StructuredOutputArrayItem, a0 as StructuredOutputType, aL as SubscriberFunctionOutput, aw as VariableReference, ao as VercelTool, az as WhenConditionReturnValue, aP as WorkflowActionParams, aQ as WorkflowActions, aO as WorkflowActors, aG as WorkflowContext, aI as WorkflowEvent, aH as WorkflowLogMessage, aZ as WorkflowResumeResult, f as WorkflowRun, aF as WorkflowRunResult, aY as WorkflowRunState, W as WorkflowRuns, aR as WorkflowState, af as createMockModel, an as createTool, am as memoryDefaultOptions } from './base-QJ_GwQxQ.cjs';
3
+ import { C as ToolAction, D as Agent$1, F as AgentConfig, b as MastraStorage$1, G as MastraMemory$1, H as ToolExecutionContext, I as Tool$1, J as Step, K as Workflow$1, L as WorkflowOptions } from './base-DI6ChaUK.cjs';
4
+ export { aA as ActionContext, az as BaseCondition, a1 as BaseStructuredOutputType, ai as Config, X as CoreAssistantMessage, Q as CoreMessage, U as CoreSystemMessage, ar as CoreTool, _ as CoreToolMessage, Y as CoreUserMessage, ab as DefaultLLMStreamObjectOptions, aa as DefaultLLMStreamOptions, a9 as DefaultLLMTextObjectOptions, a8 as DefaultLLMTextOptions, aO as DependencyCheckOutput, a0 as EmbedManyResult, $ as EmbedResult, E as EvalRow, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, a5 as GenerateReturn, af as LLMInnerStreamOptions, ag as LLMStreamObjectOptions, ae as LLMStreamOptions, ad as LLMTextObjectOptions, ac as LLMTextOptions, O as LanguageModel, a as Mastra, ak as MemoryConfig, an as MemoryProcessor, am as MemoryProcessorOpts, aj as MessageResponse, d as MessageType, a7 as OutputType, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, al as SharedMemoryConfig, at as StepAction, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, aF as StepResult, au as StepVariableType, aG as StepsRecord, S as StorageColumn, e as StorageGetMessagesArg, c as StorageThreadType, a6 as StreamReturn, a4 as StructuredOutput, a3 as StructuredOutputArrayItem, a2 as StructuredOutputType, aN as SubscriberFunctionOutput, ay as VariableReference, aq as VercelTool, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aI as WorkflowContext, aK as WorkflowEvent, aJ as WorkflowLogMessage, a$ as WorkflowResumeResult, f as WorkflowRun, aH as WorkflowRunResult, a_ as WorkflowRunState, W as WorkflowRuns, aT as WorkflowState, ah as createMockModel, ap as createTool, ao as memoryDefaultOptions } from './base-DI6ChaUK.cjs';
5
5
  import { M as MastraBase$1 } from './base-BihKcqDY.cjs';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-BihKcqDY.cjs';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-CquI0inB.cjs';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as Metric } from './types-BtMyV38I.js';
2
2
  export { E as EvaluationResult, M as MetricResult, T as TestInfo } from './types-BtMyV38I.js';
3
- import { z as ToolAction, B as Agent$1, C as AgentConfig, b as MastraStorage$1, D as MastraMemory$1, F as ToolExecutionContext, G as Tool$1, H as Step, I as Workflow$1, J as WorkflowOptions } from './base-BS0LLAna.js';
4
- export { ay as ActionContext, ax as BaseCondition, $ as BaseStructuredOutputType, ag as Config, Q as CoreAssistantMessage, K as CoreMessage, O as CoreSystemMessage, ap as CoreTool, X as CoreToolMessage, U as CoreUserMessage, a9 as DefaultLLMStreamObjectOptions, a8 as DefaultLLMStreamOptions, a7 as DefaultLLMTextObjectOptions, a6 as DefaultLLMTextOptions, aM as DependencyCheckOutput, _ as EmbedManyResult, Y as EmbedResult, E as EvalRow, aT as ExtractSchemaFromStep, aW as ExtractSchemaType, aU as ExtractStepResult, a3 as GenerateReturn, ad as LLMInnerStreamOptions, ae as LLMStreamObjectOptions, ac as LLMStreamOptions, ab as LLMTextObjectOptions, aa as LLMTextOptions, L as LanguageModel, a as Mastra, ai as MemoryConfig, al as MemoryProcessor, ak as MemoryProcessorOpts, ah as MessageResponse, d as MessageType, a5 as OutputType, aX as PathsToStringProps, aJ as ResolverFunctionInput, aK as ResolverFunctionOutput, av as RetryConfig, aj as SharedMemoryConfig, ar as StepAction, aB as StepCondition, aC as StepConfig, aA as StepDef, aq as StepExecutionContext, au as StepGraph, aS as StepId, aV as StepInputType, at as StepNode, aN as StepResolverOutput, aD as StepResult, as as StepVariableType, aE as StepsRecord, S as StorageColumn, e as StorageGetMessagesArg, c as StorageThreadType, a4 as StreamReturn, a2 as StructuredOutput, a1 as StructuredOutputArrayItem, a0 as StructuredOutputType, aL as SubscriberFunctionOutput, aw as VariableReference, ao as VercelTool, az as WhenConditionReturnValue, aP as WorkflowActionParams, aQ as WorkflowActions, aO as WorkflowActors, aG as WorkflowContext, aI as WorkflowEvent, aH as WorkflowLogMessage, aZ as WorkflowResumeResult, f as WorkflowRun, aF as WorkflowRunResult, aY as WorkflowRunState, W as WorkflowRuns, aR as WorkflowState, af as createMockModel, an as createTool, am as memoryDefaultOptions } from './base-BS0LLAna.js';
3
+ import { C as ToolAction, D as Agent$1, F as AgentConfig, b as MastraStorage$1, G as MastraMemory$1, H as ToolExecutionContext, I as Tool$1, J as Step, K as Workflow$1, L as WorkflowOptions } from './base-bWFiU8RL.js';
4
+ export { aA as ActionContext, az as BaseCondition, a1 as BaseStructuredOutputType, ai as Config, X as CoreAssistantMessage, Q as CoreMessage, U as CoreSystemMessage, ar as CoreTool, _ as CoreToolMessage, Y as CoreUserMessage, ab as DefaultLLMStreamObjectOptions, aa as DefaultLLMStreamOptions, a9 as DefaultLLMTextObjectOptions, a8 as DefaultLLMTextOptions, aO as DependencyCheckOutput, a0 as EmbedManyResult, $ as EmbedResult, E as EvalRow, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, a5 as GenerateReturn, af as LLMInnerStreamOptions, ag as LLMStreamObjectOptions, ae as LLMStreamOptions, ad as LLMTextObjectOptions, ac as LLMTextOptions, O as LanguageModel, a as Mastra, ak as MemoryConfig, an as MemoryProcessor, am as MemoryProcessorOpts, aj as MessageResponse, d as MessageType, a7 as OutputType, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, al as SharedMemoryConfig, at as StepAction, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, aF as StepResult, au as StepVariableType, aG as StepsRecord, S as StorageColumn, e as StorageGetMessagesArg, c as StorageThreadType, a6 as StreamReturn, a4 as StructuredOutput, a3 as StructuredOutputArrayItem, a2 as StructuredOutputType, aN as SubscriberFunctionOutput, ay as VariableReference, aq as VercelTool, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aI as WorkflowContext, aK as WorkflowEvent, aJ as WorkflowLogMessage, a$ as WorkflowResumeResult, f as WorkflowRun, aH as WorkflowRunResult, a_ as WorkflowRunState, W as WorkflowRuns, aT as WorkflowState, ah as createMockModel, ap as createTool, ao as memoryDefaultOptions } from './base-bWFiU8RL.js';
5
5
  import { M as MastraBase$1 } from './base-DT2poiVK.js';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-DT2poiVK.js';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-CquI0inB.js';
package/dist/index.js CHANGED
@@ -6,9 +6,9 @@ import { MastraMemory } from './chunk-INXNZ5VE.js';
6
6
  export { MemoryProcessor, memoryDefaultOptions } from './chunk-INXNZ5VE.js';
7
7
  import { MastraVector } from './chunk-LXIAHZ45.js';
8
8
  import { MastraStorage } from './chunk-52SRR7WR.js';
9
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-FA7FWCKH.js';
10
- import { Agent, Workflow } from './chunk-H2UWWO4L.js';
11
- export { Step, WhenConditionReturnValue, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from './chunk-H2UWWO4L.js';
9
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-GKTDO6XW.js';
10
+ import { Agent, Workflow } from './chunk-UQ2VDYKC.js';
11
+ export { Step, WhenConditionReturnValue, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from './chunk-UQ2VDYKC.js';
12
12
  export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-KWYJUFY3.js';
13
13
  import { Tool } from './chunk-JSUPD5IG.js';
14
14
  export { checkEvalStorageFields, createMastraProxy, createTool, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-JSUPD5IG.js';
@@ -1,5 +1,5 @@
1
1
  import '../base-BihKcqDY.cjs';
2
- import { I as Workflow, z as ToolAction } from '../base-QJ_GwQxQ.cjs';
2
+ import { K as Workflow, C as ToolAction } from '../base-DI6ChaUK.cjs';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-CquI0inB.cjs';
5
5
  import 'stream';
@@ -1,5 +1,5 @@
1
1
  import '../base-DT2poiVK.js';
2
- import { I as Workflow, z as ToolAction } from '../base-BS0LLAna.js';
2
+ import { K as Workflow, C as ToolAction } from '../base-bWFiU8RL.js';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-CquI0inB.js';
5
5
  import 'stream';
@@ -1,7 +1,7 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { $ as BaseStructuredOutputType, Q as CoreAssistantMessage, K as CoreMessage, O as CoreSystemMessage, X as CoreToolMessage, U as CoreUserMessage, a9 as DefaultLLMStreamObjectOptions, a8 as DefaultLLMStreamOptions, a7 as DefaultLLMTextObjectOptions, a6 as DefaultLLMTextOptions, _ as EmbedManyResult, Y as EmbedResult, a3 as GenerateReturn, ad as LLMInnerStreamOptions, ae as LLMStreamObjectOptions, ac as LLMStreamOptions, ab as LLMTextObjectOptions, aa as LLMTextOptions, L as LanguageModel, a5 as OutputType, a4 as StreamReturn, a2 as StructuredOutput, a1 as StructuredOutputArrayItem, a0 as StructuredOutputType, af as createMockModel } from '../base-QJ_GwQxQ.cjs';
4
+ export { a1 as BaseStructuredOutputType, X as CoreAssistantMessage, Q as CoreMessage, U as CoreSystemMessage, _ as CoreToolMessage, Y as CoreUserMessage, ab as DefaultLLMStreamObjectOptions, aa as DefaultLLMStreamOptions, a9 as DefaultLLMTextObjectOptions, a8 as DefaultLLMTextOptions, a0 as EmbedManyResult, $ as EmbedResult, a5 as GenerateReturn, af as LLMInnerStreamOptions, ag as LLMStreamObjectOptions, ae as LLMStreamOptions, ad as LLMTextObjectOptions, ac as LLMTextOptions, O as LanguageModel, a7 as OutputType, a6 as StreamReturn, a4 as StructuredOutput, a3 as StructuredOutputArrayItem, a2 as StructuredOutputType, ah as createMockModel } from '../base-DI6ChaUK.cjs';
5
5
  import '../index-CquI0inB.cjs';
6
6
  import '../runtime-context/index.cjs';
7
7
  import '../base-BihKcqDY.cjs';
@@ -1,7 +1,7 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { $ as BaseStructuredOutputType, Q as CoreAssistantMessage, K as CoreMessage, O as CoreSystemMessage, X as CoreToolMessage, U as CoreUserMessage, a9 as DefaultLLMStreamObjectOptions, a8 as DefaultLLMStreamOptions, a7 as DefaultLLMTextObjectOptions, a6 as DefaultLLMTextOptions, _ as EmbedManyResult, Y as EmbedResult, a3 as GenerateReturn, ad as LLMInnerStreamOptions, ae as LLMStreamObjectOptions, ac as LLMStreamOptions, ab as LLMTextObjectOptions, aa as LLMTextOptions, L as LanguageModel, a5 as OutputType, a4 as StreamReturn, a2 as StructuredOutput, a1 as StructuredOutputArrayItem, a0 as StructuredOutputType, af as createMockModel } from '../base-BS0LLAna.js';
4
+ export { a1 as BaseStructuredOutputType, X as CoreAssistantMessage, Q as CoreMessage, U as CoreSystemMessage, _ as CoreToolMessage, Y as CoreUserMessage, ab as DefaultLLMStreamObjectOptions, aa as DefaultLLMStreamOptions, a9 as DefaultLLMTextObjectOptions, a8 as DefaultLLMTextOptions, a0 as EmbedManyResult, $ as EmbedResult, a5 as GenerateReturn, af as LLMInnerStreamOptions, ag as LLMStreamObjectOptions, ae as LLMStreamOptions, ad as LLMTextObjectOptions, ac as LLMTextOptions, O as LanguageModel, a7 as OutputType, a6 as StreamReturn, a4 as StructuredOutput, a3 as StructuredOutputArrayItem, a2 as StructuredOutputType, ah as createMockModel } from '../base-bWFiU8RL.js';
5
5
  import '../index-CquI0inB.js';
6
6
  import '../runtime-context/index.js';
7
7
  import '../base-DT2poiVK.js';
@@ -1,4 +1,4 @@
1
- export { ag as Config, a as Mastra } from '../base-QJ_GwQxQ.cjs';
1
+ export { ai as Config, a as Mastra } from '../base-DI6ChaUK.cjs';
2
2
  import '../index-CquI0inB.cjs';
3
3
  import '../vector/index.cjs';
4
4
  import '../base-BihKcqDY.cjs';
@@ -1,4 +1,4 @@
1
- export { ag as Config, a as Mastra } from '../base-BS0LLAna.js';
1
+ export { ai as Config, a as Mastra } from '../base-bWFiU8RL.js';
2
2
  import '../index-CquI0inB.js';
3
3
  import '../vector/index.js';
4
4
  import '../base-DT2poiVK.js';
@@ -1,4 +1,4 @@
1
- export { D as MastraMemory, ai as MemoryConfig, al as MemoryProcessor, ak as MemoryProcessorOpts, ah as MessageResponse, d as MessageType, aj as SharedMemoryConfig, c as StorageThreadType, am as memoryDefaultOptions } from '../base-QJ_GwQxQ.cjs';
1
+ export { G as MastraMemory, ak as MemoryConfig, an as MemoryProcessor, am as MemoryProcessorOpts, aj as MessageResponse, d as MessageType, al as SharedMemoryConfig, c as StorageThreadType, ao as memoryDefaultOptions } from '../base-DI6ChaUK.cjs';
2
2
  export { Message as AiMessageType } from 'ai';
3
3
  import '../base-BihKcqDY.cjs';
4
4
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- export { D as MastraMemory, ai as MemoryConfig, al as MemoryProcessor, ak as MemoryProcessorOpts, ah as MessageResponse, d as MessageType, aj as SharedMemoryConfig, c as StorageThreadType, am as memoryDefaultOptions } from '../base-BS0LLAna.js';
1
+ export { G as MastraMemory, ak as MemoryConfig, an as MemoryProcessor, am as MemoryProcessorOpts, aj as MessageResponse, d as MessageType, al as SharedMemoryConfig, c as StorageThreadType, ao as memoryDefaultOptions } from '../base-bWFiU8RL.js';
2
2
  export { Message as AiMessageType } from 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7PRLYMXV_cjs = require('../chunk-7PRLYMXV.cjs');
3
+ var chunk3BKYXIDL_cjs = require('../chunk-3BKYXIDL.cjs');
4
4
  var chunk7JRVDC7F_cjs = require('../chunk-7JRVDC7F.cjs');
5
5
  var chunkD63P5O4Q_cjs = require('../chunk-D63P5O4Q.cjs');
6
6
  var chunkO7IW545H_cjs = require('../chunk-O7IW545H.cjs');
@@ -17,7 +17,7 @@ var AgentNetwork = class extends chunkD63P5O4Q_cjs.MastraBase {
17
17
  this.#instructions = config.instructions;
18
18
  this.#agents = config.agents;
19
19
  this.#model = config.model;
20
- this.#routingAgent = new chunk7PRLYMXV_cjs.Agent({
20
+ this.#routingAgent = new chunk3BKYXIDL_cjs.Agent({
21
21
  name: config.name,
22
22
  instructions: this.getInstructions(),
23
23
  model: this.#model,
@@ -1,4 +1,4 @@
1
- export { b1 as AgentNetwork, b2 as AgentNetworkConfig } from '../base-QJ_GwQxQ.cjs';
1
+ export { b3 as AgentNetwork, b4 as AgentNetworkConfig } from '../base-DI6ChaUK.cjs';
2
2
  import 'ai';
3
3
  import '../base-BihKcqDY.cjs';
4
4
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- export { b1 as AgentNetwork, b2 as AgentNetworkConfig } from '../base-BS0LLAna.js';
1
+ export { b3 as AgentNetwork, b4 as AgentNetworkConfig } from '../base-bWFiU8RL.js';
2
2
  import 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- import { Agent } from '../chunk-H2UWWO4L.js';
1
+ import { Agent } from '../chunk-UQ2VDYKC.js';
2
2
  import { createTool } from '../chunk-JSUPD5IG.js';
3
3
  import { MastraBase } from '../chunk-CLJQYXNM.js';
4
4
  import { RegisteredLogger } from '../chunk-2BVZNKLX.js';
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkZWALP7T2_cjs = require('../chunk-ZWALP7T2.cjs');
3
+ var chunkUPEXV5RA_cjs = require('../chunk-UPEXV5RA.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CohereRelevanceScorer", {
8
8
  enumerable: true,
9
- get: function () { return chunkZWALP7T2_cjs.CohereRelevanceScorer; }
9
+ get: function () { return chunkUPEXV5RA_cjs.CohereRelevanceScorer; }
10
10
  });
11
11
  Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
12
12
  enumerable: true,
13
- get: function () { return chunkZWALP7T2_cjs.MastraAgentRelevanceScorer; }
13
+ get: function () { return chunkUPEXV5RA_cjs.MastraAgentRelevanceScorer; }
14
14
  });
15
15
  Object.defineProperty(exports, "createSimilarityPrompt", {
16
16
  enumerable: true,
17
- get: function () { return chunkZWALP7T2_cjs.createSimilarityPrompt; }
17
+ get: function () { return chunkUPEXV5RA_cjs.createSimilarityPrompt; }
18
18
  });
@@ -1,5 +1,5 @@
1
1
  import '../base-BihKcqDY.cjs';
2
- import { a_ as MastraLanguageModel } from '../base-QJ_GwQxQ.cjs';
2
+ import { b0 as MastraLanguageModel } from '../base-DI6ChaUK.cjs';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-CquI0inB.cjs';
5
5
  import 'stream';