@mastra/core 0.10.13 → 0.10.14
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/a2a.d.ts +1 -0
- package/agent.d.ts +1 -0
- package/base.d.ts +1 -0
- package/bundler.d.ts +1 -0
- package/deployer.d.ts +1 -0
- package/di.d.ts +1 -0
- package/dist/a2a/index.cjs +79 -0
- package/dist/a2a/index.d.cts +780 -0
- package/dist/a2a/index.d.ts +780 -0
- package/dist/a2a/index.js +68 -0
- package/dist/agent/index.cjs +15 -0
- package/dist/agent/index.d.cts +29 -0
- package/dist/agent/index.d.ts +29 -0
- package/dist/agent/index.js +2 -0
- package/dist/base-B_y9sMg0.d.cts +162 -0
- package/dist/base-CS5eSXbL.d.cts +4117 -0
- package/dist/base-ClrXcCRx.d.ts +162 -0
- package/dist/base-DBhKcre4.d.ts +4117 -0
- package/dist/base.cjs +10 -0
- package/dist/base.d.cts +6 -0
- package/dist/base.d.ts +6 -0
- package/dist/base.js +1 -0
- package/dist/bundler/index.cjs +10 -0
- package/dist/bundler/index.d.cts +30 -0
- package/dist/bundler/index.d.ts +30 -0
- package/dist/bundler/index.js +1 -0
- package/dist/chunk-2GRYVZ2O.cjs +244 -0
- package/dist/chunk-2HDFKWFU.js +2249 -0
- package/dist/chunk-32C7JDIZ.js +1 -0
- package/dist/chunk-4UBOJFSL.js +989 -0
- package/dist/chunk-4UWPFBC6.js +88 -0
- package/dist/chunk-4Z3OU5RY.cjs +31 -0
- package/dist/chunk-5HTMDAXP.js +359 -0
- package/dist/chunk-5IEKR756.js +53 -0
- package/dist/chunk-5YDTZN2X.js +114 -0
- package/dist/chunk-6UNGH46J.js +75 -0
- package/dist/chunk-6Y4UL5Z6.cjs +94 -0
- package/dist/chunk-7F6BQXE2.cjs +425 -0
- package/dist/chunk-7H2GET5Z.cjs +668 -0
- package/dist/chunk-7HZ6NIAF.cjs +2 -0
- package/dist/chunk-7MZNOW6W.cjs +2263 -0
- package/dist/chunk-7XQIPES3.js +668 -0
- package/dist/chunk-AKYTYALY.js +70 -0
- package/dist/chunk-ATXBSEFT.js +22 -0
- package/dist/chunk-B6TOBUS6.cjs +80 -0
- package/dist/chunk-B7SQOKEC.cjs +91 -0
- package/dist/chunk-BB4KXGBU.js +83 -0
- package/dist/chunk-BB6DPGIV.cjs +6 -0
- package/dist/chunk-C4LMN2IR.js +27 -0
- package/dist/chunk-DFFVEKIG.js +407 -0
- package/dist/chunk-E7AX3U6M.cjs +659 -0
- package/dist/chunk-EWCOOO3H.js +5007 -0
- package/dist/chunk-F2WMR75C.cjs +183 -0
- package/dist/chunk-FBKJ3652.cjs +5034 -0
- package/dist/chunk-FEYYOBBG.cjs +24 -0
- package/dist/chunk-FL5SZ2XU.js +181 -0
- package/dist/chunk-GH2KM66J.js +37 -0
- package/dist/chunk-GWFS5DAR.cjs +37 -0
- package/dist/chunk-HNEE7IF4.js +60 -0
- package/dist/chunk-HSVOEWAM.cjs +2 -0
- package/dist/chunk-J52TXHZV.cjs +73 -0
- package/dist/chunk-JNMQKJH4.js +10 -0
- package/dist/chunk-JQOMTERC.js +89 -0
- package/dist/chunk-LABUWBKX.cjs +71 -0
- package/dist/chunk-LXFZUKP3.cjs +34 -0
- package/dist/chunk-MP2QBLUJ.cjs +70 -0
- package/dist/chunk-MUNFCOMB.cjs +62 -0
- package/dist/chunk-NH5WJNNS.js +1 -0
- package/dist/chunk-P3Q73CAW.cjs +55 -0
- package/dist/chunk-PA2YIVIT.js +61 -0
- package/dist/chunk-QFTBW7ZZ.cjs +2 -0
- package/dist/chunk-QQ5K5TZE.cjs +619 -0
- package/dist/chunk-QUSEDVYI.cjs +991 -0
- package/dist/chunk-R4V75T7J.js +1 -0
- package/dist/chunk-SGGPJWRQ.js +69 -0
- package/dist/chunk-ST5RMVLG.cjs +87 -0
- package/dist/chunk-TC2SCOTE.js +605 -0
- package/dist/chunk-U64IJDC5.cjs +109 -0
- package/dist/chunk-UX3B6S2I.cjs +65 -0
- package/dist/chunk-V5D2LIF5.js +68 -0
- package/dist/chunk-VG4OPO2R.js +240 -0
- package/dist/chunk-WQNOATKB.js +103 -0
- package/dist/chunk-Y7D2JLKS.js +4 -0
- package/dist/chunk-YJEHXYK5.js +657 -0
- package/dist/chunk-YOQP5T77.js +32 -0
- package/dist/chunk-ZIZ3CVHN.cjs +120 -0
- package/dist/chunk-ZPOUMTTH.cjs +362 -0
- package/dist/chunk-ZZLBNB3U.cjs +12 -0
- package/dist/deployer/index.cjs +10 -0
- package/dist/deployer/index.d.cts +19 -0
- package/dist/deployer/index.d.ts +19 -0
- package/dist/deployer/index.js +1 -0
- package/dist/di/index.cjs +10 -0
- package/dist/di/index.d.cts +1 -0
- package/dist/di/index.d.ts +1 -0
- package/dist/di/index.js +1 -0
- package/dist/error/index.cjs +22 -0
- package/dist/error/index.d.cts +86 -0
- package/dist/error/index.d.ts +86 -0
- package/dist/error/index.js +1 -0
- package/dist/eval/index.cjs +14 -0
- package/dist/eval/index.d.cts +43 -0
- package/dist/eval/index.d.ts +43 -0
- package/dist/eval/index.js +1 -0
- package/dist/hooks/index.cjs +18 -0
- package/dist/hooks/index.d.cts +33 -0
- package/dist/hooks/index.d.ts +33 -0
- package/dist/hooks/index.js +1 -0
- package/dist/index.cjs +281 -0
- package/dist/index.d.cts +92 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +112 -0
- package/dist/integration/index.cjs +14 -0
- package/dist/integration/index.d.cts +65 -0
- package/dist/integration/index.d.ts +65 -0
- package/dist/integration/index.js +1 -0
- package/dist/llm/index.cjs +10 -0
- package/dist/llm/index.d.cts +29 -0
- package/dist/llm/index.d.ts +29 -0
- package/dist/llm/index.js +1 -0
- package/dist/logger/index.cjs +43 -0
- package/dist/logger/index.d.cts +96 -0
- package/dist/logger/index.d.ts +96 -0
- package/dist/logger/index.js +2 -0
- package/dist/logger-B8XXh6ya.d.cts +159 -0
- package/dist/logger-Bpa2oLL4.d.ts +159 -0
- package/dist/mastra/index.cjs +10 -0
- package/dist/mastra/index.d.cts +29 -0
- package/dist/mastra/index.d.ts +29 -0
- package/dist/mastra/index.js +1 -0
- package/dist/mcp/index.cjs +106 -0
- package/dist/mcp/index.d.cts +29 -0
- package/dist/mcp/index.d.ts +29 -0
- package/dist/mcp/index.js +100 -0
- package/dist/memory/index.cjs +18 -0
- package/dist/memory/index.d.cts +29 -0
- package/dist/memory/index.d.ts +29 -0
- package/dist/memory/index.js +1 -0
- package/dist/network/index.cjs +311 -0
- package/dist/network/index.d.cts +29 -0
- package/dist/network/index.d.ts +29 -0
- package/dist/network/index.js +309 -0
- package/dist/network/vNext/index.cjs +873 -0
- package/dist/network/vNext/index.d.cts +29 -0
- package/dist/network/vNext/index.d.ts +29 -0
- package/dist/network/vNext/index.js +871 -0
- package/dist/relevance/index.cjs +18 -0
- package/dist/relevance/index.d.cts +49 -0
- package/dist/relevance/index.d.ts +49 -0
- package/dist/relevance/index.js +1 -0
- package/dist/runtime-context/index.cjs +10 -0
- package/dist/runtime-context/index.d.cts +52 -0
- package/dist/runtime-context/index.d.ts +52 -0
- package/dist/runtime-context/index.js +1 -0
- package/dist/server/index.cjs +62 -0
- package/dist/server/index.d.cts +52 -0
- package/dist/server/index.d.ts +52 -0
- package/dist/server/index.js +59 -0
- package/dist/storage/index.cjs +336 -0
- package/dist/storage/index.d.cts +149 -0
- package/dist/storage/index.d.ts +149 -0
- package/dist/storage/index.js +303 -0
- package/dist/telemetry/index.cjs +30 -0
- package/dist/telemetry/index.d.cts +75 -0
- package/dist/telemetry/index.d.ts +75 -0
- package/dist/telemetry/index.js +1 -0
- package/dist/telemetry/otel-vendor.cjs +103 -0
- package/dist/telemetry/otel-vendor.d.cts +20 -0
- package/dist/telemetry/otel-vendor.d.ts +20 -0
- package/dist/telemetry/otel-vendor.js +57 -0
- package/dist/tools/index.cjs +18 -0
- package/dist/tools/index.d.cts +41 -0
- package/dist/tools/index.d.ts +41 -0
- package/dist/tools/index.js +1 -0
- package/dist/tts/index.cjs +10 -0
- package/dist/tts/index.d.cts +28 -0
- package/dist/tts/index.d.ts +28 -0
- package/dist/tts/index.js +1 -0
- package/dist/types-Bo1uigWx.d.cts +17 -0
- package/dist/types-Bo1uigWx.d.ts +17 -0
- package/dist/utils.cjs +58 -0
- package/dist/utils.d.cts +149 -0
- package/dist/utils.d.ts +149 -0
- package/dist/utils.js +1 -0
- package/dist/vector/filter/index.cjs +192 -0
- package/dist/vector/filter/index.d.cts +128 -0
- package/dist/vector/filter/index.d.ts +128 -0
- package/dist/vector/filter/index.js +190 -0
- package/dist/vector/index.cjs +10 -0
- package/dist/vector/index.d.cts +77 -0
- package/dist/vector/index.d.ts +77 -0
- package/dist/vector/index.js +1 -0
- package/dist/voice/index.cjs +18 -0
- package/dist/voice/index.d.cts +29 -0
- package/dist/voice/index.d.ts +29 -0
- package/dist/voice/index.js +1 -0
- package/dist/workflows/constants.cjs +10 -0
- package/dist/workflows/constants.d.cts +3 -0
- package/dist/workflows/constants.d.ts +3 -0
- package/dist/workflows/constants.js +1 -0
- package/dist/workflows/index.cjs +42 -0
- package/dist/workflows/index.d.cts +282 -0
- package/dist/workflows/index.d.ts +282 -0
- package/dist/workflows/index.js +1 -0
- package/dist/workflows/legacy/index.cjs +90 -0
- package/dist/workflows/legacy/index.d.cts +91 -0
- package/dist/workflows/legacy/index.d.ts +91 -0
- package/dist/workflows/legacy/index.js +1 -0
- package/error.d.ts +1 -0
- package/eval.d.ts +1 -0
- package/hooks.d.ts +1 -0
- package/integration.d.ts +1 -0
- package/llm.d.ts +1 -0
- package/logger.d.ts +1 -0
- package/mastra.d.ts +1 -0
- package/mcp.d.ts +1 -0
- package/memory.d.ts +1 -0
- package/network/vNext.d.ts +1 -0
- package/network.d.ts +1 -0
- package/package.json +1 -1
- package/relevance.d.ts +1 -0
- package/runtime-context.d.ts +1 -0
- package/server.d.ts +1 -0
- package/storage.d.ts +1 -0
- package/telemetry/otel-vendor.d.ts +1 -0
- package/telemetry.d.ts +1 -0
- package/tools.d.ts +1 -0
- package/tts.d.ts +1 -0
- package/utils.d.ts +1 -0
- package/vector/filter.d.ts +1 -0
- package/vector.d.ts +1 -0
- package/voice.d.ts +1 -0
- package/workflows/_constants.d.ts +1 -0
- package/workflows/legacy.d.ts +1 -0
- package/workflows.d.ts +1 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { bm as ExecutionEngine, f as Step, bo as Emitter, bu as StepResult, bl as ExecutionGraph, bc as SerializedStepFlowEntry, ba as StepFlowEntry, bn as ExecuteFunction, aw as DefaultEngineType } from '../base-DBhKcre4.js';
|
|
2
|
+
export { bw as DynamicMapping, bz as ExtractSchemaFromStep, by as ExtractSchemaType, bx as PathsToStringProps, bk as Run, bb as SerializedStep, bq as StepFailure, bs as StepRunning, bp as StepSuccess, br as StepSuspended, bt as StepWaiting, bd as StepWithComponent, bv as StepsRecord, bB as StreamEvent, bA as VariableReference, bD as WatchEvent, e as Workflow, ax as WorkflowConfig, bj as WorkflowResult, bF as WorkflowRunState, bC as WorkflowRunStatus, bE as ZodPathType, bg as cloneStep, bi as cloneWorkflow, bf as createStep, bh as createWorkflow, be as mapVariable } from '../base-DBhKcre4.js';
|
|
3
|
+
import { Span } from '@opentelemetry/api';
|
|
4
|
+
import { RuntimeContext } from '../runtime-context/index.js';
|
|
5
|
+
import 'ai';
|
|
6
|
+
import '../base-ClrXcCRx.js';
|
|
7
|
+
import '../logger-Bpa2oLL4.js';
|
|
8
|
+
import '../error/index.js';
|
|
9
|
+
import 'stream';
|
|
10
|
+
import '@opentelemetry/sdk-trace-base';
|
|
11
|
+
import 'zod';
|
|
12
|
+
import 'json-schema';
|
|
13
|
+
import '../types-Bo1uigWx.js';
|
|
14
|
+
import 'sift';
|
|
15
|
+
import 'xstate';
|
|
16
|
+
import 'node:events';
|
|
17
|
+
import '../vector/index.js';
|
|
18
|
+
import '../vector/filter/index.js';
|
|
19
|
+
import '../tts/index.js';
|
|
20
|
+
import 'node:http';
|
|
21
|
+
import 'hono';
|
|
22
|
+
import 'stream/web';
|
|
23
|
+
import 'events';
|
|
24
|
+
import 'node:stream/web';
|
|
25
|
+
import './constants.js';
|
|
26
|
+
import 'ai/test';
|
|
27
|
+
import '../deployer/index.js';
|
|
28
|
+
import '../bundler/index.js';
|
|
29
|
+
import 'hono/cors';
|
|
30
|
+
import 'hono-openapi';
|
|
31
|
+
|
|
32
|
+
type ExecutionContext = {
|
|
33
|
+
workflowId: string;
|
|
34
|
+
runId: string;
|
|
35
|
+
executionPath: number[];
|
|
36
|
+
suspendedPaths: Record<string, number[]>;
|
|
37
|
+
retryConfig: {
|
|
38
|
+
attempts: number;
|
|
39
|
+
delay: number;
|
|
40
|
+
};
|
|
41
|
+
executionSpan: Span;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Default implementation of the ExecutionEngine using XState
|
|
45
|
+
*/
|
|
46
|
+
declare class DefaultExecutionEngine extends ExecutionEngine {
|
|
47
|
+
/**
|
|
48
|
+
* The runCounts map is used to keep track of the run count for each step.
|
|
49
|
+
* The step id is used as the key and the run count is the value.
|
|
50
|
+
*/
|
|
51
|
+
protected runCounts: Map<string, number>;
|
|
52
|
+
/**
|
|
53
|
+
* Get or generate the run count for a step.
|
|
54
|
+
* If the step id is not in the map, it will be added and the run count will be 0.
|
|
55
|
+
* If the step id is in the map, it will return the run count.
|
|
56
|
+
*
|
|
57
|
+
* @param stepId - The id of the step.
|
|
58
|
+
* @returns The run count for the step.
|
|
59
|
+
*/
|
|
60
|
+
protected getOrGenerateRunCount(stepId: Step['id']): number;
|
|
61
|
+
protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: Emitter, stepResults: Record<string, StepResult<any, any, any, any>>, lastOutput: StepResult<any, any, any, any>, error?: Error | string): Promise<TOutput>;
|
|
62
|
+
/**
|
|
63
|
+
* Executes a workflow run with the provided execution graph and input
|
|
64
|
+
* @param graph The execution graph to execute
|
|
65
|
+
* @param input The input data for the workflow
|
|
66
|
+
* @returns A promise that resolves to the workflow output
|
|
67
|
+
*/
|
|
68
|
+
execute<TInput, TOutput>(params: {
|
|
69
|
+
workflowId: string;
|
|
70
|
+
runId: string;
|
|
71
|
+
graph: ExecutionGraph;
|
|
72
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
73
|
+
input?: TInput;
|
|
74
|
+
resume?: {
|
|
75
|
+
steps: string[];
|
|
76
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
77
|
+
resumePayload: any;
|
|
78
|
+
resumePath: number[];
|
|
79
|
+
};
|
|
80
|
+
emitter: Emitter;
|
|
81
|
+
retryConfig?: {
|
|
82
|
+
attempts?: number;
|
|
83
|
+
delay?: number;
|
|
84
|
+
};
|
|
85
|
+
runtimeContext: RuntimeContext;
|
|
86
|
+
abortController: AbortController;
|
|
87
|
+
}): Promise<TOutput>;
|
|
88
|
+
getStepOutput(stepResults: Record<string, any>, step?: StepFlowEntry): any;
|
|
89
|
+
executeSleep({ runId, entry, prevOutput, stepResults, emitter, abortController, runtimeContext, }: {
|
|
90
|
+
workflowId: string;
|
|
91
|
+
runId: string;
|
|
92
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
93
|
+
entry: {
|
|
94
|
+
type: 'sleep';
|
|
95
|
+
id: string;
|
|
96
|
+
duration?: number;
|
|
97
|
+
fn?: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
98
|
+
};
|
|
99
|
+
prevStep: StepFlowEntry;
|
|
100
|
+
prevOutput: any;
|
|
101
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
102
|
+
resume?: {
|
|
103
|
+
steps: string[];
|
|
104
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
105
|
+
resumePayload: any;
|
|
106
|
+
resumePath: number[];
|
|
107
|
+
};
|
|
108
|
+
executionContext: ExecutionContext;
|
|
109
|
+
emitter: Emitter;
|
|
110
|
+
abortController: AbortController;
|
|
111
|
+
runtimeContext: RuntimeContext;
|
|
112
|
+
}): Promise<void>;
|
|
113
|
+
executeSleepUntil({ runId, entry, prevOutput, stepResults, emitter, abortController, runtimeContext, }: {
|
|
114
|
+
workflowId: string;
|
|
115
|
+
runId: string;
|
|
116
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
117
|
+
entry: {
|
|
118
|
+
type: 'sleepUntil';
|
|
119
|
+
id: string;
|
|
120
|
+
date?: Date;
|
|
121
|
+
fn?: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
122
|
+
};
|
|
123
|
+
prevStep: StepFlowEntry;
|
|
124
|
+
prevOutput: any;
|
|
125
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
126
|
+
resume?: {
|
|
127
|
+
steps: string[];
|
|
128
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
129
|
+
resumePayload: any;
|
|
130
|
+
resumePath: number[];
|
|
131
|
+
};
|
|
132
|
+
executionContext: ExecutionContext;
|
|
133
|
+
emitter: Emitter;
|
|
134
|
+
abortController: AbortController;
|
|
135
|
+
runtimeContext: RuntimeContext;
|
|
136
|
+
}): Promise<void>;
|
|
137
|
+
executeWaitForEvent({ event, emitter, timeout, }: {
|
|
138
|
+
event: string;
|
|
139
|
+
emitter: Emitter;
|
|
140
|
+
timeout?: number;
|
|
141
|
+
}): Promise<any>;
|
|
142
|
+
executeStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, abortController, runtimeContext, }: {
|
|
143
|
+
workflowId: string;
|
|
144
|
+
runId: string;
|
|
145
|
+
step: Step<string, any, any>;
|
|
146
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
147
|
+
executionContext: ExecutionContext;
|
|
148
|
+
resume?: {
|
|
149
|
+
steps: string[];
|
|
150
|
+
resumePayload: any;
|
|
151
|
+
};
|
|
152
|
+
prevOutput: any;
|
|
153
|
+
emitter: Emitter;
|
|
154
|
+
abortController: AbortController;
|
|
155
|
+
runtimeContext: RuntimeContext;
|
|
156
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
157
|
+
executeParallel({ workflowId, runId, entry, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
158
|
+
workflowId: string;
|
|
159
|
+
runId: string;
|
|
160
|
+
entry: {
|
|
161
|
+
type: 'parallel';
|
|
162
|
+
steps: StepFlowEntry[];
|
|
163
|
+
};
|
|
164
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
165
|
+
prevStep: StepFlowEntry;
|
|
166
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
167
|
+
resume?: {
|
|
168
|
+
steps: string[];
|
|
169
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
170
|
+
resumePayload: any;
|
|
171
|
+
resumePath: number[];
|
|
172
|
+
};
|
|
173
|
+
executionContext: ExecutionContext;
|
|
174
|
+
emitter: Emitter;
|
|
175
|
+
abortController: AbortController;
|
|
176
|
+
runtimeContext: RuntimeContext;
|
|
177
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
178
|
+
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
179
|
+
workflowId: string;
|
|
180
|
+
runId: string;
|
|
181
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
182
|
+
entry: {
|
|
183
|
+
type: 'conditional';
|
|
184
|
+
steps: StepFlowEntry[];
|
|
185
|
+
conditions: ExecuteFunction<any, any, any, any, DefaultEngineType>[];
|
|
186
|
+
};
|
|
187
|
+
prevStep: StepFlowEntry;
|
|
188
|
+
prevOutput: any;
|
|
189
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
190
|
+
resume?: {
|
|
191
|
+
steps: string[];
|
|
192
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
193
|
+
resumePayload: any;
|
|
194
|
+
resumePath: number[];
|
|
195
|
+
};
|
|
196
|
+
executionContext: ExecutionContext;
|
|
197
|
+
emitter: Emitter;
|
|
198
|
+
abortController: AbortController;
|
|
199
|
+
runtimeContext: RuntimeContext;
|
|
200
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
201
|
+
executeLoop({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
202
|
+
workflowId: string;
|
|
203
|
+
runId: string;
|
|
204
|
+
entry: {
|
|
205
|
+
type: 'loop';
|
|
206
|
+
step: Step;
|
|
207
|
+
condition: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
208
|
+
loopType: 'dowhile' | 'dountil';
|
|
209
|
+
};
|
|
210
|
+
prevStep: StepFlowEntry;
|
|
211
|
+
prevOutput: any;
|
|
212
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
213
|
+
resume?: {
|
|
214
|
+
steps: string[];
|
|
215
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
216
|
+
resumePayload: any;
|
|
217
|
+
resumePath: number[];
|
|
218
|
+
};
|
|
219
|
+
executionContext: ExecutionContext;
|
|
220
|
+
emitter: Emitter;
|
|
221
|
+
abortController: AbortController;
|
|
222
|
+
runtimeContext: RuntimeContext;
|
|
223
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
224
|
+
executeForeach({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
225
|
+
workflowId: string;
|
|
226
|
+
runId: string;
|
|
227
|
+
entry: {
|
|
228
|
+
type: 'foreach';
|
|
229
|
+
step: Step;
|
|
230
|
+
opts: {
|
|
231
|
+
concurrency: number;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
prevStep: StepFlowEntry;
|
|
235
|
+
prevOutput: any;
|
|
236
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
237
|
+
resume?: {
|
|
238
|
+
steps: string[];
|
|
239
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
240
|
+
resumePayload: any;
|
|
241
|
+
resumePath: number[];
|
|
242
|
+
};
|
|
243
|
+
executionContext: ExecutionContext;
|
|
244
|
+
emitter: Emitter;
|
|
245
|
+
abortController: AbortController;
|
|
246
|
+
runtimeContext: RuntimeContext;
|
|
247
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
248
|
+
protected persistStepUpdate({ workflowId, runId, stepResults, serializedStepGraph, executionContext, workflowStatus, result, error, }: {
|
|
249
|
+
workflowId: string;
|
|
250
|
+
runId: string;
|
|
251
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
252
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
253
|
+
executionContext: ExecutionContext;
|
|
254
|
+
workflowStatus: 'success' | 'failed' | 'suspended' | 'running' | 'waiting';
|
|
255
|
+
result?: Record<string, any>;
|
|
256
|
+
error?: string | Error;
|
|
257
|
+
}): Promise<void>;
|
|
258
|
+
executeEntry({ workflowId, runId, entry, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
259
|
+
workflowId: string;
|
|
260
|
+
runId: string;
|
|
261
|
+
entry: StepFlowEntry;
|
|
262
|
+
prevStep: StepFlowEntry;
|
|
263
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
264
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
265
|
+
resume?: {
|
|
266
|
+
steps: string[];
|
|
267
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
268
|
+
resumePayload: any;
|
|
269
|
+
resumePath: number[];
|
|
270
|
+
};
|
|
271
|
+
executionContext: ExecutionContext;
|
|
272
|
+
emitter: Emitter;
|
|
273
|
+
abortController: AbortController;
|
|
274
|
+
runtimeContext: RuntimeContext;
|
|
275
|
+
}): Promise<{
|
|
276
|
+
result: StepResult<any, any, any, any>;
|
|
277
|
+
stepResults?: Record<string, StepResult<any, any, any, any>>;
|
|
278
|
+
executionContext?: ExecutionContext;
|
|
279
|
+
}>;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export { DefaultEngineType, DefaultExecutionEngine, Emitter, ExecuteFunction, type ExecutionContext, ExecutionEngine, ExecutionGraph, SerializedStepFlowEntry, Step, StepFlowEntry, StepResult };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DefaultExecutionEngine, ExecutionEngine, Run, Workflow, cloneStep, cloneWorkflow, createStep, createWorkflow, mapVariable } from '../chunk-2HDFKWFU.js';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFBKJ3652_cjs = require('../../chunk-FBKJ3652.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "LegacyStep", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkFBKJ3652_cjs.LegacyStep; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "LegacyWorkflow", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkFBKJ3652_cjs.LegacyWorkflow; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "WhenConditionReturnValue", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkFBKJ3652_cjs.WhenConditionReturnValue; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "agentToStep", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkFBKJ3652_cjs.agentToStep; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "getActivePathsAndStatus", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkFBKJ3652_cjs.getActivePathsAndStatus; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "getResultActivePaths", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkFBKJ3652_cjs.getResultActivePaths; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "getStepResult", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkFBKJ3652_cjs.getStepResult; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "getSuspendedPaths", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkFBKJ3652_cjs.getSuspendedPaths; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "isAgent", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkFBKJ3652_cjs.isAgent; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "isConditionalKey", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkFBKJ3652_cjs.isConditionalKey; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "isErrorEvent", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkFBKJ3652_cjs.isErrorEvent; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "isFinalState", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkFBKJ3652_cjs.isFinalState; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "isLimboState", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkFBKJ3652_cjs.isLimboState; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "isTransitionEvent", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunkFBKJ3652_cjs.isTransitionEvent; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "isVariableReference", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return chunkFBKJ3652_cjs.isVariableReference; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "isWorkflow", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunkFBKJ3652_cjs.isWorkflow; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "mergeChildValue", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunkFBKJ3652_cjs.mergeChildValue; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "recursivelyCheckForFinalState", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunkFBKJ3652_cjs.recursivelyCheckForFinalState; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "resolveVariables", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return chunkFBKJ3652_cjs.resolveVariables; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "updateStepInHierarchy", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return chunkFBKJ3652_cjs.updateStepInHierarchy; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "workflowToStep", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return chunkFBKJ3652_cjs.workflowToStep; }
|
|
90
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Q as VariableReference, R as StepResult, d as LegacyStep, L as LegacyWorkflow, A as Agent, W as WorkflowContext, T as ToolsInput, M as Mastra, U as StepAction, X as LegacyWorkflowRunResult } from '../../base-CS5eSXbL.cjs';
|
|
2
|
+
export { a2 as ActionContext, a1 as BaseCondition, ad as DependencyCheckOutput, ak as ExtractSchemaFromStep, an as ExtractSchemaType, al as ExtractStepResult, ap as LegacyWorkflowRunState, ai as LegacyWorkflowState, ao as PathsToStringProps, aa as ResolverFunctionInput, ab as ResolverFunctionOutput, a0 as RetryConfig, a5 as StepCondition, a6 as StepConfig, a4 as StepDef, S as StepExecutionContext, $ as StepGraph, aj as StepId, am as StepInputType, _ as StepNode, ae as StepResolverOutput, Z as StepVariableType, a7 as StepsRecord, ac as SubscriberFunctionOutput, a3 as WhenConditionReturnValue, ag as WorkflowActionParams, ah as WorkflowActions, af as WorkflowActors, a9 as WorkflowEvent, a8 as WorkflowLogMessage, Y as WorkflowOptions, aq as WorkflowResumeResult } from '../../base-CS5eSXbL.cjs';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { M as Metric } from '../../types-Bo1uigWx.cjs';
|
|
5
|
+
import { I as IMastraLogger } from '../../logger-B8XXh6ya.cjs';
|
|
6
|
+
import '../../base-B_y9sMg0.cjs';
|
|
7
|
+
import 'ai';
|
|
8
|
+
import 'json-schema';
|
|
9
|
+
import 'sift';
|
|
10
|
+
import '../../runtime-context/index.cjs';
|
|
11
|
+
import '@opentelemetry/api';
|
|
12
|
+
import 'xstate';
|
|
13
|
+
import 'node:events';
|
|
14
|
+
import '../../vector/index.cjs';
|
|
15
|
+
import '../../vector/filter/index.cjs';
|
|
16
|
+
import '../../tts/index.cjs';
|
|
17
|
+
import '../../error/index.cjs';
|
|
18
|
+
import 'stream';
|
|
19
|
+
import '@opentelemetry/sdk-trace-base';
|
|
20
|
+
import 'node:http';
|
|
21
|
+
import 'hono';
|
|
22
|
+
import 'stream/web';
|
|
23
|
+
import 'events';
|
|
24
|
+
import 'node:stream/web';
|
|
25
|
+
import '../constants.cjs';
|
|
26
|
+
import 'ai/test';
|
|
27
|
+
import '../../deployer/index.cjs';
|
|
28
|
+
import '../../bundler/index.cjs';
|
|
29
|
+
import 'hono/cors';
|
|
30
|
+
import 'hono-openapi';
|
|
31
|
+
|
|
32
|
+
declare function isErrorEvent(stateEvent: any): stateEvent is {
|
|
33
|
+
type: `xstate.error.actor.${string}`;
|
|
34
|
+
error: Error;
|
|
35
|
+
};
|
|
36
|
+
declare function isTransitionEvent(stateEvent: any): stateEvent is {
|
|
37
|
+
type: `xstate.done.actor.${string}`;
|
|
38
|
+
output?: unknown;
|
|
39
|
+
};
|
|
40
|
+
declare function isVariableReference(value: any): value is VariableReference<any, any>;
|
|
41
|
+
declare function getStepResult(result?: StepResult<any>): any;
|
|
42
|
+
declare function getSuspendedPaths({ value, path, suspendedPaths, }: {
|
|
43
|
+
value: string | Record<string, string>;
|
|
44
|
+
path: string;
|
|
45
|
+
suspendedPaths: Set<string>;
|
|
46
|
+
}): void;
|
|
47
|
+
declare function isFinalState(status: string): boolean;
|
|
48
|
+
declare function isLimboState(status: string): boolean;
|
|
49
|
+
declare function recursivelyCheckForFinalState({ value, suspendedPaths, path, }: {
|
|
50
|
+
value: string | Record<string, string>;
|
|
51
|
+
suspendedPaths: Set<string>;
|
|
52
|
+
path: string;
|
|
53
|
+
}): boolean;
|
|
54
|
+
declare function getActivePathsAndStatus(value: Record<string, any>): Array<{
|
|
55
|
+
stepPath: string[];
|
|
56
|
+
stepId: string;
|
|
57
|
+
status: string;
|
|
58
|
+
}>;
|
|
59
|
+
declare function mergeChildValue(startStepId: string, parent: Record<string, any>, child: Record<string, any>): Record<string, any>;
|
|
60
|
+
declare const updateStepInHierarchy: (value: Record<string, any>, targetStepId: string) => Record<string, any>;
|
|
61
|
+
declare function getResultActivePaths(state: {
|
|
62
|
+
value: Record<string, string>;
|
|
63
|
+
context: {
|
|
64
|
+
steps: Record<string, any>;
|
|
65
|
+
};
|
|
66
|
+
}): Map<string, {
|
|
67
|
+
status: string;
|
|
68
|
+
suspendPayload?: any;
|
|
69
|
+
stepPath: string[];
|
|
70
|
+
}>;
|
|
71
|
+
declare function isWorkflow(step: LegacyStep<any, any, any, any> | LegacyWorkflow<any, any, any, any> | Agent<any, any, any>): step is LegacyWorkflow<any, any, any, any>;
|
|
72
|
+
declare function isAgent(step: LegacyStep<any, any, any, any> | Agent<any, any, any> | LegacyWorkflow<any, any, any, any>): step is Agent<any, any, any>;
|
|
73
|
+
declare function resolveVariables({ runId, logger, variables, context, }: {
|
|
74
|
+
runId: string;
|
|
75
|
+
logger: IMastraLogger;
|
|
76
|
+
variables: Record<string, VariableReference<any, any>>;
|
|
77
|
+
context: WorkflowContext;
|
|
78
|
+
}): Record<string, any>;
|
|
79
|
+
declare function agentToStep<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput, TMetrics extends Record<string, Metric> = Record<string, Metric>>(agent: Agent<TAgentId, TTools, TMetrics>, { mastra }?: {
|
|
80
|
+
mastra?: Mastra;
|
|
81
|
+
}): StepAction<TAgentId, z.ZodObject<{
|
|
82
|
+
prompt: z.ZodString;
|
|
83
|
+
}>, z.ZodObject<{
|
|
84
|
+
text: z.ZodString;
|
|
85
|
+
}>, any>;
|
|
86
|
+
declare function workflowToStep<TSteps extends LegacyStep<any, any, any, any>[], TStepId extends string = any, TTriggerSchema extends z.ZodObject<any> = any, TResultSchema extends z.ZodObject<any> = any>(workflow: LegacyWorkflow<TSteps, TStepId, TTriggerSchema, TResultSchema>, { mastra }: {
|
|
87
|
+
mastra?: Mastra;
|
|
88
|
+
}): StepAction<TStepId, TTriggerSchema, z.ZodType<LegacyWorkflowRunResult<TTriggerSchema, TSteps, TResultSchema>>, any>;
|
|
89
|
+
declare function isConditionalKey(key: string): boolean;
|
|
90
|
+
|
|
91
|
+
export { LegacyStep, LegacyWorkflow, LegacyWorkflowRunResult, StepAction, StepResult, VariableReference, WorkflowContext, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Q as VariableReference, R as StepResult, d as LegacyStep, L as LegacyWorkflow, A as Agent, W as WorkflowContext, T as ToolsInput, M as Mastra, U as StepAction, X as LegacyWorkflowRunResult } from '../../base-DBhKcre4.js';
|
|
2
|
+
export { a2 as ActionContext, a1 as BaseCondition, ad as DependencyCheckOutput, ak as ExtractSchemaFromStep, an as ExtractSchemaType, al as ExtractStepResult, ap as LegacyWorkflowRunState, ai as LegacyWorkflowState, ao as PathsToStringProps, aa as ResolverFunctionInput, ab as ResolverFunctionOutput, a0 as RetryConfig, a5 as StepCondition, a6 as StepConfig, a4 as StepDef, S as StepExecutionContext, $ as StepGraph, aj as StepId, am as StepInputType, _ as StepNode, ae as StepResolverOutput, Z as StepVariableType, a7 as StepsRecord, ac as SubscriberFunctionOutput, a3 as WhenConditionReturnValue, ag as WorkflowActionParams, ah as WorkflowActions, af as WorkflowActors, a9 as WorkflowEvent, a8 as WorkflowLogMessage, Y as WorkflowOptions, aq as WorkflowResumeResult } from '../../base-DBhKcre4.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { M as Metric } from '../../types-Bo1uigWx.js';
|
|
5
|
+
import { I as IMastraLogger } from '../../logger-Bpa2oLL4.js';
|
|
6
|
+
import '../../base-ClrXcCRx.js';
|
|
7
|
+
import 'ai';
|
|
8
|
+
import 'json-schema';
|
|
9
|
+
import 'sift';
|
|
10
|
+
import '../../runtime-context/index.js';
|
|
11
|
+
import '@opentelemetry/api';
|
|
12
|
+
import 'xstate';
|
|
13
|
+
import 'node:events';
|
|
14
|
+
import '../../vector/index.js';
|
|
15
|
+
import '../../vector/filter/index.js';
|
|
16
|
+
import '../../tts/index.js';
|
|
17
|
+
import '../../error/index.js';
|
|
18
|
+
import 'stream';
|
|
19
|
+
import '@opentelemetry/sdk-trace-base';
|
|
20
|
+
import 'node:http';
|
|
21
|
+
import 'hono';
|
|
22
|
+
import 'stream/web';
|
|
23
|
+
import 'events';
|
|
24
|
+
import 'node:stream/web';
|
|
25
|
+
import '../constants.js';
|
|
26
|
+
import 'ai/test';
|
|
27
|
+
import '../../deployer/index.js';
|
|
28
|
+
import '../../bundler/index.js';
|
|
29
|
+
import 'hono/cors';
|
|
30
|
+
import 'hono-openapi';
|
|
31
|
+
|
|
32
|
+
declare function isErrorEvent(stateEvent: any): stateEvent is {
|
|
33
|
+
type: `xstate.error.actor.${string}`;
|
|
34
|
+
error: Error;
|
|
35
|
+
};
|
|
36
|
+
declare function isTransitionEvent(stateEvent: any): stateEvent is {
|
|
37
|
+
type: `xstate.done.actor.${string}`;
|
|
38
|
+
output?: unknown;
|
|
39
|
+
};
|
|
40
|
+
declare function isVariableReference(value: any): value is VariableReference<any, any>;
|
|
41
|
+
declare function getStepResult(result?: StepResult<any>): any;
|
|
42
|
+
declare function getSuspendedPaths({ value, path, suspendedPaths, }: {
|
|
43
|
+
value: string | Record<string, string>;
|
|
44
|
+
path: string;
|
|
45
|
+
suspendedPaths: Set<string>;
|
|
46
|
+
}): void;
|
|
47
|
+
declare function isFinalState(status: string): boolean;
|
|
48
|
+
declare function isLimboState(status: string): boolean;
|
|
49
|
+
declare function recursivelyCheckForFinalState({ value, suspendedPaths, path, }: {
|
|
50
|
+
value: string | Record<string, string>;
|
|
51
|
+
suspendedPaths: Set<string>;
|
|
52
|
+
path: string;
|
|
53
|
+
}): boolean;
|
|
54
|
+
declare function getActivePathsAndStatus(value: Record<string, any>): Array<{
|
|
55
|
+
stepPath: string[];
|
|
56
|
+
stepId: string;
|
|
57
|
+
status: string;
|
|
58
|
+
}>;
|
|
59
|
+
declare function mergeChildValue(startStepId: string, parent: Record<string, any>, child: Record<string, any>): Record<string, any>;
|
|
60
|
+
declare const updateStepInHierarchy: (value: Record<string, any>, targetStepId: string) => Record<string, any>;
|
|
61
|
+
declare function getResultActivePaths(state: {
|
|
62
|
+
value: Record<string, string>;
|
|
63
|
+
context: {
|
|
64
|
+
steps: Record<string, any>;
|
|
65
|
+
};
|
|
66
|
+
}): Map<string, {
|
|
67
|
+
status: string;
|
|
68
|
+
suspendPayload?: any;
|
|
69
|
+
stepPath: string[];
|
|
70
|
+
}>;
|
|
71
|
+
declare function isWorkflow(step: LegacyStep<any, any, any, any> | LegacyWorkflow<any, any, any, any> | Agent<any, any, any>): step is LegacyWorkflow<any, any, any, any>;
|
|
72
|
+
declare function isAgent(step: LegacyStep<any, any, any, any> | Agent<any, any, any> | LegacyWorkflow<any, any, any, any>): step is Agent<any, any, any>;
|
|
73
|
+
declare function resolveVariables({ runId, logger, variables, context, }: {
|
|
74
|
+
runId: string;
|
|
75
|
+
logger: IMastraLogger;
|
|
76
|
+
variables: Record<string, VariableReference<any, any>>;
|
|
77
|
+
context: WorkflowContext;
|
|
78
|
+
}): Record<string, any>;
|
|
79
|
+
declare function agentToStep<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput, TMetrics extends Record<string, Metric> = Record<string, Metric>>(agent: Agent<TAgentId, TTools, TMetrics>, { mastra }?: {
|
|
80
|
+
mastra?: Mastra;
|
|
81
|
+
}): StepAction<TAgentId, z.ZodObject<{
|
|
82
|
+
prompt: z.ZodString;
|
|
83
|
+
}>, z.ZodObject<{
|
|
84
|
+
text: z.ZodString;
|
|
85
|
+
}>, any>;
|
|
86
|
+
declare function workflowToStep<TSteps extends LegacyStep<any, any, any, any>[], TStepId extends string = any, TTriggerSchema extends z.ZodObject<any> = any, TResultSchema extends z.ZodObject<any> = any>(workflow: LegacyWorkflow<TSteps, TStepId, TTriggerSchema, TResultSchema>, { mastra }: {
|
|
87
|
+
mastra?: Mastra;
|
|
88
|
+
}): StepAction<TStepId, TTriggerSchema, z.ZodType<LegacyWorkflowRunResult<TTriggerSchema, TSteps, TResultSchema>>, any>;
|
|
89
|
+
declare function isConditionalKey(key: string): boolean;
|
|
90
|
+
|
|
91
|
+
export { LegacyStep, LegacyWorkflow, LegacyWorkflowRunResult, StepAction, StepResult, VariableReference, WorkflowContext, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LegacyStep, LegacyWorkflow, WhenConditionReturnValue, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from '../../chunk-EWCOOO3H.js';
|
package/error.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/error';
|
package/eval.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/eval';
|
package/hooks.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/hooks';
|
package/integration.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/integration';
|
package/llm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/llm';
|
package/logger.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/logger';
|
package/mastra.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/mastra';
|
package/mcp.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/mcp';
|
package/memory.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/memory';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../dist/network/vNext';
|
package/network.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/network';
|
package/package.json
CHANGED
package/relevance.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/relevance';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/runtime-context';
|
package/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/server';
|
package/storage.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/storage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../dist/telemetry/otel-vendor.d.cts';
|
package/telemetry.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/telemetry';
|
package/tools.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/tools';
|
package/tts.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/tts';
|
package/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/utils.d.cts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../dist/vector/filter';
|
package/vector.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/vector';
|
package/voice.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/voice';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../dist/workflows/constants.d.cts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../dist/workflows/legacy';
|
package/workflows.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/workflows';
|