@mastra/core 0.9.1 → 0.9.2-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 (41) hide show
  1. package/dist/agent/index.d.cts +1 -1
  2. package/dist/agent/index.d.ts +1 -1
  3. package/dist/{base-QJ_GwQxQ.d.cts → base-DI6ChaUK.d.cts} +35 -1
  4. package/dist/{base-BS0LLAna.d.ts → base-bWFiU8RL.d.ts} +35 -1
  5. package/dist/eval/index.d.cts +1 -1
  6. package/dist/eval/index.d.ts +1 -1
  7. package/dist/index.d.cts +2 -2
  8. package/dist/index.d.ts +2 -2
  9. package/dist/integration/index.d.cts +1 -1
  10. package/dist/integration/index.d.ts +1 -1
  11. package/dist/llm/index.d.cts +1 -1
  12. package/dist/llm/index.d.ts +1 -1
  13. package/dist/mastra/index.d.cts +1 -1
  14. package/dist/mastra/index.d.ts +1 -1
  15. package/dist/memory/index.d.cts +1 -1
  16. package/dist/memory/index.d.ts +1 -1
  17. package/dist/network/index.d.cts +1 -1
  18. package/dist/network/index.d.ts +1 -1
  19. package/dist/relevance/index.d.cts +1 -1
  20. package/dist/relevance/index.d.ts +1 -1
  21. package/dist/server/index.d.cts +1 -1
  22. package/dist/server/index.d.ts +1 -1
  23. package/dist/storage/index.d.cts +1 -1
  24. package/dist/storage/index.d.ts +1 -1
  25. package/dist/storage/libsql/index.d.cts +1 -1
  26. package/dist/storage/libsql/index.d.ts +1 -1
  27. package/dist/telemetry/index.d.cts +1 -1
  28. package/dist/telemetry/index.d.ts +1 -1
  29. package/dist/tools/index.d.cts +1 -1
  30. package/dist/tools/index.d.ts +1 -1
  31. package/dist/utils.d.cts +1 -1
  32. package/dist/utils.d.ts +1 -1
  33. package/dist/voice/index.d.cts +1 -1
  34. package/dist/voice/index.d.ts +1 -1
  35. package/dist/workflows/index.d.cts +2 -2
  36. package/dist/workflows/index.d.ts +2 -2
  37. package/dist/workflows/vNext/index.cjs +80 -0
  38. package/dist/workflows/vNext/index.d.cts +2 -2
  39. package/dist/workflows/vNext/index.d.ts +2 -2
  40. package/dist/workflows/vNext/index.js +80 -0
  41. package/package.json +1 -1
@@ -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';
@@ -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 };
@@ -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.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';
@@ -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,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,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';
@@ -1,5 +1,5 @@
1
1
  import '../base-DT2poiVK.js';
2
- import { a_ as MastraLanguageModel } from '../base-BS0LLAna.js';
2
+ import { b0 as MastraLanguageModel } from '../base-bWFiU8RL.js';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-CquI0inB.js';
5
5
  import 'stream';
@@ -1,6 +1,6 @@
1
1
  import { Handler, MiddlewareHandler } from 'hono';
2
2
  import { DescribeRouteOptions } from 'hono-openapi';
3
- import { M as Methods, a as Mastra, A as ApiRoute } from '../base-QJ_GwQxQ.cjs';
3
+ import { M as Methods, a as Mastra, A as ApiRoute } 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 { Handler, MiddlewareHandler } from 'hono';
2
2
  import { DescribeRouteOptions } from 'hono-openapi';
3
- import { M as Methods, a as Mastra, A as ApiRoute } from '../base-BS0LLAna.js';
3
+ import { M as Methods, a as Mastra, A as ApiRoute } from '../base-bWFiU8RL.js';
4
4
  import 'ai';
5
5
  import '../base-DT2poiVK.js';
6
6
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, be as TABLE_EVALS, bf as TABLE_MESSAGES, T as TABLE_NAMES, bi as TABLE_SCHEMAS, bg as TABLE_THREADS, bh as TABLE_TRACES, bd as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-QJ_GwQxQ.cjs';
1
+ export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } 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 { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, be as TABLE_EVALS, bf as TABLE_MESSAGES, T as TABLE_NAMES, bi as TABLE_SCHEMAS, bg as TABLE_THREADS, bh as TABLE_TRACES, bd as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-BS0LLAna.js';
1
+ export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-bWFiU8RL.js';
2
2
  import 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -1,5 +1,5 @@
1
1
  import { Config } from '@libsql/client';
2
- import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-QJ_GwQxQ.cjs';
2
+ import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-DI6ChaUK.cjs';
3
3
  import 'ai';
4
4
  import '../../base-BihKcqDY.cjs';
5
5
  import '@opentelemetry/api';
@@ -1,5 +1,5 @@
1
1
  import { Config } from '@libsql/client';
2
- import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-BS0LLAna.js';
2
+ import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-bWFiU8RL.js';
3
3
  import 'ai';
4
4
  import '../../base-DT2poiVK.js';
5
5
  import '@opentelemetry/api';
@@ -3,7 +3,7 @@ import { SpanKind } from '@opentelemetry/api';
3
3
  import { ExportResult } from '@opentelemetry/core';
4
4
  import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
  import { L as Logger } from '../index-CquI0inB.cjs';
6
- import { b as MastraStorage } from '../base-QJ_GwQxQ.cjs';
6
+ import { b as MastraStorage } from '../base-DI6ChaUK.cjs';
7
7
  import 'stream';
8
8
  import 'pino';
9
9
  import 'ai';
@@ -3,7 +3,7 @@ import { SpanKind } from '@opentelemetry/api';
3
3
  import { ExportResult } from '@opentelemetry/core';
4
4
  import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
  import { L as Logger } from '../index-CquI0inB.js';
6
- import { b as MastraStorage } from '../base-BS0LLAna.js';
6
+ import { b as MastraStorage } from '../base-bWFiU8RL.js';
7
7
  import 'stream';
8
8
  import 'pino';
9
9
  import 'ai';
@@ -1,4 +1,4 @@
1
- export { ap as CoreTool, G as Tool, z as ToolAction, F as ToolExecutionContext, ao as VercelTool, an as createTool } from '../base-QJ_GwQxQ.cjs';
1
+ export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-DI6ChaUK.cjs';
2
2
  export { isVercelTool } from '../utils.cjs';
3
3
  import 'ai';
4
4
  import '../base-BihKcqDY.cjs';
@@ -1,4 +1,4 @@
1
- export { ap as CoreTool, G as Tool, z as ToolAction, F as ToolExecutionContext, ao as VercelTool, an as createTool } from '../base-BS0LLAna.js';
1
+ export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-bWFiU8RL.js';
2
2
  export { isVercelTool } from '../utils.js';
3
3
  import 'ai';
4
4
  import '../base-DT2poiVK.js';
package/dist/utils.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ao as VercelTool, z as ToolAction, a$ as ToolsInput, a as Mastra, b0 as MastraPrimitives, D as MastraMemory, ap as CoreTool, B as Agent, I as Workflow, H as Step, aq as StepExecutionContext, aG as WorkflowContext, r as NewWorkflow, N as NewStep, b1 as AgentNetwork } from './base-QJ_GwQxQ.cjs';
1
+ import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-DI6ChaUK.cjs';
2
2
  import { CoreMessage, Message } from 'ai';
3
3
  import { MastraTTS } from './tts/index.cjs';
4
4
  import { MastraVector } from './vector/index.cjs';
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ao as VercelTool, z as ToolAction, a$ as ToolsInput, a as Mastra, b0 as MastraPrimitives, D as MastraMemory, ap as CoreTool, B as Agent, I as Workflow, H as Step, aq as StepExecutionContext, aG as WorkflowContext, r as NewWorkflow, N as NewStep, b1 as AgentNetwork } from './base-BS0LLAna.js';
1
+ import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-bWFiU8RL.js';
2
2
  import { CoreMessage, Message } from 'ai';
3
3
  import { MastraTTS } from './tts/index.js';
4
4
  import { MastraVector } from './vector/index.js';
@@ -1,4 +1,4 @@
1
- export { b7 as CompositeVoice, b8 as DefaultVoice, b6 as MastraVoice, b5 as VoiceConfig, b4 as VoiceEventMap, b3 as VoiceEventType } from '../base-QJ_GwQxQ.cjs';
1
+ export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } 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 { b7 as CompositeVoice, b8 as DefaultVoice, b6 as MastraVoice, b5 as VoiceConfig, b4 as VoiceEventMap, b3 as VoiceEventType } from '../base-BS0LLAna.js';
1
+ export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } from '../base-bWFiU8RL.js';
2
2
  import 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -1,5 +1,5 @@
1
- import { aw as VariableReference, aD as StepResult, H as Step, I as Workflow, B as Agent, aG as WorkflowContext, a$ as ToolsInput, a as Mastra, ar as StepAction, aF as WorkflowRunResult } from '../base-QJ_GwQxQ.cjs';
2
- export { ay as ActionContext, ax as BaseCondition, aM as DependencyCheckOutput, aT as ExtractSchemaFromStep, aW as ExtractSchemaType, aU as ExtractStepResult, aX as PathsToStringProps, aJ as ResolverFunctionInput, aK as ResolverFunctionOutput, av as RetryConfig, 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, as as StepVariableType, aE as StepsRecord, aL as SubscriberFunctionOutput, az as WhenConditionReturnValue, aP as WorkflowActionParams, aQ as WorkflowActions, aO as WorkflowActors, aI as WorkflowEvent, aH as WorkflowLogMessage, J as WorkflowOptions, aZ as WorkflowResumeResult, aY as WorkflowRunState, aR as WorkflowState } from '../base-QJ_GwQxQ.cjs';
1
+ import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-DI6ChaUK.cjs';
2
+ export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, 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, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-DI6ChaUK.cjs';
3
3
  import { z } from 'zod';
4
4
  import { a as Metric } from '../types-BtMyV38I.cjs';
5
5
  import { L as Logger } from '../index-CquI0inB.cjs';
@@ -1,5 +1,5 @@
1
- import { aw as VariableReference, aD as StepResult, H as Step, I as Workflow, B as Agent, aG as WorkflowContext, a$ as ToolsInput, a as Mastra, ar as StepAction, aF as WorkflowRunResult } from '../base-BS0LLAna.js';
2
- export { ay as ActionContext, ax as BaseCondition, aM as DependencyCheckOutput, aT as ExtractSchemaFromStep, aW as ExtractSchemaType, aU as ExtractStepResult, aX as PathsToStringProps, aJ as ResolverFunctionInput, aK as ResolverFunctionOutput, av as RetryConfig, 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, as as StepVariableType, aE as StepsRecord, aL as SubscriberFunctionOutput, az as WhenConditionReturnValue, aP as WorkflowActionParams, aQ as WorkflowActions, aO as WorkflowActors, aI as WorkflowEvent, aH as WorkflowLogMessage, J as WorkflowOptions, aZ as WorkflowResumeResult, aY as WorkflowRunState, aR as WorkflowState } from '../base-BS0LLAna.js';
1
+ import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-bWFiU8RL.js';
2
+ export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, 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, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-bWFiU8RL.js';
3
3
  import { z } from 'zod';
4
4
  import { a as Metric } from '../types-BtMyV38I.js';
5
5
  import { L as Logger } from '../index-CquI0inB.js';
@@ -670,6 +670,7 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
670
670
  steps;
671
671
  stepDefs;
672
672
  stepFlow;
673
+ serializedStepFlow;
673
674
  executionEngine;
674
675
  executionGraph;
675
676
  retryConfig;
@@ -693,6 +694,7 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
693
694
  this.retryConfig = retryConfig ?? { attempts: 0, delay: 0 };
694
695
  this.executionGraph = this.buildExecutionGraph();
695
696
  this.stepFlow = [];
697
+ this.serializedStepFlow = [];
696
698
  this.#mastra = mastra;
697
699
  this.steps = {};
698
700
  this.stepDefs = steps;
@@ -728,6 +730,15 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
728
730
  */
729
731
  then(step) {
730
732
  this.stepFlow.push({ type: "step", step });
733
+ this.serializedStepFlow.push({
734
+ type: "step",
735
+ step: {
736
+ id: step.id,
737
+ description: step.description,
738
+ component: step.component,
739
+ stepFlow: step.stepFlow
740
+ }
741
+ });
731
742
  this.steps[step.id] = step;
732
743
  return this;
733
744
  }
@@ -768,11 +779,32 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
768
779
  }
769
780
  });
770
781
  this.stepFlow.push({ type: "step", step: mappingStep });
782
+ this.serializedStepFlow.push({
783
+ type: "step",
784
+ step: {
785
+ id: mappingStep.id,
786
+ description: mappingStep.description,
787
+ component: mappingStep.component,
788
+ stepFlow: mappingStep.stepFlow
789
+ }
790
+ });
771
791
  return this;
772
792
  }
773
793
  // TODO: make typing better here
774
794
  parallel(steps) {
775
795
  this.stepFlow.push({ type: "parallel", steps: steps.map((step) => ({ type: "step", step })) });
796
+ this.serializedStepFlow.push({
797
+ type: "parallel",
798
+ steps: steps.map((step) => ({
799
+ type: "step",
800
+ step: {
801
+ id: step.id,
802
+ description: step.description,
803
+ component: step.component,
804
+ stepFlow: step.stepFlow
805
+ }
806
+ }))
807
+ });
776
808
  steps.forEach((step) => {
777
809
  this.steps[step.id] = step;
778
810
  });
@@ -786,6 +818,19 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
786
818
  conditions: steps.map(([cond]) => cond),
787
819
  serializedConditions: steps.map(([cond, _step]) => ({ id: `${_step.id}-condition`, fn: cond.toString() }))
788
820
  });
821
+ this.serializedStepFlow.push({
822
+ type: "conditional",
823
+ steps: steps.map(([_cond, step]) => ({
824
+ type: "step",
825
+ step: {
826
+ id: step.id,
827
+ description: step.description,
828
+ component: step.component,
829
+ stepFlow: step.stepFlow
830
+ }
831
+ })),
832
+ serializedConditions: steps.map(([cond, _step]) => ({ id: `${_step.id}-condition`, fn: cond.toString() }))
833
+ });
789
834
  steps.forEach(([_, step]) => {
790
835
  this.steps[step.id] = step;
791
836
  });
@@ -799,6 +844,17 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
799
844
  loopType: "dowhile",
800
845
  serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() }
801
846
  });
847
+ this.serializedStepFlow.push({
848
+ type: "loop",
849
+ step: {
850
+ id: step.id,
851
+ description: step.description,
852
+ component: step.component,
853
+ stepFlow: step.stepFlow
854
+ },
855
+ serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() },
856
+ loopType: "dowhile"
857
+ });
802
858
  this.steps[step.id] = step;
803
859
  return this;
804
860
  }
@@ -810,11 +866,32 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
810
866
  loopType: "dountil",
811
867
  serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() }
812
868
  });
869
+ this.serializedStepFlow.push({
870
+ type: "loop",
871
+ step: {
872
+ id: step.id,
873
+ description: step.description,
874
+ component: step.component,
875
+ stepFlow: step.stepFlow
876
+ },
877
+ serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() },
878
+ loopType: "dountil"
879
+ });
813
880
  this.steps[step.id] = step;
814
881
  return this;
815
882
  }
816
883
  foreach(step, opts) {
817
884
  this.stepFlow.push({ type: "foreach", step, opts: opts ?? { concurrency: 1 } });
885
+ this.serializedStepFlow.push({
886
+ type: "foreach",
887
+ step: {
888
+ id: step.id,
889
+ description: step.description,
890
+ component: step.component,
891
+ stepFlow: step.stepFlow
892
+ },
893
+ opts: opts ?? { concurrency: 1 }
894
+ });
818
895
  this.steps[step.id] = step;
819
896
  return this;
820
897
  }
@@ -840,6 +917,9 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
840
917
  get stepGraph() {
841
918
  return this.stepFlow;
842
919
  }
920
+ get serializedStepGraph() {
921
+ return this.serializedStepFlow;
922
+ }
843
923
  /**
844
924
  * Creates a new workflow run instance
845
925
  * @param options Optional configuration for the run
@@ -1,5 +1,5 @@
1
- import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-QJ_GwQxQ.cjs';
2
- export { x as ExtractSchemaFromStep, w as ExtractSchemaType, r as NewWorkflow, q as NewWorkflowConfig, P as PathsToStringProps, R as Run, t as StepFailure, s as StepSuccess, u as StepSuspended, v as StepsRecord, V as VariableReference, y as WatchEvent, p as WorkflowResult, Z as ZodPathType, m as cloneStep, o as cloneWorkflow, l as createStep, n as createWorkflow } from '../../base-QJ_GwQxQ.cjs';
1
+ import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-DI6ChaUK.cjs';
2
+ export { 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-DI6ChaUK.cjs';
3
3
  import EventEmitter from 'events';
4
4
  import { RuntimeContext } from '../../runtime-context/index.cjs';
5
5
  import 'ai';
@@ -1,5 +1,5 @@
1
- import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-BS0LLAna.js';
2
- export { x as ExtractSchemaFromStep, w as ExtractSchemaType, r as NewWorkflow, q as NewWorkflowConfig, P as PathsToStringProps, R as Run, t as StepFailure, s as StepSuccess, u as StepSuspended, v as StepsRecord, V as VariableReference, y as WatchEvent, p as WorkflowResult, Z as ZodPathType, m as cloneStep, o as cloneWorkflow, l as createStep, n as createWorkflow } from '../../base-BS0LLAna.js';
1
+ import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-bWFiU8RL.js';
2
+ export { 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-bWFiU8RL.js';
3
3
  import EventEmitter from 'events';
4
4
  import { RuntimeContext } from '../../runtime-context/index.js';
5
5
  import 'ai';
@@ -664,6 +664,7 @@ var NewWorkflow = class extends MastraBase {
664
664
  steps;
665
665
  stepDefs;
666
666
  stepFlow;
667
+ serializedStepFlow;
667
668
  executionEngine;
668
669
  executionGraph;
669
670
  retryConfig;
@@ -687,6 +688,7 @@ var NewWorkflow = class extends MastraBase {
687
688
  this.retryConfig = retryConfig ?? { attempts: 0, delay: 0 };
688
689
  this.executionGraph = this.buildExecutionGraph();
689
690
  this.stepFlow = [];
691
+ this.serializedStepFlow = [];
690
692
  this.#mastra = mastra;
691
693
  this.steps = {};
692
694
  this.stepDefs = steps;
@@ -722,6 +724,15 @@ var NewWorkflow = class extends MastraBase {
722
724
  */
723
725
  then(step) {
724
726
  this.stepFlow.push({ type: "step", step });
727
+ this.serializedStepFlow.push({
728
+ type: "step",
729
+ step: {
730
+ id: step.id,
731
+ description: step.description,
732
+ component: step.component,
733
+ stepFlow: step.stepFlow
734
+ }
735
+ });
725
736
  this.steps[step.id] = step;
726
737
  return this;
727
738
  }
@@ -762,11 +773,32 @@ var NewWorkflow = class extends MastraBase {
762
773
  }
763
774
  });
764
775
  this.stepFlow.push({ type: "step", step: mappingStep });
776
+ this.serializedStepFlow.push({
777
+ type: "step",
778
+ step: {
779
+ id: mappingStep.id,
780
+ description: mappingStep.description,
781
+ component: mappingStep.component,
782
+ stepFlow: mappingStep.stepFlow
783
+ }
784
+ });
765
785
  return this;
766
786
  }
767
787
  // TODO: make typing better here
768
788
  parallel(steps) {
769
789
  this.stepFlow.push({ type: "parallel", steps: steps.map((step) => ({ type: "step", step })) });
790
+ this.serializedStepFlow.push({
791
+ type: "parallel",
792
+ steps: steps.map((step) => ({
793
+ type: "step",
794
+ step: {
795
+ id: step.id,
796
+ description: step.description,
797
+ component: step.component,
798
+ stepFlow: step.stepFlow
799
+ }
800
+ }))
801
+ });
770
802
  steps.forEach((step) => {
771
803
  this.steps[step.id] = step;
772
804
  });
@@ -780,6 +812,19 @@ var NewWorkflow = class extends MastraBase {
780
812
  conditions: steps.map(([cond]) => cond),
781
813
  serializedConditions: steps.map(([cond, _step]) => ({ id: `${_step.id}-condition`, fn: cond.toString() }))
782
814
  });
815
+ this.serializedStepFlow.push({
816
+ type: "conditional",
817
+ steps: steps.map(([_cond, step]) => ({
818
+ type: "step",
819
+ step: {
820
+ id: step.id,
821
+ description: step.description,
822
+ component: step.component,
823
+ stepFlow: step.stepFlow
824
+ }
825
+ })),
826
+ serializedConditions: steps.map(([cond, _step]) => ({ id: `${_step.id}-condition`, fn: cond.toString() }))
827
+ });
783
828
  steps.forEach(([_, step]) => {
784
829
  this.steps[step.id] = step;
785
830
  });
@@ -793,6 +838,17 @@ var NewWorkflow = class extends MastraBase {
793
838
  loopType: "dowhile",
794
839
  serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() }
795
840
  });
841
+ this.serializedStepFlow.push({
842
+ type: "loop",
843
+ step: {
844
+ id: step.id,
845
+ description: step.description,
846
+ component: step.component,
847
+ stepFlow: step.stepFlow
848
+ },
849
+ serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() },
850
+ loopType: "dowhile"
851
+ });
796
852
  this.steps[step.id] = step;
797
853
  return this;
798
854
  }
@@ -804,11 +860,32 @@ var NewWorkflow = class extends MastraBase {
804
860
  loopType: "dountil",
805
861
  serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() }
806
862
  });
863
+ this.serializedStepFlow.push({
864
+ type: "loop",
865
+ step: {
866
+ id: step.id,
867
+ description: step.description,
868
+ component: step.component,
869
+ stepFlow: step.stepFlow
870
+ },
871
+ serializedCondition: { id: `${step.id}-condition`, fn: condition.toString() },
872
+ loopType: "dountil"
873
+ });
807
874
  this.steps[step.id] = step;
808
875
  return this;
809
876
  }
810
877
  foreach(step, opts) {
811
878
  this.stepFlow.push({ type: "foreach", step, opts: opts ?? { concurrency: 1 } });
879
+ this.serializedStepFlow.push({
880
+ type: "foreach",
881
+ step: {
882
+ id: step.id,
883
+ description: step.description,
884
+ component: step.component,
885
+ stepFlow: step.stepFlow
886
+ },
887
+ opts: opts ?? { concurrency: 1 }
888
+ });
812
889
  this.steps[step.id] = step;
813
890
  return this;
814
891
  }
@@ -834,6 +911,9 @@ var NewWorkflow = class extends MastraBase {
834
911
  get stepGraph() {
835
912
  return this.stepFlow;
836
913
  }
914
+ get serializedStepGraph() {
915
+ return this.serializedStepFlow;
916
+ }
837
917
  /**
838
918
  * Creates a new workflow run instance
839
919
  * @param options Optional configuration for the run
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/core",
3
- "version": "0.9.1",
3
+ "version": "0.9.2-alpha.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",