@mastra/core 0.4.2 → 0.4.3-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.
@@ -1,5 +1,5 @@
1
1
  import { a as Metric, T as TestInfo, M as MetricResult } from '../types-m9RryK9a.js';
2
- import { A as Agent } from '../base-hk-xmLC1.js';
2
+ import { A as Agent } from '../base-BQTYN6-G.js';
3
3
  import 'ai';
4
4
  import '../base-D90KQ4XI.js';
5
5
  import '@opentelemetry/api';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as Metric } from './types-m9RryK9a.js';
2
2
  export { M as MetricResult, T as TestInfo } from './types-m9RryK9a.js';
3
- import { m as ToolAction, A as Agent$1, n as AgentConfig, M as MastraStorage$1, a as MastraMemory$1, o as ToolExecutionContext, W as WorkflowOptions } from './base-hk-xmLC1.js';
4
- export { Z as ActionContext, Y as BaseCondition, B as BaseStructuredOutputType, r as CoreAssistantMessage, C as CoreMessage, q as CoreSystemMessage, U as CoreTool, t as CoreToolMessage, s as CoreUserMessage, a6 as DependencyCheckOutput, v as EmbedManyResult, u as EmbedResult, E as EvalRow, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, H as LLMStreamOptions, F as LLMTextObjectOptions, D as LLMTextOptions, L as LanguageModel, P as MemoryConfig, N as MessageResponse, c as MessageType, O as OutputType, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, Q as SharedMemoryConfig, f as StepAction, $ as StepCondition, i as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, j as StepResult, h as StepVariableType, S as StorageColumn, d as StorageGetMessagesArg, b as StorageThreadType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType, a5 as SubscriberFunctionOutput, X as VariableReference, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, p as WorkflowRow, k as WorkflowRunState, aa as WorkflowState } from './base-hk-xmLC1.js';
3
+ import { m as ToolAction, A as Agent$1, n as AgentConfig, M as MastraStorage$1, a as MastraMemory$1, o as ToolExecutionContext, W as WorkflowOptions } from './base-BQTYN6-G.js';
4
+ export { Z as ActionContext, Y as BaseCondition, B as BaseStructuredOutputType, r as CoreAssistantMessage, C as CoreMessage, q as CoreSystemMessage, U as CoreTool, t as CoreToolMessage, s as CoreUserMessage, a6 as DependencyCheckOutput, v as EmbedManyResult, u as EmbedResult, E as EvalRow, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, H as LLMStreamOptions, F as LLMTextObjectOptions, D as LLMTextOptions, L as LanguageModel, P as MemoryConfig, N as MessageResponse, c as MessageType, O as OutputType, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, Q as SharedMemoryConfig, f as StepAction, $ as StepCondition, j as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, h as StepResult, i as StepVariableType, S as StorageColumn, d as StorageGetMessagesArg, b as StorageThreadType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType, a5 as SubscriberFunctionOutput, X as VariableReference, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, ah as WorkflowResumeResult, p as WorkflowRow, k as WorkflowRunState, aa as WorkflowState } from './base-BQTYN6-G.js';
5
5
  import { M as MastraBase$1 } from './base-D90KQ4XI.js';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-D90KQ4XI.js';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-mKY1XrpK.js';
@@ -19,9 +19,9 @@ import { MastraTTS as MastraTTS$1, TTSConfig } from './tts/index.js';
19
19
  export { TagMaskOptions, deepMerge, delay, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, maskStreamTags } from './utils.js';
20
20
  import { MastraVector as MastraVector$1 } from './vector/index.js';
21
21
  export { IndexStats, QueryResult } from './vector/index.js';
22
- import { S as Step, W as Workflow$1 } from './workflow-BxyFP9Wv.js';
23
- export { c as createStep } from './workflow-BxyFP9Wv.js';
24
- export { getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './workflows/index.js';
22
+ import { S as Step, W as Workflow$1 } from './workflow-BNqX20ki.js';
23
+ export { c as createStep } from './workflow-BNqX20ki.js';
24
+ export { getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './workflows/index.js';
25
25
  export { AvailableHooks, executeHook, registerHook } from './hooks/index.js';
26
26
  export { ArrayOperator, BaseFilterTranslator, BasicOperator, ElementOperator, FieldCondition, Filter, LogicalOperator, NumericOperator, OperatorCondition, OperatorSupport, QueryOperator, RegexOperator } from './filter/index.js';
27
27
  export { Message as AiMessageType } from 'ai';
@@ -33,7 +33,6 @@ import '@opentelemetry/sdk-trace-base';
33
33
  import 'stream';
34
34
  import 'pino';
35
35
  import './bundler/index.js';
36
- import 'xstate';
37
36
  import '@opentelemetry/core';
38
37
 
39
38
  declare class Agent<TTools extends Record<string, ToolAction<any, any, any, any>> = Record<string, ToolAction<any, any, any, any>>, TMetrics extends Record<string, Metric> = Record<string, Metric>> extends Agent$1<TTools, TMetrics> {
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { MastraTTS } from './chunk-QAAJAHDB.js';
2
- import { Workflow } from './chunk-XVS6QFTX.js';
3
- export { Step, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './chunk-XVS6QFTX.js';
2
+ import { Workflow } from './chunk-PVFNEHKS.js';
3
+ export { Step, createStep, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './chunk-PVFNEHKS.js';
4
4
  import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
5
5
  import { Tool } from './chunk-ZINPRHAN.js';
6
6
  export { createTool } from './chunk-ZINPRHAN.js';
7
- export { Mastra } from './chunk-KM7PRKJ2.js';
8
- import { MastraMemory } from './chunk-M626YCHO.js';
7
+ export { Mastra } from './chunk-NGD2HQYW.js';
8
+ import { MastraMemory } from './chunk-HQ55LN2U.js';
9
9
  import { MastraVector } from './chunk-55NFNRKO.js';
10
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-PL6URKH2.js';
10
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-5KT47LWQ.js';
11
11
  import { MastraStorage } from './chunk-5XPCMNGW.js';
12
- import { Agent } from './chunk-7TG2Y45H.js';
12
+ import { Agent } from './chunk-EPBACDYE.js';
13
13
  export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-W5HVJX45.js';
14
14
  export { deepMerge, delay, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, maskStreamTags } from './chunk-WIBGG4X6.js';
15
15
  import { MastraDeployer } from './chunk-4YRYBCOZ.js';
@@ -1,17 +1,16 @@
1
- import { W as Workflow } from '../workflow-BxyFP9Wv.js';
1
+ import { W as Workflow } from '../workflow-BNqX20ki.js';
2
2
  import '../base-D90KQ4XI.js';
3
- import { m as ToolAction } from '../base-hk-xmLC1.js';
4
- import 'xstate';
5
- import 'zod';
3
+ import { m as ToolAction } from '../base-BQTYN6-G.js';
6
4
  import '@opentelemetry/api';
5
+ import 'zod';
7
6
  import '../index-mKY1XrpK.js';
8
7
  import 'stream';
9
8
  import 'pino';
10
9
  import '@opentelemetry/sdk-trace-base';
11
10
  import 'ai';
12
- import '../types-m9RryK9a.js';
13
11
  import 'sift';
14
12
  import 'json-schema';
13
+ import '../types-m9RryK9a.js';
15
14
  import '../vector/index.js';
16
15
  import '../voice/index.js';
17
16
  import '../tts/index.js';
@@ -1,13 +1,13 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as BaseStructuredOutputType, r as CoreAssistantMessage, C as CoreMessage, q as CoreSystemMessage, t as CoreToolMessage, s as CoreUserMessage, v as EmbedManyResult, u as EmbedResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, H as LLMStreamOptions, F as LLMTextObjectOptions, D as LLMTextOptions, L as LanguageModel, O as OutputType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType } from '../base-hk-xmLC1.js';
4
+ export { B as BaseStructuredOutputType, r as CoreAssistantMessage, C as CoreMessage, q as CoreSystemMessage, t as CoreToolMessage, s as CoreUserMessage, v as EmbedManyResult, u as EmbedResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, H as LLMStreamOptions, F as LLMTextObjectOptions, D as LLMTextOptions, L as LanguageModel, O as OutputType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType } from '../base-BQTYN6-G.js';
5
5
  import '../index-mKY1XrpK.js';
6
6
  import '../base-D90KQ4XI.js';
7
7
  import '@opentelemetry/api';
8
8
  import '@opentelemetry/sdk-trace-base';
9
- import '../types-m9RryK9a.js';
10
9
  import 'sift';
10
+ import '../types-m9RryK9a.js';
11
11
  import '../vector/index.js';
12
12
  import 'stream';
13
13
  import 'pino';
@@ -1,19 +1,18 @@
1
- import { A as Agent, M as MastraStorage, a as MastraMemory } from '../base-hk-xmLC1.js';
1
+ import { A as Agent, M as MastraStorage, a as MastraMemory } from '../base-BQTYN6-G.js';
2
2
  import { L as Logger, B as BaseLogMessage } from '../index-mKY1XrpK.js';
3
- import { W as Workflow } from '../workflow-BxyFP9Wv.js';
3
+ import { W as Workflow } from '../workflow-BNqX20ki.js';
4
4
  import { MastraVector } from '../vector/index.js';
5
5
  import { O as OtelConfig, T as Telemetry } from '../base-D90KQ4XI.js';
6
6
  import { MastraTTS } from '../tts/index.js';
7
7
  import { MastraDeployer } from '../deployer/index.js';
8
8
  import 'ai';
9
- import '../types-m9RryK9a.js';
10
9
  import 'sift';
11
10
  import 'zod';
12
11
  import 'json-schema';
12
+ import '../types-m9RryK9a.js';
13
13
  import '../voice/index.js';
14
14
  import 'stream';
15
15
  import 'pino';
16
- import 'xstate';
17
16
  import '@opentelemetry/api';
18
17
  import '@opentelemetry/sdk-trace-base';
19
18
  import '../bundler/index.js';
@@ -1 +1 @@
1
- export { Mastra } from '../chunk-KM7PRKJ2.js';
1
+ export { Mastra } from '../chunk-NGD2HQYW.js';
@@ -1,4 +1,4 @@
1
- export { a as MastraMemory, P as MemoryConfig, N as MessageResponse, c as MessageType, Q as SharedMemoryConfig, b as StorageThreadType } from '../base-hk-xmLC1.js';
1
+ export { a as MastraMemory, P as MemoryConfig, N as MessageResponse, c as MessageType, Q as SharedMemoryConfig, b as StorageThreadType } from '../base-BQTYN6-G.js';
2
2
  export { Message as AiMessageType } from 'ai';
3
3
  import '../base-D90KQ4XI.js';
4
4
  import '@opentelemetry/api';
@@ -6,10 +6,10 @@ import '../index-mKY1XrpK.js';
6
6
  import 'stream';
7
7
  import 'pino';
8
8
  import '@opentelemetry/sdk-trace-base';
9
- import '../types-m9RryK9a.js';
10
9
  import 'sift';
11
10
  import 'zod';
12
11
  import 'json-schema';
12
+ import '../types-m9RryK9a.js';
13
13
  import '../vector/index.js';
14
14
  import '../voice/index.js';
15
15
  import '../tts/index.js';
@@ -1 +1 @@
1
- export { MastraMemory } from '../chunk-M626YCHO.js';
1
+ export { MastraMemory } from '../chunk-HQ55LN2U.js';
@@ -1 +1 @@
1
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-PL6URKH2.js';
1
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-5KT47LWQ.js';
@@ -1,4 +1,4 @@
1
- export { E as EvalRow, M as MastraStorage, S as StorageColumn, d as StorageGetMessagesArg, ai as TABLE_EVALS, aj as TABLE_MESSAGES, T as TABLE_NAMES, ak as TABLE_THREADS, al as TABLE_TRACES, ah as TABLE_WORKFLOW_SNAPSHOT, p as WorkflowRow } from '../base-hk-xmLC1.js';
1
+ export { E as EvalRow, M as MastraStorage, S as StorageColumn, d as StorageGetMessagesArg, aj as TABLE_EVALS, ak as TABLE_MESSAGES, T as TABLE_NAMES, al as TABLE_THREADS, am as TABLE_TRACES, ai as TABLE_WORKFLOW_SNAPSHOT, p as WorkflowRow } from '../base-BQTYN6-G.js';
2
2
  import 'ai';
3
3
  import '../base-D90KQ4XI.js';
4
4
  import '@opentelemetry/api';
@@ -6,10 +6,10 @@ import '../index-mKY1XrpK.js';
6
6
  import 'stream';
7
7
  import 'pino';
8
8
  import '@opentelemetry/sdk-trace-base';
9
- import '../types-m9RryK9a.js';
10
9
  import 'sift';
11
10
  import 'zod';
12
11
  import 'json-schema';
12
+ import '../types-m9RryK9a.js';
13
13
  import '../vector/index.js';
14
14
  import '../voice/index.js';
15
15
  import '../tts/index.js';
@@ -1,4 +1,4 @@
1
- import { M as MastraStorage, T as TABLE_NAMES, S as StorageColumn, b as StorageThreadType, c as MessageType, d as StorageGetMessagesArg, E as EvalRow } from '../../base-hk-xmLC1.js';
1
+ import { M as MastraStorage, T as TABLE_NAMES, S as StorageColumn, b as StorageThreadType, c as MessageType, d as StorageGetMessagesArg, E as EvalRow } from '../../base-BQTYN6-G.js';
2
2
  import 'ai';
3
3
  import '../../base-D90KQ4XI.js';
4
4
  import '@opentelemetry/api';
@@ -6,10 +6,10 @@ import '../../index-mKY1XrpK.js';
6
6
  import 'stream';
7
7
  import 'pino';
8
8
  import '@opentelemetry/sdk-trace-base';
9
- import '../../types-m9RryK9a.js';
10
9
  import 'sift';
11
10
  import 'zod';
12
11
  import 'json-schema';
12
+ import '../../types-m9RryK9a.js';
13
13
  import '../../vector/index.js';
14
14
  import '../../voice/index.js';
15
15
  import '../../tts/index.js';
@@ -1 +1 @@
1
- export { LibSQLStore as DefaultStorage, LibSQLStore } from '../../chunk-YLCBP7MP.js';
1
+ export { LibSQLStore as DefaultStorage, LibSQLStore } from '../../chunk-KNVTCZW7.js';
@@ -3,14 +3,14 @@ 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-mKY1XrpK.js';
6
- import { M as MastraStorage } from '../base-hk-xmLC1.js';
6
+ import { M as MastraStorage } from '../base-BQTYN6-G.js';
7
7
  import 'stream';
8
8
  import 'pino';
9
9
  import 'ai';
10
- import '../types-m9RryK9a.js';
11
10
  import 'sift';
12
11
  import 'zod';
13
12
  import 'json-schema';
13
+ import '../types-m9RryK9a.js';
14
14
  import '../vector/index.js';
15
15
  import '../voice/index.js';
16
16
  import '../tts/index.js';
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { o as ToolExecutionContext, m as ToolAction, g as MastraPrimitives } from '../base-hk-xmLC1.js';
3
- export { U as CoreTool } from '../base-hk-xmLC1.js';
2
+ import { o as ToolExecutionContext, m as ToolAction, g as MastraPrimitives } from '../base-BQTYN6-G.js';
3
+ export { U as CoreTool } from '../base-BQTYN6-G.js';
4
4
  import 'ai';
5
5
  import '../base-D90KQ4XI.js';
6
6
  import '@opentelemetry/api';
@@ -8,9 +8,9 @@ import '../index-mKY1XrpK.js';
8
8
  import 'stream';
9
9
  import 'pino';
10
10
  import '@opentelemetry/sdk-trace-base';
11
- import '../types-m9RryK9a.js';
12
11
  import 'sift';
13
12
  import 'json-schema';
13
+ import '../types-m9RryK9a.js';
14
14
  import '../vector/index.js';
15
15
  import '../voice/index.js';
16
16
  import '../tts/index.js';
@@ -1,6 +1,6 @@
1
- import { Snapshot } from 'xstate';
1
+ import { e as StepExecutionContext, f as StepAction, R as RetryConfig, g as MastraPrimitives, h as StepResult, W as WorkflowOptions, I as IAction, i as StepVariableType, j as StepConfig, k as WorkflowRunState, l as StepGraph } from './base-BQTYN6-G.js';
2
+ import { Span } from '@opentelemetry/api';
2
3
  import { z } from 'zod';
3
- import { e as StepExecutionContext, f as StepAction, R as RetryConfig, g as MastraPrimitives, W as WorkflowOptions, I as IAction, h as StepVariableType, i as StepConfig, j as StepResult, k as WorkflowRunState, l as StepGraph } from './base-hk-xmLC1.js';
4
4
  import { M as MastraBase } from './base-D90KQ4XI.js';
5
5
 
6
6
  declare class Step<TStepId extends string = any, TSchemaIn extends z.ZodSchema | undefined = undefined, TSchemaOut extends z.ZodSchema | undefined = undefined, TContext extends StepExecutionContext<TSchemaIn> = StepExecutionContext<TSchemaIn>> implements StepAction<TStepId, TSchemaIn, TSchemaOut, TContext> {
@@ -26,6 +26,7 @@ interface WorkflowResultReturn<T extends z.ZodType<any>> {
26
26
  runId: string;
27
27
  }>;
28
28
  }
29
+
29
30
  declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchema extends z.ZodType<any> = any> extends MastraBase {
30
31
  #private;
31
32
  name: string;
@@ -36,13 +37,6 @@ declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchem
36
37
  * @param logger - Optional logger instance
37
38
  */
38
39
  constructor({ name, triggerSchema, retryConfig, mastra }: WorkflowOptions<TTriggerSchema>);
39
- /**
40
- * Initializes the XState machine for the workflow
41
- *
42
- * Registers the machine's types, actions, actors, initial context, entry actions, initial state, and states
43
- * @returns The initialized machine
44
- */
45
- private initializeMachine;
46
40
  step<TStep extends IAction<any, any, any, any>, CondStep extends StepVariableType<any, any, any, any>, VarStep extends StepVariableType<any, any, any, any>>(step: TStep, config?: StepConfig<TStep, CondStep, VarStep, TTriggerSchema>): this;
47
41
  then<TStep extends IAction<any, any, any, any>, CondStep extends StepVariableType<any, any, any, any>, VarStep extends StepVariableType<any, any, any, any>>(step: TStep, config?: StepConfig<TStep, CondStep, VarStep, TTriggerSchema>): this;
48
42
  after<TStep extends IAction<any, any, any, any>>(step: TStep): Omit<typeof this, "then" | "after">;
@@ -53,16 +47,6 @@ declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchem
53
47
  * @throws Error if trigger schema validation fails
54
48
  */
55
49
  createRun(): WorkflowResultReturn<TTriggerSchema>;
56
- execute({ triggerData, snapshot, runId, stepId, }?: {
57
- stepId?: string;
58
- triggerData?: z.infer<TTriggerSchema>;
59
- runId?: string;
60
- snapshot?: Snapshot<any>;
61
- }): Promise<{
62
- triggerData?: z.infer<TTriggerSchema>;
63
- results: Record<string, StepResult<any>>;
64
- runId: string;
65
- }>;
66
50
  /**
67
51
  * Rebuilds the machine with the current steps configuration and validates the workflow
68
52
  *
@@ -72,6 +56,7 @@ declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchem
72
56
  * @returns this instance for method chaining
73
57
  */
74
58
  commit(): this;
59
+ getExecutionSpan(runId: string): Span | undefined;
75
60
  getState(runId: string): Promise<WorkflowRunState | null>;
76
61
  watch(onTransition: (state: WorkflowRunState) => void): () => void;
77
62
  resume({ runId, stepId, context: resumeContext, }: {
@@ -79,10 +64,17 @@ declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchem
79
64
  stepId: string;
80
65
  context?: Record<string, any>;
81
66
  }): Promise<{
82
- triggerData?: z.infer<TTriggerSchema>;
67
+ triggerData?: z.TypeOf<TTriggerSchema> | undefined;
83
68
  results: Record<string, StepResult<any>>;
69
+ } | undefined>;
70
+ _resume({ runId, stepId, context: resumeContext, }: {
84
71
  runId: string;
85
- }>;
72
+ stepId: string;
73
+ context?: Record<string, any>;
74
+ }): Promise<{
75
+ triggerData?: z.TypeOf<TTriggerSchema> | undefined;
76
+ results: Record<string, StepResult<any>>;
77
+ } | undefined>;
86
78
  __registerPrimitives(p: MastraPrimitives): void;
87
79
  get stepGraph(): StepGraph;
88
80
  get stepSubscriberGraph(): Record<string, StepGraph>;
@@ -1,18 +1,17 @@
1
- export { S as Step, W as Workflow, c as createStep } from '../workflow-BxyFP9Wv.js';
2
- import { X as VariableReference, j as StepResult } from '../base-hk-xmLC1.js';
3
- export { Z as ActionContext, Y as BaseCondition, a6 as DependencyCheckOutput, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, f as StepAction, $ as StepCondition, i as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, h as StepVariableType, a5 as SubscriberFunctionOutput, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, W as WorkflowOptions, k as WorkflowRunState, aa as WorkflowState } from '../base-hk-xmLC1.js';
4
- import 'xstate';
1
+ export { S as Step, W as Workflow, c as createStep } from '../workflow-BNqX20ki.js';
2
+ import { X as VariableReference, h as StepResult } from '../base-BQTYN6-G.js';
3
+ export { Z as ActionContext, Y as BaseCondition, a6 as DependencyCheckOutput, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, f as StepAction, $ as StepCondition, j as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, i as StepVariableType, a5 as SubscriberFunctionOutput, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, W as WorkflowOptions, ah as WorkflowResumeResult, k as WorkflowRunState, aa as WorkflowState } from '../base-BQTYN6-G.js';
4
+ import '@opentelemetry/api';
5
5
  import 'zod';
6
6
  import '../base-D90KQ4XI.js';
7
- import '@opentelemetry/api';
8
7
  import '../index-mKY1XrpK.js';
9
8
  import 'stream';
10
9
  import 'pino';
11
10
  import '@opentelemetry/sdk-trace-base';
12
11
  import 'ai';
13
- import '../types-m9RryK9a.js';
14
12
  import 'sift';
15
13
  import 'json-schema';
14
+ import '../types-m9RryK9a.js';
16
15
  import '../vector/index.js';
17
16
  import '../voice/index.js';
18
17
  import '../tts/index.js';
@@ -27,5 +26,23 @@ declare function isTransitionEvent(stateEvent: any): stateEvent is {
27
26
  };
28
27
  declare function isVariableReference(value: any): value is VariableReference<any, any>;
29
28
  declare function getStepResult(result?: StepResult<any>): any;
29
+ declare function getSuspendedPaths({ value, path, suspendedPaths, }: {
30
+ value: string | Record<string, string>;
31
+ path: string;
32
+ suspendedPaths: Set<string>;
33
+ }): void;
34
+ declare function isFinalState(status: string): boolean;
35
+ declare function recursivelyCheckForFinalState({ value, suspendedPaths, path, }: {
36
+ value: string | Record<string, string>;
37
+ suspendedPaths: Set<string>;
38
+ path: string;
39
+ }): boolean;
40
+ declare function getActivePathsAndStatus(value: Record<string, any>): Array<{
41
+ stepPath: string[];
42
+ stepId: string;
43
+ status: string;
44
+ }>;
45
+ declare function mergeChildValue(startStepId: string, parent: Record<string, any>, child: Record<string, any>): Record<string, any>;
46
+ declare const updateStepInHierarchy: (value: Record<string, any>, targetStepId: string) => Record<string, any>;
30
47
 
31
- export { StepResult, VariableReference, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference };
48
+ export { StepResult, VariableReference, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy };
@@ -1 +1 @@
1
- export { Step, Workflow, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from '../chunk-XVS6QFTX.js';
1
+ export { Step, Workflow, createStep, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from '../chunk-PVFNEHKS.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/core",
3
- "version": "0.4.2",
3
+ "version": "0.4.3-alpha.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",