@mastra/core 0.9.2-alpha.0 → 0.9.2-alpha.3

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 (79) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.d.cts +1 -1
  3. package/dist/agent/index.d.ts +1 -1
  4. package/dist/agent/index.js +1 -1
  5. package/dist/{base-DI6ChaUK.d.cts → base-BZxFAZ3-.d.cts} +27 -3
  6. package/dist/{base-bWFiU8RL.d.ts → base-uXj2cuRo.d.ts} +27 -3
  7. package/dist/{chunk-H2UWWO4L.js → chunk-6YY6MN2Z.js} +9 -5
  8. package/dist/{chunk-MAWT75XY.cjs → chunk-B7N24G5E.cjs} +2 -2
  9. package/dist/{chunk-7JRVDC7F.cjs → chunk-D2Y3ET63.cjs} +0 -91
  10. package/dist/{chunk-ZWALP7T2.cjs → chunk-EIMOKGTI.cjs} +2 -2
  11. package/dist/{chunk-SHDPMWGJ.js → chunk-IBKW4TJU.js} +1 -1
  12. package/dist/{chunk-33XQ5DGU.cjs → chunk-OPUU4S32.cjs} +5 -5
  13. package/dist/{chunk-YEA2KXXJ.js → chunk-QV4ZJLWA.js} +1 -1
  14. package/dist/{chunk-VI3IQINW.cjs → chunk-RSPHEENE.cjs} +45 -7
  15. package/dist/{chunk-FA7FWCKH.js → chunk-VQ7AM4ZV.js} +1 -1
  16. package/dist/{chunk-7PRLYMXV.cjs → chunk-VXUCE4GF.cjs} +20 -16
  17. package/dist/{chunk-INXNZ5VE.js → chunk-Z3OKCJ62.js} +41 -3
  18. package/dist/{chunk-KYULILA6.js → chunk-Z4MZ3ZUM.js} +1 -1
  19. package/dist/{chunk-JSUPD5IG.js → chunk-ZCJJ6XOH.js} +1 -90
  20. package/dist/{chunk-CFWUR4PX.cjs → chunk-ZVBLRU4W.cjs} +5 -5
  21. package/dist/eval/index.d.cts +1 -1
  22. package/dist/eval/index.d.ts +1 -1
  23. package/dist/index.cjs +50 -58
  24. package/dist/index.d.cts +3 -3
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.js +9 -9
  27. package/dist/integration/index.cjs +3 -3
  28. package/dist/integration/index.d.cts +1 -1
  29. package/dist/integration/index.d.ts +1 -1
  30. package/dist/integration/index.js +1 -1
  31. package/dist/llm/index.d.cts +1 -1
  32. package/dist/llm/index.d.ts +1 -1
  33. package/dist/mastra/index.cjs +2 -2
  34. package/dist/mastra/index.d.cts +1 -1
  35. package/dist/mastra/index.d.ts +1 -1
  36. package/dist/mastra/index.js +1 -1
  37. package/dist/memory/index.cjs +4 -4
  38. package/dist/memory/index.d.cts +1 -1
  39. package/dist/memory/index.d.ts +1 -1
  40. package/dist/memory/index.js +1 -1
  41. package/dist/network/index.cjs +4 -4
  42. package/dist/network/index.d.cts +1 -1
  43. package/dist/network/index.d.ts +1 -1
  44. package/dist/network/index.js +2 -2
  45. package/dist/relevance/index.cjs +4 -4
  46. package/dist/relevance/index.d.cts +1 -1
  47. package/dist/relevance/index.d.ts +1 -1
  48. package/dist/relevance/index.js +1 -1
  49. package/dist/server/index.d.cts +1 -1
  50. package/dist/server/index.d.ts +1 -1
  51. package/dist/storage/index.d.cts +1 -1
  52. package/dist/storage/index.d.ts +1 -1
  53. package/dist/storage/libsql/index.cjs +15 -1
  54. package/dist/storage/libsql/index.d.cts +4 -2
  55. package/dist/storage/libsql/index.d.ts +4 -2
  56. package/dist/storage/libsql/index.js +15 -1
  57. package/dist/telemetry/index.d.cts +1 -1
  58. package/dist/telemetry/index.d.ts +1 -1
  59. package/dist/tools/index.cjs +4 -4
  60. package/dist/tools/index.d.cts +1 -1
  61. package/dist/tools/index.d.ts +1 -1
  62. package/dist/tools/index.js +1 -1
  63. package/dist/utils.cjs +12 -20
  64. package/dist/utils.d.cts +3 -5
  65. package/dist/utils.d.ts +3 -5
  66. package/dist/utils.js +1 -1
  67. package/dist/voice/index.d.cts +1 -1
  68. package/dist/voice/index.d.ts +1 -1
  69. package/dist/workflows/index.cjs +22 -22
  70. package/dist/workflows/index.d.cts +2 -2
  71. package/dist/workflows/index.d.ts +2 -2
  72. package/dist/workflows/index.js +1 -1
  73. package/dist/workflows/vNext/index.cjs +6 -6
  74. package/dist/workflows/vNext/index.d.cts +2 -2
  75. package/dist/workflows/vNext/index.d.ts +2 -2
  76. package/dist/workflows/vNext/index.js +4 -4
  77. package/package.json +1 -1
  78. /package/dist/{chunk-7ZR64JAJ.js → chunk-2IXADNQJ.js} +0 -0
  79. /package/dist/{chunk-ZKRQS3N5.cjs → chunk-AVAHVCWY.cjs} +0 -0
@@ -1,4 +1,4 @@
1
- export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-DI6ChaUK.cjs';
1
+ export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-BZxFAZ3-.cjs';
2
2
  import 'ai';
3
3
  import '../base-BihKcqDY.cjs';
4
4
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-bWFiU8RL.js';
1
+ export { E as EvalRow, b as MastraStorage, S as StorageColumn, e as StorageGetMessagesArg, bg as TABLE_EVALS, bh as TABLE_MESSAGES, T as TABLE_NAMES, bk as TABLE_SCHEMAS, bi as TABLE_THREADS, bj as TABLE_TRACES, bf as TABLE_WORKFLOW_SNAPSHOT, f as WorkflowRun, W as WorkflowRuns } from '../base-uXj2cuRo.js';
2
2
  import 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -399,7 +399,9 @@ var LibSQLStore = class extends chunkXNBNJEES_cjs.MastraStorage {
399
399
  page,
400
400
  perPage,
401
401
  attributes,
402
- filters
402
+ filters,
403
+ fromDate,
404
+ toDate
403
405
  } = {
404
406
  page: 0,
405
407
  perPage: 100
@@ -424,6 +426,12 @@ var LibSQLStore = class extends chunkXNBNJEES_cjs.MastraStorage {
424
426
  conditions.push(`${key} = ?`);
425
427
  });
426
428
  }
429
+ if (fromDate) {
430
+ conditions.push("createdAt >= ?");
431
+ }
432
+ if (toDate) {
433
+ conditions.push("createdAt <= ?");
434
+ }
427
435
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
428
436
  if (name) {
429
437
  args.push(name);
@@ -441,6 +449,12 @@ var LibSQLStore = class extends chunkXNBNJEES_cjs.MastraStorage {
441
449
  args.push(value);
442
450
  }
443
451
  }
452
+ if (fromDate) {
453
+ args.push(fromDate.toISOString());
454
+ }
455
+ if (toDate) {
456
+ args.push(toDate.toISOString());
457
+ }
444
458
  args.push(limit, offset);
445
459
  const result = await this.client.execute({
446
460
  sql: `SELECT * FROM ${chunk6KB5CPBV_cjs.TABLE_TRACES} ${whereClause} ORDER BY "startTime" DESC LIMIT ? OFFSET ?`,
@@ -1,5 +1,5 @@
1
1
  import { Config } from '@libsql/client';
2
- import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-DI6ChaUK.cjs';
2
+ import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-BZxFAZ3-.cjs';
3
3
  import 'ai';
4
4
  import '../../base-BihKcqDY.cjs';
5
5
  import '@opentelemetry/api';
@@ -76,13 +76,15 @@ declare class LibSQLStore extends MastraStorage {
76
76
  }): Promise<MessageType[]>;
77
77
  private transformEvalRow;
78
78
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
79
- getTraces({ name, scope, page, perPage, attributes, filters, }?: {
79
+ getTraces({ name, scope, page, perPage, attributes, filters, fromDate, toDate, }?: {
80
80
  name?: string;
81
81
  scope?: string;
82
82
  page: number;
83
83
  perPage: number;
84
84
  attributes?: Record<string, string>;
85
85
  filters?: Record<string, any>;
86
+ fromDate?: Date;
87
+ toDate?: Date;
86
88
  }): Promise<any[]>;
87
89
  getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, }?: {
88
90
  workflowName?: string;
@@ -1,5 +1,5 @@
1
1
  import { Config } from '@libsql/client';
2
- import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-bWFiU8RL.js';
2
+ import { b as MastraStorage, T as TABLE_NAMES, S as StorageColumn, c as StorageThreadType, d as MessageType, e as StorageGetMessagesArg, E as EvalRow, W as WorkflowRuns, f as WorkflowRun } from '../../base-uXj2cuRo.js';
3
3
  import 'ai';
4
4
  import '../../base-DT2poiVK.js';
5
5
  import '@opentelemetry/api';
@@ -76,13 +76,15 @@ declare class LibSQLStore extends MastraStorage {
76
76
  }): Promise<MessageType[]>;
77
77
  private transformEvalRow;
78
78
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
79
- getTraces({ name, scope, page, perPage, attributes, filters, }?: {
79
+ getTraces({ name, scope, page, perPage, attributes, filters, fromDate, toDate, }?: {
80
80
  name?: string;
81
81
  scope?: string;
82
82
  page: number;
83
83
  perPage: number;
84
84
  attributes?: Record<string, string>;
85
85
  filters?: Record<string, any>;
86
+ fromDate?: Date;
87
+ toDate?: Date;
86
88
  }): Promise<any[]>;
87
89
  getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, }?: {
88
90
  workflowName?: string;
@@ -397,7 +397,9 @@ var LibSQLStore = class extends MastraStorage {
397
397
  page,
398
398
  perPage,
399
399
  attributes,
400
- filters
400
+ filters,
401
+ fromDate,
402
+ toDate
401
403
  } = {
402
404
  page: 0,
403
405
  perPage: 100
@@ -422,6 +424,12 @@ var LibSQLStore = class extends MastraStorage {
422
424
  conditions.push(`${key} = ?`);
423
425
  });
424
426
  }
427
+ if (fromDate) {
428
+ conditions.push("createdAt >= ?");
429
+ }
430
+ if (toDate) {
431
+ conditions.push("createdAt <= ?");
432
+ }
425
433
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
426
434
  if (name) {
427
435
  args.push(name);
@@ -439,6 +447,12 @@ var LibSQLStore = class extends MastraStorage {
439
447
  args.push(value);
440
448
  }
441
449
  }
450
+ if (fromDate) {
451
+ args.push(fromDate.toISOString());
452
+ }
453
+ if (toDate) {
454
+ args.push(toDate.toISOString());
455
+ }
442
456
  args.push(limit, offset);
443
457
  const result = await this.client.execute({
444
458
  sql: `SELECT * FROM ${TABLE_TRACES} ${whereClause} ORDER BY "startTime" DESC LIMIT ? OFFSET ?`,
@@ -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-CquI0inB.cjs';
6
- import { b as MastraStorage } from '../base-DI6ChaUK.cjs';
6
+ import { b as MastraStorage } from '../base-BZxFAZ3-.cjs';
7
7
  import 'stream';
8
8
  import 'pino';
9
9
  import 'ai';
@@ -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-CquI0inB.js';
6
- import { b as MastraStorage } from '../base-bWFiU8RL.js';
6
+ import { b as MastraStorage } from '../base-uXj2cuRo.js';
7
7
  import 'stream';
8
8
  import 'pino';
9
9
  import 'ai';
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunk7JRVDC7F_cjs = require('../chunk-7JRVDC7F.cjs');
3
+ var chunkD2Y3ET63_cjs = require('../chunk-D2Y3ET63.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Tool", {
8
8
  enumerable: true,
9
- get: function () { return chunk7JRVDC7F_cjs.Tool; }
9
+ get: function () { return chunkD2Y3ET63_cjs.Tool; }
10
10
  });
11
11
  Object.defineProperty(exports, "createTool", {
12
12
  enumerable: true,
13
- get: function () { return chunk7JRVDC7F_cjs.createTool; }
13
+ get: function () { return chunkD2Y3ET63_cjs.createTool; }
14
14
  });
15
15
  Object.defineProperty(exports, "isVercelTool", {
16
16
  enumerable: true,
17
- get: function () { return chunk7JRVDC7F_cjs.isVercelTool; }
17
+ get: function () { return chunkD2Y3ET63_cjs.isVercelTool; }
18
18
  });
@@ -1,4 +1,4 @@
1
- export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-DI6ChaUK.cjs';
1
+ export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-BZxFAZ3-.cjs';
2
2
  export { isVercelTool } from '../utils.cjs';
3
3
  import 'ai';
4
4
  import '../base-BihKcqDY.cjs';
@@ -1,4 +1,4 @@
1
- export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-bWFiU8RL.js';
1
+ export { ar as CoreTool, I as Tool, C as ToolAction, H as ToolExecutionContext, aq as VercelTool, ap as createTool } from '../base-uXj2cuRo.js';
2
2
  export { isVercelTool } from '../utils.js';
3
3
  import 'ai';
4
4
  import '../base-DT2poiVK.js';
@@ -1 +1 @@
1
- export { Tool, createTool, isVercelTool } from '../chunk-JSUPD5IG.js';
1
+ export { Tool, createTool, isVercelTool } from '../chunk-ZCJJ6XOH.js';
package/dist/utils.cjs CHANGED
@@ -1,58 +1,50 @@
1
1
  'use strict';
2
2
 
3
- var chunk7JRVDC7F_cjs = require('./chunk-7JRVDC7F.cjs');
3
+ var chunkD2Y3ET63_cjs = require('./chunk-D2Y3ET63.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "checkEvalStorageFields", {
8
8
  enumerable: true,
9
- get: function () { return chunk7JRVDC7F_cjs.checkEvalStorageFields; }
9
+ get: function () { return chunkD2Y3ET63_cjs.checkEvalStorageFields; }
10
10
  });
11
11
  Object.defineProperty(exports, "createMastraProxy", {
12
12
  enumerable: true,
13
- get: function () { return chunk7JRVDC7F_cjs.createMastraProxy; }
13
+ get: function () { return chunkD2Y3ET63_cjs.createMastraProxy; }
14
14
  });
15
15
  Object.defineProperty(exports, "deepMerge", {
16
16
  enumerable: true,
17
- get: function () { return chunk7JRVDC7F_cjs.deepMerge; }
17
+ get: function () { return chunkD2Y3ET63_cjs.deepMerge; }
18
18
  });
19
19
  Object.defineProperty(exports, "delay", {
20
20
  enumerable: true,
21
- get: function () { return chunk7JRVDC7F_cjs.delay; }
21
+ get: function () { return chunkD2Y3ET63_cjs.delay; }
22
22
  });
23
23
  Object.defineProperty(exports, "ensureAllMessagesAreCoreMessages", {
24
24
  enumerable: true,
25
- get: function () { return chunk7JRVDC7F_cjs.ensureAllMessagesAreCoreMessages; }
25
+ get: function () { return chunkD2Y3ET63_cjs.ensureAllMessagesAreCoreMessages; }
26
26
  });
27
27
  Object.defineProperty(exports, "ensureToolProperties", {
28
28
  enumerable: true,
29
- get: function () { return chunk7JRVDC7F_cjs.ensureToolProperties; }
29
+ get: function () { return chunkD2Y3ET63_cjs.ensureToolProperties; }
30
30
  });
31
31
  Object.defineProperty(exports, "isVercelTool", {
32
32
  enumerable: true,
33
- get: function () { return chunk7JRVDC7F_cjs.isVercelTool; }
33
+ get: function () { return chunkD2Y3ET63_cjs.isVercelTool; }
34
34
  });
35
35
  Object.defineProperty(exports, "isZodType", {
36
36
  enumerable: true,
37
- get: function () { return chunk7JRVDC7F_cjs.isZodType; }
38
- });
39
- Object.defineProperty(exports, "jsonSchemaPropertiesToTSTypes", {
40
- enumerable: true,
41
- get: function () { return chunk7JRVDC7F_cjs.jsonSchemaPropertiesToTSTypes; }
42
- });
43
- Object.defineProperty(exports, "jsonSchemaToModel", {
44
- enumerable: true,
45
- get: function () { return chunk7JRVDC7F_cjs.jsonSchemaToModel; }
37
+ get: function () { return chunkD2Y3ET63_cjs.isZodType; }
46
38
  });
47
39
  Object.defineProperty(exports, "makeCoreTool", {
48
40
  enumerable: true,
49
- get: function () { return chunk7JRVDC7F_cjs.makeCoreTool; }
41
+ get: function () { return chunkD2Y3ET63_cjs.makeCoreTool; }
50
42
  });
51
43
  Object.defineProperty(exports, "maskStreamTags", {
52
44
  enumerable: true,
53
- get: function () { return chunk7JRVDC7F_cjs.maskStreamTags; }
45
+ get: function () { return chunkD2Y3ET63_cjs.maskStreamTags; }
54
46
  });
55
47
  Object.defineProperty(exports, "resolveSerializedZodOutput", {
56
48
  enumerable: true,
57
- get: function () { return chunk7JRVDC7F_cjs.resolveSerializedZodOutput; }
49
+ get: function () { return chunkD2Y3ET63_cjs.resolveSerializedZodOutput; }
58
50
  });
package/dist/utils.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-DI6ChaUK.cjs';
1
+ import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-BZxFAZ3-.cjs';
2
2
  import { CoreMessage, Message } from 'ai';
3
3
  import { MastraTTS } from './tts/index.cjs';
4
4
  import { MastraVector } from './vector/index.cjs';
5
5
  import { a as Metric } from './types-BtMyV38I.cjs';
6
- import { z, ZodObject } from 'zod';
6
+ import { z } from 'zod';
7
7
  import { L as Logger } from './index-CquI0inB.cjs';
8
8
  import './base-BihKcqDY.cjs';
9
9
  import { RuntimeContext } from './runtime-context/index.cjs';
@@ -25,8 +25,6 @@ import 'ai/test';
25
25
  import './vector/filter/index.cjs';
26
26
 
27
27
  declare const delay: (ms: number) => Promise<unknown>;
28
- declare function jsonSchemaPropertiesToTSTypes(value: any): z.ZodTypeAny;
29
- declare function jsonSchemaToModel(jsonSchema: Record<string, any>): ZodObject<any>;
30
28
  /**
31
29
  * Deep merges two objects, recursively merging nested objects and arrays
32
30
  */
@@ -106,4 +104,4 @@ declare function createMastraProxy({ mastra, logger }: {
106
104
  declare function checkEvalStorageFields(traceObject: any, logger?: Logger): boolean;
107
105
  declare function ensureAllMessagesAreCoreMessages(messages: (CoreMessage | Message)[]): CoreMessage[];
108
106
 
109
- export { type TagMaskOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput };
107
+ export { type TagMaskOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, makeCoreTool, maskStreamTags, resolveSerializedZodOutput };
package/dist/utils.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-bWFiU8RL.js';
1
+ import { aq as VercelTool, C as ToolAction, b1 as ToolsInput, a as Mastra, b2 as MastraPrimitives, G as MastraMemory, ar as CoreTool, D as Agent, K as Workflow, J as Step, as as StepExecutionContext, aI as WorkflowContext, t as NewWorkflow, N as NewStep, b3 as AgentNetwork } from './base-uXj2cuRo.js';
2
2
  import { CoreMessage, Message } from 'ai';
3
3
  import { MastraTTS } from './tts/index.js';
4
4
  import { MastraVector } from './vector/index.js';
5
5
  import { a as Metric } from './types-BtMyV38I.js';
6
- import { z, ZodObject } from 'zod';
6
+ import { z } from 'zod';
7
7
  import { L as Logger } from './index-CquI0inB.js';
8
8
  import './base-DT2poiVK.js';
9
9
  import { RuntimeContext } from './runtime-context/index.js';
@@ -25,8 +25,6 @@ import 'ai/test';
25
25
  import './vector/filter/index.js';
26
26
 
27
27
  declare const delay: (ms: number) => Promise<unknown>;
28
- declare function jsonSchemaPropertiesToTSTypes(value: any): z.ZodTypeAny;
29
- declare function jsonSchemaToModel(jsonSchema: Record<string, any>): ZodObject<any>;
30
28
  /**
31
29
  * Deep merges two objects, recursively merging nested objects and arrays
32
30
  */
@@ -106,4 +104,4 @@ declare function createMastraProxy({ mastra, logger }: {
106
104
  declare function checkEvalStorageFields(traceObject: any, logger?: Logger): boolean;
107
105
  declare function ensureAllMessagesAreCoreMessages(messages: (CoreMessage | Message)[]): CoreMessage[];
108
106
 
109
- export { type TagMaskOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput };
107
+ export { type TagMaskOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, makeCoreTool, maskStreamTags, resolveSerializedZodOutput };
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- export { checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-JSUPD5IG.js';
1
+ export { checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, isZodType, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-ZCJJ6XOH.js';
@@ -1,4 +1,4 @@
1
- export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } from '../base-DI6ChaUK.cjs';
1
+ export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } from '../base-BZxFAZ3-.cjs';
2
2
  import 'ai';
3
3
  import '../base-BihKcqDY.cjs';
4
4
  import '@opentelemetry/api';
@@ -1,4 +1,4 @@
1
- export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } from '../base-bWFiU8RL.js';
1
+ export { b9 as CompositeVoice, ba as DefaultVoice, b8 as MastraVoice, b7 as VoiceConfig, b6 as VoiceEventMap, b5 as VoiceEventType } from '../base-uXj2cuRo.js';
2
2
  import 'ai';
3
3
  import '../base-DT2poiVK.js';
4
4
  import '@opentelemetry/api';
@@ -1,90 +1,90 @@
1
1
  'use strict';
2
2
 
3
- var chunk7PRLYMXV_cjs = require('../chunk-7PRLYMXV.cjs');
3
+ var chunkVXUCE4GF_cjs = require('../chunk-VXUCE4GF.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Step", {
8
8
  enumerable: true,
9
- get: function () { return chunk7PRLYMXV_cjs.Step; }
9
+ get: function () { return chunkVXUCE4GF_cjs.Step; }
10
10
  });
11
11
  Object.defineProperty(exports, "WhenConditionReturnValue", {
12
12
  enumerable: true,
13
- get: function () { return chunk7PRLYMXV_cjs.WhenConditionReturnValue; }
13
+ get: function () { return chunkVXUCE4GF_cjs.WhenConditionReturnValue; }
14
14
  });
15
15
  Object.defineProperty(exports, "Workflow", {
16
16
  enumerable: true,
17
- get: function () { return chunk7PRLYMXV_cjs.Workflow; }
17
+ get: function () { return chunkVXUCE4GF_cjs.Workflow; }
18
18
  });
19
19
  Object.defineProperty(exports, "agentToStep", {
20
20
  enumerable: true,
21
- get: function () { return chunk7PRLYMXV_cjs.agentToStep; }
21
+ get: function () { return chunkVXUCE4GF_cjs.agentToStep; }
22
22
  });
23
23
  Object.defineProperty(exports, "getActivePathsAndStatus", {
24
24
  enumerable: true,
25
- get: function () { return chunk7PRLYMXV_cjs.getActivePathsAndStatus; }
25
+ get: function () { return chunkVXUCE4GF_cjs.getActivePathsAndStatus; }
26
26
  });
27
27
  Object.defineProperty(exports, "getResultActivePaths", {
28
28
  enumerable: true,
29
- get: function () { return chunk7PRLYMXV_cjs.getResultActivePaths; }
29
+ get: function () { return chunkVXUCE4GF_cjs.getResultActivePaths; }
30
30
  });
31
31
  Object.defineProperty(exports, "getStepResult", {
32
32
  enumerable: true,
33
- get: function () { return chunk7PRLYMXV_cjs.getStepResult; }
33
+ get: function () { return chunkVXUCE4GF_cjs.getStepResult; }
34
34
  });
35
35
  Object.defineProperty(exports, "getSuspendedPaths", {
36
36
  enumerable: true,
37
- get: function () { return chunk7PRLYMXV_cjs.getSuspendedPaths; }
37
+ get: function () { return chunkVXUCE4GF_cjs.getSuspendedPaths; }
38
38
  });
39
39
  Object.defineProperty(exports, "isAgent", {
40
40
  enumerable: true,
41
- get: function () { return chunk7PRLYMXV_cjs.isAgent; }
41
+ get: function () { return chunkVXUCE4GF_cjs.isAgent; }
42
42
  });
43
43
  Object.defineProperty(exports, "isConditionalKey", {
44
44
  enumerable: true,
45
- get: function () { return chunk7PRLYMXV_cjs.isConditionalKey; }
45
+ get: function () { return chunkVXUCE4GF_cjs.isConditionalKey; }
46
46
  });
47
47
  Object.defineProperty(exports, "isErrorEvent", {
48
48
  enumerable: true,
49
- get: function () { return chunk7PRLYMXV_cjs.isErrorEvent; }
49
+ get: function () { return chunkVXUCE4GF_cjs.isErrorEvent; }
50
50
  });
51
51
  Object.defineProperty(exports, "isFinalState", {
52
52
  enumerable: true,
53
- get: function () { return chunk7PRLYMXV_cjs.isFinalState; }
53
+ get: function () { return chunkVXUCE4GF_cjs.isFinalState; }
54
54
  });
55
55
  Object.defineProperty(exports, "isLimboState", {
56
56
  enumerable: true,
57
- get: function () { return chunk7PRLYMXV_cjs.isLimboState; }
57
+ get: function () { return chunkVXUCE4GF_cjs.isLimboState; }
58
58
  });
59
59
  Object.defineProperty(exports, "isTransitionEvent", {
60
60
  enumerable: true,
61
- get: function () { return chunk7PRLYMXV_cjs.isTransitionEvent; }
61
+ get: function () { return chunkVXUCE4GF_cjs.isTransitionEvent; }
62
62
  });
63
63
  Object.defineProperty(exports, "isVariableReference", {
64
64
  enumerable: true,
65
- get: function () { return chunk7PRLYMXV_cjs.isVariableReference; }
65
+ get: function () { return chunkVXUCE4GF_cjs.isVariableReference; }
66
66
  });
67
67
  Object.defineProperty(exports, "isWorkflow", {
68
68
  enumerable: true,
69
- get: function () { return chunk7PRLYMXV_cjs.isWorkflow; }
69
+ get: function () { return chunkVXUCE4GF_cjs.isWorkflow; }
70
70
  });
71
71
  Object.defineProperty(exports, "mergeChildValue", {
72
72
  enumerable: true,
73
- get: function () { return chunk7PRLYMXV_cjs.mergeChildValue; }
73
+ get: function () { return chunkVXUCE4GF_cjs.mergeChildValue; }
74
74
  });
75
75
  Object.defineProperty(exports, "recursivelyCheckForFinalState", {
76
76
  enumerable: true,
77
- get: function () { return chunk7PRLYMXV_cjs.recursivelyCheckForFinalState; }
77
+ get: function () { return chunkVXUCE4GF_cjs.recursivelyCheckForFinalState; }
78
78
  });
79
79
  Object.defineProperty(exports, "resolveVariables", {
80
80
  enumerable: true,
81
- get: function () { return chunk7PRLYMXV_cjs.resolveVariables; }
81
+ get: function () { return chunkVXUCE4GF_cjs.resolveVariables; }
82
82
  });
83
83
  Object.defineProperty(exports, "updateStepInHierarchy", {
84
84
  enumerable: true,
85
- get: function () { return chunk7PRLYMXV_cjs.updateStepInHierarchy; }
85
+ get: function () { return chunkVXUCE4GF_cjs.updateStepInHierarchy; }
86
86
  });
87
87
  Object.defineProperty(exports, "workflowToStep", {
88
88
  enumerable: true,
89
- get: function () { return chunk7PRLYMXV_cjs.workflowToStep; }
89
+ get: function () { return chunkVXUCE4GF_cjs.workflowToStep; }
90
90
  });
@@ -1,5 +1,5 @@
1
- import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-DI6ChaUK.cjs';
2
- export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-DI6ChaUK.cjs';
1
+ import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-BZxFAZ3-.cjs';
2
+ export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-BZxFAZ3-.cjs';
3
3
  import { z } from 'zod';
4
4
  import { a as Metric } from '../types-BtMyV38I.cjs';
5
5
  import { L as Logger } from '../index-CquI0inB.cjs';
@@ -1,5 +1,5 @@
1
- import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-bWFiU8RL.js';
2
- export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-bWFiU8RL.js';
1
+ import { ay as VariableReference, aF as StepResult, J as Step, K as Workflow, D as Agent, aI as WorkflowContext, b1 as ToolsInput, a as Mastra, at as StepAction, aH as WorkflowRunResult } from '../base-uXj2cuRo.js';
2
+ export { aA as ActionContext, az as BaseCondition, aO as DependencyCheckOutput, aV as ExtractSchemaFromStep, aY as ExtractSchemaType, aW as ExtractStepResult, aZ as PathsToStringProps, aL as ResolverFunctionInput, aM as ResolverFunctionOutput, ax as RetryConfig, aD as StepCondition, aE as StepConfig, aC as StepDef, as as StepExecutionContext, aw as StepGraph, aU as StepId, aX as StepInputType, av as StepNode, aP as StepResolverOutput, au as StepVariableType, aG as StepsRecord, aN as SubscriberFunctionOutput, aB as WhenConditionReturnValue, aR as WorkflowActionParams, aS as WorkflowActions, aQ as WorkflowActors, aK as WorkflowEvent, aJ as WorkflowLogMessage, L as WorkflowOptions, a$ as WorkflowResumeResult, a_ as WorkflowRunState, aT as WorkflowState } from '../base-uXj2cuRo.js';
3
3
  import { z } from 'zod';
4
4
  import { a as Metric } from '../types-BtMyV38I.js';
5
5
  import { L as Logger } from '../index-CquI0inB.js';
@@ -1 +1 @@
1
- export { Step, WhenConditionReturnValue, Workflow, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from '../chunk-H2UWWO4L.js';
1
+ export { Step, WhenConditionReturnValue, Workflow, agentToStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isAgent, isConditionalKey, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, isWorkflow, mergeChildValue, recursivelyCheckForFinalState, resolveVariables, updateStepInHierarchy, workflowToStep } from '../chunk-6YY6MN2Z.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk7PRLYMXV_cjs = require('../../chunk-7PRLYMXV.cjs');
4
- var chunk7JRVDC7F_cjs = require('../../chunk-7JRVDC7F.cjs');
3
+ var chunkVXUCE4GF_cjs = require('../../chunk-VXUCE4GF.cjs');
4
+ var chunkD2Y3ET63_cjs = require('../../chunk-D2Y3ET63.cjs');
5
5
  var chunkD63P5O4Q_cjs = require('../../chunk-D63P5O4Q.cjs');
6
6
  var chunkO7IW545H_cjs = require('../../chunk-O7IW545H.cjs');
7
7
  var chunkLABUWBKX_cjs = require('../../chunk-LABUWBKX.cjs');
@@ -586,7 +586,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
586
586
 
587
587
  // src/workflows/vNext/workflow.ts
588
588
  function createStep(params) {
589
- if (params instanceof chunk7PRLYMXV_cjs.Agent) {
589
+ if (params instanceof chunkVXUCE4GF_cjs.Agent) {
590
590
  return {
591
591
  id: params.name,
592
592
  // @ts-ignore
@@ -610,7 +610,7 @@ function createStep(params) {
610
610
  }
611
611
  };
612
612
  }
613
- if (params instanceof chunk7JRVDC7F_cjs.Tool) {
613
+ if (params instanceof chunkD2Y3ET63_cjs.Tool) {
614
614
  if (!params.inputSchema || !params.outputSchema) {
615
615
  throw new Error("Tool must have input and output schemas defined");
616
616
  }
@@ -972,13 +972,13 @@ var NewWorkflow = class extends chunkD63P5O4Q_cjs.MastraBase {
972
972
  }
973
973
  return res.status === "success" ? res.result : void 0;
974
974
  }
975
- async getWorkflowRuns() {
975
+ async getWorkflowRuns(args) {
976
976
  const storage = this.#mastra?.getStorage();
977
977
  if (!storage) {
978
978
  this.logger.debug("Cannot get workflow runs. Mastra engine is not initialized");
979
979
  return { runs: [], total: 0 };
980
980
  }
981
- return storage.getWorkflowRuns({ workflowName: this.id });
981
+ return storage.getWorkflowRuns({ workflowName: this.id, ...args ?? {} });
982
982
  }
983
983
  async getWorkflowRun(runId) {
984
984
  const runs = await this.getWorkflowRuns();
@@ -1,5 +1,5 @@
1
- import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-DI6ChaUK.cjs';
2
- export { z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-DI6ChaUK.cjs';
1
+ import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-BZxFAZ3-.cjs';
2
+ export { z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-BZxFAZ3-.cjs';
3
3
  import EventEmitter from 'events';
4
4
  import { RuntimeContext } from '../../runtime-context/index.cjs';
5
5
  import 'ai';
@@ -1,5 +1,5 @@
1
- import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-bWFiU8RL.js';
2
- export { z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-bWFiU8RL.js';
1
+ import { g as ExecutionEngine, h as ExecutionGraph, i as StepResult, j as StepFlowEntry, N as NewStep, k as ExecuteFunction } from '../../base-uXj2cuRo.js';
2
+ export { z as ExtractSchemaFromStep, y as ExtractSchemaType, t as NewWorkflow, s as NewWorkflowConfig, P as PathsToStringProps, R as Run, l as SerializedStep, m as SerializedStepFlowEntry, v as StepFailure, u as StepSuccess, w as StepSuspended, x as StepsRecord, V as VariableReference, B as WatchEvent, r as WorkflowResult, Z as ZodPathType, o as cloneStep, q as cloneWorkflow, n as createStep, p as createWorkflow } from '../../base-uXj2cuRo.js';
3
3
  import EventEmitter from 'events';
4
4
  import { RuntimeContext } from '../../runtime-context/index.js';
5
5
  import 'ai';
@@ -1,5 +1,5 @@
1
- import { Agent } from '../../chunk-H2UWWO4L.js';
2
- import { Tool } from '../../chunk-JSUPD5IG.js';
1
+ import { Agent } from '../../chunk-6YY6MN2Z.js';
2
+ import { Tool } from '../../chunk-ZCJJ6XOH.js';
3
3
  import { MastraBase } from '../../chunk-CLJQYXNM.js';
4
4
  import { RegisteredLogger } from '../../chunk-2BVZNKLX.js';
5
5
  import { RuntimeContext } from '../../chunk-SGGPJWRQ.js';
@@ -966,13 +966,13 @@ var NewWorkflow = class extends MastraBase {
966
966
  }
967
967
  return res.status === "success" ? res.result : void 0;
968
968
  }
969
- async getWorkflowRuns() {
969
+ async getWorkflowRuns(args) {
970
970
  const storage = this.#mastra?.getStorage();
971
971
  if (!storage) {
972
972
  this.logger.debug("Cannot get workflow runs. Mastra engine is not initialized");
973
973
  return { runs: [], total: 0 };
974
974
  }
975
- return storage.getWorkflowRuns({ workflowName: this.id });
975
+ return storage.getWorkflowRuns({ workflowName: this.id, ...args ?? {} });
976
976
  }
977
977
  async getWorkflowRun(runId) {
978
978
  const runs = await this.getWorkflowRuns();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/core",
3
- "version": "0.9.2-alpha.0",
3
+ "version": "0.9.2-alpha.3",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
File without changes
File without changes