@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.
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/{base-QJ_GwQxQ.d.cts → base-DI6ChaUK.d.cts} +35 -1
- package/dist/{base-BS0LLAna.d.ts → base-bWFiU8RL.d.ts} +35 -1
- package/dist/eval/index.d.cts +1 -1
- package/dist/eval/index.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/integration/index.d.cts +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/llm/index.d.cts +1 -1
- package/dist/llm/index.d.ts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.ts +1 -1
- package/dist/memory/index.d.cts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/network/index.d.cts +1 -1
- package/dist/network/index.d.ts +1 -1
- package/dist/relevance/index.d.cts +1 -1
- package/dist/relevance/index.d.ts +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/libsql/index.d.cts +1 -1
- package/dist/storage/libsql/index.d.ts +1 -1
- package/dist/telemetry/index.d.cts +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/index.d.cts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/voice/index.d.cts +1 -1
- package/dist/voice/index.d.ts +1 -1
- package/dist/workflows/index.d.cts +2 -2
- package/dist/workflows/index.d.ts +2 -2
- package/dist/workflows/vNext/index.cjs +80 -0
- package/dist/workflows/vNext/index.d.cts +2 -2
- package/dist/workflows/vNext/index.d.ts +2 -2
- package/dist/workflows/vNext/index.js +80 -0
- package/package.json +1 -1
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
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';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
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
|
|
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
|
|
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 };
|
package/dist/eval/index.d.cts
CHANGED
|
@@ -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 {
|
|
3
|
+
import { D as Agent } from '../base-DI6ChaUK.cjs';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../base-BihKcqDY.cjs';
|
|
6
6
|
import '@opentelemetry/api';
|
package/dist/eval/index.d.ts
CHANGED
|
@@ -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 {
|
|
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 {
|
|
4
|
-
export {
|
|
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 {
|
|
4
|
-
export {
|
|
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/llm/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
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';
|
package/dist/llm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
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';
|
package/dist/mastra/index.d.cts
CHANGED
package/dist/mastra/index.d.ts
CHANGED
package/dist/memory/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/network/index.d.cts
CHANGED
package/dist/network/index.d.ts
CHANGED
package/dist/server/index.d.cts
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/storage/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg,
|
|
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';
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg,
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
6
|
+
import { b as MastraStorage } from '../base-bWFiU8RL.js';
|
|
7
7
|
import 'stream';
|
|
8
8
|
import 'pino';
|
|
9
9
|
import 'ai';
|
package/dist/tools/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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 {
|
|
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 {
|
|
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';
|
package/dist/voice/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/voice/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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 {
|
|
2
|
-
export {
|
|
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 {
|
|
2
|
-
export {
|
|
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-
|
|
2
|
-
export {
|
|
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-
|
|
2
|
-
export {
|
|
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
|