@mastra/core 0.10.13 → 0.10.15-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/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-CTj7ESwt.d.cts +4132 -0
- package/dist/base-ClrXcCRx.d.ts +162 -0
- package/dist/base-qVqAnB-c.d.ts +4132 -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-32C7JDIZ.js +1 -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-7H2GET5Z.cjs +668 -0
- package/dist/chunk-7HZ6NIAF.cjs +2 -0
- package/dist/chunk-7XQIPES3.js +668 -0
- package/dist/chunk-AKYTYALY.js +70 -0
- package/dist/chunk-AOWJUV2N.js +2415 -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-BVD7NVAR.cjs +244 -0
- package/dist/chunk-C4LMN2IR.js +27 -0
- package/dist/chunk-DR4JS662.js +989 -0
- package/dist/chunk-F2WMR75C.cjs +183 -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-IBKM5CLQ.js +428 -0
- package/dist/chunk-ID5LG5CQ.cjs +659 -0
- package/dist/chunk-J52TXHZV.cjs +73 -0
- package/dist/chunk-J62R4M7K.js +240 -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-LBUQ6YNU.cjs +447 -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-MVCHTRVB.js +5038 -0
- package/dist/chunk-NH5WJNNS.js +1 -0
- package/dist/chunk-P3Q73CAW.cjs +55 -0
- package/dist/chunk-Q33INUG2.cjs +81 -0
- package/dist/chunk-QFTBW7ZZ.cjs +2 -0
- package/dist/chunk-QQ5K5TZE.cjs +619 -0
- package/dist/chunk-R4V75T7J.js +1 -0
- package/dist/chunk-RVFWMGGR.js +77 -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-TTMYHBQM.js +657 -0
- package/dist/chunk-U64IJDC5.cjs +109 -0
- package/dist/chunk-ULZ6MRTN.cjs +5065 -0
- package/dist/chunk-V5D2LIF5.js +68 -0
- package/dist/chunk-WQNOATKB.js +103 -0
- package/dist/chunk-Y7D2JLKS.js +4 -0
- package/dist/chunk-YOQP5T77.js +32 -0
- package/dist/chunk-ZCU3PLIL.cjs +2429 -0
- package/dist/chunk-ZIZ3CVHN.cjs +120 -0
- package/dist/chunk-ZPOUMTTH.cjs +362 -0
- package/dist/chunk-ZTPPDHQK.cjs +991 -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 +285 -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 +880 -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 +878 -0
- package/dist/relevance/index.cjs +18 -0
- package/dist/relevance/index.d.cts +50 -0
- package/dist/relevance/index.d.ts +50 -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 +62 -0
- package/dist/utils.d.cts +150 -0
- package/dist/utils.d.ts +150 -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 +285 -0
- package/dist/workflows/index.d.ts +285 -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 +2 -3
- 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,77 @@
|
|
|
1
|
+
import { M as MastraBase } from '../base-B_y9sMg0.cjs';
|
|
2
|
+
import { VectorFilter } from './filter/index.cjs';
|
|
3
|
+
import '@opentelemetry/api';
|
|
4
|
+
import '../logger-B8XXh6ya.cjs';
|
|
5
|
+
import '../error/index.cjs';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import '@opentelemetry/sdk-trace-base';
|
|
8
|
+
|
|
9
|
+
interface QueryResult {
|
|
10
|
+
id: string;
|
|
11
|
+
score: number;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
vector?: number[];
|
|
14
|
+
/**
|
|
15
|
+
* The document content, if available.
|
|
16
|
+
* Note: Currently only supported by Chroma vector store.
|
|
17
|
+
* For other vector stores, documents should be stored in metadata.
|
|
18
|
+
*/
|
|
19
|
+
document?: string;
|
|
20
|
+
}
|
|
21
|
+
interface IndexStats {
|
|
22
|
+
dimension: number;
|
|
23
|
+
count: number;
|
|
24
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
25
|
+
}
|
|
26
|
+
interface UpsertVectorParams {
|
|
27
|
+
indexName: string;
|
|
28
|
+
vectors: number[][];
|
|
29
|
+
metadata?: Record<string, any>[];
|
|
30
|
+
ids?: string[];
|
|
31
|
+
}
|
|
32
|
+
interface CreateIndexParams {
|
|
33
|
+
indexName: string;
|
|
34
|
+
dimension: number;
|
|
35
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
36
|
+
}
|
|
37
|
+
interface QueryVectorParams<Filter = VectorFilter> {
|
|
38
|
+
indexName: string;
|
|
39
|
+
queryVector: number[];
|
|
40
|
+
topK?: number;
|
|
41
|
+
filter?: Filter;
|
|
42
|
+
includeVector?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface DescribeIndexParams {
|
|
45
|
+
indexName: string;
|
|
46
|
+
}
|
|
47
|
+
interface DeleteIndexParams {
|
|
48
|
+
indexName: string;
|
|
49
|
+
}
|
|
50
|
+
interface UpdateVectorParams {
|
|
51
|
+
indexName: string;
|
|
52
|
+
id: string;
|
|
53
|
+
update: {
|
|
54
|
+
vector?: number[];
|
|
55
|
+
metadata?: Record<string, any>;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface DeleteVectorParams {
|
|
59
|
+
indexName: string;
|
|
60
|
+
id: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare abstract class MastraVector<Filter = VectorFilter> extends MastraBase {
|
|
64
|
+
constructor();
|
|
65
|
+
get indexSeparator(): string;
|
|
66
|
+
abstract query(params: QueryVectorParams<Filter>): Promise<QueryResult[]>;
|
|
67
|
+
abstract upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
68
|
+
abstract createIndex(params: CreateIndexParams): Promise<void>;
|
|
69
|
+
abstract listIndexes(): Promise<string[]>;
|
|
70
|
+
abstract describeIndex(params: DescribeIndexParams): Promise<IndexStats>;
|
|
71
|
+
abstract deleteIndex(params: DeleteIndexParams): Promise<void>;
|
|
72
|
+
abstract updateVector(params: UpdateVectorParams): Promise<void>;
|
|
73
|
+
abstract deleteVector(params: DeleteVectorParams): Promise<void>;
|
|
74
|
+
protected validateExistingIndex(indexName: string, dimension: number, metric: string): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { type CreateIndexParams, type DeleteIndexParams, type DeleteVectorParams, type DescribeIndexParams, type IndexStats, MastraVector, type QueryResult, type QueryVectorParams, type UpdateVectorParams, type UpsertVectorParams };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { M as MastraBase } from '../base-ClrXcCRx.js';
|
|
2
|
+
import { VectorFilter } from './filter/index.js';
|
|
3
|
+
import '@opentelemetry/api';
|
|
4
|
+
import '../logger-Bpa2oLL4.js';
|
|
5
|
+
import '../error/index.js';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import '@opentelemetry/sdk-trace-base';
|
|
8
|
+
|
|
9
|
+
interface QueryResult {
|
|
10
|
+
id: string;
|
|
11
|
+
score: number;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
vector?: number[];
|
|
14
|
+
/**
|
|
15
|
+
* The document content, if available.
|
|
16
|
+
* Note: Currently only supported by Chroma vector store.
|
|
17
|
+
* For other vector stores, documents should be stored in metadata.
|
|
18
|
+
*/
|
|
19
|
+
document?: string;
|
|
20
|
+
}
|
|
21
|
+
interface IndexStats {
|
|
22
|
+
dimension: number;
|
|
23
|
+
count: number;
|
|
24
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
25
|
+
}
|
|
26
|
+
interface UpsertVectorParams {
|
|
27
|
+
indexName: string;
|
|
28
|
+
vectors: number[][];
|
|
29
|
+
metadata?: Record<string, any>[];
|
|
30
|
+
ids?: string[];
|
|
31
|
+
}
|
|
32
|
+
interface CreateIndexParams {
|
|
33
|
+
indexName: string;
|
|
34
|
+
dimension: number;
|
|
35
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
36
|
+
}
|
|
37
|
+
interface QueryVectorParams<Filter = VectorFilter> {
|
|
38
|
+
indexName: string;
|
|
39
|
+
queryVector: number[];
|
|
40
|
+
topK?: number;
|
|
41
|
+
filter?: Filter;
|
|
42
|
+
includeVector?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface DescribeIndexParams {
|
|
45
|
+
indexName: string;
|
|
46
|
+
}
|
|
47
|
+
interface DeleteIndexParams {
|
|
48
|
+
indexName: string;
|
|
49
|
+
}
|
|
50
|
+
interface UpdateVectorParams {
|
|
51
|
+
indexName: string;
|
|
52
|
+
id: string;
|
|
53
|
+
update: {
|
|
54
|
+
vector?: number[];
|
|
55
|
+
metadata?: Record<string, any>;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface DeleteVectorParams {
|
|
59
|
+
indexName: string;
|
|
60
|
+
id: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare abstract class MastraVector<Filter = VectorFilter> extends MastraBase {
|
|
64
|
+
constructor();
|
|
65
|
+
get indexSeparator(): string;
|
|
66
|
+
abstract query(params: QueryVectorParams<Filter>): Promise<QueryResult[]>;
|
|
67
|
+
abstract upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
68
|
+
abstract createIndex(params: CreateIndexParams): Promise<void>;
|
|
69
|
+
abstract listIndexes(): Promise<string[]>;
|
|
70
|
+
abstract describeIndex(params: DescribeIndexParams): Promise<IndexStats>;
|
|
71
|
+
abstract deleteIndex(params: DeleteIndexParams): Promise<void>;
|
|
72
|
+
abstract updateVector(params: UpdateVectorParams): Promise<void>;
|
|
73
|
+
abstract deleteVector(params: DeleteVectorParams): Promise<void>;
|
|
74
|
+
protected validateExistingIndex(indexName: string, dimension: number, metric: string): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { type CreateIndexParams, type DeleteIndexParams, type DeleteVectorParams, type DescribeIndexParams, type IndexStats, MastraVector, type QueryResult, type QueryVectorParams, type UpdateVectorParams, type UpsertVectorParams };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MastraVector } from '../chunk-V5D2LIF5.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZPOUMTTH_cjs = require('../chunk-ZPOUMTTH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "CompositeVoice", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkZPOUMTTH_cjs.CompositeVoice; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "DefaultVoice", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkZPOUMTTH_cjs.DefaultVoice; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "MastraVoice", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkZPOUMTTH_cjs.MastraVoice; }
|
|
18
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { bL as CompositeVoice, bM as DefaultVoice, bK as MastraVoice, bJ as VoiceConfig, bI as VoiceEventMap, bH as VoiceEventType } from '../base-CTj7ESwt.cjs';
|
|
2
|
+
import 'ai';
|
|
3
|
+
import '../base-B_y9sMg0.cjs';
|
|
4
|
+
import '@opentelemetry/api';
|
|
5
|
+
import '../logger-B8XXh6ya.cjs';
|
|
6
|
+
import '../error/index.cjs';
|
|
7
|
+
import 'stream';
|
|
8
|
+
import '@opentelemetry/sdk-trace-base';
|
|
9
|
+
import 'json-schema';
|
|
10
|
+
import 'zod';
|
|
11
|
+
import '../types-Bo1uigWx.cjs';
|
|
12
|
+
import 'sift';
|
|
13
|
+
import '../runtime-context/index.cjs';
|
|
14
|
+
import 'xstate';
|
|
15
|
+
import 'node:events';
|
|
16
|
+
import '../vector/index.cjs';
|
|
17
|
+
import '../vector/filter/index.cjs';
|
|
18
|
+
import '../tts/index.cjs';
|
|
19
|
+
import 'node:http';
|
|
20
|
+
import 'hono';
|
|
21
|
+
import 'stream/web';
|
|
22
|
+
import 'events';
|
|
23
|
+
import 'node:stream/web';
|
|
24
|
+
import '../workflows/constants.cjs';
|
|
25
|
+
import 'ai/test';
|
|
26
|
+
import '../deployer/index.cjs';
|
|
27
|
+
import '../bundler/index.cjs';
|
|
28
|
+
import 'hono/cors';
|
|
29
|
+
import 'hono-openapi';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { bL as CompositeVoice, bM as DefaultVoice, bK as MastraVoice, bJ as VoiceConfig, bI as VoiceEventMap, bH as VoiceEventType } from '../base-qVqAnB-c.js';
|
|
2
|
+
import 'ai';
|
|
3
|
+
import '../base-ClrXcCRx.js';
|
|
4
|
+
import '@opentelemetry/api';
|
|
5
|
+
import '../logger-Bpa2oLL4.js';
|
|
6
|
+
import '../error/index.js';
|
|
7
|
+
import 'stream';
|
|
8
|
+
import '@opentelemetry/sdk-trace-base';
|
|
9
|
+
import 'json-schema';
|
|
10
|
+
import 'zod';
|
|
11
|
+
import '../types-Bo1uigWx.js';
|
|
12
|
+
import 'sift';
|
|
13
|
+
import '../runtime-context/index.js';
|
|
14
|
+
import 'xstate';
|
|
15
|
+
import 'node:events';
|
|
16
|
+
import '../vector/index.js';
|
|
17
|
+
import '../vector/filter/index.js';
|
|
18
|
+
import '../tts/index.js';
|
|
19
|
+
import 'node:http';
|
|
20
|
+
import 'hono';
|
|
21
|
+
import 'stream/web';
|
|
22
|
+
import 'events';
|
|
23
|
+
import 'node:stream/web';
|
|
24
|
+
import '../workflows/constants.js';
|
|
25
|
+
import 'ai/test';
|
|
26
|
+
import '../deployer/index.js';
|
|
27
|
+
import '../bundler/index.js';
|
|
28
|
+
import 'hono/cors';
|
|
29
|
+
import 'hono-openapi';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CompositeVoice, DefaultVoice, MastraVoice } from '../chunk-5HTMDAXP.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EMITTER_SYMBOL } from '../chunk-Y7D2JLKS.js';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZCU3PLIL_cjs = require('../chunk-ZCU3PLIL.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "DefaultExecutionEngine", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkZCU3PLIL_cjs.DefaultExecutionEngine; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "ExecutionEngine", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkZCU3PLIL_cjs.ExecutionEngine; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "Run", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkZCU3PLIL_cjs.Run; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "Workflow", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkZCU3PLIL_cjs.Workflow; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "cloneStep", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkZCU3PLIL_cjs.cloneStep; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "cloneWorkflow", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkZCU3PLIL_cjs.cloneWorkflow; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "createStep", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkZCU3PLIL_cjs.createStep; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "createWorkflow", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkZCU3PLIL_cjs.createWorkflow; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "mapVariable", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkZCU3PLIL_cjs.mapVariable; }
|
|
42
|
+
});
|
|
@@ -0,0 +1,285 @@
|
|
|
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-CTj7ESwt.cjs';
|
|
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-CTj7ESwt.cjs';
|
|
3
|
+
import { Span } from '@opentelemetry/api';
|
|
4
|
+
import { RuntimeContext } from '../runtime-context/index.cjs';
|
|
5
|
+
import 'ai';
|
|
6
|
+
import '../base-B_y9sMg0.cjs';
|
|
7
|
+
import '../logger-B8XXh6ya.cjs';
|
|
8
|
+
import '../error/index.cjs';
|
|
9
|
+
import 'stream';
|
|
10
|
+
import '@opentelemetry/sdk-trace-base';
|
|
11
|
+
import 'json-schema';
|
|
12
|
+
import 'zod';
|
|
13
|
+
import '../types-Bo1uigWx.cjs';
|
|
14
|
+
import 'sift';
|
|
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 '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
|
+
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 runtimeContext: Record<string, any>;
|
|
62
|
+
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>;
|
|
63
|
+
/**
|
|
64
|
+
* Executes a workflow run with the provided execution graph and input
|
|
65
|
+
* @param graph The execution graph to execute
|
|
66
|
+
* @param input The input data for the workflow
|
|
67
|
+
* @returns A promise that resolves to the workflow output
|
|
68
|
+
*/
|
|
69
|
+
execute<TInput, TOutput>(params: {
|
|
70
|
+
workflowId: string;
|
|
71
|
+
runId: string;
|
|
72
|
+
graph: ExecutionGraph;
|
|
73
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
74
|
+
input?: TInput;
|
|
75
|
+
resume?: {
|
|
76
|
+
steps: string[];
|
|
77
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
78
|
+
resumePayload: any;
|
|
79
|
+
resumePath: number[];
|
|
80
|
+
snapshotRuntimeContext?: Record<string, any>;
|
|
81
|
+
};
|
|
82
|
+
emitter: Emitter;
|
|
83
|
+
retryConfig?: {
|
|
84
|
+
attempts?: number;
|
|
85
|
+
delay?: number;
|
|
86
|
+
};
|
|
87
|
+
runtimeContext: RuntimeContext;
|
|
88
|
+
abortController: AbortController;
|
|
89
|
+
}): Promise<TOutput>;
|
|
90
|
+
getStepOutput(stepResults: Record<string, any>, step?: StepFlowEntry): any;
|
|
91
|
+
executeSleep({ runId, entry, prevOutput, stepResults, emitter, abortController, runtimeContext, }: {
|
|
92
|
+
workflowId: string;
|
|
93
|
+
runId: string;
|
|
94
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
95
|
+
entry: {
|
|
96
|
+
type: 'sleep';
|
|
97
|
+
id: string;
|
|
98
|
+
duration?: number;
|
|
99
|
+
fn?: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
100
|
+
};
|
|
101
|
+
prevStep: StepFlowEntry;
|
|
102
|
+
prevOutput: any;
|
|
103
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
104
|
+
resume?: {
|
|
105
|
+
steps: string[];
|
|
106
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
107
|
+
resumePayload: any;
|
|
108
|
+
resumePath: number[];
|
|
109
|
+
};
|
|
110
|
+
executionContext: ExecutionContext;
|
|
111
|
+
emitter: Emitter;
|
|
112
|
+
abortController: AbortController;
|
|
113
|
+
runtimeContext: RuntimeContext;
|
|
114
|
+
}): Promise<void>;
|
|
115
|
+
executeSleepUntil({ runId, entry, prevOutput, stepResults, emitter, abortController, runtimeContext, }: {
|
|
116
|
+
workflowId: string;
|
|
117
|
+
runId: string;
|
|
118
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
119
|
+
entry: {
|
|
120
|
+
type: 'sleepUntil';
|
|
121
|
+
id: string;
|
|
122
|
+
date?: Date;
|
|
123
|
+
fn?: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
124
|
+
};
|
|
125
|
+
prevStep: StepFlowEntry;
|
|
126
|
+
prevOutput: any;
|
|
127
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
128
|
+
resume?: {
|
|
129
|
+
steps: string[];
|
|
130
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
131
|
+
resumePayload: any;
|
|
132
|
+
resumePath: number[];
|
|
133
|
+
};
|
|
134
|
+
executionContext: ExecutionContext;
|
|
135
|
+
emitter: Emitter;
|
|
136
|
+
abortController: AbortController;
|
|
137
|
+
runtimeContext: RuntimeContext;
|
|
138
|
+
}): Promise<void>;
|
|
139
|
+
executeWaitForEvent({ event, emitter, timeout, }: {
|
|
140
|
+
event: string;
|
|
141
|
+
emitter: Emitter;
|
|
142
|
+
timeout?: number;
|
|
143
|
+
}): Promise<any>;
|
|
144
|
+
executeStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, abortController, runtimeContext, skipEmits, }: {
|
|
145
|
+
workflowId: string;
|
|
146
|
+
runId: string;
|
|
147
|
+
step: Step<string, any, any>;
|
|
148
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
149
|
+
executionContext: ExecutionContext;
|
|
150
|
+
resume?: {
|
|
151
|
+
steps: string[];
|
|
152
|
+
resumePayload: any;
|
|
153
|
+
};
|
|
154
|
+
prevOutput: any;
|
|
155
|
+
emitter: Emitter;
|
|
156
|
+
abortController: AbortController;
|
|
157
|
+
runtimeContext: RuntimeContext;
|
|
158
|
+
skipEmits?: boolean;
|
|
159
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
160
|
+
executeParallel({ workflowId, runId, entry, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
161
|
+
workflowId: string;
|
|
162
|
+
runId: string;
|
|
163
|
+
entry: {
|
|
164
|
+
type: 'parallel';
|
|
165
|
+
steps: StepFlowEntry[];
|
|
166
|
+
};
|
|
167
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
168
|
+
prevStep: StepFlowEntry;
|
|
169
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
170
|
+
resume?: {
|
|
171
|
+
steps: string[];
|
|
172
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
173
|
+
resumePayload: any;
|
|
174
|
+
resumePath: number[];
|
|
175
|
+
};
|
|
176
|
+
executionContext: ExecutionContext;
|
|
177
|
+
emitter: Emitter;
|
|
178
|
+
abortController: AbortController;
|
|
179
|
+
runtimeContext: RuntimeContext;
|
|
180
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
181
|
+
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
182
|
+
workflowId: string;
|
|
183
|
+
runId: string;
|
|
184
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
185
|
+
entry: {
|
|
186
|
+
type: 'conditional';
|
|
187
|
+
steps: StepFlowEntry[];
|
|
188
|
+
conditions: ExecuteFunction<any, any, any, any, DefaultEngineType>[];
|
|
189
|
+
};
|
|
190
|
+
prevStep: StepFlowEntry;
|
|
191
|
+
prevOutput: any;
|
|
192
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
193
|
+
resume?: {
|
|
194
|
+
steps: string[];
|
|
195
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
196
|
+
resumePayload: any;
|
|
197
|
+
resumePath: number[];
|
|
198
|
+
};
|
|
199
|
+
executionContext: ExecutionContext;
|
|
200
|
+
emitter: Emitter;
|
|
201
|
+
abortController: AbortController;
|
|
202
|
+
runtimeContext: RuntimeContext;
|
|
203
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
204
|
+
executeLoop({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
205
|
+
workflowId: string;
|
|
206
|
+
runId: string;
|
|
207
|
+
entry: {
|
|
208
|
+
type: 'loop';
|
|
209
|
+
step: Step;
|
|
210
|
+
condition: ExecuteFunction<any, any, any, any, DefaultEngineType>;
|
|
211
|
+
loopType: 'dowhile' | 'dountil';
|
|
212
|
+
};
|
|
213
|
+
prevStep: StepFlowEntry;
|
|
214
|
+
prevOutput: any;
|
|
215
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
216
|
+
resume?: {
|
|
217
|
+
steps: string[];
|
|
218
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
219
|
+
resumePayload: any;
|
|
220
|
+
resumePath: number[];
|
|
221
|
+
};
|
|
222
|
+
executionContext: ExecutionContext;
|
|
223
|
+
emitter: Emitter;
|
|
224
|
+
abortController: AbortController;
|
|
225
|
+
runtimeContext: RuntimeContext;
|
|
226
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
227
|
+
executeForeach({ workflowId, runId, entry, prevOutput, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
228
|
+
workflowId: string;
|
|
229
|
+
runId: string;
|
|
230
|
+
entry: {
|
|
231
|
+
type: 'foreach';
|
|
232
|
+
step: Step;
|
|
233
|
+
opts: {
|
|
234
|
+
concurrency: number;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
prevStep: StepFlowEntry;
|
|
238
|
+
prevOutput: any;
|
|
239
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
240
|
+
resume?: {
|
|
241
|
+
steps: string[];
|
|
242
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
243
|
+
resumePayload: any;
|
|
244
|
+
resumePath: number[];
|
|
245
|
+
};
|
|
246
|
+
executionContext: ExecutionContext;
|
|
247
|
+
emitter: Emitter;
|
|
248
|
+
abortController: AbortController;
|
|
249
|
+
runtimeContext: RuntimeContext;
|
|
250
|
+
}): Promise<StepResult<any, any, any, any>>;
|
|
251
|
+
protected persistStepUpdate({ workflowId, runId, stepResults, serializedStepGraph, executionContext, workflowStatus, result, error, }: {
|
|
252
|
+
workflowId: string;
|
|
253
|
+
runId: string;
|
|
254
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
255
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
256
|
+
executionContext: ExecutionContext;
|
|
257
|
+
workflowStatus: 'success' | 'failed' | 'suspended' | 'running' | 'waiting';
|
|
258
|
+
result?: Record<string, any>;
|
|
259
|
+
error?: string | Error;
|
|
260
|
+
}): Promise<void>;
|
|
261
|
+
executeEntry({ workflowId, runId, entry, prevStep, serializedStepGraph, stepResults, resume, executionContext, emitter, abortController, runtimeContext, }: {
|
|
262
|
+
workflowId: string;
|
|
263
|
+
runId: string;
|
|
264
|
+
entry: StepFlowEntry;
|
|
265
|
+
prevStep: StepFlowEntry;
|
|
266
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
267
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
268
|
+
resume?: {
|
|
269
|
+
steps: string[];
|
|
270
|
+
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
271
|
+
resumePayload: any;
|
|
272
|
+
resumePath: number[];
|
|
273
|
+
};
|
|
274
|
+
executionContext: ExecutionContext;
|
|
275
|
+
emitter: Emitter;
|
|
276
|
+
abortController: AbortController;
|
|
277
|
+
runtimeContext: RuntimeContext;
|
|
278
|
+
}): Promise<{
|
|
279
|
+
result: StepResult<any, any, any, any>;
|
|
280
|
+
stepResults?: Record<string, StepResult<any, any, any, any>>;
|
|
281
|
+
executionContext?: ExecutionContext;
|
|
282
|
+
}>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export { DefaultEngineType, DefaultExecutionEngine, Emitter, ExecuteFunction, type ExecutionContext, ExecutionEngine, ExecutionGraph, SerializedStepFlowEntry, Step, StepFlowEntry, StepResult };
|