@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.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/dist/action/index.d.ts +3 -3
  3. package/dist/agent/index.d.ts +6 -6
  4. package/dist/agent/index.js +6 -6
  5. package/dist/base.d.ts +3 -3
  6. package/dist/base.js +2 -2
  7. package/dist/bundler/index.d.ts +21 -0
  8. package/dist/bundler/index.js +4 -0
  9. package/dist/chunk-2ISN3AA7.js +392 -0
  10. package/dist/chunk-2J5OHBUG.js +24 -0
  11. package/dist/{chunk-Y7TKCKRI.js → chunk-5NQ3MEZM.js} +8 -8
  12. package/dist/{chunk-K7KUCZT2.js → chunk-6WJREZ5F.js} +2 -2
  13. package/dist/{chunk-RPBNMIV7.js → chunk-73XDWPXJ.js} +84 -52
  14. package/dist/chunk-CQYUMNLZ.js +28 -0
  15. package/dist/{chunk-AO76Z4K3.js → chunk-D66E7L7R.js} +1 -1
  16. package/dist/{chunk-FCRDS4YS.js → chunk-EH2PG7Q6.js} +10 -4
  17. package/dist/{chunk-BWEOV64I.js → chunk-EVYBUFXB.js} +13 -9
  18. package/dist/{chunk-OJJ6QGX4.js → chunk-I3MJB67Z.js} +12 -12
  19. package/dist/{chunk-27EL4TRB.js → chunk-JCRGAEY6.js} +1 -1
  20. package/dist/{chunk-BQMCLBCR.js → chunk-OOZGW5CY.js} +1 -1
  21. package/dist/{chunk-LYNJHHQX.js → chunk-RCS7AVH6.js} +2 -2
  22. package/dist/chunk-RLPH6TDJ.js +30 -0
  23. package/dist/{chunk-FROFMREE.js → chunk-RZYBOMIG.js} +7 -0
  24. package/dist/{chunk-Q5JF3TKZ.js → chunk-SLWM3SEH.js} +1 -1
  25. package/dist/{chunk-NLQVQJOD.js → chunk-TJK6TGSR.js} +1 -0
  26. package/dist/{chunk-S45F6AHA.js → chunk-U25DBVJZ.js} +1 -1
  27. package/dist/chunk-XD5IQZRB.js +16 -0
  28. package/dist/deployer/index.d.ts +8 -25
  29. package/dist/deployer/index.js +4 -3
  30. package/dist/embeddings/index.d.ts +2 -2
  31. package/dist/embeddings/index.js +1 -1
  32. package/dist/engine/index.d.ts +2 -2
  33. package/dist/engine/index.js +3 -3
  34. package/dist/eval/index.d.ts +3 -3
  35. package/dist/filter/index.d.ts +7 -6
  36. package/dist/filter/index.js +1 -1
  37. package/dist/{index-B9i6dmc0.d.ts → index-B0-NXUYv.d.ts} +1 -0
  38. package/dist/{index-CA9EWqaj.d.ts → index-Duqv1Yom.d.ts} +50 -27
  39. package/dist/index.d.ts +15 -13
  40. package/dist/index.js +26 -25
  41. package/dist/integration/index.d.ts +4 -4
  42. package/dist/llm/index.d.ts +3 -3
  43. package/dist/llm/index.js +3 -3
  44. package/dist/llm/model/providers/anthropic-vertex.d.ts +31 -0
  45. package/dist/llm/model/providers/anthropic-vertex.js +23 -0
  46. package/dist/llm/model/providers/anthropic.d.ts +29 -0
  47. package/dist/llm/model/providers/anthropic.js +21 -0
  48. package/dist/llm/model/providers/azure.d.ts +48 -0
  49. package/dist/llm/model/providers/azure.js +50 -0
  50. package/dist/llm/model/providers/baseten.d.ts +33 -0
  51. package/dist/llm/model/providers/baseten.js +29 -0
  52. package/dist/llm/model/providers/bedrock.d.ts +32 -0
  53. package/dist/llm/model/providers/bedrock.js +24 -0
  54. package/dist/llm/model/providers/cerebras.d.ts +30 -0
  55. package/dist/llm/model/providers/cerebras.js +22 -0
  56. package/dist/llm/model/providers/cohere.d.ts +30 -0
  57. package/dist/llm/model/providers/cohere.js +22 -0
  58. package/dist/llm/model/providers/deepinfra.d.ts +30 -0
  59. package/dist/llm/model/providers/deepinfra.js +22 -0
  60. package/dist/llm/model/providers/deepseek.d.ts +30 -0
  61. package/dist/llm/model/providers/deepseek.js +22 -0
  62. package/dist/llm/model/providers/fireworks.d.ts +35 -0
  63. package/dist/llm/model/providers/fireworks.js +40 -0
  64. package/dist/llm/model/providers/google-vertex.d.ts +48 -0
  65. package/dist/llm/model/providers/google-vertex.js +22 -0
  66. package/dist/llm/model/providers/google.d.ts +54 -0
  67. package/dist/llm/model/providers/google.js +23 -0
  68. package/dist/llm/model/providers/grok.d.ts +32 -0
  69. package/dist/llm/model/providers/grok.js +22 -0
  70. package/dist/llm/model/providers/groq.d.ts +37 -0
  71. package/dist/llm/model/providers/groq.js +42 -0
  72. package/dist/llm/model/providers/lmstudio.d.ts +29 -0
  73. package/dist/llm/model/providers/lmstudio.js +22 -0
  74. package/dist/llm/model/providers/mistral.d.ts +30 -0
  75. package/dist/llm/model/providers/mistral.js +22 -0
  76. package/dist/llm/model/providers/mock.d.ts +30 -0
  77. package/dist/llm/model/providers/mock.js +83 -0
  78. package/dist/llm/model/providers/ollama.d.ts +31 -0
  79. package/dist/llm/model/providers/ollama.js +23 -0
  80. package/dist/llm/model/providers/openai-compat.d.ts +39 -0
  81. package/dist/llm/model/providers/openai-compat.js +6 -0
  82. package/dist/llm/model/providers/openai.d.ts +34 -0
  83. package/dist/llm/model/providers/openai.js +6 -0
  84. package/dist/llm/model/providers/openai.test.d.ts +2 -0
  85. package/dist/llm/model/providers/openai.test.js +220 -0
  86. package/dist/llm/model/providers/perplexity.d.ts +30 -0
  87. package/dist/llm/model/providers/perplexity.js +22 -0
  88. package/dist/llm/model/providers/portkey.d.ts +34 -0
  89. package/dist/llm/model/providers/portkey.js +22 -0
  90. package/dist/llm/model/providers/togetherai.d.ts +30 -0
  91. package/dist/llm/model/providers/togetherai.js +22 -0
  92. package/dist/logger/index.d.ts +1 -1
  93. package/dist/logger/index.js +1 -1
  94. package/dist/mastra/index.d.ts +5 -4
  95. package/dist/mastra/index.js +5 -5
  96. package/dist/memory/index.d.ts +3 -3
  97. package/dist/memory/index.js +3 -3
  98. package/dist/model-QGWIMOSx.d.ts +31 -0
  99. package/dist/relevance/index.d.ts +3 -3
  100. package/dist/relevance/index.js +7 -7
  101. package/dist/storage/index.d.ts +4 -4
  102. package/dist/storage/index.js +3 -3
  103. package/dist/telemetry/index.d.ts +5 -103
  104. package/dist/telemetry/index.js +1 -1
  105. package/dist/telemetry-oCUM52DG.d.ts +104 -0
  106. package/dist/tools/index.d.ts +4 -4
  107. package/dist/tts/index.d.ts +2 -2
  108. package/dist/tts/index.js +4 -4
  109. package/dist/vector/index.d.ts +2 -2
  110. package/dist/vector/index.js +4 -4
  111. package/dist/{workflow-Dam5GtdA.d.ts → workflow-DQ8CtzzU.d.ts} +1 -1
  112. package/dist/workflows/index.d.ts +5 -5
  113. package/dist/workflows/index.js +3 -3
  114. package/package.json +30 -15
  115. package/dist/chunk-5R6DBXQM.js +0 -57
  116. /package/dist/{chunk-OZZS5Y3C.js → chunk-SDKEPBBH.js} +0 -0
@@ -1,52 +1,7 @@
1
- import { SpanKind, 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
- };
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
- declare global {
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 };
@@ -1,3 +1,3 @@
1
- export { Telemetry } from '../chunk-OZZS5Y3C.js';
1
+ export { Telemetry } from '../chunk-SDKEPBBH.js';
2
2
  export { InstrumentClass, hasActiveTelemetry, withSpan } from '../chunk-6ZVFVYLE.js';
3
3
  import '../chunk-AJJZUHB4.js';
@@ -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 };
@@ -1,14 +1,14 @@
1
1
  import { z } from 'zod';
2
- import { k as ToolExecutionContext, T as ToolAction, d as MastraPrimitives } from '../index-CA9EWqaj.js';
3
- export { at as CoreTool } from '../index-CA9EWqaj.js';
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-B9i6dmc0.js';
8
+ import '../index-B0-NXUYv.js';
9
9
  import 'pino';
10
10
  import 'stream';
11
- import '../telemetry/index.js';
11
+ import '../telemetry-oCUM52DG.js';
12
12
  import '@opentelemetry/sdk-node';
13
13
  import '@opentelemetry/sdk-trace-base';
14
14
  import '../metric-D2V4CR8D.js';
@@ -1,9 +1,9 @@
1
1
  import { MastraBase } from '../base.js';
2
2
  import '@opentelemetry/api';
3
- import '../index-B9i6dmc0.js';
3
+ import '../index-B0-NXUYv.js';
4
4
  import 'pino';
5
5
  import 'stream';
6
- import '../telemetry/index.js';
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-Q5JF3TKZ.js';
2
- import '../chunk-OZZS5Y3C.js';
1
+ export { MastraTTS } from '../chunk-SLWM3SEH.js';
2
+ import '../chunk-SDKEPBBH.js';
3
3
  import '../chunk-6ZVFVYLE.js';
4
- import '../chunk-27EL4TRB.js';
5
- import '../chunk-NLQVQJOD.js';
4
+ import '../chunk-JCRGAEY6.js';
5
+ import '../chunk-TJK6TGSR.js';
6
6
  import '../chunk-AJJZUHB4.js';
@@ -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-B9i6dmc0.js';
4
+ import '../index-B0-NXUYv.js';
5
5
  import 'pino';
6
6
  import 'stream';
7
- import '../telemetry/index.js';
7
+ import '../telemetry-oCUM52DG.js';
8
8
  import '@opentelemetry/sdk-node';
9
9
  import '@opentelemetry/sdk-trace-base';
10
10
 
@@ -1,5 +1,5 @@
1
- export { MastraVector } from '../chunk-LYNJHHQX.js';
2
- import '../chunk-27EL4TRB.js';
3
- import '../chunk-NLQVQJOD.js';
4
- import '../chunk-Y7TKCKRI.js';
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 { S as StepExecutionContext, c as StepAction, R as RetryConfig, d as MastraPrimitives, W as WorkflowOptions, I as IAction, e as StepVariableType, f as StepConfig, g as StepResult, h as WorkflowRunState, i as StepGraph } from './index-CA9EWqaj.js';
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-Dam5GtdA.js';
2
- import { av as VariableReference, g as StepResult } from '../index-CA9EWqaj.js';
3
- export { ax as ActionContext, aw as BaseCondition, aG as DependencyCheckOutput, aM as ExtractSchemaFromStep, aP as ExtractSchemaType, aN as ExtractStepResult, aQ as PathsToStringProps, aD as ResolverFunctionInput, aE as ResolverFunctionOutput, R as RetryConfig, c as StepAction, az as StepCondition, f as StepConfig, ay as StepDef, S as StepExecutionContext, i as StepGraph, aL as StepId, aO as StepInputType, au as StepNode, e as StepVariableType, aF as SubscriberFunctionOutput, aI as WorkflowActionParams, aJ as WorkflowActions, aH as WorkflowActors, aA as WorkflowContext, aC as WorkflowEvent, aB as WorkflowLogMessage, W as WorkflowOptions, h as WorkflowRunState, aK as WorkflowState } from '../index-CA9EWqaj.js';
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-B9i6dmc0.js';
8
+ import '../index-B0-NXUYv.js';
9
9
  import 'pino';
10
10
  import 'stream';
11
- import '../telemetry/index.js';
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';
@@ -1,4 +1,4 @@
1
- export { Step, Workflow, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from '../chunk-BQMCLBCR.js';
2
- import '../chunk-27EL4TRB.js';
3
- import '../chunk-NLQVQJOD.js';
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.83",
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.0.8",
44
- "@ai-sdk/anthropic": "^1.0.8",
45
- "@ai-sdk/azure": "^1.0.20",
46
- "@ai-sdk/cohere": "^1.0.8",
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/mistral": "^1.0.8",
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/xai": "^1.0.17",
51
- "@badgateway/oauth2-client": "^2.4.0",
52
- "@date-fns/utc": "^1.2.0",
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
- "@types/express": "^5.0.0",
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"
@@ -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