@mastra/core 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/agent/index.d.ts +1 -1
  2. package/dist/agent/index.js +1 -15
  3. package/dist/{base-Bpb7Dmwe.d.ts → base-C7R9FwZ6.d.ts} +7 -7
  4. package/dist/base.js +0 -2
  5. package/dist/bundler/index.js +0 -3
  6. package/dist/{chunk-FGZVE4CM.js → chunk-4ZRHVG25.js} +2 -4
  7. package/dist/chunk-55GTEVHJ.js +1 -1
  8. package/dist/{chunk-U6J2FOU4.js → chunk-5HXXWLRX.js} +103 -101
  9. package/dist/{chunk-SB37QG7O.js → chunk-6TCTOQ3G.js} +38 -37
  10. package/dist/{chunk-OJ26F3J4.js → chunk-AN562ICT.js} +2 -0
  11. package/dist/chunk-AWEACB2T.js +1 -1
  12. package/dist/{chunk-MLWGYRJR.js → chunk-BB4KXGBU.js} +1 -5
  13. package/dist/chunk-C6A6W6XS.js +48 -20
  14. package/dist/{chunk-K4DFI76V.js → chunk-CUIUUULJ.js} +313 -204
  15. package/dist/{chunk-SDBM53G4.js → chunk-HT63PEVD.js} +10 -5
  16. package/dist/{chunk-VB7CO5ND.js → chunk-NUDAZEOG.js} +6 -2
  17. package/dist/{chunk-MEISIZMP.js → chunk-PNZK456O.js} +1 -1
  18. package/dist/chunk-SIFBBGY6.js +2 -2
  19. package/dist/{chunk-2JL6DQMZ.js → chunk-V4WSAQOP.js} +14 -14
  20. package/dist/{chunk-65VPTVVP.js → chunk-V5UMPUKC.js} +2 -2
  21. package/dist/{chunk-J3W3IHDO.js → chunk-VE4JJJSW.js} +43 -21
  22. package/dist/{chunk-3HBFW3Q7.js → chunk-ZINPRHAN.js} +0 -2
  23. package/dist/chunk-ZJOXJFJI.js +1 -2
  24. package/dist/deployer/index.d.ts +1 -1
  25. package/dist/deployer/index.js +0 -4
  26. package/dist/eval/index.d.ts +1 -1
  27. package/dist/eval/index.js +1 -3
  28. package/dist/filter/index.js +0 -1
  29. package/dist/hooks/index.js +1 -2
  30. package/dist/index.d.ts +5 -5
  31. package/dist/index.js +18 -22
  32. package/dist/integration/index.d.ts +2 -2
  33. package/dist/integration/index.js +1 -6
  34. package/dist/llm/index.d.ts +1 -1
  35. package/dist/llm/index.js +1 -1
  36. package/dist/logger/index.js +0 -1
  37. package/dist/mastra/index.d.ts +15 -14
  38. package/dist/mastra/index.js +1 -20
  39. package/dist/memory/index.d.ts +1 -1
  40. package/dist/memory/index.js +1 -11
  41. package/dist/relevance/index.js +1 -16
  42. package/dist/storage/index.d.ts +2 -2
  43. package/dist/storage/index.js +2 -7
  44. package/dist/telemetry/index.d.ts +1 -1
  45. package/dist/telemetry/index.js +1 -3
  46. package/dist/telemetry/otel-vendor.js +0 -1
  47. package/dist/tools/index.d.ts +2 -2
  48. package/dist/tools/index.js +1 -2
  49. package/dist/tts/index.js +1 -6
  50. package/dist/utils.js +0 -1
  51. package/dist/vector/index.d.ts +1 -1
  52. package/dist/vector/index.js +0 -3
  53. package/dist/vector/libsql/index.js +1 -6
  54. package/dist/{workflow-Cy8UTGCt.d.ts → workflow-7xHmmFH5.d.ts} +1 -1
  55. package/dist/workflows/index.d.ts +3 -3
  56. package/dist/workflows/index.js +1 -4
  57. package/package.json +10 -10
  58. package/dist/chunk-2SAHBQEF.js +0 -3
  59. /package/dist/{chunk-VDOJTUYY.js → chunk-ZDWFBE5L.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { InstrumentClass } from './chunk-FGZVE4CM.js';
1
+ import { InstrumentClass } from './chunk-4ZRHVG25.js';
2
2
  import { MastraBase } from './chunk-AWEACB2T.js';
3
3
  import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-C6A6W6XS.js';
4
4
 
@@ -10,7 +10,9 @@ _MastraTTS_decorators = [InstrumentClass({
10
10
  })];
11
11
  var MastraTTS = class extends (_a = MastraBase) {
12
12
  model;
13
- constructor({ model }) {
13
+ constructor({
14
+ model
15
+ }) {
14
16
  super({
15
17
  component: "TTS"
16
18
  });
@@ -25,8 +27,11 @@ var MastraTTS = class extends (_a = MastraBase) {
25
27
  }) ?? method;
26
28
  }
27
29
  };
28
- _init = __decoratorStart(_a);
29
- MastraTTS = __decorateElement(_init, 0, "MastraTTS", _MastraTTS_decorators, MastraTTS);
30
- __runInitializers(_init, 1, MastraTTS);
30
+ MastraTTS = /*@__PURE__*/(_ => {
31
+ _init = __decoratorStart(_a);
32
+ MastraTTS = __decorateElement(_init, 0, "MastraTTS", _MastraTTS_decorators, MastraTTS);
33
+ __runInitializers(_init, 1, MastraTTS);
34
+ return MastraTTS;
35
+ })();
31
36
 
32
37
  export { MastraTTS };
@@ -1,4 +1,8 @@
1
- import { executeHook } from './chunk-MLWGYRJR.js';
1
+ import { executeHook } from './chunk-BB4KXGBU.js';
2
+
3
+ // src/eval/metric.ts
4
+ var Metric = class {
5
+ };
2
6
 
3
7
  // src/eval/evaluation.ts
4
8
  async function evaluate({
@@ -28,4 +32,4 @@ async function evaluate({
28
32
  return metricResult;
29
33
  }
30
34
 
31
- export { evaluate };
35
+ export { Metric, evaluate };
@@ -1,4 +1,4 @@
1
- import { createTool } from './chunk-3HBFW3Q7.js';
1
+ import { createTool } from './chunk-ZINPRHAN.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/integration/integration.ts
@@ -80,13 +80,13 @@ var BaseFilterTranslator = class _BaseFilterTranslator {
80
80
  * Utility functions for type checking
81
81
  */
82
82
  isPrimitive(value) {
83
- return value === null || value === undefined || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
83
+ return value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
84
84
  }
85
85
  isRegex(value) {
86
86
  return value instanceof RegExp;
87
87
  }
88
88
  isEmpty(obj) {
89
- return obj === null || obj === undefined || typeof obj === "object" && Object.keys(obj).length === 0;
89
+ return obj === null || obj === void 0 || typeof obj === "object" && Object.keys(obj).length === 0;
90
90
  }
91
91
  static ErrorMessages = {
92
92
  UNSUPPORTED_OPERATOR: (op) => `Unsupported operator: ${op}`,
@@ -1,19 +1,6 @@
1
- import { Agent } from './chunk-K4DFI76V.js';
1
+ import { Agent } from './chunk-CUIUUULJ.js';
2
2
  import { CohereClient } from 'cohere-ai';
3
- import 'ai';
4
3
 
5
- // src/relevance/relevance-score-provider.ts
6
- function createSimilarityPrompt(query, text) {
7
- return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
8
-
9
- Query: ${query}
10
-
11
- Text: ${text}
12
-
13
- Relevance score (0-1):`;
14
- }
15
-
16
- // src/relevance/cohere/index.ts
17
4
  var CohereRelevanceScorer = class {
18
5
  client;
19
6
  model;
@@ -33,6 +20,19 @@ var CohereRelevanceScorer = class {
33
20
  return response.results[0].relevanceScore;
34
21
  }
35
22
  };
23
+
24
+ // src/relevance/relevance-score-provider.ts
25
+ function createSimilarityPrompt(query, text) {
26
+ return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
27
+
28
+ Query: ${query}
29
+
30
+ Text: ${text}
31
+
32
+ Relevance score (0-1):`;
33
+ }
34
+
35
+ // src/relevance/mastra-agent/index.ts
36
36
  var MastraAgentRelevanceScorer = class {
37
37
  agent;
38
38
  constructor(name, model) {
@@ -1,5 +1,5 @@
1
- import { DefaultStorage } from './chunk-U6J2FOU4.js';
2
- import { DefaultVectorDB } from './chunk-OJ26F3J4.js';
1
+ import { DefaultStorage } from './chunk-5HXXWLRX.js';
2
+ import { DefaultVectorDB } from './chunk-AN562ICT.js';
3
3
  import { defaultEmbedder } from './chunk-ZJOXJFJI.js';
4
4
  import { deepMerge } from './chunk-55GTEVHJ.js';
5
5
  import { MastraBase } from './chunk-AWEACB2T.js';
@@ -1,6 +1,6 @@
1
- import { InstrumentClass, OTLPTraceExporter, Telemetry } from './chunk-FGZVE4CM.js';
2
- import { DefaultStorage } from './chunk-U6J2FOU4.js';
3
- import { LogLevel, createLogger, noopLogger } from './chunk-O2VP5JBC.js';
1
+ import { DefaultStorage } from './chunk-5HXXWLRX.js';
2
+ import { InstrumentClass, OTLPTraceExporter, Telemetry } from './chunk-4ZRHVG25.js';
3
+ import { createLogger, LogLevel, noopLogger } from './chunk-O2VP5JBC.js';
4
4
  import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-C6A6W6XS.js';
5
5
 
6
6
  // src/mastra/index.ts
@@ -28,7 +28,10 @@ var Mastra = class {
28
28
  logger = config.logger;
29
29
  } else {
30
30
  const levleOnEnv = process.env.NODE_ENV === "production" ? LogLevel.WARN : LogLevel.INFO;
31
- logger = createLogger({ name: "Mastra", level: levleOnEnv });
31
+ logger = createLogger({
32
+ name: "Mastra",
33
+ level: levleOnEnv
34
+ });
32
35
  }
33
36
  }
34
37
  this.logger = logger;
@@ -42,7 +45,7 @@ var Mastra = class {
42
45
  }
43
46
  if (storage instanceof DefaultStorage && config?.telemetry?.export?.type !== "custom") {
44
47
  const newTelemetry = {
45
- ...config?.telemetry || {},
48
+ ...(config?.telemetry || {}),
46
49
  export: {
47
50
  type: "custom",
48
51
  exporter: new OTLPTraceExporter({
@@ -145,7 +148,9 @@ var Mastra = class {
145
148
  this.workflows[key] = workflow;
146
149
  });
147
150
  }
148
- this.setLogger({ logger });
151
+ this.setLogger({
152
+ logger
153
+ });
149
154
  }
150
155
  getAgent(name) {
151
156
  const agent = this.agents?.[name];
@@ -170,13 +175,17 @@ var Mastra = class {
170
175
  getDeployer() {
171
176
  return this.deployer;
172
177
  }
173
- getWorkflow(id, { serialized } = {}) {
178
+ getWorkflow(id, {
179
+ serialized
180
+ } = {}) {
174
181
  const workflow = this.workflows?.[id];
175
182
  if (!workflow) {
176
183
  throw new Error(`Workflow with ID ${String(id)} not found`);
177
184
  }
178
185
  if (serialized) {
179
- return { name: workflow.name };
186
+ return {
187
+ name: workflow.name
188
+ };
180
189
  }
181
190
  return workflow;
182
191
  }
@@ -185,7 +194,9 @@ var Mastra = class {
185
194
  return Object.entries(this.workflows).reduce((acc, [k, v]) => {
186
195
  return {
187
196
  ...acc,
188
- [k]: { name: v.name }
197
+ [k]: {
198
+ name: v.name
199
+ }
189
200
  };
190
201
  }, {});
191
202
  }
@@ -194,15 +205,17 @@ var Mastra = class {
194
205
  setStorage(storage) {
195
206
  this.storage = storage;
196
207
  }
197
- setLogger({ logger }) {
208
+ setLogger({
209
+ logger
210
+ }) {
198
211
  this.logger = logger;
199
212
  if (this.agents) {
200
- Object.keys(this.agents).forEach((key) => {
213
+ Object.keys(this.agents).forEach(key => {
201
214
  this.agents?.[key]?.__setLogger(this.logger);
202
215
  });
203
216
  }
204
217
  if (this.workflows) {
205
- Object.keys(this.workflows).forEach((key) => {
218
+ Object.keys(this.workflows).forEach(key => {
206
219
  this.workflows?.[key]?.__setLogger(this.logger);
207
220
  });
208
221
  }
@@ -213,7 +226,7 @@ var Mastra = class {
213
226
  this.deployer.__setLogger(this.logger);
214
227
  }
215
228
  if (this.tts) {
216
- Object.keys(this.tts).forEach((key) => {
229
+ Object.keys(this.tts).forEach(key => {
217
230
  this.tts?.[key]?.__setLogger(this.logger);
218
231
  });
219
232
  }
@@ -221,7 +234,7 @@ var Mastra = class {
221
234
  this.storage.__setLogger(this.logger);
222
235
  }
223
236
  if (this.vectors) {
224
- Object.keys(this.vectors).forEach((key) => {
237
+ Object.keys(this.vectors).forEach(key => {
225
238
  this.vectors?.[key]?.__setLogger(this.logger);
226
239
  });
227
240
  }
@@ -229,14 +242,14 @@ var Mastra = class {
229
242
  setTelemetry(telemetry) {
230
243
  this.telemetry = Telemetry.init(telemetry);
231
244
  if (this.agents) {
232
- Object.keys(this.agents).forEach((key) => {
245
+ Object.keys(this.agents).forEach(key => {
233
246
  if (this.telemetry) {
234
247
  this.agents?.[key]?.__setTelemetry(this.telemetry);
235
248
  }
236
249
  });
237
250
  }
238
251
  if (this.workflows) {
239
- Object.keys(this.workflows).forEach((key) => {
252
+ Object.keys(this.workflows).forEach(key => {
240
253
  if (this.telemetry) {
241
254
  this.workflows?.[key]?.__setTelemetry(this.telemetry);
242
255
  }
@@ -291,11 +304,17 @@ var Mastra = class {
291
304
  getTelemetry() {
292
305
  return this.telemetry;
293
306
  }
294
- async getLogsByRunId({ runId, transportId }) {
307
+ async getLogsByRunId({
308
+ runId,
309
+ transportId
310
+ }) {
295
311
  if (!transportId) {
296
312
  throw new Error("Transport ID is required");
297
313
  }
298
- return await this.logger.getLogsByRunId({ runId, transportId });
314
+ return await this.logger.getLogsByRunId({
315
+ runId,
316
+ transportId
317
+ });
299
318
  }
300
319
  async getLogs(transportId) {
301
320
  if (!transportId) {
@@ -304,8 +323,11 @@ var Mastra = class {
304
323
  return await this.logger.getLogs(transportId);
305
324
  }
306
325
  };
307
- _init = __decoratorStart(null);
308
- Mastra = __decorateElement(_init, 0, "Mastra", _Mastra_decorators, Mastra);
309
- __runInitializers(_init, 1, Mastra);
326
+ Mastra = /*@__PURE__*/(_ => {
327
+ _init = __decoratorStart(null);
328
+ Mastra = __decorateElement(_init, 0, "Mastra", _Mastra_decorators, Mastra);
329
+ __runInitializers(_init, 1, Mastra);
330
+ return Mastra;
331
+ })();
310
332
 
311
333
  export { Mastra };
@@ -1,5 +1,3 @@
1
- import 'zod';
2
-
3
1
  // src/tools/tool.ts
4
2
  var Tool = class {
5
3
  id;
@@ -14,12 +14,11 @@ function unbundleableImport(name) {
14
14
  const nonStaticallyAnalyzableName = `${name}?d=${Date.now()}`;
15
15
  return import(nonStaticallyAnalyzableName.split(`?`)[0]);
16
16
  }
17
- var useFastEmbedWebFallback = false;
18
17
  async function generateEmbeddings(values, modelType) {
19
18
  try {
20
19
  let mod;
21
20
  const importErrors = [];
22
- if (useFastEmbedWebFallback) ; else {
21
+ {
23
22
  try {
24
23
  mod = await unbundleableImport("fastembed");
25
24
  } catch (e) {
@@ -1,4 +1,4 @@
1
- import { IBundler, MastraBundler } from '../bundler/index.js';
1
+ import { MastraBundler, IBundler } from '../bundler/index.js';
2
2
  import '../base-BbtPAA6f.js';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-B2JCcAQt.js';
@@ -1,5 +1 @@
1
1
  export { MastraDeployer } from '../chunk-K36NSQWH.js';
2
- import '../chunk-22LC46YN.js';
3
- import '../chunk-AWEACB2T.js';
4
- import '../chunk-O2VP5JBC.js';
5
- import '../chunk-C6A6W6XS.js';
@@ -1,5 +1,5 @@
1
1
  import { a as Metric, T as TestInfo, M as MetricResult } from '../types-m9RryK9a.js';
2
- import { A as Agent } from '../base-Bpb7Dmwe.js';
2
+ import { A as Agent } from '../base-C7R9FwZ6.js';
3
3
  import 'ai';
4
4
  import '../base-BbtPAA6f.js';
5
5
  import '@opentelemetry/api';
@@ -1,3 +1 @@
1
- export { evaluate } from '../chunk-VB7CO5ND.js';
2
- export { Metric } from '../chunk-MLWGYRJR.js';
3
- import '../chunk-C6A6W6XS.js';
1
+ export { Metric, evaluate } from '../chunk-NUDAZEOG.js';
@@ -1,2 +1 @@
1
1
  export { BaseFilterTranslator } from '../chunk-SIFBBGY6.js';
2
- import '../chunk-C6A6W6XS.js';
@@ -1,2 +1 @@
1
- export { AvailableHooks, executeHook, registerHook } from '../chunk-MLWGYRJR.js';
2
- import '../chunk-C6A6W6XS.js';
1
+ export { AvailableHooks, executeHook, registerHook } from '../chunk-BB4KXGBU.js';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as Metric } from './types-m9RryK9a.js';
2
2
  export { M as MetricResult, T as TestInfo } from './types-m9RryK9a.js';
3
- import { T as ToolAction, A as Agent$1, i as AgentConfig, M as MastraStorage$1, a as MastraMemory$1, j as ToolExecutionContext, W as WorkflowOptions } from './base-Bpb7Dmwe.js';
4
- export { Y as ActionContext, X as BaseCondition, B as BaseStructuredOutputType, o as CoreAssistantMessage, C as CoreMessage, n as CoreSystemMessage, Q as CoreTool, q as CoreToolMessage, p as CoreUserMessage, a5 as DependencyCheckOutput, s as EmbedManyResult, r as EmbedResult, E as EvalRow, ab as ExtractSchemaFromStep, ae as ExtractSchemaType, ac as ExtractStepResult, G as GenerateReturn, D as LLMInnerStreamOptions, F as LLMStreamObjectOptions, x as LLMStreamOptions, z as LLMTextObjectOptions, y as LLMTextOptions, L as LanguageModel, N as MemoryConfig, K as MessageResponse, H as MessageType, O as OutputType, af as PathsToStringProps, a2 as ResolverFunctionInput, a3 as ResolverFunctionOutput, R as RetryConfig, P as SharedMemoryConfig, b as StepAction, _ as StepCondition, e as StepConfig, Z as StepDef, S as StepExecutionContext, h as StepGraph, aa as StepId, ad as StepInputType, U as StepNode, f as StepResult, d as StepVariableType, k as StorageColumn, m as StorageGetMessagesArg, J as StorageThreadType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType, a4 as SubscriberFunctionOutput, V as VariableReference, a7 as WorkflowActionParams, a8 as WorkflowActions, a6 as WorkflowActors, $ as WorkflowContext, a1 as WorkflowEvent, a0 as WorkflowLogMessage, l as WorkflowRow, g as WorkflowRunState, a9 as WorkflowState } from './base-Bpb7Dmwe.js';
3
+ import { T as ToolAction, A as Agent$1, i as AgentConfig, a as MastraStorage$1, M as MastraMemory$1, j as ToolExecutionContext, W as WorkflowOptions } from './base-C7R9FwZ6.js';
4
+ export { Y as ActionContext, X as BaseCondition, B as BaseStructuredOutputType, o as CoreAssistantMessage, C as CoreMessage, n as CoreSystemMessage, Q as CoreTool, q as CoreToolMessage, p as CoreUserMessage, a5 as DependencyCheckOutput, s as EmbedManyResult, r as EmbedResult, E as EvalRow, ab as ExtractSchemaFromStep, ae as ExtractSchemaType, ac as ExtractStepResult, G as GenerateReturn, D as LLMInnerStreamOptions, F as LLMStreamObjectOptions, x as LLMStreamOptions, z as LLMTextObjectOptions, y as LLMTextOptions, L as LanguageModel, N as MemoryConfig, K as MessageResponse, H as MessageType, O as OutputType, af as PathsToStringProps, a2 as ResolverFunctionInput, a3 as ResolverFunctionOutput, R as RetryConfig, P as SharedMemoryConfig, b as StepAction, _ as StepCondition, e as StepConfig, Z as StepDef, S as StepExecutionContext, h as StepGraph, aa as StepId, ad as StepInputType, U as StepNode, f as StepResult, d as StepVariableType, k as StorageColumn, m as StorageGetMessagesArg, J as StorageThreadType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType, a4 as SubscriberFunctionOutput, V as VariableReference, a7 as WorkflowActionParams, a8 as WorkflowActions, a6 as WorkflowActors, $ as WorkflowContext, a1 as WorkflowEvent, a0 as WorkflowLogMessage, l as WorkflowRow, g as WorkflowRunState, a9 as WorkflowState } from './base-C7R9FwZ6.js';
5
5
  import { M as MastraBase$1 } from './base-BbtPAA6f.js';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-BbtPAA6f.js';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-B2JCcAQt.js';
@@ -10,7 +10,7 @@ import { MastraDeployer as MastraDeployer$1 } from './deployer/index.js';
10
10
  import { MastraStorageLibSql as DefaultStorage, LibSQLConfig } from './storage/index.js';
11
11
  export { evaluate } from './eval/index.js';
12
12
  import { Integration as Integration$1, OpenAPIToolset as OpenAPIToolset$1 } from './integration/index.js';
13
- export { Mastra } from './mastra/index.js';
13
+ export { Config, Mastra } from './mastra/index.js';
14
14
  export { CohereRelevanceScorer, MastraAgentRelevanceScorer, RelevanceScoreProvider, createSimilarityPrompt } from './relevance/index.js';
15
15
  export { InstrumentClass, OTLPStorageExporter, hasActiveTelemetry, withSpan } from './telemetry/index.js';
16
16
  import { z } from 'zod';
@@ -20,8 +20,8 @@ import { MastraTTS as MastraTTS$1, TTSConfig } from './tts/index.js';
20
20
  export { TagMaskOptions, deepMerge, delay, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, maskStreamTags } from './utils.js';
21
21
  import { MastraVector as MastraVector$1 } from './vector/index.js';
22
22
  export { IndexStats, QueryResult, defaultEmbedder } from './vector/index.js';
23
- import { S as Step, W as Workflow$1 } from './workflow-Cy8UTGCt.js';
24
- export { c as createStep } from './workflow-Cy8UTGCt.js';
23
+ import { S as Step, W as Workflow$1 } from './workflow-7xHmmFH5.js';
24
+ export { c as createStep } from './workflow-7xHmmFH5.js';
25
25
  export { getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './workflows/index.js';
26
26
  export { AvailableHooks, executeHook, registerHook } from './hooks/index.js';
27
27
  export { ArrayOperator, BaseFilterTranslator, BasicOperator, ElementOperator, FieldCondition, Filter, LogicalOperator, NumericOperator, OperatorCondition, OperatorSupport, QueryOperator, RegexOperator } from './filter/index.js';
package/dist/index.js CHANGED
@@ -1,33 +1,27 @@
1
- import { Integration, OpenAPIToolset } from './chunk-MEISIZMP.js';
2
- import { Tool } from './chunk-3HBFW3Q7.js';
3
- export { createTool } from './chunk-3HBFW3Q7.js';
4
- export { Mastra } from './chunk-J3W3IHDO.js';
5
- import { MastraTTS } from './chunk-SDBM53G4.js';
6
- import { Workflow } from './chunk-SB37QG7O.js';
7
- export { Step, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './chunk-SB37QG7O.js';
8
- import './chunk-VDOJTUYY.js';
9
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-2JL6DQMZ.js';
10
- import { Agent } from './chunk-K4DFI76V.js';
11
- export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-FGZVE4CM.js';
12
- import './chunk-2SAHBQEF.js';
13
- import { MastraMemory } from './chunk-65VPTVVP.js';
14
- import { MastraStorage, DefaultStorage } from './chunk-U6J2FOU4.js';
15
- export { DefaultStorage } from './chunk-U6J2FOU4.js';
16
- import './chunk-RG66XEJT.js';
17
- export { DefaultVectorDB, DefaultVectorDB as LibSQLVector } from './chunk-OJ26F3J4.js';
1
+ import { MastraTTS } from './chunk-HT63PEVD.js';
2
+ import { Workflow } from './chunk-6TCTOQ3G.js';
3
+ export { Step, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './chunk-6TCTOQ3G.js';
4
+ import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
5
+ import { Tool } from './chunk-ZINPRHAN.js';
6
+ export { createTool } from './chunk-ZINPRHAN.js';
7
+ export { Mastra } from './chunk-VE4JJJSW.js';
8
+ import { MastraMemory } from './chunk-V5UMPUKC.js';
9
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-V4WSAQOP.js';
10
+ import { MastraStorage, DefaultStorage } from './chunk-5HXXWLRX.js';
11
+ export { DefaultStorage } from './chunk-5HXXWLRX.js';
12
+ export { DefaultVectorDB, DefaultVectorDB as LibSQLVector } from './chunk-AN562ICT.js';
18
13
  import { MastraVector } from './chunk-ZJOXJFJI.js';
19
14
  export { defaultEmbedder } from './chunk-ZJOXJFJI.js';
15
+ import { Agent } from './chunk-CUIUUULJ.js';
16
+ export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-4ZRHVG25.js';
20
17
  export { deepMerge, delay, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, maskStreamTags } from './chunk-55GTEVHJ.js';
21
18
  import { MastraDeployer } from './chunk-K36NSQWH.js';
22
- import './chunk-22LC46YN.js';
23
19
  import { MastraBase } from './chunk-AWEACB2T.js';
24
20
  import { createLogger } from './chunk-O2VP5JBC.js';
25
21
  export { LogLevel, Logger, LoggerTransport, MultiLogger, RegisteredLogger, combineLoggers, noopLogger } from './chunk-O2VP5JBC.js';
26
- export { evaluate } from './chunk-VB7CO5ND.js';
27
- export { AvailableHooks, Metric, executeHook, registerHook } from './chunk-MLWGYRJR.js';
22
+ export { Metric, evaluate } from './chunk-NUDAZEOG.js';
23
+ export { AvailableHooks, executeHook, registerHook } from './chunk-BB4KXGBU.js';
28
24
  export { BaseFilterTranslator } from './chunk-SIFBBGY6.js';
29
- import './chunk-C6A6W6XS.js';
30
- import 'zod';
31
25
 
32
26
  // src/agent/index.warning.ts
33
27
  var Agent2 = class extends Agent {
@@ -100,6 +94,8 @@ var MastraMemory2 = class extends MastraMemory {
100
94
  this.logger.warn('Please import "MastraMemory" from "@mastra/core/memory" instead of "@mastra/core"');
101
95
  }
102
96
  };
97
+
98
+ // src/tools/index.warning.ts
103
99
  var Tool2 = class extends Tool {
104
100
  constructor(opts) {
105
101
  super(opts);
@@ -1,6 +1,6 @@
1
- import { W as Workflow } from '../workflow-Cy8UTGCt.js';
1
+ import { W as Workflow } from '../workflow-7xHmmFH5.js';
2
2
  import '../base-BbtPAA6f.js';
3
- import { T as ToolAction } from '../base-Bpb7Dmwe.js';
3
+ import { T as ToolAction } from '../base-C7R9FwZ6.js';
4
4
  import 'xstate';
5
5
  import 'zod';
6
6
  import '@opentelemetry/api';
@@ -1,6 +1 @@
1
- export { Integration, OpenAPIToolset } from '../chunk-MEISIZMP.js';
2
- import '../chunk-3HBFW3Q7.js';
3
- import '../chunk-SB37QG7O.js';
4
- import '../chunk-AWEACB2T.js';
5
- import '../chunk-O2VP5JBC.js';
6
- import '../chunk-C6A6W6XS.js';
1
+ export { Integration, OpenAPIToolset } from '../chunk-PNZK456O.js';
@@ -1,7 +1,7 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as BaseStructuredOutputType, o as CoreAssistantMessage, C as CoreMessage, n as CoreSystemMessage, q as CoreToolMessage, p as CoreUserMessage, s as EmbedManyResult, r as EmbedResult, G as GenerateReturn, D as LLMInnerStreamOptions, F as LLMStreamObjectOptions, x as LLMStreamOptions, z as LLMTextObjectOptions, y as LLMTextOptions, L as LanguageModel, O as OutputType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType } from '../base-Bpb7Dmwe.js';
4
+ export { B as BaseStructuredOutputType, o as CoreAssistantMessage, C as CoreMessage, n as CoreSystemMessage, q as CoreToolMessage, p as CoreUserMessage, s as EmbedManyResult, r as EmbedResult, G as GenerateReturn, D as LLMInnerStreamOptions, F as LLMStreamObjectOptions, x as LLMStreamOptions, z as LLMTextObjectOptions, y as LLMTextOptions, L as LanguageModel, O as OutputType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType } from '../base-C7R9FwZ6.js';
5
5
  import '../index-B2JCcAQt.js';
6
6
  import '../base-BbtPAA6f.js';
7
7
  import '@opentelemetry/api';
package/dist/llm/index.js CHANGED
@@ -1 +1 @@
1
- import '../chunk-2SAHBQEF.js';
1
+
@@ -1,2 +1 @@
1
1
  export { LogLevel, Logger, LoggerTransport, MultiLogger, RegisteredLogger, combineLoggers, createLogger, noopLogger } from '../chunk-O2VP5JBC.js';
2
- import '../chunk-C6A6W6XS.js';
@@ -1,6 +1,6 @@
1
- import { A as Agent, M as MastraStorage, a as MastraMemory } from '../base-Bpb7Dmwe.js';
1
+ import { A as Agent, M as MastraMemory, a as MastraStorage } from '../base-C7R9FwZ6.js';
2
2
  import { L as Logger, B as BaseLogMessage } from '../index-B2JCcAQt.js';
3
- import { W as Workflow } from '../workflow-Cy8UTGCt.js';
3
+ import { W as Workflow } from '../workflow-7xHmmFH5.js';
4
4
  import { MastraVector } from '../vector/index.js';
5
5
  import { O as OtelConfig, T as Telemetry } from '../base-BbtPAA6f.js';
6
6
  import { MastraTTS } from '../tts/index.js';
@@ -17,6 +17,17 @@ import '@opentelemetry/api';
17
17
  import '@opentelemetry/sdk-trace-base';
18
18
  import '../bundler/index.js';
19
19
 
20
+ interface Config<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow> = Record<string, Workflow>, TVectors extends Record<string, MastraVector> = Record<string, MastraVector>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends Logger = Logger> {
21
+ memory?: MastraMemory;
22
+ agents?: TAgents;
23
+ storage?: MastraStorage;
24
+ vectors?: TVectors;
25
+ logger?: TLogger | false;
26
+ workflows?: TWorkflows;
27
+ tts?: TTTS;
28
+ telemetry?: OtelConfig;
29
+ deployer?: MastraDeployer;
30
+ }
20
31
  declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow> = Record<string, Workflow>, TVectors extends Record<string, MastraVector> = Record<string, MastraVector>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends Logger = Logger> {
21
32
  private vectors?;
22
33
  private agents;
@@ -27,17 +38,7 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
27
38
  private deployer?;
28
39
  storage?: MastraStorage;
29
40
  memory?: MastraMemory;
30
- constructor(config?: {
31
- memory?: MastraMemory;
32
- agents?: TAgents;
33
- storage?: MastraStorage;
34
- vectors?: TVectors;
35
- logger?: TLogger | false;
36
- workflows?: TWorkflows;
37
- tts?: TTTS;
38
- telemetry?: OtelConfig;
39
- deployer?: MastraDeployer;
40
- });
41
+ constructor(config?: Config<TAgents, TWorkflows, TVectors, TTTS, TLogger>);
41
42
  getAgent<TAgentName extends keyof TAgents>(name: TAgentName): TAgents[TAgentName];
42
43
  getAgents(): TAgents;
43
44
  getVector<TVectorName extends keyof TVectors>(name: TVectorName): TVectors[TVectorName];
@@ -63,4 +64,4 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
63
64
  getLogs(transportId: string): Promise<BaseLogMessage[]>;
64
65
  }
65
66
 
66
- export { Mastra };
67
+ export { type Config, Mastra };
@@ -1,20 +1 @@
1
- export { Mastra } from '../chunk-J3W3IHDO.js';
2
- import '../chunk-SDBM53G4.js';
3
- import '../chunk-SB37QG7O.js';
4
- import '../chunk-K4DFI76V.js';
5
- import '../chunk-FGZVE4CM.js';
6
- import '../chunk-2SAHBQEF.js';
7
- import '../chunk-65VPTVVP.js';
8
- import '../chunk-U6J2FOU4.js';
9
- import '../chunk-RG66XEJT.js';
10
- import '../chunk-OJ26F3J4.js';
11
- import '../chunk-ZJOXJFJI.js';
12
- import '../chunk-55GTEVHJ.js';
13
- import '../chunk-K36NSQWH.js';
14
- import '../chunk-22LC46YN.js';
15
- import '../chunk-AWEACB2T.js';
16
- import '../chunk-O2VP5JBC.js';
17
- import '../chunk-VB7CO5ND.js';
18
- import '../chunk-MLWGYRJR.js';
19
- import '../chunk-SIFBBGY6.js';
20
- import '../chunk-C6A6W6XS.js';
1
+ export { Mastra } from '../chunk-VE4JJJSW.js';
@@ -1,4 +1,4 @@
1
- export { a as MastraMemory, N as MemoryConfig, K as MessageResponse, H as MessageType, P as SharedMemoryConfig, J as StorageThreadType } from '../base-Bpb7Dmwe.js';
1
+ export { M as MastraMemory, N as MemoryConfig, K as MessageResponse, H as MessageType, P as SharedMemoryConfig, J as StorageThreadType } from '../base-C7R9FwZ6.js';
2
2
  export { Message as AiMessageType } from 'ai';
3
3
  import '../base-BbtPAA6f.js';
4
4
  import '@opentelemetry/api';
@@ -1,11 +1 @@
1
- import '../chunk-VDOJTUYY.js';
2
- export { MastraMemory } from '../chunk-65VPTVVP.js';
3
- import '../chunk-U6J2FOU4.js';
4
- import '../chunk-RG66XEJT.js';
5
- import '../chunk-OJ26F3J4.js';
6
- import '../chunk-ZJOXJFJI.js';
7
- import '../chunk-55GTEVHJ.js';
8
- import '../chunk-AWEACB2T.js';
9
- import '../chunk-O2VP5JBC.js';
10
- import '../chunk-SIFBBGY6.js';
11
- import '../chunk-C6A6W6XS.js';
1
+ export { MastraMemory } from '../chunk-V5UMPUKC.js';
@@ -1,16 +1 @@
1
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-2JL6DQMZ.js';
2
- import '../chunk-K4DFI76V.js';
3
- import '../chunk-FGZVE4CM.js';
4
- import '../chunk-2SAHBQEF.js';
5
- import '../chunk-65VPTVVP.js';
6
- import '../chunk-U6J2FOU4.js';
7
- import '../chunk-RG66XEJT.js';
8
- import '../chunk-OJ26F3J4.js';
9
- import '../chunk-ZJOXJFJI.js';
10
- import '../chunk-55GTEVHJ.js';
11
- import '../chunk-AWEACB2T.js';
12
- import '../chunk-O2VP5JBC.js';
13
- import '../chunk-VB7CO5ND.js';
14
- import '../chunk-MLWGYRJR.js';
15
- import '../chunk-SIFBBGY6.js';
16
- import '../chunk-C6A6W6XS.js';
1
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-V4WSAQOP.js';
@@ -1,5 +1,5 @@
1
- import { M as MastraStorage, ag as TABLE_NAMES, k as StorageColumn, J as StorageThreadType, H as MessageType, m as StorageGetMessagesArg, E as EvalRow } from '../base-Bpb7Dmwe.js';
2
- export { ai as TABLE_EVALS, aj as TABLE_MESSAGES, ak as TABLE_THREADS, al as TABLE_TRACES, ah as TABLE_WORKFLOW_SNAPSHOT, l as WorkflowRow } from '../base-Bpb7Dmwe.js';
1
+ import { a as MastraStorage, ag as TABLE_NAMES, k as StorageColumn, J as StorageThreadType, H as MessageType, m as StorageGetMessagesArg, E as EvalRow } from '../base-C7R9FwZ6.js';
2
+ export { ai as TABLE_EVALS, aj as TABLE_MESSAGES, ak as TABLE_THREADS, al as TABLE_TRACES, ah as TABLE_WORKFLOW_SNAPSHOT, l as WorkflowRow } from '../base-C7R9FwZ6.js';
3
3
  import '../base-BbtPAA6f.js';
4
4
  export { LibSQLVector as DefaultVectorDB, LibSQLVector } from '../vector/libsql/index.js';
5
5
  import 'ai';
@@ -1,8 +1,3 @@
1
- export { DefaultStorage, MastraStorage, DefaultStorage as MastraStorageLibSql } from '../chunk-U6J2FOU4.js';
1
+ export { DefaultStorage, MastraStorage, DefaultStorage as MastraStorageLibSql } from '../chunk-5HXXWLRX.js';
2
+ export { DefaultVectorDB, DefaultVectorDB as LibSQLVector } from '../chunk-AN562ICT.js';
2
3
  export { TABLE_EVALS, TABLE_MESSAGES, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT } from '../chunk-RG66XEJT.js';
3
- export { DefaultVectorDB, DefaultVectorDB as LibSQLVector } from '../chunk-OJ26F3J4.js';
4
- import '../chunk-ZJOXJFJI.js';
5
- import '../chunk-AWEACB2T.js';
6
- import '../chunk-O2VP5JBC.js';
7
- import '../chunk-SIFBBGY6.js';
8
- import '../chunk-C6A6W6XS.js';
@@ -3,7 +3,7 @@ import { SpanKind } from '@opentelemetry/api';
3
3
  import { ExportResult } from '@opentelemetry/core';
4
4
  import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
  import { L as Logger } from '../index-B2JCcAQt.js';
6
- import { M as MastraStorage } from '../base-Bpb7Dmwe.js';
6
+ import { a as MastraStorage } from '../base-C7R9FwZ6.js';
7
7
  import 'pino';
8
8
  import 'stream';
9
9
  import 'ai';
@@ -1,3 +1 @@
1
- export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from '../chunk-FGZVE4CM.js';
2
- import '../chunk-RG66XEJT.js';
3
- import '../chunk-C6A6W6XS.js';
1
+ export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from '../chunk-4ZRHVG25.js';
@@ -1,4 +1,3 @@
1
- import '../chunk-C6A6W6XS.js';
2
1
  export { NodeSDK } from '@opentelemetry/sdk-node';
3
2
  export { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
4
3
  export { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';