@mastra/core 0.1.27-alpha.9 → 0.1.27-unstable.2
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 +1 -1
- package/dist/agent/index.d.ts +20 -2
- package/dist/core.cjs.development.js +597 -208
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +596 -209
- package/dist/core.esm.js.map +1 -1
- package/dist/engine/index.d.ts +3 -4
- package/dist/engine/schema.d.ts +0 -1
- package/dist/engine/types.d.ts +1 -2
- package/dist/engine/utils.d.ts +0 -1
- package/dist/index.d.ts +1 -2
- package/dist/integration/index.d.ts +0 -1
- package/dist/integration/test-integration.d.ts +12 -0
- package/dist/llm/index.d.ts +32 -2
- package/dist/llm/types.d.ts +33 -1
- package/dist/logger/index.d.ts +0 -1
- package/dist/mastra/index.d.ts +4 -4
- package/dist/mastra/types.d.ts +1 -0
- package/dist/sync/index.d.ts +2 -0
- package/dist/sync/types.d.ts +23 -11
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/types.d.ts +3 -3
- package/dist/utils.d.ts +0 -1
- package/dist/vector/index.d.ts +0 -1
- package/dist/workflows/index.d.ts +2 -2
- package/dist/workflows/step.d.ts +15 -0
- package/dist/workflows/types.d.ts +25 -24
- package/dist/workflows/utils.d.ts +0 -1
- package/dist/workflows/{main.d.ts → workflow.d.ts} +13 -13
- package/package.json +16 -8
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/schema.d.ts.map +0 -1
- package/dist/engine/types.d.ts.map +0 -1
- package/dist/engine/utils.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integration/index.d.ts.map +0 -1
- package/dist/llm/index.d.ts.map +0 -1
- package/dist/llm/types.d.ts.map +0 -1
- package/dist/logger/index.d.ts.map +0 -1
- package/dist/mastra/index.d.ts.map +0 -1
- package/dist/sync/types.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/vector/index.d.ts.map +0 -1
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/main.d.ts.map +0 -1
- package/dist/workflows/types.d.ts.map +0 -1
- package/dist/workflows/utils.d.ts.map +0 -1
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConnection, BaseCredential, BaseEntity, BaseProperty, BaseRecord, CredentialInput, CredentialUpdateInput, CredentialWithConnection, FilterObject } from
|
|
1
|
+
import { BaseConnection, BaseCredential, BaseEntity, BaseProperty, BaseRecord, CredentialInput, CredentialUpdateInput, CredentialWithConnection, FilterObject } from './types';
|
|
2
2
|
export * from './schema';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export * from './utils';
|
|
@@ -69,10 +69,10 @@ export declare abstract class MastraEngine {
|
|
|
69
69
|
abstract getEntityRecordsByConnectionAndType(params: {
|
|
70
70
|
kId: string;
|
|
71
71
|
type: string;
|
|
72
|
-
}): Promise<BaseEntity & {
|
|
72
|
+
}): Promise<(BaseEntity & {
|
|
73
73
|
properties: BaseProperty[];
|
|
74
74
|
records: BaseRecord[];
|
|
75
|
-
} | null>;
|
|
75
|
+
}) | null>;
|
|
76
76
|
abstract updateEntityLastSyncId(params: {
|
|
77
77
|
id: string;
|
|
78
78
|
syncId: string;
|
|
@@ -144,4 +144,3 @@ export declare abstract class MastraEngine {
|
|
|
144
144
|
sort?: string[];
|
|
145
145
|
}): Promise<any[]>;
|
|
146
146
|
}
|
|
147
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/engine/schema.d.ts
CHANGED
package/dist/engine/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface BaseCredential {
|
|
|
19
19
|
scope: string[];
|
|
20
20
|
kId: string | null;
|
|
21
21
|
}
|
|
22
|
-
export type CredentialInput = Omit<BaseCredential,
|
|
22
|
+
export type CredentialInput = Omit<BaseCredential, 'id' | 'kId'>;
|
|
23
23
|
export type CredentialWithConnection = {
|
|
24
24
|
id: string;
|
|
25
25
|
type: string;
|
|
@@ -113,4 +113,3 @@ export declare enum FilterOperators {
|
|
|
113
113
|
SET = "set",
|
|
114
114
|
NOT_SET = "not_set"
|
|
115
115
|
}
|
|
116
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/engine/utils.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,7 @@ export * from './tools';
|
|
|
5
5
|
export * from './logger';
|
|
6
6
|
export * from './engine';
|
|
7
7
|
export * from './vector';
|
|
8
|
-
export * from './sync
|
|
8
|
+
export * from './sync';
|
|
9
9
|
export * from './mastra';
|
|
10
10
|
export * from './llm/types';
|
|
11
11
|
export * from './workflows';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Integration } from '.';
|
|
2
|
+
export declare class TestIntegration extends Integration {
|
|
3
|
+
readonly name = "TEST";
|
|
4
|
+
readonly logoUrl = "/logo-url";
|
|
5
|
+
readonly categories: string[];
|
|
6
|
+
readonly description = "This is a test integration";
|
|
7
|
+
readonly tools: {
|
|
8
|
+
readonly testTool: import("..").ToolApi<{}, {
|
|
9
|
+
message: string;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
}
|
package/dist/llm/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ZodSchema } from 'zod';
|
|
|
3
3
|
import { AllTools, CoreTool, ToolApi } from '../tools/types';
|
|
4
4
|
import { Integration } from '../integration';
|
|
5
5
|
import { Logger } from '../logger';
|
|
6
|
-
import { CustomModelConfig, GoogleGenerativeAISettings, ModelConfig } from './types';
|
|
6
|
+
import { CustomModelConfig, EmbeddingModelConfig, GoogleGenerativeAISettings, ModelConfig, StructuredOutput } from './types';
|
|
7
7
|
export declare class LLM<TTools, TIntegrations extends Integration[] | undefined = undefined, TKeys extends keyof AllTools<TTools, TIntegrations> = keyof AllTools<TTools, TIntegrations>> {
|
|
8
8
|
#private;
|
|
9
9
|
logger: Logger;
|
|
@@ -31,6 +31,11 @@ export declare class LLM<TTools, TIntegrations extends Integration[] | undefined
|
|
|
31
31
|
apiKey?: string;
|
|
32
32
|
};
|
|
33
33
|
}): LanguageModelV1;
|
|
34
|
+
createEmbedding({ model, value, maxRetries, }: {
|
|
35
|
+
model: EmbeddingModelConfig;
|
|
36
|
+
value: string[] | string;
|
|
37
|
+
maxRetries: number;
|
|
38
|
+
}): Promise<import("ai").EmbedManyResult<string> | import("ai").EmbedResult<string>>;
|
|
34
39
|
getParams({ tools, resultTool, model, }: {
|
|
35
40
|
tools: Record<string, CoreTool>;
|
|
36
41
|
resultTool?: {
|
|
@@ -52,6 +57,9 @@ export declare class LLM<TTools, TIntegrations extends Integration[] | undefined
|
|
|
52
57
|
toolChoice: "auto" | "required";
|
|
53
58
|
}>;
|
|
54
59
|
convertTools(enabledTools?: Partial<Record<TKeys, boolean>>): Record<TKeys, CoreTool>;
|
|
60
|
+
private isBaseOutputType;
|
|
61
|
+
private baseOutputTypeSchema;
|
|
62
|
+
private createOutputSchema;
|
|
55
63
|
text({ model, messages, onStepFinish, maxSteps, enabledTools, }: {
|
|
56
64
|
enabledTools?: Partial<Record<TKeys, boolean>>;
|
|
57
65
|
model: ModelConfig;
|
|
@@ -59,6 +67,16 @@ export declare class LLM<TTools, TIntegrations extends Integration[] | undefined
|
|
|
59
67
|
onStepFinish?: (step: string) => void;
|
|
60
68
|
maxSteps?: number;
|
|
61
69
|
}): Promise<import("ai").GenerateTextResult<{}>>;
|
|
70
|
+
textObject({ model, messages, onStepFinish, maxSteps, enabledTools, structuredOutput, }: {
|
|
71
|
+
structuredOutput: StructuredOutput;
|
|
72
|
+
enabledTools?: Partial<Record<TKeys, boolean>>;
|
|
73
|
+
model: ModelConfig;
|
|
74
|
+
messages: CoreMessage[];
|
|
75
|
+
onStepFinish?: (step: string) => void;
|
|
76
|
+
maxSteps?: number;
|
|
77
|
+
}): Promise<import("ai").GenerateObjectResult<{
|
|
78
|
+
[x: string]: any;
|
|
79
|
+
}>>;
|
|
62
80
|
stream({ model, messages, onStepFinish, onFinish, maxSteps, enabledTools, }: {
|
|
63
81
|
model: ModelConfig;
|
|
64
82
|
enabledTools: Partial<Record<TKeys, boolean>>;
|
|
@@ -67,5 +85,17 @@ export declare class LLM<TTools, TIntegrations extends Integration[] | undefined
|
|
|
67
85
|
onFinish?: (result: string) => Promise<void> | void;
|
|
68
86
|
maxSteps?: number;
|
|
69
87
|
}): Promise<import("ai").StreamTextResult<{}>>;
|
|
88
|
+
streamObject({ model, messages, onStepFinish, onFinish, maxSteps, enabledTools, structuredOutput, }: {
|
|
89
|
+
structuredOutput: StructuredOutput;
|
|
90
|
+
model: ModelConfig;
|
|
91
|
+
enabledTools: Partial<Record<TKeys, boolean>>;
|
|
92
|
+
messages: CoreMessage[];
|
|
93
|
+
onStepFinish?: (step: string) => void;
|
|
94
|
+
onFinish?: (result: string) => Promise<void> | void;
|
|
95
|
+
maxSteps?: number;
|
|
96
|
+
}): Promise<import("ai").StreamObjectResult<{
|
|
97
|
+
[x: string]: any;
|
|
98
|
+
}, {
|
|
99
|
+
[x: string]: any;
|
|
100
|
+
}, never>>;
|
|
70
101
|
}
|
|
71
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/llm/types.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { LanguageModelV1 } from 'ai';
|
|
2
|
+
interface EmbeddingModelConfigBase {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
2
5
|
export type OpenAIModel = 'gpt-4' | 'gpt-4-turbo' | 'gpt-3.5-turbo' | 'gpt-4o' | 'gpt-4o-mini';
|
|
6
|
+
export type OpenAIEmbeddingModelNames = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
3
7
|
export type OpenAIConfig = {
|
|
4
8
|
provider: 'OPEN_AI';
|
|
5
9
|
name: OpenAIModel | (string & {});
|
|
6
10
|
toolChoice: 'auto' | 'required';
|
|
7
11
|
apiKey?: string;
|
|
8
12
|
};
|
|
13
|
+
export type OpenAIEmbeddingConfig = EmbeddingModelConfigBase & {
|
|
14
|
+
provider: 'OPEN_AI';
|
|
15
|
+
name: OpenAIEmbeddingModelNames;
|
|
16
|
+
};
|
|
9
17
|
export type GoogleModel = 'gemini-1.5-pro-latest' | 'gemini-1.5-pro' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash';
|
|
10
18
|
export type GoogleConfig = {
|
|
11
19
|
provider: 'GOOGLE';
|
|
@@ -51,6 +59,12 @@ export type GroqConfig = {
|
|
|
51
59
|
apiKey?: string;
|
|
52
60
|
toolChoice: 'auto' | 'required';
|
|
53
61
|
};
|
|
62
|
+
export type CohereEmbeddingModelNames = 'embed-english-v3.0' | 'embed-multilingual-v3.0' | 'embed-english-light-v3.0' | 'embed-multilingual-light-v3.0' | 'embed-english-v2.0' | 'embed-english-light-v2.0' | 'embed-multilingual-v2.0' | (string & {});
|
|
63
|
+
export type CohereEmbeddingConfig = EmbeddingModelConfigBase & {
|
|
64
|
+
provider: 'COHERE';
|
|
65
|
+
name: CohereEmbeddingModelNames;
|
|
66
|
+
};
|
|
67
|
+
export type EmbeddingModelConfig = OpenAIEmbeddingConfig | CohereEmbeddingConfig;
|
|
54
68
|
export type PerplexityModel = 'llama-3.1-sonar-small-128k-online' | 'llama-3.1-sonar-large-128k-online' | 'llama-3.1-sonar-huge-128k-online' | 'llama-3.1-sonar-small-128k-chat' | 'llama-3.1-sonar-large-128k-chat' | 'llama-3.1-8b-instruct' | 'llama-3.1-70b-instruct';
|
|
55
69
|
export type PerplexityConfig = {
|
|
56
70
|
provider: 'PERPLEXITY';
|
|
@@ -138,5 +152,23 @@ export type AnthropicVertexConfig = {
|
|
|
138
152
|
type BuiltInModelConfig = OpenAIConfig | AnthropicConfig | GroqConfig | GoogleConfig | PerplexityConfig | TogetherAiConfig | LMStudioConfig | BaseTenConfig | FireworksConfig | MistralConfig | XGrokConfig | CohereConfig | AzureConfig | AmazonConfig | AnthropicVertexConfig;
|
|
139
153
|
export type ModelConfig = BuiltInModelConfig | CustomModelConfig;
|
|
140
154
|
export type LLMProvider = BuiltInModelConfig['provider'];
|
|
155
|
+
export type BaseStructuredOutputType = 'string' | 'number' | 'boolean' | 'date';
|
|
156
|
+
export type StructuredOutputType = 'array' | 'string' | 'number' | 'object' | 'boolean' | 'date';
|
|
157
|
+
export type StructuredOutputArrayItem = {
|
|
158
|
+
type: BaseStructuredOutputType;
|
|
159
|
+
} | {
|
|
160
|
+
type: 'object';
|
|
161
|
+
items: StructuredOutput;
|
|
162
|
+
};
|
|
163
|
+
export type StructuredOutput = {
|
|
164
|
+
[key: string]: {
|
|
165
|
+
type: BaseStructuredOutputType;
|
|
166
|
+
} | {
|
|
167
|
+
type: 'object';
|
|
168
|
+
items: StructuredOutput;
|
|
169
|
+
} | {
|
|
170
|
+
type: 'array';
|
|
171
|
+
items: StructuredOutputArrayItem;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
141
174
|
export {};
|
|
142
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/logger/index.d.ts
CHANGED
|
@@ -58,4 +58,3 @@ export declare class MultiLogger<T extends BaseLogMessage = BaseLogMessage> impl
|
|
|
58
58
|
}
|
|
59
59
|
export declare function createLogger<T extends BaseLogMessage = BaseLogMessage>(config: LoggerConfig): Logger<T>;
|
|
60
60
|
export declare function createMultiLogger<T extends BaseLogMessage = BaseLogMessage>(loggers: Logger<T>[]): Logger<T>;
|
|
61
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/mastra/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Integration } from '../integration';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
3
|
import { Logger, RegisteredLogger } from '../logger';
|
|
4
|
-
import { SyncConfig } from '../sync/types';
|
|
5
4
|
import { AllTools } from '../tools/types';
|
|
6
5
|
import { MastraEngine } from '../engine';
|
|
7
6
|
import { MastraVector } from '../vector';
|
|
8
7
|
import { LLM } from '../llm';
|
|
9
8
|
import { z } from 'zod';
|
|
10
9
|
import { Workflow } from '../workflows';
|
|
11
|
-
|
|
10
|
+
import { syncApi } from '../sync/types';
|
|
11
|
+
import { StripUndefined } from './types';
|
|
12
|
+
export declare class Mastra<TIntegrations extends Integration[], MastraTools extends Record<string, any>, TSyncs extends Record<string, syncApi<any, any>>> {
|
|
12
13
|
private engine?;
|
|
13
14
|
private vectors?;
|
|
14
15
|
private tools;
|
|
@@ -28,7 +29,7 @@ export declare class Mastra<TIntegrations extends Integration[], MastraTools ext
|
|
|
28
29
|
logger?: Logger;
|
|
29
30
|
workflows?: Workflow[];
|
|
30
31
|
});
|
|
31
|
-
sync<K extends keyof TSyncs>(key: K, params: TSyncs[K]
|
|
32
|
+
sync<K extends keyof TSyncs>(key: K, params: TSyncs[K]['schema']['_input']): Promise<StripUndefined<TSyncs[K]['outputShema']>['_input']>;
|
|
32
33
|
getAgent(name: string): Agent<MastraTools, TIntegrations, keyof MastraTools | keyof (TIntegrations extends Integration[] ? (import("../tools/types").IntegrationTools<TIntegrations[number]> extends infer T ? T extends import("../tools/types").IntegrationTools<TIntegrations[number]> ? T extends any ? (k: T) => void : never : never : never) extends (k: infer I) => void ? I : never : {})>;
|
|
33
34
|
getIntegration<I extends TIntegrations[number]['name']>(name: I): Extract<TIntegrations[number], {
|
|
34
35
|
name: I;
|
|
@@ -47,4 +48,3 @@ export declare class Mastra<TIntegrations extends Integration[], MastraTools ext
|
|
|
47
48
|
}): void;
|
|
48
49
|
getLogger(key: RegisteredLogger): Logger<import("../logger").BaseLogMessage> | undefined;
|
|
49
50
|
}
|
|
50
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type StripUndefined<T> = T extends undefined ? never : T;
|
package/dist/sync/types.d.ts
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
|
+
import { ZodSchema } from 'zod';
|
|
1
2
|
import { Agent } from '../agent';
|
|
2
3
|
import { MastraEngine } from '../engine';
|
|
3
4
|
import { Integration } from '../integration';
|
|
4
5
|
import { LLM } from '../llm';
|
|
5
6
|
import { AllTools, ToolApi } from '../tools/types';
|
|
6
7
|
import { MastraVector } from '../vector';
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export interface
|
|
16
|
-
|
|
8
|
+
export interface SyncIntegrationRegistry<I extends Integration[]> {
|
|
9
|
+
get: <N extends I[number]['name']>(name: N) => Extract<I[number], {
|
|
10
|
+
name: N;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export interface SyncToolRegistry<T extends Record<string, ToolApi<any, any>>> {
|
|
14
|
+
get: <N extends keyof T>(name: N) => T[N];
|
|
15
|
+
}
|
|
16
|
+
export interface syncApi<IN extends Record<string, unknown>, OUT extends Record<string, unknown>> {
|
|
17
|
+
label: string;
|
|
18
|
+
schema: ZodSchema<IN>;
|
|
19
|
+
outputShema?: ZodSchema<OUT>;
|
|
20
|
+
description: string;
|
|
21
|
+
executor: (params: {
|
|
22
|
+
data: IN;
|
|
23
|
+
engine: MastraEngine;
|
|
24
|
+
agents: Map<string, Agent<Integration[], any>>;
|
|
25
|
+
vectors: Record<string, MastraVector> | undefined;
|
|
26
|
+
llm: LLM<AllTools<any, Integration[]>, Integration[], any>;
|
|
27
|
+
integrationsRegistry: <I extends Integration[]>() => SyncIntegrationRegistry<I>;
|
|
28
|
+
toolsRegistry: <T extends Record<string, ToolApi<any, any>>>() => SyncToolRegistry<T>;
|
|
29
|
+
}) => Promise<OUT>;
|
|
17
30
|
}
|
|
18
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/tools/index.d.ts
CHANGED
package/dist/tools/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ interface ToolIntegrations<I extends Integration[]> {
|
|
|
13
13
|
name: N;
|
|
14
14
|
}>;
|
|
15
15
|
}
|
|
16
|
-
export interface IntegrationApiExcutorParams<T extends Record<string, unknown>> {
|
|
16
|
+
export interface IntegrationApiExcutorParams<T extends Record<string, unknown>, TOUT extends Record<string, unknown>> {
|
|
17
17
|
data: T;
|
|
18
18
|
integrationsRegistry: <I extends Integration[]>() => ToolIntegrations<I>;
|
|
19
19
|
llm: LLM<Integration[], any, any>;
|
|
@@ -25,11 +25,11 @@ export type ToolApi<IN extends Record<string, unknown> = Record<string, unknown>
|
|
|
25
25
|
label: string;
|
|
26
26
|
description: string;
|
|
27
27
|
documentation?: string;
|
|
28
|
-
|
|
28
|
+
outputSchema?: ZodSchema<OUT>;
|
|
29
|
+
executor: (params: IntegrationApiExcutorParams<IN, OUT>) => Promise<OUT>;
|
|
29
30
|
};
|
|
30
31
|
export type IntegrationTools<T extends Integration> = T['tools'];
|
|
31
32
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
32
33
|
export type MergeIntegrationTools<T extends Integration[]> = UnionToIntersection<IntegrationTools<T[number]>>;
|
|
33
34
|
export type AllTools<TTools, TIntegrations extends Integration[] | undefined = undefined> = TTools & (TIntegrations extends Integration[] ? MergeIntegrationTools<TIntegrations> : {});
|
|
34
35
|
export {};
|
|
35
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/utils.d.ts
CHANGED
package/dist/vector/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './workflow';
|
|
2
2
|
export * from './types';
|
|
3
|
-
|
|
3
|
+
export * from './step';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare class Step<TStepId extends string = any, TSchemaIn extends z.ZodSchema = any, TSchemaOut extends z.ZodSchema = any> {
|
|
3
|
+
id: TStepId;
|
|
4
|
+
inputSchema?: TSchemaIn;
|
|
5
|
+
outputSchema?: TSchemaOut;
|
|
6
|
+
payload?: Partial<z.infer<TSchemaIn>>;
|
|
7
|
+
action?: (args: z.infer<TSchemaIn>) => z.infer<TSchemaOut>;
|
|
8
|
+
constructor({ id, inputSchema, outputSchema, payload, action }: {
|
|
9
|
+
id: TStepId;
|
|
10
|
+
inputSchema?: TSchemaIn;
|
|
11
|
+
outputSchema?: TSchemaOut;
|
|
12
|
+
payload?: Partial<z.infer<TSchemaIn>>;
|
|
13
|
+
action?: (args: z.infer<TSchemaIn>) => z.infer<TSchemaOut>;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Query } from 'sift';
|
|
3
3
|
import { RegisteredLogger, BaseLogMessage } from '../logger';
|
|
4
|
+
import { Step } from './step';
|
|
4
5
|
declare const StepIdBrand: unique symbol;
|
|
5
6
|
export type StepId = string & {
|
|
6
7
|
readonly [StepIdBrand]: typeof StepIdBrand;
|
|
7
8
|
};
|
|
8
9
|
export type StepResult<T> = T extends (data: any) => Promise<infer R> ? R : never;
|
|
9
|
-
export interface VariableReference<TStepId extends string
|
|
10
|
+
export interface VariableReference<TStepId extends string, TPath extends string> {
|
|
10
11
|
stepId: TStepId | 'trigger';
|
|
11
12
|
path: TPath;
|
|
12
13
|
}
|
|
13
|
-
export interface BaseCondition<
|
|
14
|
+
export interface BaseCondition<TStepId extends string> {
|
|
14
15
|
ref: {
|
|
15
|
-
stepId:
|
|
16
|
+
stepId: TStepId | 'trigger';
|
|
16
17
|
path: string;
|
|
17
18
|
};
|
|
18
|
-
query: Query<
|
|
19
|
+
query: Query<any>;
|
|
19
20
|
}
|
|
20
|
-
export type
|
|
21
|
-
|
|
21
|
+
export type StepConfig<TStepId extends string, TSchemaIn extends z.ZodType<any>, TSchemaOut extends z.ZodType<any>> = Record<TStepId, {
|
|
22
|
+
data: TSchemaIn;
|
|
23
|
+
transitions?: Partial<Record<TStepId, StepTransition<TStepId>>>;
|
|
24
|
+
handler: (data: z.infer<TSchemaIn>) => Promise<z.infer<TSchemaOut>>;
|
|
25
|
+
}>;
|
|
26
|
+
export type StepCondition<TStepId extends string> = BaseCondition<TStepId> | {
|
|
27
|
+
and: StepCondition<TStepId>[];
|
|
22
28
|
} | {
|
|
23
|
-
or: StepCondition<
|
|
29
|
+
or: StepCondition<TStepId>[];
|
|
24
30
|
};
|
|
25
|
-
export interface StepTransition<
|
|
26
|
-
condition?: StepCondition<
|
|
31
|
+
export interface StepTransition<TStepId extends string> {
|
|
32
|
+
condition?: StepCondition<TStepId>;
|
|
27
33
|
}
|
|
28
|
-
export
|
|
29
|
-
id:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
action: (data: z.infer<TSchema>) => Promise<TOutput>;
|
|
37
|
-
inputSchema?: TSchema;
|
|
38
|
-
variables?: Partial<Record<keyof z.infer<TSchema>, VariableReference>>;
|
|
39
|
-
payload?: Partial<z.infer<TSchema>>;
|
|
40
|
-
transitions?: Record<TTransitions, StepTransition> | null;
|
|
34
|
+
export type StepInputType<Steps extends Step<any, any, any>[], Id extends Steps[number]['id']> = Extract<Steps[number], {
|
|
35
|
+
id: Id;
|
|
36
|
+
}>['inputSchema'] extends infer Schema ? Schema extends z.ZodType<any> ? z.infer<Schema> : never : never;
|
|
37
|
+
export interface StepDefinition<TStepId extends string, TSteps extends Step<any, any, any>[]> {
|
|
38
|
+
variables?: StepInputType<TSteps, TStepId> extends never ? Record<string, VariableReference<TSteps[number]['id'], string>> : {
|
|
39
|
+
[K in keyof StepInputType<TSteps, TStepId> as K]?: VariableReference<TSteps[number]['id'], string>;
|
|
40
|
+
};
|
|
41
|
+
transitions?: Partial<Record<TSteps[number]['id'], StepTransition<TStepId>>>;
|
|
41
42
|
}
|
|
42
43
|
export interface WorkflowContext<TTrigger = any, TStepResults = any> {
|
|
43
44
|
error: Error | null;
|
|
@@ -77,8 +78,9 @@ export type WorkflowEvent = {
|
|
|
77
78
|
output: ResolverFunctionOutput;
|
|
78
79
|
};
|
|
79
80
|
export type ResolverFunctionInput = {
|
|
80
|
-
step: StepConfig;
|
|
81
|
+
step: StepConfig<any, any, any>[any];
|
|
81
82
|
context: WorkflowContext;
|
|
83
|
+
stepId: StepId;
|
|
82
84
|
};
|
|
83
85
|
export type ResolverFunctionOutput = {
|
|
84
86
|
stepId: StepId;
|
|
@@ -125,4 +127,3 @@ export type WorkflowState = {
|
|
|
125
127
|
};
|
|
126
128
|
};
|
|
127
129
|
export {};
|
|
128
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Logger } from '../logger';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { WorkflowLogMessage, StepDefinition } from './types';
|
|
4
|
-
|
|
4
|
+
import { Step } from './step';
|
|
5
|
+
export declare class Workflow<TSteps extends Step<any, any, any>[] = any, TTriggerSchema extends z.ZodType<any> = any> {
|
|
5
6
|
#private;
|
|
6
7
|
name: string;
|
|
7
|
-
triggerSchema?: z.ZodType<any>;
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new Workflow instance
|
|
10
10
|
* @param name - Identifier for the workflow (not necessarily unique)
|
|
11
11
|
* @param logger - Optional logger instance
|
|
12
12
|
*/
|
|
13
|
-
constructor(name
|
|
13
|
+
constructor({ name, logger, steps, triggerSchema }: {
|
|
14
|
+
name: string;
|
|
15
|
+
logger?: Logger<WorkflowLogMessage>;
|
|
16
|
+
steps: TSteps;
|
|
17
|
+
triggerSchema?: TTriggerSchema;
|
|
18
|
+
});
|
|
14
19
|
/**
|
|
15
20
|
* Initializes the XState machine for the workflow
|
|
16
21
|
*
|
|
@@ -23,14 +28,10 @@ export declare class Workflow<TTrigger = any, TSteps extends Record<string, Step
|
|
|
23
28
|
*
|
|
24
29
|
* This is the last step of a workflow builder method chain
|
|
25
30
|
* @throws Error if validation fails
|
|
26
|
-
|
|
27
|
-
commit(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Sets the schema for validating trigger data
|
|
30
|
-
* @param schema - Zod schema for trigger data validation
|
|
31
|
+
*
|
|
31
32
|
* @returns this instance for method chaining
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
commit(): this;
|
|
34
35
|
/**
|
|
35
36
|
* Adds a new step to the workflow
|
|
36
37
|
* @param id - Unique identifier for the step
|
|
@@ -38,16 +39,15 @@ export declare class Workflow<TTrigger = any, TSteps extends Record<string, Step
|
|
|
38
39
|
* @returns this instance for method chaining (builder pattern baybyyyy)
|
|
39
40
|
* @throws Error if step ID is duplicate or variable resolution fails
|
|
40
41
|
*/
|
|
41
|
-
|
|
42
|
+
step<TStepId extends TSteps[number]['id']>(id: TStepId, config?: StepDefinition<TStepId, TSteps>): this;
|
|
42
43
|
/**
|
|
43
44
|
* Executes the workflow with the given trigger data
|
|
44
45
|
* @param triggerData - Initial data to start the workflow with
|
|
45
46
|
* @returns Promise resolving to workflow results or rejecting with error
|
|
46
47
|
* @throws Error if trigger schema validation fails
|
|
47
48
|
*/
|
|
48
|
-
|
|
49
|
-
triggerData?:
|
|
49
|
+
execute(triggerData?: z.infer<TTriggerSchema>): Promise<{
|
|
50
|
+
triggerData?: z.infer<TTriggerSchema>;
|
|
50
51
|
results: Record<string, unknown>;
|
|
51
52
|
}>;
|
|
52
53
|
}
|
|
53
|
-
//# sourceMappingURL=main.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "0.1.27-
|
|
3
|
+
"version": "0.1.27-unstable.2",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/
|
|
7
|
+
"module": "dist/core.esm.js",
|
|
7
8
|
"typings": "dist/index.d.ts",
|
|
8
9
|
"files": [
|
|
9
10
|
"dist"
|
|
@@ -31,12 +32,14 @@
|
|
|
31
32
|
"@badgateway/oauth2-client": "^2.4.0",
|
|
32
33
|
"@date-fns/utc": "^1.2.0",
|
|
33
34
|
"@pinecone-database/pinecone": "^3.0.3",
|
|
35
|
+
"@types/express": "^5.0.0",
|
|
34
36
|
"@upstash/redis": "^1.34.3",
|
|
35
37
|
"ai": "^4.0.3",
|
|
36
38
|
"anthropic-vertex-ai": "^1.0.2",
|
|
37
39
|
"date-fns": "^3.0.5",
|
|
40
|
+
"express": "^4.21.1",
|
|
38
41
|
"inngest": "3.22.3",
|
|
39
|
-
"lodash": "^4.17.21",
|
|
42
|
+
"lodash-es": "^4.17.21",
|
|
40
43
|
"sift": "^17.1.3",
|
|
41
44
|
"xstate": "^5.19.0"
|
|
42
45
|
},
|
|
@@ -57,20 +60,25 @@
|
|
|
57
60
|
}
|
|
58
61
|
],
|
|
59
62
|
"devDependencies": {
|
|
63
|
+
"@babel/preset-env": "^7.26.0",
|
|
64
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
65
|
+
"@badgateway/oauth2-client": "^2.4.0",
|
|
60
66
|
"@jest/globals": "^29.7.0",
|
|
61
67
|
"@size-limit/preset-small-lib": "^11.1.4",
|
|
62
68
|
"@tsconfig/recommended": "^1.0.7",
|
|
63
|
-
"@types/jest": "^29.5.
|
|
64
|
-
"@types/lodash": "^4.17.
|
|
69
|
+
"@types/jest": "^29.5.14",
|
|
70
|
+
"@types/lodash-es": "^4.17.12",
|
|
65
71
|
"@types/node": "^22.1.0",
|
|
72
|
+
"@types/qs": "^6.9.15",
|
|
73
|
+
"babel-jest": "^29.7.0",
|
|
74
|
+
"dotenv": "^16.3.1",
|
|
66
75
|
"dts-cli": "^2.0.5",
|
|
67
76
|
"husky": "^9.1.4",
|
|
68
77
|
"jest": "^29.7.0",
|
|
69
78
|
"size-limit": "^11.1.4",
|
|
70
|
-
"ts-jest": "^29.2.4",
|
|
71
79
|
"ts-node": "^10.9.2",
|
|
72
80
|
"tslib": "^2.6.3",
|
|
73
|
-
"typescript": "
|
|
81
|
+
"typescript": "5.5.4"
|
|
74
82
|
},
|
|
75
83
|
"scripts": {
|
|
76
84
|
"check": "tsc --noEmit",
|
|
@@ -80,7 +88,7 @@
|
|
|
80
88
|
"lint": "dts lint",
|
|
81
89
|
"size": "size-limit",
|
|
82
90
|
"start": "dts watch",
|
|
83
|
-
"test": "jest",
|
|
91
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
84
92
|
"clean": "rm -rf dist && rm -rf node_modules"
|
|
85
93
|
}
|
|
86
94
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,qBAAa,KAAK,CAChB,MAAM,EACN,aAAa,SAAS,WAAW,EAAE,GAAG,SAAS,GAAG,SAAS,EAC3D,KAAK,SAAS,MAAM,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,MAAM,QAAQ,CAClE,MAAM,EACN,aAAa,CACd;IAEM,IAAI,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ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AAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAElB,QAAQ,CAAC,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE;QAC5D,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/engine/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,KAAK,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEvC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB5B,CAAC;AAEH,eAAO,MAAM,eAAe,yDAAkD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/engine/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAA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CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,iBAAiB,EACjB,eAAe,GAChB,EAAE;IACD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,UAMA"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integration/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+B,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEtE,8BAAsB,WAAW;IAC/B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAa;;IAI7B,SAAS,KAAK,WAAW,IAAI,GAAG,CAE/B;IAED,SAAS,KAAK,kBAAkB,IAAI,MAAM,CACxC,MAAM,EACN;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAClC,CAEA;IAED,SAAS,KAAK,UAAU,IAAI,GAAG,CAE9B;IAEK,YAAY,IAAI,OAAO,C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