@mastra/core 0.9.4 → 0.10.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +13 -14
- package/dist/agent/index.d.ts +13 -14
- package/dist/agent/index.js +1 -1
- package/dist/{base-BCfssGt6.d.ts → base-DttB7sJD.d.ts} +1187 -886
- package/dist/{base-CAEcd6q2.d.cts → base-aJ3etsh5.d.cts} +1187 -886
- package/dist/{base-H7siSAfu.d.cts → base-aPYtPBT2.d.cts} +3 -3
- package/dist/{base-4Z34GQL8.d.ts → base-tc5kgDTD.d.ts} +3 -3
- package/dist/base.cjs +2 -2
- package/dist/base.d.cts +2 -3
- package/dist/base.d.ts +2 -3
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.d.cts +2 -3
- package/dist/bundler/index.d.ts +2 -3
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-W4BSLENO.js → chunk-2NTUAUGH.js} +1 -1
- package/dist/{chunk-S34QVMKE.js → chunk-2PW6UJMW.js} +77 -10
- package/dist/{chunk-WE36CRQV.cjs → chunk-2U7ZZUFO.cjs} +2 -2
- package/dist/{workflows/vNext/index.js → chunk-3SQ3G2EJ.js} +19 -16
- package/dist/chunk-5HULBQ2W.cjs +38 -0
- package/dist/{chunk-XRGDVLM4.cjs → chunk-5JRD3NDP.cjs} +15 -15
- package/dist/{chunk-GXKODTLA.cjs → chunk-5W2G7S44.cjs} +83 -68
- package/dist/chunk-75Z4BZEE.js +36 -0
- package/dist/{chunk-66GQROSI.cjs → chunk-AOGUTJUO.cjs} +58 -51
- package/dist/{chunk-WIKOYZ63.js → chunk-BPTSLJHA.js} +9 -9
- package/dist/{chunk-JBJ7KXN5.js → chunk-C3ICEF6E.js} +1 -1
- package/dist/{chunk-E4FAXBUV.cjs → chunk-CWSFP2HS.cjs} +2 -2
- package/dist/{chunk-FW5RS6WV.js → chunk-E7CLY6SK.js} +42 -35
- package/dist/{chunk-235X76GC.js → chunk-FI7R232B.js} +2 -2
- package/dist/chunk-GQ2XQ4UN.js +321 -0
- package/dist/{chunk-H4CEZSRM.js → chunk-J7GDGV6F.js} +1 -1
- package/dist/{chunk-NLBJOFNG.js → chunk-JW5TMK2L.js} +1 -1
- package/dist/{chunk-NOPY74PV.js → chunk-KJQFFEEQ.js} +1 -1
- package/dist/{chunk-V2Q2FEVO.cjs → chunk-KSPHQSZX.cjs} +2 -2
- package/dist/{chunk-NZV4OA6P.js → chunk-LHRZV5VG.js} +2 -23
- package/dist/chunk-NMDM4IZN.cjs +78 -0
- package/dist/chunk-OBEALYTK.js +74 -0
- package/dist/{chunk-PEK4TY3P.js → chunk-OCT2762Q.js} +1 -1
- package/dist/{chunk-5DUFC7TV.cjs → chunk-P7BGXOQV.cjs} +2 -2
- package/dist/{chunk-WQKOM7XM.cjs → chunk-PIZM25KI.cjs} +3 -24
- package/dist/{chunk-S7J63JOG.cjs → chunk-RVS6OUJN.cjs} +2 -2
- package/dist/{chunk-5JUWUTPJ.cjs → chunk-SKG2NIZW.cjs} +2 -2
- package/dist/chunk-SWW4EBUZ.cjs +96 -0
- package/dist/{chunk-RGE4UF6A.cjs → chunk-TMPFLJLG.cjs} +2 -2
- package/dist/{workflows/vNext/index.cjs → chunk-TTKQ37ZZ.cjs} +24 -21
- package/dist/{chunk-EJITEVAB.cjs → chunk-U3L3NEOM.cjs} +81 -10
- package/dist/chunk-VHLL4AZK.js +90 -0
- package/dist/{chunk-EG74VBSP.cjs → chunk-YEULQPUY.cjs} +6 -6
- package/dist/{chunk-SOLXHDNQ.js → chunk-ZB3LEHL2.js} +81 -66
- package/dist/{chunk-TAFOICHR.js → chunk-ZKN6HYYQ.js} +1 -1
- package/dist/chunk-ZZDAC5KD.cjs +325 -0
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.d.cts +2 -3
- package/dist/deployer/index.d.ts +2 -3
- package/dist/deployer/index.js +1 -1
- package/dist/eval/index.d.cts +13 -14
- package/dist/eval/index.d.ts +13 -14
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.cjs +88 -159
- package/dist/index.d.cts +17 -25
- package/dist/index.d.ts +17 -25
- package/dist/index.js +18 -25
- package/dist/integration/index.cjs +3 -3
- package/dist/integration/index.d.cts +12 -13
- package/dist/integration/index.d.ts +12 -13
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.d.cts +13 -14
- package/dist/llm/index.d.ts +13 -14
- package/dist/logger/index.cjs +18 -17
- package/dist/logger/index.d.cts +42 -2
- package/dist/logger/index.d.ts +42 -2
- package/dist/logger/index.js +2 -1
- package/dist/{index-QV27jkxQ.d.ts → logger-EhZkzZOr.d.cts} +38 -52
- package/dist/{index-QV27jkxQ.d.cts → logger-EhZkzZOr.d.ts} +38 -52
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +11 -12
- package/dist/mastra/index.d.ts +11 -12
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +75 -17
- package/dist/mcp/index.d.cts +14 -15
- package/dist/mcp/index.d.ts +14 -15
- package/dist/mcp/index.js +69 -15
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.d.cts +12 -13
- package/dist/memory/index.d.ts +12 -13
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +8 -8
- package/dist/network/index.d.cts +12 -13
- package/dist/network/index.d.ts +12 -13
- package/dist/network/index.js +5 -5
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +15 -16
- package/dist/relevance/index.d.ts +15 -16
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +4 -0
- package/dist/server/index.d.cts +13 -12
- package/dist/server/index.d.ts +13 -12
- package/dist/server/index.js +4 -1
- package/dist/storage/index.cjs +184 -3
- package/dist/storage/index.d.cts +83 -13
- package/dist/storage/index.d.ts +83 -13
- package/dist/storage/index.js +186 -1
- package/dist/telemetry/index.d.cts +14 -15
- package/dist/telemetry/index.d.ts +14 -15
- package/dist/telemetry/otel-vendor.cjs +2 -2
- package/dist/telemetry/otel-vendor.d.cts +1 -1
- package/dist/telemetry/otel-vendor.d.ts +1 -1
- package/dist/telemetry/otel-vendor.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.d.cts +12 -13
- package/dist/tools/index.d.ts +12 -13
- package/dist/tools/index.js +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.d.cts +2 -3
- package/dist/tts/index.d.ts +2 -3
- package/dist/tts/index.js +1 -1
- package/dist/{types-BtMyV38I.d.ts → types-Bo1uigWx.d.cts} +1 -1
- package/dist/{types-BtMyV38I.d.cts → types-Bo1uigWx.d.ts} +1 -1
- package/dist/utils.cjs +28 -12
- package/dist/utils.d.cts +59 -16
- package/dist/utils.d.ts +59 -16
- package/dist/utils.js +1 -1
- package/dist/vector/filter/index.cjs +189 -7
- package/dist/vector/filter/index.js +190 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.d.cts +28 -20
- package/dist/vector/index.d.ts +28 -20
- package/dist/vector/index.js +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.d.cts +12 -13
- package/dist/voice/index.d.ts +12 -13
- package/dist/voice/index.js +1 -1
- package/dist/workflows/index.cjs +17 -69
- package/dist/workflows/index.d.cts +197 -77
- package/dist/workflows/index.d.ts +197 -77
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +90 -0
- package/dist/workflows/legacy/index.d.cts +87 -0
- package/dist/workflows/legacy/index.d.ts +87 -0
- package/dist/workflows/legacy/index.js +1 -0
- package/package.json +19 -40
- package/workflows/legacy.d.ts +1 -0
- package/dist/chunk-4WABQORE.js +0 -781
- package/dist/chunk-CIEPFV6B.js +0 -658
- package/dist/chunk-CMPPXW4U.js +0 -154
- package/dist/chunk-CTKNWYK2.js +0 -131
- package/dist/chunk-LGERQTJM.js +0 -190
- package/dist/chunk-O44MSFMZ.cjs +0 -168
- package/dist/chunk-QDAMIZY3.cjs +0 -783
- package/dist/chunk-QHDPLMHB.cjs +0 -667
- package/dist/chunk-RAQBTCIR.cjs +0 -134
- package/dist/chunk-YK3XJ52U.cjs +0 -192
- package/dist/storage/libsql/index.cjs +0 -581
- package/dist/storage/libsql/index.d.cts +0 -104
- package/dist/storage/libsql/index.d.ts +0 -104
- package/dist/storage/libsql/index.js +0 -578
- package/dist/vector/libsql/index.cjs +0 -14
- package/dist/vector/libsql/index.d.cts +0 -82
- package/dist/vector/libsql/index.d.ts +0 -82
- package/dist/vector/libsql/index.js +0 -1
- package/dist/workflows/vNext/index.d.cts +0 -209
- package/dist/workflows/vNext/index.d.ts +0 -209
- package/storage/libsql.d.ts +0 -1
- package/vector/libsql.d.ts +0 -1
- package/workflows/vNext.d.ts +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { VectorFilter } from '../filter/index.cjs';
|
|
2
|
-
import { MastraVector, ParamsToArgs, QueryVectorParams, QueryVectorArgs, QueryResult, UpsertVectorParams, CreateIndexParams, IndexStats } from '../index.cjs';
|
|
3
|
-
import '../../base-H7siSAfu.cjs';
|
|
4
|
-
import '@opentelemetry/api';
|
|
5
|
-
import '../../index-QV27jkxQ.cjs';
|
|
6
|
-
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
|
-
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
|
|
10
|
-
interface LibSQLQueryParams extends QueryVectorParams {
|
|
11
|
-
minScore?: number;
|
|
12
|
-
}
|
|
13
|
-
type LibSQLQueryArgs = [...QueryVectorArgs, number?];
|
|
14
|
-
declare class LibSQLVector extends MastraVector {
|
|
15
|
-
private turso;
|
|
16
|
-
constructor({ connectionUrl, authToken, syncUrl, syncInterval, }: {
|
|
17
|
-
connectionUrl: string;
|
|
18
|
-
authToken?: string;
|
|
19
|
-
syncUrl?: string;
|
|
20
|
-
syncInterval?: number;
|
|
21
|
-
});
|
|
22
|
-
protected rewriteDbUrl(url: string): string;
|
|
23
|
-
transformFilter(filter?: VectorFilter): VectorFilter;
|
|
24
|
-
query(...args: ParamsToArgs<LibSQLQueryParams> | LibSQLQueryArgs): Promise<QueryResult[]>;
|
|
25
|
-
upsert(...args: ParamsToArgs<UpsertVectorParams>): Promise<string[]>;
|
|
26
|
-
createIndex(...args: ParamsToArgs<CreateIndexParams>): Promise<void>;
|
|
27
|
-
deleteIndex(indexName: string): Promise<void>;
|
|
28
|
-
listIndexes(): Promise<string[]>;
|
|
29
|
-
describeIndex(indexName: string): Promise<IndexStats>;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
|
|
32
|
-
*
|
|
33
|
-
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
34
|
-
* @param indexName - The name of the index containing the vector.
|
|
35
|
-
* @param id - The ID of the vector to update.
|
|
36
|
-
* @param update - An object containing the vector and/or metadata to update.
|
|
37
|
-
* @param update.vector - An optional array of numbers representing the new vector.
|
|
38
|
-
* @param update.metadata - An optional record containing the new metadata.
|
|
39
|
-
* @returns A promise that resolves when the update is complete.
|
|
40
|
-
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
41
|
-
*/
|
|
42
|
-
updateIndexById(indexName: string, id: string, update: {
|
|
43
|
-
vector?: number[];
|
|
44
|
-
metadata?: Record<string, any>;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
48
|
-
*
|
|
49
|
-
* @param indexName - The name of the index containing the vector.
|
|
50
|
-
* @param id - The ID of the vector to update.
|
|
51
|
-
* @param update - An object containing the vector and/or metadata to update.
|
|
52
|
-
* @param update.vector - An optional array of numbers representing the new vector.
|
|
53
|
-
* @param update.metadata - An optional record containing the new metadata.
|
|
54
|
-
* @returns A promise that resolves when the update is complete.
|
|
55
|
-
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
56
|
-
*/
|
|
57
|
-
updateVector(indexName: string, id: string, update: {
|
|
58
|
-
vector?: number[];
|
|
59
|
-
metadata?: Record<string, any>;
|
|
60
|
-
}): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
|
|
63
|
-
*
|
|
64
|
-
* Deletes a vector by its ID.
|
|
65
|
-
* @param indexName - The name of the index containing the vector.
|
|
66
|
-
* @param id - The ID of the vector to delete.
|
|
67
|
-
* @returns A promise that resolves when the deletion is complete.
|
|
68
|
-
* @throws Will throw an error if the deletion operation fails.
|
|
69
|
-
*/
|
|
70
|
-
deleteIndexById(indexName: string, id: string): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Deletes a vector by its ID.
|
|
73
|
-
* @param indexName - The name of the index containing the vector.
|
|
74
|
-
* @param id - The ID of the vector to delete.
|
|
75
|
-
* @returns A promise that resolves when the deletion is complete.
|
|
76
|
-
* @throws Will throw an error if the deletion operation fails.
|
|
77
|
-
*/
|
|
78
|
-
deleteVector(indexName: string, id: string): Promise<void>;
|
|
79
|
-
truncateIndex(indexName: string): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { LibSQLVector as DefaultVectorDB, LibSQLVector };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { VectorFilter } from '../filter/index.js';
|
|
2
|
-
import { MastraVector, ParamsToArgs, QueryVectorParams, QueryVectorArgs, QueryResult, UpsertVectorParams, CreateIndexParams, IndexStats } from '../index.js';
|
|
3
|
-
import '../../base-4Z34GQL8.js';
|
|
4
|
-
import '@opentelemetry/api';
|
|
5
|
-
import '../../index-QV27jkxQ.js';
|
|
6
|
-
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
|
-
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
|
|
10
|
-
interface LibSQLQueryParams extends QueryVectorParams {
|
|
11
|
-
minScore?: number;
|
|
12
|
-
}
|
|
13
|
-
type LibSQLQueryArgs = [...QueryVectorArgs, number?];
|
|
14
|
-
declare class LibSQLVector extends MastraVector {
|
|
15
|
-
private turso;
|
|
16
|
-
constructor({ connectionUrl, authToken, syncUrl, syncInterval, }: {
|
|
17
|
-
connectionUrl: string;
|
|
18
|
-
authToken?: string;
|
|
19
|
-
syncUrl?: string;
|
|
20
|
-
syncInterval?: number;
|
|
21
|
-
});
|
|
22
|
-
protected rewriteDbUrl(url: string): string;
|
|
23
|
-
transformFilter(filter?: VectorFilter): VectorFilter;
|
|
24
|
-
query(...args: ParamsToArgs<LibSQLQueryParams> | LibSQLQueryArgs): Promise<QueryResult[]>;
|
|
25
|
-
upsert(...args: ParamsToArgs<UpsertVectorParams>): Promise<string[]>;
|
|
26
|
-
createIndex(...args: ParamsToArgs<CreateIndexParams>): Promise<void>;
|
|
27
|
-
deleteIndex(indexName: string): Promise<void>;
|
|
28
|
-
listIndexes(): Promise<string[]>;
|
|
29
|
-
describeIndex(indexName: string): Promise<IndexStats>;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use {@link updateVector} instead. This method will be removed on May 20th, 2025.
|
|
32
|
-
*
|
|
33
|
-
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
34
|
-
* @param indexName - The name of the index containing the vector.
|
|
35
|
-
* @param id - The ID of the vector to update.
|
|
36
|
-
* @param update - An object containing the vector and/or metadata to update.
|
|
37
|
-
* @param update.vector - An optional array of numbers representing the new vector.
|
|
38
|
-
* @param update.metadata - An optional record containing the new metadata.
|
|
39
|
-
* @returns A promise that resolves when the update is complete.
|
|
40
|
-
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
41
|
-
*/
|
|
42
|
-
updateIndexById(indexName: string, id: string, update: {
|
|
43
|
-
vector?: number[];
|
|
44
|
-
metadata?: Record<string, any>;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
48
|
-
*
|
|
49
|
-
* @param indexName - The name of the index containing the vector.
|
|
50
|
-
* @param id - The ID of the vector to update.
|
|
51
|
-
* @param update - An object containing the vector and/or metadata to update.
|
|
52
|
-
* @param update.vector - An optional array of numbers representing the new vector.
|
|
53
|
-
* @param update.metadata - An optional record containing the new metadata.
|
|
54
|
-
* @returns A promise that resolves when the update is complete.
|
|
55
|
-
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
56
|
-
*/
|
|
57
|
-
updateVector(indexName: string, id: string, update: {
|
|
58
|
-
vector?: number[];
|
|
59
|
-
metadata?: Record<string, any>;
|
|
60
|
-
}): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated Use {@link deleteVector} instead. This method will be removed on May 20th, 2025.
|
|
63
|
-
*
|
|
64
|
-
* Deletes a vector by its ID.
|
|
65
|
-
* @param indexName - The name of the index containing the vector.
|
|
66
|
-
* @param id - The ID of the vector to delete.
|
|
67
|
-
* @returns A promise that resolves when the deletion is complete.
|
|
68
|
-
* @throws Will throw an error if the deletion operation fails.
|
|
69
|
-
*/
|
|
70
|
-
deleteIndexById(indexName: string, id: string): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Deletes a vector by its ID.
|
|
73
|
-
* @param indexName - The name of the index containing the vector.
|
|
74
|
-
* @param id - The ID of the vector to delete.
|
|
75
|
-
* @returns A promise that resolves when the deletion is complete.
|
|
76
|
-
* @throws Will throw an error if the deletion operation fails.
|
|
77
|
-
*/
|
|
78
|
-
deleteVector(indexName: string, id: string): Promise<void>;
|
|
79
|
-
truncateIndex(indexName: string): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { LibSQLVector as DefaultVectorDB, LibSQLVector };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LibSQLVector as DefaultVectorDB, LibSQLVector } from '../../chunk-4WABQORE.js';
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-CAEcd6q2.cjs';
|
|
2
|
-
export { D as DynamicMapping, 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-CAEcd6q2.cjs';
|
|
3
|
-
import { Span } from '@opentelemetry/api';
|
|
4
|
-
import { RuntimeContext } from '../../runtime-context/index.cjs';
|
|
5
|
-
import 'ai';
|
|
6
|
-
import '../../base-H7siSAfu.cjs';
|
|
7
|
-
import '../../index-QV27jkxQ.cjs';
|
|
8
|
-
import 'stream';
|
|
9
|
-
import 'pino';
|
|
10
|
-
import '@opentelemetry/sdk-trace-base';
|
|
11
|
-
import '../../types-BtMyV38I.cjs';
|
|
12
|
-
import 'sift';
|
|
13
|
-
import 'zod';
|
|
14
|
-
import 'json-schema';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'node:events';
|
|
17
|
-
import '../../vector/index.cjs';
|
|
18
|
-
import '../../vector/filter/index.cjs';
|
|
19
|
-
import '../../tts/index.cjs';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'events';
|
|
23
|
-
import '../../deployer/index.cjs';
|
|
24
|
-
import '../../bundler/index.cjs';
|
|
25
|
-
import 'hono/cors';
|
|
26
|
-
import 'hono-openapi';
|
|
27
|
-
import 'ai/test';
|
|
28
|
-
|
|
29
|
-
type ExecutionContext = {
|
|
30
|
-
workflowId: string;
|
|
31
|
-
runId: string;
|
|
32
|
-
executionPath: number[];
|
|
33
|
-
suspendedPaths: Record<string, number[]>;
|
|
34
|
-
retryConfig: {
|
|
35
|
-
attempts: number;
|
|
36
|
-
delay: number;
|
|
37
|
-
};
|
|
38
|
-
executionSpan: Span;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Default implementation of the ExecutionEngine using XState
|
|
42
|
-
*/
|
|
43
|
-
declare class DefaultExecutionEngine extends ExecutionEngine {
|
|
44
|
-
protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
|
|
45
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
46
|
-
}, stepResults: Record<string, StepResult<any>>, lastOutput: StepResult<any>, error?: Error | string): Promise<TOutput>;
|
|
47
|
-
/**
|
|
48
|
-
* Executes a workflow run with the provided execution graph and input
|
|
49
|
-
* @param graph The execution graph to execute
|
|
50
|
-
* @param input The input data for the workflow
|
|
51
|
-
* @returns A promise that resolves to the workflow output
|
|
52
|
-
*/
|
|
53
|
-
execute<TInput, TOutput>(params: {
|
|
54
|
-
workflowId: string;
|
|
55
|
-
runId: string;
|
|
56
|
-
graph: ExecutionGraph;
|
|
57
|
-
input?: TInput;
|
|
58
|
-
resume?: {
|
|
59
|
-
steps: string[];
|
|
60
|
-
stepResults: Record<string, StepResult<any>>;
|
|
61
|
-
resumePayload: any;
|
|
62
|
-
resumePath: number[];
|
|
63
|
-
};
|
|
64
|
-
emitter: {
|
|
65
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
66
|
-
};
|
|
67
|
-
retryConfig?: {
|
|
68
|
-
attempts?: number;
|
|
69
|
-
delay?: number;
|
|
70
|
-
};
|
|
71
|
-
runtimeContext: RuntimeContext;
|
|
72
|
-
}): Promise<TOutput>;
|
|
73
|
-
getStepOutput(stepResults: Record<string, any>, step?: StepFlowEntry): any;
|
|
74
|
-
executeStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
|
|
75
|
-
workflowId: string;
|
|
76
|
-
runId: string;
|
|
77
|
-
step: NewStep<string, any, any>;
|
|
78
|
-
stepResults: Record<string, StepResult<any>>;
|
|
79
|
-
executionContext: ExecutionContext;
|
|
80
|
-
resume?: {
|
|
81
|
-
steps: string[];
|
|
82
|
-
resumePayload: any;
|
|
83
|
-
};
|
|
84
|
-
prevOutput: any;
|
|
85
|
-
emitter: {
|
|
86
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
87
|
-
};
|
|
88
|
-
runtimeContext: RuntimeContext;
|
|
89
|
-
}): Promise<StepResult<any>>;
|
|
90
|
-
executeParallel({ workflowId, runId, entry, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
91
|
-
workflowId: string;
|
|
92
|
-
runId: string;
|
|
93
|
-
entry: {
|
|
94
|
-
type: 'parallel';
|
|
95
|
-
steps: StepFlowEntry[];
|
|
96
|
-
};
|
|
97
|
-
prevStep: StepFlowEntry;
|
|
98
|
-
stepResults: Record<string, StepResult<any>>;
|
|
99
|
-
resume?: {
|
|
100
|
-
steps: string[];
|
|
101
|
-
stepResults: Record<string, StepResult<any>>;
|
|
102
|
-
resumePayload: any;
|
|
103
|
-
resumePath: number[];
|
|
104
|
-
};
|
|
105
|
-
executionContext: ExecutionContext;
|
|
106
|
-
emitter: {
|
|
107
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
108
|
-
};
|
|
109
|
-
runtimeContext: RuntimeContext;
|
|
110
|
-
}): Promise<StepResult<any>>;
|
|
111
|
-
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
112
|
-
workflowId: string;
|
|
113
|
-
runId: string;
|
|
114
|
-
entry: {
|
|
115
|
-
type: 'conditional';
|
|
116
|
-
steps: StepFlowEntry[];
|
|
117
|
-
conditions: ExecuteFunction<any, any, any, any>[];
|
|
118
|
-
};
|
|
119
|
-
prevStep: StepFlowEntry;
|
|
120
|
-
prevOutput: any;
|
|
121
|
-
stepResults: Record<string, StepResult<any>>;
|
|
122
|
-
resume?: {
|
|
123
|
-
steps: string[];
|
|
124
|
-
stepResults: Record<string, StepResult<any>>;
|
|
125
|
-
resumePayload: any;
|
|
126
|
-
resumePath: number[];
|
|
127
|
-
};
|
|
128
|
-
executionContext: ExecutionContext;
|
|
129
|
-
emitter: {
|
|
130
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
131
|
-
};
|
|
132
|
-
runtimeContext: RuntimeContext;
|
|
133
|
-
}): Promise<StepResult<any>>;
|
|
134
|
-
executeLoop({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
135
|
-
workflowId: string;
|
|
136
|
-
runId: string;
|
|
137
|
-
entry: {
|
|
138
|
-
type: 'loop';
|
|
139
|
-
step: NewStep;
|
|
140
|
-
condition: ExecuteFunction<any, any, any, any>;
|
|
141
|
-
loopType: 'dowhile' | 'dountil';
|
|
142
|
-
};
|
|
143
|
-
prevStep: StepFlowEntry;
|
|
144
|
-
prevOutput: any;
|
|
145
|
-
stepResults: Record<string, StepResult<any>>;
|
|
146
|
-
resume?: {
|
|
147
|
-
steps: string[];
|
|
148
|
-
stepResults: Record<string, StepResult<any>>;
|
|
149
|
-
resumePayload: any;
|
|
150
|
-
resumePath: number[];
|
|
151
|
-
};
|
|
152
|
-
executionContext: ExecutionContext;
|
|
153
|
-
emitter: {
|
|
154
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
155
|
-
};
|
|
156
|
-
runtimeContext: RuntimeContext;
|
|
157
|
-
}): Promise<StepResult<any>>;
|
|
158
|
-
executeForeach({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
159
|
-
workflowId: string;
|
|
160
|
-
runId: string;
|
|
161
|
-
entry: {
|
|
162
|
-
type: 'foreach';
|
|
163
|
-
step: NewStep;
|
|
164
|
-
opts: {
|
|
165
|
-
concurrency: number;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
prevStep: StepFlowEntry;
|
|
169
|
-
prevOutput: any;
|
|
170
|
-
stepResults: Record<string, StepResult<any>>;
|
|
171
|
-
resume?: {
|
|
172
|
-
steps: string[];
|
|
173
|
-
stepResults: Record<string, StepResult<any>>;
|
|
174
|
-
resumePayload: any;
|
|
175
|
-
resumePath: number[];
|
|
176
|
-
};
|
|
177
|
-
executionContext: ExecutionContext;
|
|
178
|
-
emitter: {
|
|
179
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
180
|
-
};
|
|
181
|
-
runtimeContext: RuntimeContext;
|
|
182
|
-
}): Promise<StepResult<any>>;
|
|
183
|
-
protected persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
|
|
184
|
-
workflowId: string;
|
|
185
|
-
runId: string;
|
|
186
|
-
stepResults: Record<string, StepResult<any>>;
|
|
187
|
-
executionContext: ExecutionContext;
|
|
188
|
-
}): Promise<void>;
|
|
189
|
-
executeEntry({ workflowId, runId, entry, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
190
|
-
workflowId: string;
|
|
191
|
-
runId: string;
|
|
192
|
-
entry: StepFlowEntry;
|
|
193
|
-
prevStep: StepFlowEntry;
|
|
194
|
-
stepResults: Record<string, StepResult<any>>;
|
|
195
|
-
resume?: {
|
|
196
|
-
steps: string[];
|
|
197
|
-
stepResults: Record<string, StepResult<any>>;
|
|
198
|
-
resumePayload: any;
|
|
199
|
-
resumePath: number[];
|
|
200
|
-
};
|
|
201
|
-
executionContext: ExecutionContext;
|
|
202
|
-
emitter: {
|
|
203
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
204
|
-
};
|
|
205
|
-
runtimeContext: RuntimeContext;
|
|
206
|
-
}): Promise<StepResult<any>>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export { DefaultExecutionEngine, ExecuteFunction, type ExecutionContext, ExecutionEngine, ExecutionGraph, NewStep, StepFlowEntry, StepResult };
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { g as ExecutionEngine, h as StepResult, i as ExecutionGraph, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-BCfssGt6.js';
|
|
2
|
-
export { D as DynamicMapping, 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-BCfssGt6.js';
|
|
3
|
-
import { Span } from '@opentelemetry/api';
|
|
4
|
-
import { RuntimeContext } from '../../runtime-context/index.js';
|
|
5
|
-
import 'ai';
|
|
6
|
-
import '../../base-4Z34GQL8.js';
|
|
7
|
-
import '../../index-QV27jkxQ.js';
|
|
8
|
-
import 'stream';
|
|
9
|
-
import 'pino';
|
|
10
|
-
import '@opentelemetry/sdk-trace-base';
|
|
11
|
-
import '../../types-BtMyV38I.js';
|
|
12
|
-
import 'sift';
|
|
13
|
-
import 'zod';
|
|
14
|
-
import 'json-schema';
|
|
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 'events';
|
|
23
|
-
import '../../deployer/index.js';
|
|
24
|
-
import '../../bundler/index.js';
|
|
25
|
-
import 'hono/cors';
|
|
26
|
-
import 'hono-openapi';
|
|
27
|
-
import 'ai/test';
|
|
28
|
-
|
|
29
|
-
type ExecutionContext = {
|
|
30
|
-
workflowId: string;
|
|
31
|
-
runId: string;
|
|
32
|
-
executionPath: number[];
|
|
33
|
-
suspendedPaths: Record<string, number[]>;
|
|
34
|
-
retryConfig: {
|
|
35
|
-
attempts: number;
|
|
36
|
-
delay: number;
|
|
37
|
-
};
|
|
38
|
-
executionSpan: Span;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Default implementation of the ExecutionEngine using XState
|
|
42
|
-
*/
|
|
43
|
-
declare class DefaultExecutionEngine extends ExecutionEngine {
|
|
44
|
-
protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
|
|
45
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
46
|
-
}, stepResults: Record<string, StepResult<any>>, lastOutput: StepResult<any>, error?: Error | string): Promise<TOutput>;
|
|
47
|
-
/**
|
|
48
|
-
* Executes a workflow run with the provided execution graph and input
|
|
49
|
-
* @param graph The execution graph to execute
|
|
50
|
-
* @param input The input data for the workflow
|
|
51
|
-
* @returns A promise that resolves to the workflow output
|
|
52
|
-
*/
|
|
53
|
-
execute<TInput, TOutput>(params: {
|
|
54
|
-
workflowId: string;
|
|
55
|
-
runId: string;
|
|
56
|
-
graph: ExecutionGraph;
|
|
57
|
-
input?: TInput;
|
|
58
|
-
resume?: {
|
|
59
|
-
steps: string[];
|
|
60
|
-
stepResults: Record<string, StepResult<any>>;
|
|
61
|
-
resumePayload: any;
|
|
62
|
-
resumePath: number[];
|
|
63
|
-
};
|
|
64
|
-
emitter: {
|
|
65
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
66
|
-
};
|
|
67
|
-
retryConfig?: {
|
|
68
|
-
attempts?: number;
|
|
69
|
-
delay?: number;
|
|
70
|
-
};
|
|
71
|
-
runtimeContext: RuntimeContext;
|
|
72
|
-
}): Promise<TOutput>;
|
|
73
|
-
getStepOutput(stepResults: Record<string, any>, step?: StepFlowEntry): any;
|
|
74
|
-
executeStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
|
|
75
|
-
workflowId: string;
|
|
76
|
-
runId: string;
|
|
77
|
-
step: NewStep<string, any, any>;
|
|
78
|
-
stepResults: Record<string, StepResult<any>>;
|
|
79
|
-
executionContext: ExecutionContext;
|
|
80
|
-
resume?: {
|
|
81
|
-
steps: string[];
|
|
82
|
-
resumePayload: any;
|
|
83
|
-
};
|
|
84
|
-
prevOutput: any;
|
|
85
|
-
emitter: {
|
|
86
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
87
|
-
};
|
|
88
|
-
runtimeContext: RuntimeContext;
|
|
89
|
-
}): Promise<StepResult<any>>;
|
|
90
|
-
executeParallel({ workflowId, runId, entry, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
91
|
-
workflowId: string;
|
|
92
|
-
runId: string;
|
|
93
|
-
entry: {
|
|
94
|
-
type: 'parallel';
|
|
95
|
-
steps: StepFlowEntry[];
|
|
96
|
-
};
|
|
97
|
-
prevStep: StepFlowEntry;
|
|
98
|
-
stepResults: Record<string, StepResult<any>>;
|
|
99
|
-
resume?: {
|
|
100
|
-
steps: string[];
|
|
101
|
-
stepResults: Record<string, StepResult<any>>;
|
|
102
|
-
resumePayload: any;
|
|
103
|
-
resumePath: number[];
|
|
104
|
-
};
|
|
105
|
-
executionContext: ExecutionContext;
|
|
106
|
-
emitter: {
|
|
107
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
108
|
-
};
|
|
109
|
-
runtimeContext: RuntimeContext;
|
|
110
|
-
}): Promise<StepResult<any>>;
|
|
111
|
-
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
112
|
-
workflowId: string;
|
|
113
|
-
runId: string;
|
|
114
|
-
entry: {
|
|
115
|
-
type: 'conditional';
|
|
116
|
-
steps: StepFlowEntry[];
|
|
117
|
-
conditions: ExecuteFunction<any, any, any, any>[];
|
|
118
|
-
};
|
|
119
|
-
prevStep: StepFlowEntry;
|
|
120
|
-
prevOutput: any;
|
|
121
|
-
stepResults: Record<string, StepResult<any>>;
|
|
122
|
-
resume?: {
|
|
123
|
-
steps: string[];
|
|
124
|
-
stepResults: Record<string, StepResult<any>>;
|
|
125
|
-
resumePayload: any;
|
|
126
|
-
resumePath: number[];
|
|
127
|
-
};
|
|
128
|
-
executionContext: ExecutionContext;
|
|
129
|
-
emitter: {
|
|
130
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
131
|
-
};
|
|
132
|
-
runtimeContext: RuntimeContext;
|
|
133
|
-
}): Promise<StepResult<any>>;
|
|
134
|
-
executeLoop({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
135
|
-
workflowId: string;
|
|
136
|
-
runId: string;
|
|
137
|
-
entry: {
|
|
138
|
-
type: 'loop';
|
|
139
|
-
step: NewStep;
|
|
140
|
-
condition: ExecuteFunction<any, any, any, any>;
|
|
141
|
-
loopType: 'dowhile' | 'dountil';
|
|
142
|
-
};
|
|
143
|
-
prevStep: StepFlowEntry;
|
|
144
|
-
prevOutput: any;
|
|
145
|
-
stepResults: Record<string, StepResult<any>>;
|
|
146
|
-
resume?: {
|
|
147
|
-
steps: string[];
|
|
148
|
-
stepResults: Record<string, StepResult<any>>;
|
|
149
|
-
resumePayload: any;
|
|
150
|
-
resumePath: number[];
|
|
151
|
-
};
|
|
152
|
-
executionContext: ExecutionContext;
|
|
153
|
-
emitter: {
|
|
154
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
155
|
-
};
|
|
156
|
-
runtimeContext: RuntimeContext;
|
|
157
|
-
}): Promise<StepResult<any>>;
|
|
158
|
-
executeForeach({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
159
|
-
workflowId: string;
|
|
160
|
-
runId: string;
|
|
161
|
-
entry: {
|
|
162
|
-
type: 'foreach';
|
|
163
|
-
step: NewStep;
|
|
164
|
-
opts: {
|
|
165
|
-
concurrency: number;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
prevStep: StepFlowEntry;
|
|
169
|
-
prevOutput: any;
|
|
170
|
-
stepResults: Record<string, StepResult<any>>;
|
|
171
|
-
resume?: {
|
|
172
|
-
steps: string[];
|
|
173
|
-
stepResults: Record<string, StepResult<any>>;
|
|
174
|
-
resumePayload: any;
|
|
175
|
-
resumePath: number[];
|
|
176
|
-
};
|
|
177
|
-
executionContext: ExecutionContext;
|
|
178
|
-
emitter: {
|
|
179
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
180
|
-
};
|
|
181
|
-
runtimeContext: RuntimeContext;
|
|
182
|
-
}): Promise<StepResult<any>>;
|
|
183
|
-
protected persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
|
|
184
|
-
workflowId: string;
|
|
185
|
-
runId: string;
|
|
186
|
-
stepResults: Record<string, StepResult<any>>;
|
|
187
|
-
executionContext: ExecutionContext;
|
|
188
|
-
}): Promise<void>;
|
|
189
|
-
executeEntry({ workflowId, runId, entry, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
190
|
-
workflowId: string;
|
|
191
|
-
runId: string;
|
|
192
|
-
entry: StepFlowEntry;
|
|
193
|
-
prevStep: StepFlowEntry;
|
|
194
|
-
stepResults: Record<string, StepResult<any>>;
|
|
195
|
-
resume?: {
|
|
196
|
-
steps: string[];
|
|
197
|
-
stepResults: Record<string, StepResult<any>>;
|
|
198
|
-
resumePayload: any;
|
|
199
|
-
resumePath: number[];
|
|
200
|
-
};
|
|
201
|
-
executionContext: ExecutionContext;
|
|
202
|
-
emitter: {
|
|
203
|
-
emit: (event: string, data: any) => Promise<void>;
|
|
204
|
-
};
|
|
205
|
-
runtimeContext: RuntimeContext;
|
|
206
|
-
}): Promise<StepResult<any>>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export { DefaultExecutionEngine, ExecuteFunction, type ExecutionContext, ExecutionEngine, ExecutionGraph, NewStep, StepFlowEntry, StepResult };
|
package/storage/libsql.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './../dist/storage/libsql';
|
package/vector/libsql.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './../dist/vector/libsql';
|
package/workflows/vNext.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './../dist/workflows/vNext';
|