@mastra/core 0.2.0-alpha.83 → 0.2.0-alpha.86
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/action/index.d.ts +3 -3
- package/dist/agent/index.d.ts +6 -6
- package/dist/agent/index.js +6 -6
- package/dist/base.d.ts +3 -3
- package/dist/base.js +2 -2
- package/dist/bundler/index.d.ts +21 -0
- package/dist/bundler/index.js +4 -0
- package/dist/chunk-2ISN3AA7.js +392 -0
- package/dist/chunk-2J5OHBUG.js +24 -0
- package/dist/{chunk-Y7TKCKRI.js → chunk-5NQ3MEZM.js} +8 -8
- package/dist/{chunk-K7KUCZT2.js → chunk-6WJREZ5F.js} +2 -2
- package/dist/{chunk-RPBNMIV7.js → chunk-73XDWPXJ.js} +84 -52
- package/dist/chunk-CQYUMNLZ.js +28 -0
- package/dist/{chunk-AO76Z4K3.js → chunk-D66E7L7R.js} +1 -1
- package/dist/{chunk-FCRDS4YS.js → chunk-EH2PG7Q6.js} +10 -4
- package/dist/{chunk-BWEOV64I.js → chunk-EVYBUFXB.js} +13 -9
- package/dist/{chunk-OJJ6QGX4.js → chunk-I3MJB67Z.js} +12 -12
- package/dist/{chunk-27EL4TRB.js → chunk-JCRGAEY6.js} +1 -1
- package/dist/{chunk-BQMCLBCR.js → chunk-OOZGW5CY.js} +1 -1
- package/dist/{chunk-LYNJHHQX.js → chunk-RCS7AVH6.js} +2 -2
- package/dist/chunk-RLPH6TDJ.js +30 -0
- package/dist/{chunk-FROFMREE.js → chunk-RZYBOMIG.js} +7 -0
- package/dist/{chunk-Q5JF3TKZ.js → chunk-SLWM3SEH.js} +1 -1
- package/dist/{chunk-NLQVQJOD.js → chunk-TJK6TGSR.js} +1 -0
- package/dist/{chunk-S45F6AHA.js → chunk-U25DBVJZ.js} +1 -1
- package/dist/chunk-XD5IQZRB.js +16 -0
- package/dist/deployer/index.d.ts +8 -25
- package/dist/deployer/index.js +4 -3
- package/dist/embeddings/index.d.ts +2 -2
- package/dist/embeddings/index.js +1 -1
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.js +3 -3
- package/dist/eval/index.d.ts +3 -3
- package/dist/filter/index.d.ts +7 -6
- package/dist/filter/index.js +1 -1
- package/dist/{index-B9i6dmc0.d.ts → index-B0-NXUYv.d.ts} +1 -0
- package/dist/{index-CA9EWqaj.d.ts → index-Duqv1Yom.d.ts} +50 -27
- package/dist/index.d.ts +15 -13
- package/dist/index.js +26 -25
- package/dist/integration/index.d.ts +4 -4
- package/dist/llm/index.d.ts +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/providers/anthropic-vertex.d.ts +31 -0
- package/dist/llm/model/providers/anthropic-vertex.js +23 -0
- package/dist/llm/model/providers/anthropic.d.ts +29 -0
- package/dist/llm/model/providers/anthropic.js +21 -0
- package/dist/llm/model/providers/azure.d.ts +48 -0
- package/dist/llm/model/providers/azure.js +50 -0
- package/dist/llm/model/providers/baseten.d.ts +33 -0
- package/dist/llm/model/providers/baseten.js +29 -0
- package/dist/llm/model/providers/bedrock.d.ts +32 -0
- package/dist/llm/model/providers/bedrock.js +24 -0
- package/dist/llm/model/providers/cerebras.d.ts +30 -0
- package/dist/llm/model/providers/cerebras.js +22 -0
- package/dist/llm/model/providers/cohere.d.ts +30 -0
- package/dist/llm/model/providers/cohere.js +22 -0
- package/dist/llm/model/providers/deepinfra.d.ts +30 -0
- package/dist/llm/model/providers/deepinfra.js +22 -0
- package/dist/llm/model/providers/deepseek.d.ts +30 -0
- package/dist/llm/model/providers/deepseek.js +22 -0
- package/dist/llm/model/providers/fireworks.d.ts +35 -0
- package/dist/llm/model/providers/fireworks.js +40 -0
- package/dist/llm/model/providers/google-vertex.d.ts +48 -0
- package/dist/llm/model/providers/google-vertex.js +22 -0
- package/dist/llm/model/providers/google.d.ts +54 -0
- package/dist/llm/model/providers/google.js +23 -0
- package/dist/llm/model/providers/grok.d.ts +32 -0
- package/dist/llm/model/providers/grok.js +22 -0
- package/dist/llm/model/providers/groq.d.ts +37 -0
- package/dist/llm/model/providers/groq.js +42 -0
- package/dist/llm/model/providers/lmstudio.d.ts +29 -0
- package/dist/llm/model/providers/lmstudio.js +22 -0
- package/dist/llm/model/providers/mistral.d.ts +30 -0
- package/dist/llm/model/providers/mistral.js +22 -0
- package/dist/llm/model/providers/mock.d.ts +30 -0
- package/dist/llm/model/providers/mock.js +83 -0
- package/dist/llm/model/providers/ollama.d.ts +31 -0
- package/dist/llm/model/providers/ollama.js +23 -0
- package/dist/llm/model/providers/openai-compat.d.ts +39 -0
- package/dist/llm/model/providers/openai-compat.js +6 -0
- package/dist/llm/model/providers/openai.d.ts +34 -0
- package/dist/llm/model/providers/openai.js +6 -0
- package/dist/llm/model/providers/openai.test.d.ts +2 -0
- package/dist/llm/model/providers/openai.test.js +220 -0
- package/dist/llm/model/providers/perplexity.d.ts +30 -0
- package/dist/llm/model/providers/perplexity.js +22 -0
- package/dist/llm/model/providers/portkey.d.ts +34 -0
- package/dist/llm/model/providers/portkey.js +22 -0
- package/dist/llm/model/providers/togetherai.d.ts +30 -0
- package/dist/llm/model/providers/togetherai.js +22 -0
- package/dist/logger/index.d.ts +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/mastra/index.d.ts +5 -4
- package/dist/mastra/index.js +5 -5
- package/dist/memory/index.d.ts +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/model-QGWIMOSx.d.ts +31 -0
- package/dist/relevance/index.d.ts +3 -3
- package/dist/relevance/index.js +7 -7
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.js +3 -3
- package/dist/telemetry/index.d.ts +5 -103
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry-oCUM52DG.d.ts +104 -0
- package/dist/tools/index.d.ts +4 -4
- package/dist/tts/index.d.ts +2 -2
- package/dist/tts/index.js +4 -4
- package/dist/vector/index.d.ts +2 -2
- package/dist/vector/index.js +4 -4
- package/dist/{workflow-Dam5GtdA.d.ts → workflow-DQ8CtzzU.d.ts} +1 -1
- package/dist/workflows/index.d.ts +5 -5
- package/dist/workflows/index.js +3 -3
- package/package.json +30 -15
- package/dist/chunk-5R6DBXQM.js +0 -57
- /package/dist/{chunk-OZZS5Y3C.js → chunk-SDKEPBBH.js} +0 -0
|
@@ -1,52 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
/** Sampling strategy configuration for OpenTelemetry */
|
|
6
|
-
type SamplingStrategy = {
|
|
7
|
-
/** Sample traces based on a probability between 0 and 1 */
|
|
8
|
-
type: 'ratio';
|
|
9
|
-
/** Probability between 0 and 1 (e.g., 0.1 for 10% sampling) */
|
|
10
|
-
probability: number;
|
|
11
|
-
} | {
|
|
12
|
-
/** Sample all traces */
|
|
13
|
-
type: 'always_on';
|
|
14
|
-
} | {
|
|
15
|
-
/** Don't sample any traces */
|
|
16
|
-
type: 'always_off';
|
|
17
|
-
} | {
|
|
18
|
-
/** Use parent sampling decision if available, otherwise use root sampler */
|
|
19
|
-
type: 'parent_based';
|
|
20
|
-
/** Configuration for the root sampler when no parent context exists */
|
|
21
|
-
root: {
|
|
22
|
-
/** Probability between 0 and 1 for the root sampler */
|
|
23
|
-
probability: number;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
/** Configuration options for OpenTelemetry */
|
|
27
|
-
type OtelConfig = {
|
|
28
|
-
/** Name of the service for telemetry identification */
|
|
29
|
-
serviceName?: string;
|
|
30
|
-
/** Whether telemetry is enabled. Defaults to true */
|
|
31
|
-
enabled?: boolean;
|
|
32
|
-
/** Sampling configuration to control trace data volume */
|
|
33
|
-
sampling?: SamplingStrategy;
|
|
34
|
-
/** Export configuration for sending telemetry data */
|
|
35
|
-
export?: {
|
|
36
|
-
/** Export to an OTLP (OpenTelemetry Protocol) endpoint */
|
|
37
|
-
type: 'otlp';
|
|
38
|
-
/** OTLP endpoint URL */
|
|
39
|
-
endpoint?: string;
|
|
40
|
-
/** Optional headers for OTLP requests */
|
|
41
|
-
headers?: Record<string, string>;
|
|
42
|
-
} | {
|
|
43
|
-
/** Export to console for development/debugging */
|
|
44
|
-
type: 'console';
|
|
45
|
-
} | {
|
|
46
|
-
type: 'custom';
|
|
47
|
-
exporter: SpanExporter;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
1
|
+
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from '../telemetry-oCUM52DG.js';
|
|
2
|
+
import { SpanKind } from '@opentelemetry/api';
|
|
3
|
+
import '@opentelemetry/sdk-node';
|
|
4
|
+
import '@opentelemetry/sdk-trace-base';
|
|
50
5
|
|
|
51
6
|
declare function withSpan(options: {
|
|
52
7
|
spanName?: string;
|
|
@@ -62,57 +17,4 @@ declare function InstrumentClass(options?: {
|
|
|
62
17
|
|
|
63
18
|
declare function hasActiveTelemetry(): boolean;
|
|
64
19
|
|
|
65
|
-
|
|
66
|
-
var __OTEL_SDK__: NodeSDK | undefined;
|
|
67
|
-
var __TELEMETRY__: Telemetry | undefined;
|
|
68
|
-
}
|
|
69
|
-
declare class Telemetry {
|
|
70
|
-
private sdk;
|
|
71
|
-
tracer: Tracer;
|
|
72
|
-
name: string;
|
|
73
|
-
private static isInitialized;
|
|
74
|
-
private getSampler;
|
|
75
|
-
private constructor();
|
|
76
|
-
private shutdown;
|
|
77
|
-
/**
|
|
78
|
-
* Initialize telemetry with the given configuration
|
|
79
|
-
* @param config - Optional telemetry configuration object
|
|
80
|
-
* @returns Telemetry instance that can be used for tracing
|
|
81
|
-
*/
|
|
82
|
-
static init(config?: OtelConfig): Telemetry;
|
|
83
|
-
/**
|
|
84
|
-
* Get the global telemetry instance
|
|
85
|
-
* @throws {Error} If telemetry has not been initialized
|
|
86
|
-
* @returns {Telemetry} The global telemetry instance
|
|
87
|
-
*/
|
|
88
|
-
static get(): Telemetry;
|
|
89
|
-
/**
|
|
90
|
-
* Wraps a class instance with telemetry tracing
|
|
91
|
-
* @param instance The class instance to wrap
|
|
92
|
-
* @param options Optional configuration for tracing
|
|
93
|
-
* @returns Wrapped instance with all methods traced
|
|
94
|
-
*/
|
|
95
|
-
traceClass<T extends object>(instance: T, options?: {
|
|
96
|
-
/** Base name for spans (e.g. 'integration', 'agent') */
|
|
97
|
-
spanNamePrefix?: string;
|
|
98
|
-
/** Additional attributes to add to all spans */
|
|
99
|
-
attributes?: Record<string, string>;
|
|
100
|
-
/** Methods to exclude from tracing */
|
|
101
|
-
excludeMethods?: string[];
|
|
102
|
-
/** Skip tracing if telemetry is not active */
|
|
103
|
-
skipIfNoTelemetry?: boolean;
|
|
104
|
-
}): T;
|
|
105
|
-
/**
|
|
106
|
-
* method to trace individual methods with proper context
|
|
107
|
-
* @param method The method to trace
|
|
108
|
-
* @param context Additional context for the trace
|
|
109
|
-
* @returns Wrapped method with tracing
|
|
110
|
-
*/
|
|
111
|
-
traceMethod<TMethod extends Function>(method: TMethod, context: {
|
|
112
|
-
spanName: string;
|
|
113
|
-
attributes?: Record<string, string>;
|
|
114
|
-
skipIfNoTelemetry?: boolean;
|
|
115
|
-
}): TMethod;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export { InstrumentClass, type OtelConfig, type SamplingStrategy, Telemetry, hasActiveTelemetry, withSpan };
|
|
20
|
+
export { InstrumentClass, hasActiveTelemetry, withSpan };
|
package/dist/telemetry/index.js
CHANGED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Tracer } from '@opentelemetry/api';
|
|
2
|
+
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
3
|
+
import { SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
4
|
+
|
|
5
|
+
/** Sampling strategy configuration for OpenTelemetry */
|
|
6
|
+
type SamplingStrategy = {
|
|
7
|
+
/** Sample traces based on a probability between 0 and 1 */
|
|
8
|
+
type: 'ratio';
|
|
9
|
+
/** Probability between 0 and 1 (e.g., 0.1 for 10% sampling) */
|
|
10
|
+
probability: number;
|
|
11
|
+
} | {
|
|
12
|
+
/** Sample all traces */
|
|
13
|
+
type: 'always_on';
|
|
14
|
+
} | {
|
|
15
|
+
/** Don't sample any traces */
|
|
16
|
+
type: 'always_off';
|
|
17
|
+
} | {
|
|
18
|
+
/** Use parent sampling decision if available, otherwise use root sampler */
|
|
19
|
+
type: 'parent_based';
|
|
20
|
+
/** Configuration for the root sampler when no parent context exists */
|
|
21
|
+
root: {
|
|
22
|
+
/** Probability between 0 and 1 for the root sampler */
|
|
23
|
+
probability: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/** Configuration options for OpenTelemetry */
|
|
27
|
+
type OtelConfig = {
|
|
28
|
+
/** Name of the service for telemetry identification */
|
|
29
|
+
serviceName?: string;
|
|
30
|
+
/** Whether telemetry is enabled. Defaults to true */
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
/** Sampling configuration to control trace data volume */
|
|
33
|
+
sampling?: SamplingStrategy;
|
|
34
|
+
/** Export configuration for sending telemetry data */
|
|
35
|
+
export?: {
|
|
36
|
+
/** Export to an OTLP (OpenTelemetry Protocol) endpoint */
|
|
37
|
+
type: 'otlp';
|
|
38
|
+
/** OTLP endpoint URL */
|
|
39
|
+
endpoint?: string;
|
|
40
|
+
/** Optional headers for OTLP requests */
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
} | {
|
|
43
|
+
/** Export to console for development/debugging */
|
|
44
|
+
type: 'console';
|
|
45
|
+
} | {
|
|
46
|
+
type: 'custom';
|
|
47
|
+
exporter: SpanExporter;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare global {
|
|
52
|
+
var __OTEL_SDK__: NodeSDK | undefined;
|
|
53
|
+
var __TELEMETRY__: Telemetry | undefined;
|
|
54
|
+
}
|
|
55
|
+
declare class Telemetry {
|
|
56
|
+
private sdk;
|
|
57
|
+
tracer: Tracer;
|
|
58
|
+
name: string;
|
|
59
|
+
private static isInitialized;
|
|
60
|
+
private getSampler;
|
|
61
|
+
private constructor();
|
|
62
|
+
private shutdown;
|
|
63
|
+
/**
|
|
64
|
+
* Initialize telemetry with the given configuration
|
|
65
|
+
* @param config - Optional telemetry configuration object
|
|
66
|
+
* @returns Telemetry instance that can be used for tracing
|
|
67
|
+
*/
|
|
68
|
+
static init(config?: OtelConfig): Telemetry;
|
|
69
|
+
/**
|
|
70
|
+
* Get the global telemetry instance
|
|
71
|
+
* @throws {Error} If telemetry has not been initialized
|
|
72
|
+
* @returns {Telemetry} The global telemetry instance
|
|
73
|
+
*/
|
|
74
|
+
static get(): Telemetry;
|
|
75
|
+
/**
|
|
76
|
+
* Wraps a class instance with telemetry tracing
|
|
77
|
+
* @param instance The class instance to wrap
|
|
78
|
+
* @param options Optional configuration for tracing
|
|
79
|
+
* @returns Wrapped instance with all methods traced
|
|
80
|
+
*/
|
|
81
|
+
traceClass<T extends object>(instance: T, options?: {
|
|
82
|
+
/** Base name for spans (e.g. 'integration', 'agent') */
|
|
83
|
+
spanNamePrefix?: string;
|
|
84
|
+
/** Additional attributes to add to all spans */
|
|
85
|
+
attributes?: Record<string, string>;
|
|
86
|
+
/** Methods to exclude from tracing */
|
|
87
|
+
excludeMethods?: string[];
|
|
88
|
+
/** Skip tracing if telemetry is not active */
|
|
89
|
+
skipIfNoTelemetry?: boolean;
|
|
90
|
+
}): T;
|
|
91
|
+
/**
|
|
92
|
+
* method to trace individual methods with proper context
|
|
93
|
+
* @param method The method to trace
|
|
94
|
+
* @param context Additional context for the trace
|
|
95
|
+
* @returns Wrapped method with tracing
|
|
96
|
+
*/
|
|
97
|
+
traceMethod<TMethod extends Function>(method: TMethod, context: {
|
|
98
|
+
spanName: string;
|
|
99
|
+
attributes?: Record<string, string>;
|
|
100
|
+
skipIfNoTelemetry?: boolean;
|
|
101
|
+
}): TMethod;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { s as ToolExecutionContext, q as ToolAction, d as MastraPrimitives } from '../index-Duqv1Yom.js';
|
|
3
|
+
export { C as CoreTool } from '../index-Duqv1Yom.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import 'json-schema';
|
|
6
6
|
import '../base.js';
|
|
7
7
|
import '@opentelemetry/api';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-B0-NXUYv.js';
|
|
9
9
|
import 'pino';
|
|
10
10
|
import 'stream';
|
|
11
|
-
import '../telemetry
|
|
11
|
+
import '../telemetry-oCUM52DG.js';
|
|
12
12
|
import '@opentelemetry/sdk-node';
|
|
13
13
|
import '@opentelemetry/sdk-trace-base';
|
|
14
14
|
import '../metric-D2V4CR8D.js';
|
package/dist/tts/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MastraBase } from '../base.js';
|
|
2
2
|
import '@opentelemetry/api';
|
|
3
|
-
import '../index-
|
|
3
|
+
import '../index-B0-NXUYv.js';
|
|
4
4
|
import 'pino';
|
|
5
5
|
import 'stream';
|
|
6
|
-
import '../telemetry
|
|
6
|
+
import '../telemetry-oCUM52DG.js';
|
|
7
7
|
import '@opentelemetry/sdk-node';
|
|
8
8
|
import '@opentelemetry/sdk-trace-base';
|
|
9
9
|
|
package/dist/tts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MastraTTS } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { MastraTTS } from '../chunk-SLWM3SEH.js';
|
|
2
|
+
import '../chunk-SDKEPBBH.js';
|
|
3
3
|
import '../chunk-6ZVFVYLE.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-JCRGAEY6.js';
|
|
5
|
+
import '../chunk-TJK6TGSR.js';
|
|
6
6
|
import '../chunk-AJJZUHB4.js';
|
package/dist/vector/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MastraBase } from '../base.js';
|
|
2
2
|
import { E as EmbeddingOptions } from '../types-M16hSruO.js';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
|
-
import '../index-
|
|
4
|
+
import '../index-B0-NXUYv.js';
|
|
5
5
|
import 'pino';
|
|
6
6
|
import 'stream';
|
|
7
|
-
import '../telemetry
|
|
7
|
+
import '../telemetry-oCUM52DG.js';
|
|
8
8
|
import '@opentelemetry/sdk-node';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
10
10
|
|
package/dist/vector/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MastraVector } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { MastraVector } from '../chunk-RCS7AVH6.js';
|
|
2
|
+
import '../chunk-JCRGAEY6.js';
|
|
3
|
+
import '../chunk-TJK6TGSR.js';
|
|
4
|
+
import '../chunk-5NQ3MEZM.js';
|
|
5
5
|
import '../chunk-AJJZUHB4.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Snapshot } from 'xstate';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { j as StepExecutionContext, k as StepAction, R as RetryConfig, d as MastraPrimitives, W as WorkflowOptions, I as IAction, l as StepVariableType, m as StepConfig, n as StepResult, o as WorkflowRunState, p as StepGraph } from './index-Duqv1Yom.js';
|
|
4
4
|
import { MastraBase } from './base.js';
|
|
5
5
|
import { M as MastraEngine } from './engine-EwEG-4Iv.js';
|
|
6
6
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { S as Step, W as Workflow, c as createStep } from '../workflow-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
export { S as Step, W as Workflow, c as createStep } from '../workflow-DQ8CtzzU.js';
|
|
2
|
+
import { ax as VariableReference, n as StepResult } from '../index-Duqv1Yom.js';
|
|
3
|
+
export { az as ActionContext, ay as BaseCondition, aI as DependencyCheckOutput, aO as ExtractSchemaFromStep, aR as ExtractSchemaType, aP as ExtractStepResult, aS as PathsToStringProps, aF as ResolverFunctionInput, aG as ResolverFunctionOutput, R as RetryConfig, k as StepAction, aB as StepCondition, m as StepConfig, aA as StepDef, j as StepExecutionContext, p as StepGraph, aN as StepId, aQ as StepInputType, aw as StepNode, l as StepVariableType, aH as SubscriberFunctionOutput, aK as WorkflowActionParams, aL as WorkflowActions, aJ as WorkflowActors, aC as WorkflowContext, aE as WorkflowEvent, aD as WorkflowLogMessage, W as WorkflowOptions, o as WorkflowRunState, aM as WorkflowState } from '../index-Duqv1Yom.js';
|
|
4
4
|
import 'xstate';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../base.js';
|
|
7
7
|
import '@opentelemetry/api';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-B0-NXUYv.js';
|
|
9
9
|
import 'pino';
|
|
10
10
|
import 'stream';
|
|
11
|
-
import '../telemetry
|
|
11
|
+
import '../telemetry-oCUM52DG.js';
|
|
12
12
|
import '@opentelemetry/sdk-node';
|
|
13
13
|
import '@opentelemetry/sdk-trace-base';
|
|
14
14
|
import '../engine-EwEG-4Iv.js';
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Step, Workflow, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { Step, Workflow, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from '../chunk-OOZGW5CY.js';
|
|
2
|
+
import '../chunk-JCRGAEY6.js';
|
|
3
|
+
import '../chunk-TJK6TGSR.js';
|
|
4
4
|
import '../chunk-AJJZUHB4.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.86",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/core.esm.js",
|
|
@@ -21,6 +21,18 @@
|
|
|
21
21
|
"default": "./dist/*/index.js"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
+
"./llm": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/llm/model/index.d.ts",
|
|
27
|
+
"default": "./dist/llm/model/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./llm/*": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/llm/model/providers/*.d.ts",
|
|
33
|
+
"default": "./dist/llm/model/providers/*.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
24
36
|
"./utils": {
|
|
25
37
|
"import": {
|
|
26
38
|
"types": "./dist/utils.d.ts",
|
|
@@ -40,16 +52,22 @@
|
|
|
40
52
|
},
|
|
41
53
|
"sideEffects": false,
|
|
42
54
|
"dependencies": {
|
|
43
|
-
"@ai-sdk/amazon-bedrock": "^1.
|
|
44
|
-
"@ai-sdk/anthropic": "^1.
|
|
45
|
-
"@ai-sdk/azure": "^1.
|
|
46
|
-
"@ai-sdk/
|
|
55
|
+
"@ai-sdk/amazon-bedrock": "^1.1.6",
|
|
56
|
+
"@ai-sdk/anthropic": "^1.1.6",
|
|
57
|
+
"@ai-sdk/azure": "^1.1.9",
|
|
58
|
+
"@ai-sdk/cerebras": "^0.1.8",
|
|
59
|
+
"@ai-sdk/cohere": "^1.1.6",
|
|
60
|
+
"@ai-sdk/deepinfra": "^0.1.9",
|
|
61
|
+
"@ai-sdk/deepseek": "^0.1.8",
|
|
62
|
+
"@ai-sdk/fireworks": "^0.1.8",
|
|
47
63
|
"@ai-sdk/google": "^1.0.16",
|
|
48
|
-
"@ai-sdk/
|
|
64
|
+
"@ai-sdk/google-vertex": "^2.1.9",
|
|
65
|
+
"@ai-sdk/groq": "^1.1.7",
|
|
66
|
+
"@ai-sdk/mistral": "^1.1.6",
|
|
49
67
|
"@ai-sdk/openai": "^1.0.18",
|
|
50
|
-
"@ai-sdk/
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
68
|
+
"@ai-sdk/perplexity": "^0.0.7",
|
|
69
|
+
"@ai-sdk/togetherai": "^0.1.9",
|
|
70
|
+
"@ai-sdk/xai": "^1.1.8",
|
|
53
71
|
"@libsql/client": "^0.14.0",
|
|
54
72
|
"@opentelemetry/api": "^1.9.0",
|
|
55
73
|
"@opentelemetry/auto-instrumentations-node": "^0.53.0",
|
|
@@ -61,15 +79,13 @@
|
|
|
61
79
|
"@opentelemetry/sdk-trace-node": "^1.28.0",
|
|
62
80
|
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
63
81
|
"@pinecone-database/pinecone": "^3.0.3",
|
|
64
|
-
"@
|
|
65
|
-
"@upstash/redis": "^1.34.3",
|
|
82
|
+
"@portkey-ai/vercel-provider": "^1.0.1",
|
|
66
83
|
"ai": "^4.0.34",
|
|
67
84
|
"anthropic-vertex-ai": "^1.0.2",
|
|
68
85
|
"cohere-ai": "^7.15.2",
|
|
69
86
|
"date-fns": "^3.0.5",
|
|
70
|
-
"dotenv": "^16.4.7",
|
|
71
|
-
"express": "^4.21.1",
|
|
72
87
|
"json-schema": "^0.4.0",
|
|
88
|
+
"ollama-ai-provider": "^1.2.0",
|
|
73
89
|
"pino": "^9.6.0",
|
|
74
90
|
"pino-pretty": "^13.0.0",
|
|
75
91
|
"radash": "^12.1.0",
|
|
@@ -94,7 +110,6 @@
|
|
|
94
110
|
"devDependencies": {
|
|
95
111
|
"@babel/preset-env": "^7.26.0",
|
|
96
112
|
"@babel/preset-typescript": "^7.26.0",
|
|
97
|
-
"@badgateway/oauth2-client": "^2.4.0",
|
|
98
113
|
"@size-limit/preset-small-lib": "^11.1.4",
|
|
99
114
|
"@tsconfig/recommended": "^1.0.7",
|
|
100
115
|
"@types/json-schema": "^7.0.15",
|
|
@@ -129,7 +144,7 @@
|
|
|
129
144
|
"scripts": {
|
|
130
145
|
"check": "tsc --noEmit",
|
|
131
146
|
"analyze": "size-limit --why",
|
|
132
|
-
"build": "tsup-node src/index.ts src/base.ts src/utils.ts src/*/index.ts --format esm --clean --dts --treeshake",
|
|
147
|
+
"build": "tsup-node src/index.ts src/base.ts src/utils.ts src/*/index.ts src/llm/model/providers/*.ts --format esm --clean --dts --treeshake",
|
|
133
148
|
"build:dev": "pnpm build --watch",
|
|
134
149
|
"size": "size-limit",
|
|
135
150
|
"test": "vitest run"
|
package/dist/chunk-5R6DBXQM.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { MastraBase } from './chunk-27EL4TRB.js';
|
|
2
|
-
import { __name, __publicField } from './chunk-AJJZUHB4.js';
|
|
3
|
-
import dotenv from 'dotenv';
|
|
4
|
-
import { readFileSync, existsSync } from 'fs';
|
|
5
|
-
import { join } from 'path';
|
|
6
|
-
|
|
7
|
-
var _MastraDeployer = class _MastraDeployer extends MastraBase {
|
|
8
|
-
constructor({ scope, env, projectName }) {
|
|
9
|
-
super({
|
|
10
|
-
component: "DEPLOYER",
|
|
11
|
-
name: "MasterDeployer"
|
|
12
|
-
});
|
|
13
|
-
__publicField(this, "scope");
|
|
14
|
-
__publicField(this, "projectName");
|
|
15
|
-
__publicField(this, "env");
|
|
16
|
-
this.scope = scope;
|
|
17
|
-
this.env = env;
|
|
18
|
-
this.projectName = projectName;
|
|
19
|
-
}
|
|
20
|
-
loadEnvVars() {
|
|
21
|
-
this.logger.debug("Loading environment variables into context.");
|
|
22
|
-
this.getEnvFiles().forEach((file) => {
|
|
23
|
-
const content = readFileSync(file, "utf-8");
|
|
24
|
-
const config = dotenv.parse(content);
|
|
25
|
-
this.env = {
|
|
26
|
-
...this.env,
|
|
27
|
-
...config
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
getEnvFiles() {
|
|
32
|
-
this.logger.debug("Reading environment variables from .env or .env.production files.");
|
|
33
|
-
const envFiles = [
|
|
34
|
-
".env",
|
|
35
|
-
".env.production"
|
|
36
|
-
].map((file) => join(process.cwd(), file)).filter((file) => existsSync(file));
|
|
37
|
-
return envFiles;
|
|
38
|
-
}
|
|
39
|
-
parseEnvFile(filePath) {
|
|
40
|
-
this.logger.debug(`Parsing environment variables file: ${filePath}`);
|
|
41
|
-
const content = readFileSync(filePath, "utf-8");
|
|
42
|
-
return content.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#")).filter((line) => line.includes("="));
|
|
43
|
-
}
|
|
44
|
-
writeFiles({ dir }) {
|
|
45
|
-
this.logger.debug(`Writing files to ${dir}`);
|
|
46
|
-
}
|
|
47
|
-
writeIndex({ dir }) {
|
|
48
|
-
this.logger.debug(`Writing index file to ${dir}`);
|
|
49
|
-
}
|
|
50
|
-
async deploy({ dir, siteId }) {
|
|
51
|
-
this.logger.debug(`Deploying with command ${this.scope}...${siteId || ""} to ${dir} ${this.projectName || "mastra-starter"}`);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
__name(_MastraDeployer, "MastraDeployer");
|
|
55
|
-
var MastraDeployer = _MastraDeployer;
|
|
56
|
-
|
|
57
|
-
export { MastraDeployer };
|
|
File without changes
|