@mastra/core 0.10.3 → 0.10.4-alpha.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 (142) hide show
  1. package/dist/agent/index.cjs +4 -4
  2. package/dist/agent/index.d.cts +4 -3
  3. package/dist/agent/index.d.ts +4 -3
  4. package/dist/agent/index.js +2 -2
  5. package/dist/{base-Dmg7H-Iz.d.cts → base-BBs8xtlU.d.cts} +71 -6
  6. package/dist/{base-BY9WFI65.d.cts → base-Bi9KB0TN.d.ts} +19 -3
  7. package/dist/{base-C0yUw8BC.d.ts → base-CO-L7hF9.d.cts} +19 -3
  8. package/dist/{base-Bdo-CPMn.d.ts → base-DKqdQHNd.d.ts} +71 -6
  9. package/dist/base.cjs +2 -2
  10. package/dist/base.d.cts +3 -2
  11. package/dist/base.d.ts +3 -2
  12. package/dist/base.js +1 -1
  13. package/dist/bundler/index.cjs +2 -2
  14. package/dist/bundler/index.d.cts +3 -2
  15. package/dist/bundler/index.d.ts +3 -2
  16. package/dist/bundler/index.js +1 -1
  17. package/dist/{chunk-NMDM4IZN.cjs → chunk-2D7NOO7S.cjs} +16 -11
  18. package/dist/{chunk-EWDGXKOQ.js → chunk-36UICULV.js} +2 -1
  19. package/dist/{chunk-JOCKZ2US.js → chunk-5IEKR756.js} +1 -1
  20. package/dist/{chunk-XXVGT7SJ.js → chunk-5YDTZN2X.js} +32 -9
  21. package/dist/{chunk-4TEWSQS5.js → chunk-6FYLLPWK.js} +1 -1
  22. package/dist/chunk-7LRIVP5A.cjs +138 -0
  23. package/dist/{chunk-FLPSXJWQ.js → chunk-7UNDRBOU.js} +2 -2
  24. package/dist/{chunk-DTJ4KVHM.js → chunk-ATXBSEFT.js} +1 -1
  25. package/dist/chunk-BBAQW23O.cjs +68 -0
  26. package/dist/{chunk-OBEALYTK.js → chunk-DO5R43AJ.js} +16 -11
  27. package/dist/{chunk-5EB62G6T.js → chunk-DU32FMDF.js} +3 -3
  28. package/dist/{chunk-CYJF6U6B.cjs → chunk-FEYYOBBG.cjs} +2 -2
  29. package/dist/{chunk-K7BZ4VXX.js → chunk-GSELXPJC.js} +3 -3
  30. package/dist/{chunk-SH2C4VTJ.cjs → chunk-GV6P24NY.cjs} +25 -14
  31. package/dist/{chunk-FHLDRRKJ.cjs → chunk-H5IRI46R.cjs} +3 -3
  32. package/dist/{chunk-FGBS7VRU.js → chunk-HFEELWJO.js} +33 -23
  33. package/dist/{chunk-PMAVDBJY.js → chunk-IM7CLVLZ.js} +1 -1
  34. package/dist/{chunk-TIPFGQCO.js → chunk-IZGRJXUQ.js} +19 -8
  35. package/dist/{chunk-XJCP3SLA.js → chunk-JNMQKJH4.js} +1 -1
  36. package/dist/{chunk-3JGO7S6X.cjs → chunk-JYLH5IY3.cjs} +4 -4
  37. package/dist/{chunk-TAHSAZUN.cjs → chunk-LEK3J7YN.cjs} +2 -2
  38. package/dist/{chunk-B4TMM6NT.js → chunk-MGOJI66G.js} +25 -9
  39. package/dist/{chunk-ERUGEZPR.cjs → chunk-NFGQDPZL.cjs} +2 -2
  40. package/dist/{chunk-7MWWPVCE.js → chunk-NWJWIOVO.js} +48 -2
  41. package/dist/{chunk-MVXVUMLA.cjs → chunk-OKHKG5C7.cjs} +42 -26
  42. package/dist/{chunk-VHZPWE5L.cjs → chunk-P3Q73CAW.cjs} +6 -6
  43. package/dist/chunk-PVGSY24V.js +63 -0
  44. package/dist/chunk-QVROTSA5.cjs +408 -0
  45. package/dist/{chunk-VBSKHNCY.cjs → chunk-RO5VPM3P.cjs} +39 -29
  46. package/dist/{chunk-LMTSGD2E.cjs → chunk-RORSYAKV.cjs} +7 -7
  47. package/dist/{chunk-HZ7ME4LD.cjs → chunk-S6WRT7GI.cjs} +4 -4
  48. package/dist/{chunk-ZPOETARN.js → chunk-SI2ENZ3O.js} +2 -2
  49. package/dist/chunk-TRJIWZKM.js +390 -0
  50. package/dist/{chunk-IBIGJYTD.cjs → chunk-UJODXBBX.cjs} +8 -8
  51. package/dist/{chunk-677GIYFF.js → chunk-YCYAVLYR.js} +1 -1
  52. package/dist/{chunk-TICDQWVJ.cjs → chunk-ZAXPU6F2.cjs} +2 -1
  53. package/dist/{chunk-RFAN7FAT.cjs → chunk-ZIZ3CVHN.cjs} +32 -9
  54. package/dist/{chunk-PKYG5CWB.cjs → chunk-ZZLBNB3U.cjs} +2 -2
  55. package/dist/deployer/index.cjs +2 -2
  56. package/dist/deployer/index.d.cts +3 -2
  57. package/dist/deployer/index.d.ts +3 -2
  58. package/dist/deployer/index.js +1 -1
  59. package/dist/error/index.cjs +19 -72
  60. package/dist/error/index.d.cts +25 -31
  61. package/dist/error/index.d.ts +25 -31
  62. package/dist/error/index.js +1 -70
  63. package/dist/eval/index.d.cts +4 -3
  64. package/dist/eval/index.d.ts +4 -3
  65. package/dist/index.cjs +58 -58
  66. package/dist/index.d.cts +6 -5
  67. package/dist/index.d.ts +6 -5
  68. package/dist/index.js +14 -14
  69. package/dist/integration/index.d.cts +4 -3
  70. package/dist/integration/index.d.ts +4 -3
  71. package/dist/llm/index.d.cts +4 -3
  72. package/dist/llm/index.d.ts +4 -3
  73. package/dist/logger/index.cjs +10 -10
  74. package/dist/logger/index.d.cts +60 -7
  75. package/dist/logger/index.d.ts +60 -7
  76. package/dist/logger/index.js +2 -2
  77. package/dist/logger-CpL0z5v_.d.cts +158 -0
  78. package/dist/logger-DtVDdb81.d.ts +158 -0
  79. package/dist/mastra/index.cjs +2 -2
  80. package/dist/mastra/index.d.cts +5 -4
  81. package/dist/mastra/index.d.ts +5 -4
  82. package/dist/mastra/index.js +1 -1
  83. package/dist/mcp/index.cjs +4 -4
  84. package/dist/mcp/index.d.cts +5 -4
  85. package/dist/mcp/index.d.ts +5 -4
  86. package/dist/mcp/index.js +3 -3
  87. package/dist/memory/index.cjs +4 -4
  88. package/dist/memory/index.d.cts +4 -3
  89. package/dist/memory/index.d.ts +4 -3
  90. package/dist/memory/index.js +1 -1
  91. package/dist/network/index.cjs +6 -6
  92. package/dist/network/index.d.cts +4 -3
  93. package/dist/network/index.d.ts +4 -3
  94. package/dist/network/index.js +3 -3
  95. package/dist/relevance/index.cjs +4 -4
  96. package/dist/relevance/index.d.cts +5 -4
  97. package/dist/relevance/index.d.ts +5 -4
  98. package/dist/relevance/index.js +1 -1
  99. package/dist/server/index.cjs +4 -4
  100. package/dist/server/index.d.cts +5 -4
  101. package/dist/server/index.d.ts +5 -4
  102. package/dist/server/index.js +2 -2
  103. package/dist/storage/index.cjs +17 -12
  104. package/dist/storage/index.d.cts +11 -5
  105. package/dist/storage/index.d.ts +11 -5
  106. package/dist/storage/index.js +9 -4
  107. package/dist/telemetry/index.cjs +7 -7
  108. package/dist/telemetry/index.d.cts +4 -3
  109. package/dist/telemetry/index.d.ts +4 -3
  110. package/dist/telemetry/index.js +1 -1
  111. package/dist/tools/index.d.cts +6 -5
  112. package/dist/tools/index.d.ts +6 -5
  113. package/dist/tts/index.cjs +2 -2
  114. package/dist/tts/index.d.cts +3 -2
  115. package/dist/tts/index.d.ts +3 -2
  116. package/dist/tts/index.js +1 -1
  117. package/dist/utils.cjs +14 -14
  118. package/dist/utils.d.cts +4 -3
  119. package/dist/utils.d.ts +4 -3
  120. package/dist/utils.js +1 -1
  121. package/dist/vector/index.cjs +2 -2
  122. package/dist/vector/index.d.cts +3 -2
  123. package/dist/vector/index.d.ts +3 -2
  124. package/dist/vector/index.js +1 -1
  125. package/dist/voice/index.cjs +4 -4
  126. package/dist/voice/index.d.cts +4 -3
  127. package/dist/voice/index.d.ts +4 -3
  128. package/dist/voice/index.js +1 -1
  129. package/dist/workflows/index.cjs +9 -9
  130. package/dist/workflows/index.d.cts +5 -4
  131. package/dist/workflows/index.d.ts +5 -4
  132. package/dist/workflows/index.js +1 -1
  133. package/dist/workflows/legacy/index.cjs +22 -22
  134. package/dist/workflows/legacy/index.d.cts +5 -4
  135. package/dist/workflows/legacy/index.d.ts +5 -4
  136. package/dist/workflows/legacy/index.js +1 -1
  137. package/package.json +10 -11
  138. package/dist/chunk-WWLMZIHW.cjs +0 -995
  139. package/dist/chunk-X6VHQCYN.cjs +0 -92
  140. package/dist/chunk-Y5BGCPNZ.js +0 -977
  141. package/dist/logger-BF2Sn7JX.d.cts +0 -79
  142. package/dist/logger-BF2Sn7JX.d.ts +0 -79
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkMVXVUMLA_cjs = require('../chunk-MVXVUMLA.cjs');
4
- var chunkFHLDRRKJ_cjs = require('../chunk-FHLDRRKJ.cjs');
3
+ var chunkOKHKG5C7_cjs = require('../chunk-OKHKG5C7.cjs');
4
+ var chunkH5IRI46R_cjs = require('../chunk-H5IRI46R.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkMVXVUMLA_cjs.Agent; }
10
+ get: function () { return chunkOKHKG5C7_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "MessageList", {
13
13
  enumerable: true,
14
- get: function () { return chunkFHLDRRKJ_cjs.MessageList; }
14
+ get: function () { return chunkH5IRI46R_cjs.MessageList; }
15
15
  });
@@ -1,11 +1,12 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { A as Agent, ap as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bn as MastraLanguageModel, bS as MastraMessageContentV2, s as MastraMessageV2, bN as MessageList, T as ToolsInput, bO as ToolsetsInput } from '../base-Dmg7H-Iz.cjs';
5
- import '../base-BY9WFI65.cjs';
4
+ export { A as Agent, ar as AgentConfig, bT as AgentGenerateOptions, bU as AgentStreamOptions, bS as DynamicArgument, bq as MastraLanguageModel, bV as MastraMessageContentV2, s as MastraMessageV2, bQ as MessageList, T as ToolsInput, bR as ToolsetsInput } from '../base-BBs8xtlU.cjs';
5
+ import '../base-CO-L7hF9.cjs';
6
6
  import '../types-Bo1uigWx.cjs';
7
7
  import '../runtime-context/index.cjs';
8
- import '../logger-BF2Sn7JX.cjs';
8
+ import '../logger-CpL0z5v_.cjs';
9
+ import '../error/index.cjs';
9
10
  import 'stream';
10
11
  import '../tts/index.cjs';
11
12
  import '@opentelemetry/api';
@@ -1,11 +1,12 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { A as Agent, ap as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bn as MastraLanguageModel, bS as MastraMessageContentV2, s as MastraMessageV2, bN as MessageList, T as ToolsInput, bO as ToolsetsInput } from '../base-Bdo-CPMn.js';
5
- import '../base-C0yUw8BC.js';
4
+ export { A as Agent, ar as AgentConfig, bT as AgentGenerateOptions, bU as AgentStreamOptions, bS as DynamicArgument, bq as MastraLanguageModel, bV as MastraMessageContentV2, s as MastraMessageV2, bQ as MessageList, T as ToolsInput, bR as ToolsetsInput } from '../base-DKqdQHNd.js';
5
+ import '../base-Bi9KB0TN.js';
6
6
  import '../types-Bo1uigWx.js';
7
7
  import '../runtime-context/index.js';
8
- import '../logger-BF2Sn7JX.js';
8
+ import '../logger-DtVDdb81.js';
9
+ import '../error/index.js';
9
10
  import 'stream';
10
11
  import '../tts/index.js';
11
12
  import '@opentelemetry/api';
@@ -1,2 +1,2 @@
1
- export { Agent } from '../chunk-B4TMM6NT.js';
2
- export { MessageList } from '../chunk-677GIYFF.js';
1
+ export { Agent } from '../chunk-MGOJI66G.js';
2
+ export { MessageList } from '../chunk-YCYAVLYR.js';
@@ -1,9 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$1, Schema, ToolExecutionOptions, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, CoreMessage as CoreMessage$1, UIMessage, IDGenerator as IDGenerator$1, Message, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, DeepPartial, generateText, generateObject, streamText, streamObject, TelemetrySettings, CoreAssistantMessage as CoreAssistantMessage$1, CoreUserMessage as CoreUserMessage$1, CoreToolMessage as CoreToolMessage$1, EmbedResult as EmbedResult$1, EmbedManyResult as EmbedManyResult$1, LanguageModelV1, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
3
- import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-BY9WFI65.cjs';
3
+ import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-CO-L7hF9.cjs';
4
4
  import { z, ZodSchema } from 'zod';
5
+ import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-CpL0z5v_.cjs';
5
6
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
6
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.cjs';
7
7
  import { MastraTTS } from './tts/index.cjs';
8
8
  import { MastraVector } from './vector/index.cjs';
9
9
  import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.cjs';
@@ -1570,6 +1570,20 @@ interface WorkflowRun {
1570
1570
  updatedAt: Date;
1571
1571
  resourceId?: string;
1572
1572
  }
1573
+ type PaginationArgs = {
1574
+ dateRange?: {
1575
+ start?: Date;
1576
+ end?: Date;
1577
+ };
1578
+ page?: number;
1579
+ perPage?: number;
1580
+ };
1581
+ type PaginationInfo = {
1582
+ total: number;
1583
+ page: number;
1584
+ perPage: number;
1585
+ hasMore: boolean;
1586
+ };
1573
1587
  type StorageGetMessagesArg = {
1574
1588
  threadId: string;
1575
1589
  resourceId?: string;
@@ -1581,6 +1595,7 @@ type StorageGetMessagesArg = {
1581
1595
  withPreviousMessages?: number;
1582
1596
  withNextMessages?: number;
1583
1597
  }[];
1598
+ pagination?: PaginationArgs;
1584
1599
  };
1585
1600
  threadConfig?: MemoryConfig;
1586
1601
  format?: 'v1' | 'v2';
@@ -1660,6 +1675,22 @@ type SharedMemoryConfig = {
1660
1675
  embedder?: EmbeddingModel<string>;
1661
1676
  processors?: MemoryProcessor[];
1662
1677
  };
1678
+ type TraceType = {
1679
+ id: string;
1680
+ parentSpanId: string | null;
1681
+ name: string;
1682
+ traceId: string;
1683
+ scope: string;
1684
+ kind: number;
1685
+ attributes: Record<string, unknown> | null;
1686
+ status: Record<string, unknown> | null;
1687
+ events: Record<string, unknown> | null;
1688
+ links: Record<string, unknown> | null;
1689
+ other: Record<string, unknown> | null;
1690
+ startTime: number;
1691
+ endTime: number;
1692
+ createdAt: Date;
1693
+ };
1663
1694
 
1664
1695
  type MastraMessageContentV2 = {
1665
1696
  format: 2;
@@ -3095,11 +3126,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
3095
3126
  * @returns The network with the specified ID, or undefined if not found
3096
3127
  */
3097
3128
  getNetwork(networkId: string): AgentNetwork | undefined;
3098
- getLogsByRunId({ runId, transportId }: {
3129
+ getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
3099
3130
  runId: string;
3100
3131
  transportId: string;
3101
- }): Promise<any[]>;
3102
- getLogs(transportId: string): Promise<any[]>;
3132
+ fromDate?: Date;
3133
+ toDate?: Date;
3134
+ logLevel?: LogLevel;
3135
+ filters?: Record<string, any>;
3136
+ page?: number;
3137
+ perPage?: number;
3138
+ }): Promise<{
3139
+ logs: BaseLogMessage[];
3140
+ total: number;
3141
+ page: number;
3142
+ perPage: number;
3143
+ hasMore: boolean;
3144
+ }>;
3145
+ getLogs(transportId: string, params?: {
3146
+ fromDate?: Date;
3147
+ toDate?: Date;
3148
+ logLevel?: LogLevel;
3149
+ filters?: Record<string, any>;
3150
+ page?: number;
3151
+ perPage?: number;
3152
+ }): Promise<{
3153
+ logs: BaseLogMessage[];
3154
+ total: number;
3155
+ page: number;
3156
+ perPage: number;
3157
+ hasMore: boolean;
3158
+ }>;
3103
3159
  /**
3104
3160
  * Get all registered MCP server instances.
3105
3161
  * @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
@@ -3337,6 +3393,10 @@ declare abstract class MastraStorage extends MastraBase {
3337
3393
  constructor({ name }: {
3338
3394
  name: string;
3339
3395
  });
3396
+ protected ensureDate(date: Date | string | undefined): Date | undefined;
3397
+ protected serializeDate(date: Date | string | undefined): string | undefined;
3398
+ protected getSqlType(type: StorageColumn['type']): string;
3399
+ protected getDefaultValue(type: StorageColumn['type']): string;
3340
3400
  abstract createTable({ tableName }: {
3341
3401
  tableName: TABLE_NAMES;
3342
3402
  schema: Record<string, StorageColumn>;
@@ -3344,6 +3404,11 @@ declare abstract class MastraStorage extends MastraBase {
3344
3404
  abstract clearTable({ tableName }: {
3345
3405
  tableName: TABLE_NAMES;
3346
3406
  }): Promise<void>;
3407
+ abstract alterTable(args: {
3408
+ tableName: TABLE_NAMES;
3409
+ schema: Record<string, StorageColumn>;
3410
+ ifNotExists: string[];
3411
+ }): Promise<void>;
3347
3412
  abstract insert({ tableName, record }: {
3348
3413
  tableName: TABLE_NAMES;
3349
3414
  record: Record<string, any>;
@@ -3435,4 +3500,4 @@ declare abstract class MastraStorage extends MastraBase {
3435
3500
  }): Promise<WorkflowRun | null>;
3436
3501
  }
3437
3502
 
3438
- export { type StepCondition as $, Agent as A, TABLE_EVALS as B, type CoreTool as C, TABLE_MESSAGES as D, type EvalRow as E, TABLE_THREADS as F, TABLE_TRACES as G, TABLE_SCHEMAS as H, type VariableReference$1 as I, type StepResult$1 as J, type StepAction as K, LegacyWorkflow as L, Mastra as M, type LegacyWorkflowRunResult as N, type WorkflowOptions as O, type StepVariableType as P, type StepNode as Q, type StepGraph as R, type StepExecutionContext as S, type ToolsInput as T, type RetryConfig as U, type VercelTool as V, type WorkflowContext as W, type BaseCondition as X, type ActionContext as Y, WhenConditionReturnValue as Z, type StepDef as _, type MastraPrimitives as a, createStep as a$, type StepConfig as a0, type StepsRecord$1 as a1, type WorkflowLogMessage as a2, type WorkflowEvent as a3, type ResolverFunctionInput as a4, type ResolverFunctionOutput as a5, type SubscriberFunctionOutput as a6, type DependencyCheckOutput as a7, type StepResolverOutput as a8, type WorkflowActors as a9, type StructuredOutputType as aA, type StructuredOutputArrayItem as aB, type StructuredOutput as aC, type GenerateReturn as aD, type StreamReturn as aE, type OutputType as aF, type DefaultLLMTextOptions as aG, type DefaultLLMTextObjectOptions as aH, type DefaultLLMStreamOptions as aI, type DefaultLLMStreamObjectOptions as aJ, type LLMTextOptions as aK, type LLMTextObjectOptions as aL, type LLMStreamOptions as aM, type LLMInnerStreamOptions as aN, type LLMStreamObjectOptions as aO, createMockModel as aP, type Config as aQ, type MessageType as aR, type MessageResponse as aS, type MemoryConfig as aT, type SharedMemoryConfig as aU, type MemoryProcessorOpts as aV, MemoryProcessor as aW, memoryDefaultOptions as aX, type StepFlowEntry as aY, type SerializedStep as aZ, type SerializedStepFlowEntry as a_, type WorkflowActionParams as aa, type WorkflowActions as ab, type LegacyWorkflowState as ac, type StepId as ad, type ExtractSchemaFromStep$1 as ae, type ExtractStepResult as af, type StepInputType as ag, type ExtractSchemaType$1 as ah, type PathsToStringProps$1 as ai, type LegacyWorkflowRunState as aj, type WorkflowResumeResult as ak, Tool as al, createTool as am, type InternalCoreTool as an, type ToolExecutionContext as ao, type AgentConfig as ap, type WorkflowConfig as aq, type LanguageModel as ar, type CoreMessage as as, type CoreSystemMessage as at, type CoreAssistantMessage as au, type CoreUserMessage as av, type CoreToolMessage as aw, type EmbedResult as ax, type EmbedManyResult as ay, type BaseStructuredOutputType as az, MastraMemory as b, cloneStep as b0, createWorkflow as b1, cloneWorkflow as b2, type WorkflowResult as b3, Run as b4, type ExecutionGraph as b5, ExecutionEngine as b6, type ExecuteFunction as b7, type StepSuccess as b8, type StepFailure as b9, type VersionDetail as bA, type ArgumentInfo as bB, type PositionalArgumentInfo as bC, type NamedArgumentInfo as bD, type SubcommandInfo as bE, type CommandInfo as bF, type EnvironmentVariableInfo as bG, type PackageInfo as bH, type RemoteInfo as bI, type MCPServerConfig as bJ, type ServerInfo as bK, type ServerDetailInfo as bL, type MCPToolType as bM, MessageList as bN, type ToolsetsInput as bO, type DynamicArgument as bP, type AgentGenerateOptions as bQ, type AgentStreamOptions as bR, type MastraMessageContentV2 as bS, type StepSuspended as ba, type StepRunning as bb, type StepResult as bc, type StepsRecord as bd, type DynamicMapping as be, type PathsToStringProps as bf, type ExtractSchemaType as bg, type ExtractSchemaFromStep as bh, type VariableReference as bi, type StreamEvent as bj, type WatchEvent as bk, type ZodPathType as bl, type WorkflowRunState as bm, type MastraLanguageModel as bn, type VoiceEventType as bo, type VoiceEventMap as bp, type VoiceConfig as bq, MastraVoice as br, CompositeVoice as bs, DefaultVoice as bt, type AgentNetworkConfig as bu, type ConvertedTool as bv, type MCPServerSSEOptions as bw, type MCPServerHonoSSEOptions as bx, type MCPServerHTTPOptions as by, type Repository as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, TABLE_WORKFLOW_SNAPSHOT as z };
3503
+ export { WhenConditionReturnValue as $, Agent as A, TABLE_WORKFLOW_SNAPSHOT as B, type CoreTool as C, TABLE_EVALS as D, type EvalRow as E, TABLE_MESSAGES as F, TABLE_THREADS as G, TABLE_TRACES as H, TABLE_SCHEMAS as I, type VariableReference$1 as J, type StepResult$1 as K, LegacyWorkflow as L, Mastra as M, type StepAction as N, type LegacyWorkflowRunResult as O, type PaginationArgs as P, type WorkflowOptions as Q, type StepVariableType as R, type StepExecutionContext as S, type ToolsInput as T, type StepNode as U, type VercelTool as V, type WorkflowContext as W, type StepGraph as X, type RetryConfig as Y, type BaseCondition as Z, type ActionContext as _, type MastraPrimitives as a, type StepFlowEntry as a$, type StepDef as a0, type StepCondition as a1, type StepConfig as a2, type StepsRecord$1 as a3, type WorkflowLogMessage as a4, type WorkflowEvent as a5, type ResolverFunctionInput as a6, type ResolverFunctionOutput as a7, type SubscriberFunctionOutput as a8, type DependencyCheckOutput as a9, type EmbedManyResult as aA, type BaseStructuredOutputType as aB, type StructuredOutputType as aC, type StructuredOutputArrayItem as aD, type StructuredOutput as aE, type GenerateReturn as aF, type StreamReturn as aG, type OutputType as aH, type DefaultLLMTextOptions as aI, type DefaultLLMTextObjectOptions as aJ, type DefaultLLMStreamOptions as aK, type DefaultLLMStreamObjectOptions as aL, type LLMTextOptions as aM, type LLMTextObjectOptions as aN, type LLMStreamOptions as aO, type LLMInnerStreamOptions as aP, type LLMStreamObjectOptions as aQ, createMockModel as aR, type Config as aS, type MessageType as aT, type MessageResponse as aU, type MemoryConfig as aV, type SharedMemoryConfig as aW, type TraceType as aX, type MemoryProcessorOpts as aY, MemoryProcessor as aZ, memoryDefaultOptions as a_, type StepResolverOutput as aa, type WorkflowActors as ab, type WorkflowActionParams as ac, type WorkflowActions as ad, type LegacyWorkflowState as ae, type StepId as af, type ExtractSchemaFromStep$1 as ag, type ExtractStepResult as ah, type StepInputType as ai, type ExtractSchemaType$1 as aj, type PathsToStringProps$1 as ak, type LegacyWorkflowRunState as al, type WorkflowResumeResult as am, Tool as an, createTool as ao, type InternalCoreTool as ap, type ToolExecutionContext as aq, type AgentConfig as ar, type WorkflowConfig as as, type LanguageModel as at, type CoreMessage as au, type CoreSystemMessage as av, type CoreAssistantMessage as aw, type CoreUserMessage as ax, type CoreToolMessage as ay, type EmbedResult as az, MastraMemory as b, type SerializedStep as b0, type SerializedStepFlowEntry as b1, createStep as b2, cloneStep as b3, createWorkflow as b4, cloneWorkflow as b5, type WorkflowResult as b6, Run as b7, type ExecutionGraph as b8, ExecutionEngine as b9, type MCPServerHonoSSEOptions as bA, type MCPServerHTTPOptions as bB, type Repository as bC, type VersionDetail as bD, type ArgumentInfo as bE, type PositionalArgumentInfo as bF, type NamedArgumentInfo as bG, type SubcommandInfo as bH, type CommandInfo as bI, type EnvironmentVariableInfo as bJ, type PackageInfo as bK, type RemoteInfo as bL, type MCPServerConfig as bM, type ServerInfo as bN, type ServerDetailInfo as bO, type MCPToolType as bP, MessageList as bQ, type ToolsetsInput as bR, type DynamicArgument as bS, type AgentGenerateOptions as bT, type AgentStreamOptions as bU, type MastraMessageContentV2 as bV, type ExecuteFunction as ba, type StepSuccess as bb, type StepFailure as bc, type StepSuspended as bd, type StepRunning as be, type StepResult as bf, type StepsRecord as bg, type DynamicMapping as bh, type PathsToStringProps as bi, type ExtractSchemaType as bj, type ExtractSchemaFromStep as bk, type VariableReference as bl, type StreamEvent as bm, type WatchEvent as bn, type ZodPathType as bo, type WorkflowRunState as bp, type MastraLanguageModel as bq, type VoiceEventType as br, type VoiceEventMap as bs, type VoiceConfig as bt, MastraVoice as bu, CompositeVoice as bv, DefaultVoice as bw, type AgentNetworkConfig as bx, type ConvertedTool as by, type MCPServerSSEOptions as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, type PaginationInfo as z };
@@ -1,7 +1,7 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Tracer, Span, BaggageEntry, Context } from '@opentelemetry/api';
3
- import { R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.cjs';
4
- import { SpanExporter } from '@opentelemetry/sdk-trace-base';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-DtVDdb81.js';
4
+ import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
7
7
  type SamplingStrategy = {
@@ -55,6 +55,22 @@ type OtelConfig = {
55
55
  exporter: SpanExporter;
56
56
  };
57
57
  };
58
+ type Trace = {
59
+ id: string;
60
+ parentSpanId: string;
61
+ name: string;
62
+ traceId: string;
63
+ scope: string;
64
+ kind: ReadableSpan['kind'];
65
+ attributes: ReadableSpan['attributes'];
66
+ status: ReadableSpan['status'];
67
+ events: ReadableSpan['events'];
68
+ links: ReadableSpan['links'];
69
+ other: Record<string, any>;
70
+ startTime: number;
71
+ endTime: number;
72
+ createdAt: string;
73
+ };
58
74
 
59
75
  declare global {
60
76
  var __TELEMETRY__: Telemetry | undefined;
@@ -143,4 +159,4 @@ declare class MastraBase {
143
159
  } | undefined;
144
160
  }
145
161
 
146
- export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
162
+ export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T, type Trace as a };
@@ -1,7 +1,7 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Tracer, Span, BaggageEntry, Context } from '@opentelemetry/api';
3
- import { R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.js';
4
- import { SpanExporter } from '@opentelemetry/sdk-trace-base';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-CpL0z5v_.cjs';
4
+ import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
7
7
  type SamplingStrategy = {
@@ -55,6 +55,22 @@ type OtelConfig = {
55
55
  exporter: SpanExporter;
56
56
  };
57
57
  };
58
+ type Trace = {
59
+ id: string;
60
+ parentSpanId: string;
61
+ name: string;
62
+ traceId: string;
63
+ scope: string;
64
+ kind: ReadableSpan['kind'];
65
+ attributes: ReadableSpan['attributes'];
66
+ status: ReadableSpan['status'];
67
+ events: ReadableSpan['events'];
68
+ links: ReadableSpan['links'];
69
+ other: Record<string, any>;
70
+ startTime: number;
71
+ endTime: number;
72
+ createdAt: string;
73
+ };
58
74
 
59
75
  declare global {
60
76
  var __TELEMETRY__: Telemetry | undefined;
@@ -143,4 +159,4 @@ declare class MastraBase {
143
159
  } | undefined;
144
160
  }
145
161
 
146
- export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
162
+ export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T, type Trace as a };
@@ -1,9 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$1, Schema, ToolExecutionOptions, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, CoreMessage as CoreMessage$1, UIMessage, IDGenerator as IDGenerator$1, Message, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, DeepPartial, generateText, generateObject, streamText, streamObject, TelemetrySettings, CoreAssistantMessage as CoreAssistantMessage$1, CoreUserMessage as CoreUserMessage$1, CoreToolMessage as CoreToolMessage$1, EmbedResult as EmbedResult$1, EmbedManyResult as EmbedManyResult$1, LanguageModelV1, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
3
- import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-C0yUw8BC.js';
3
+ import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-Bi9KB0TN.js';
4
4
  import { z, ZodSchema } from 'zod';
5
+ import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-DtVDdb81.js';
5
6
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
6
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.js';
7
7
  import { MastraTTS } from './tts/index.js';
8
8
  import { MastraVector } from './vector/index.js';
9
9
  import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.js';
@@ -1570,6 +1570,20 @@ interface WorkflowRun {
1570
1570
  updatedAt: Date;
1571
1571
  resourceId?: string;
1572
1572
  }
1573
+ type PaginationArgs = {
1574
+ dateRange?: {
1575
+ start?: Date;
1576
+ end?: Date;
1577
+ };
1578
+ page?: number;
1579
+ perPage?: number;
1580
+ };
1581
+ type PaginationInfo = {
1582
+ total: number;
1583
+ page: number;
1584
+ perPage: number;
1585
+ hasMore: boolean;
1586
+ };
1573
1587
  type StorageGetMessagesArg = {
1574
1588
  threadId: string;
1575
1589
  resourceId?: string;
@@ -1581,6 +1595,7 @@ type StorageGetMessagesArg = {
1581
1595
  withPreviousMessages?: number;
1582
1596
  withNextMessages?: number;
1583
1597
  }[];
1598
+ pagination?: PaginationArgs;
1584
1599
  };
1585
1600
  threadConfig?: MemoryConfig;
1586
1601
  format?: 'v1' | 'v2';
@@ -1660,6 +1675,22 @@ type SharedMemoryConfig = {
1660
1675
  embedder?: EmbeddingModel<string>;
1661
1676
  processors?: MemoryProcessor[];
1662
1677
  };
1678
+ type TraceType = {
1679
+ id: string;
1680
+ parentSpanId: string | null;
1681
+ name: string;
1682
+ traceId: string;
1683
+ scope: string;
1684
+ kind: number;
1685
+ attributes: Record<string, unknown> | null;
1686
+ status: Record<string, unknown> | null;
1687
+ events: Record<string, unknown> | null;
1688
+ links: Record<string, unknown> | null;
1689
+ other: Record<string, unknown> | null;
1690
+ startTime: number;
1691
+ endTime: number;
1692
+ createdAt: Date;
1693
+ };
1663
1694
 
1664
1695
  type MastraMessageContentV2 = {
1665
1696
  format: 2;
@@ -3095,11 +3126,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
3095
3126
  * @returns The network with the specified ID, or undefined if not found
3096
3127
  */
3097
3128
  getNetwork(networkId: string): AgentNetwork | undefined;
3098
- getLogsByRunId({ runId, transportId }: {
3129
+ getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
3099
3130
  runId: string;
3100
3131
  transportId: string;
3101
- }): Promise<any[]>;
3102
- getLogs(transportId: string): Promise<any[]>;
3132
+ fromDate?: Date;
3133
+ toDate?: Date;
3134
+ logLevel?: LogLevel;
3135
+ filters?: Record<string, any>;
3136
+ page?: number;
3137
+ perPage?: number;
3138
+ }): Promise<{
3139
+ logs: BaseLogMessage[];
3140
+ total: number;
3141
+ page: number;
3142
+ perPage: number;
3143
+ hasMore: boolean;
3144
+ }>;
3145
+ getLogs(transportId: string, params?: {
3146
+ fromDate?: Date;
3147
+ toDate?: Date;
3148
+ logLevel?: LogLevel;
3149
+ filters?: Record<string, any>;
3150
+ page?: number;
3151
+ perPage?: number;
3152
+ }): Promise<{
3153
+ logs: BaseLogMessage[];
3154
+ total: number;
3155
+ page: number;
3156
+ perPage: number;
3157
+ hasMore: boolean;
3158
+ }>;
3103
3159
  /**
3104
3160
  * Get all registered MCP server instances.
3105
3161
  * @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
@@ -3337,6 +3393,10 @@ declare abstract class MastraStorage extends MastraBase {
3337
3393
  constructor({ name }: {
3338
3394
  name: string;
3339
3395
  });
3396
+ protected ensureDate(date: Date | string | undefined): Date | undefined;
3397
+ protected serializeDate(date: Date | string | undefined): string | undefined;
3398
+ protected getSqlType(type: StorageColumn['type']): string;
3399
+ protected getDefaultValue(type: StorageColumn['type']): string;
3340
3400
  abstract createTable({ tableName }: {
3341
3401
  tableName: TABLE_NAMES;
3342
3402
  schema: Record<string, StorageColumn>;
@@ -3344,6 +3404,11 @@ declare abstract class MastraStorage extends MastraBase {
3344
3404
  abstract clearTable({ tableName }: {
3345
3405
  tableName: TABLE_NAMES;
3346
3406
  }): Promise<void>;
3407
+ abstract alterTable(args: {
3408
+ tableName: TABLE_NAMES;
3409
+ schema: Record<string, StorageColumn>;
3410
+ ifNotExists: string[];
3411
+ }): Promise<void>;
3347
3412
  abstract insert({ tableName, record }: {
3348
3413
  tableName: TABLE_NAMES;
3349
3414
  record: Record<string, any>;
@@ -3435,4 +3500,4 @@ declare abstract class MastraStorage extends MastraBase {
3435
3500
  }): Promise<WorkflowRun | null>;
3436
3501
  }
3437
3502
 
3438
- export { type StepCondition as $, Agent as A, TABLE_EVALS as B, type CoreTool as C, TABLE_MESSAGES as D, type EvalRow as E, TABLE_THREADS as F, TABLE_TRACES as G, TABLE_SCHEMAS as H, type VariableReference$1 as I, type StepResult$1 as J, type StepAction as K, LegacyWorkflow as L, Mastra as M, type LegacyWorkflowRunResult as N, type WorkflowOptions as O, type StepVariableType as P, type StepNode as Q, type StepGraph as R, type StepExecutionContext as S, type ToolsInput as T, type RetryConfig as U, type VercelTool as V, type WorkflowContext as W, type BaseCondition as X, type ActionContext as Y, WhenConditionReturnValue as Z, type StepDef as _, type MastraPrimitives as a, createStep as a$, type StepConfig as a0, type StepsRecord$1 as a1, type WorkflowLogMessage as a2, type WorkflowEvent as a3, type ResolverFunctionInput as a4, type ResolverFunctionOutput as a5, type SubscriberFunctionOutput as a6, type DependencyCheckOutput as a7, type StepResolverOutput as a8, type WorkflowActors as a9, type StructuredOutputType as aA, type StructuredOutputArrayItem as aB, type StructuredOutput as aC, type GenerateReturn as aD, type StreamReturn as aE, type OutputType as aF, type DefaultLLMTextOptions as aG, type DefaultLLMTextObjectOptions as aH, type DefaultLLMStreamOptions as aI, type DefaultLLMStreamObjectOptions as aJ, type LLMTextOptions as aK, type LLMTextObjectOptions as aL, type LLMStreamOptions as aM, type LLMInnerStreamOptions as aN, type LLMStreamObjectOptions as aO, createMockModel as aP, type Config as aQ, type MessageType as aR, type MessageResponse as aS, type MemoryConfig as aT, type SharedMemoryConfig as aU, type MemoryProcessorOpts as aV, MemoryProcessor as aW, memoryDefaultOptions as aX, type StepFlowEntry as aY, type SerializedStep as aZ, type SerializedStepFlowEntry as a_, type WorkflowActionParams as aa, type WorkflowActions as ab, type LegacyWorkflowState as ac, type StepId as ad, type ExtractSchemaFromStep$1 as ae, type ExtractStepResult as af, type StepInputType as ag, type ExtractSchemaType$1 as ah, type PathsToStringProps$1 as ai, type LegacyWorkflowRunState as aj, type WorkflowResumeResult as ak, Tool as al, createTool as am, type InternalCoreTool as an, type ToolExecutionContext as ao, type AgentConfig as ap, type WorkflowConfig as aq, type LanguageModel as ar, type CoreMessage as as, type CoreSystemMessage as at, type CoreAssistantMessage as au, type CoreUserMessage as av, type CoreToolMessage as aw, type EmbedResult as ax, type EmbedManyResult as ay, type BaseStructuredOutputType as az, MastraMemory as b, cloneStep as b0, createWorkflow as b1, cloneWorkflow as b2, type WorkflowResult as b3, Run as b4, type ExecutionGraph as b5, ExecutionEngine as b6, type ExecuteFunction as b7, type StepSuccess as b8, type StepFailure as b9, type VersionDetail as bA, type ArgumentInfo as bB, type PositionalArgumentInfo as bC, type NamedArgumentInfo as bD, type SubcommandInfo as bE, type CommandInfo as bF, type EnvironmentVariableInfo as bG, type PackageInfo as bH, type RemoteInfo as bI, type MCPServerConfig as bJ, type ServerInfo as bK, type ServerDetailInfo as bL, type MCPToolType as bM, MessageList as bN, type ToolsetsInput as bO, type DynamicArgument as bP, type AgentGenerateOptions as bQ, type AgentStreamOptions as bR, type MastraMessageContentV2 as bS, type StepSuspended as ba, type StepRunning as bb, type StepResult as bc, type StepsRecord as bd, type DynamicMapping as be, type PathsToStringProps as bf, type ExtractSchemaType as bg, type ExtractSchemaFromStep as bh, type VariableReference as bi, type StreamEvent as bj, type WatchEvent as bk, type ZodPathType as bl, type WorkflowRunState as bm, type MastraLanguageModel as bn, type VoiceEventType as bo, type VoiceEventMap as bp, type VoiceConfig as bq, MastraVoice as br, CompositeVoice as bs, DefaultVoice as bt, type AgentNetworkConfig as bu, type ConvertedTool as bv, type MCPServerSSEOptions as bw, type MCPServerHonoSSEOptions as bx, type MCPServerHTTPOptions as by, type Repository as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, TABLE_WORKFLOW_SNAPSHOT as z };
3503
+ export { WhenConditionReturnValue as $, Agent as A, TABLE_WORKFLOW_SNAPSHOT as B, type CoreTool as C, TABLE_EVALS as D, type EvalRow as E, TABLE_MESSAGES as F, TABLE_THREADS as G, TABLE_TRACES as H, TABLE_SCHEMAS as I, type VariableReference$1 as J, type StepResult$1 as K, LegacyWorkflow as L, Mastra as M, type StepAction as N, type LegacyWorkflowRunResult as O, type PaginationArgs as P, type WorkflowOptions as Q, type StepVariableType as R, type StepExecutionContext as S, type ToolsInput as T, type StepNode as U, type VercelTool as V, type WorkflowContext as W, type StepGraph as X, type RetryConfig as Y, type BaseCondition as Z, type ActionContext as _, type MastraPrimitives as a, type StepFlowEntry as a$, type StepDef as a0, type StepCondition as a1, type StepConfig as a2, type StepsRecord$1 as a3, type WorkflowLogMessage as a4, type WorkflowEvent as a5, type ResolverFunctionInput as a6, type ResolverFunctionOutput as a7, type SubscriberFunctionOutput as a8, type DependencyCheckOutput as a9, type EmbedManyResult as aA, type BaseStructuredOutputType as aB, type StructuredOutputType as aC, type StructuredOutputArrayItem as aD, type StructuredOutput as aE, type GenerateReturn as aF, type StreamReturn as aG, type OutputType as aH, type DefaultLLMTextOptions as aI, type DefaultLLMTextObjectOptions as aJ, type DefaultLLMStreamOptions as aK, type DefaultLLMStreamObjectOptions as aL, type LLMTextOptions as aM, type LLMTextObjectOptions as aN, type LLMStreamOptions as aO, type LLMInnerStreamOptions as aP, type LLMStreamObjectOptions as aQ, createMockModel as aR, type Config as aS, type MessageType as aT, type MessageResponse as aU, type MemoryConfig as aV, type SharedMemoryConfig as aW, type TraceType as aX, type MemoryProcessorOpts as aY, MemoryProcessor as aZ, memoryDefaultOptions as a_, type StepResolverOutput as aa, type WorkflowActors as ab, type WorkflowActionParams as ac, type WorkflowActions as ad, type LegacyWorkflowState as ae, type StepId as af, type ExtractSchemaFromStep$1 as ag, type ExtractStepResult as ah, type StepInputType as ai, type ExtractSchemaType$1 as aj, type PathsToStringProps$1 as ak, type LegacyWorkflowRunState as al, type WorkflowResumeResult as am, Tool as an, createTool as ao, type InternalCoreTool as ap, type ToolExecutionContext as aq, type AgentConfig as ar, type WorkflowConfig as as, type LanguageModel as at, type CoreMessage as au, type CoreSystemMessage as av, type CoreAssistantMessage as aw, type CoreUserMessage as ax, type CoreToolMessage as ay, type EmbedResult as az, MastraMemory as b, type SerializedStep as b0, type SerializedStepFlowEntry as b1, createStep as b2, cloneStep as b3, createWorkflow as b4, cloneWorkflow as b5, type WorkflowResult as b6, Run as b7, type ExecutionGraph as b8, ExecutionEngine as b9, type MCPServerHonoSSEOptions as bA, type MCPServerHTTPOptions as bB, type Repository as bC, type VersionDetail as bD, type ArgumentInfo as bE, type PositionalArgumentInfo as bF, type NamedArgumentInfo as bG, type SubcommandInfo as bH, type CommandInfo as bI, type EnvironmentVariableInfo as bJ, type PackageInfo as bK, type RemoteInfo as bL, type MCPServerConfig as bM, type ServerInfo as bN, type ServerDetailInfo as bO, type MCPToolType as bP, MessageList as bQ, type ToolsetsInput as bR, type DynamicArgument as bS, type AgentGenerateOptions as bT, type AgentStreamOptions as bU, type MastraMessageContentV2 as bV, type ExecuteFunction as ba, type StepSuccess as bb, type StepFailure as bc, type StepSuspended as bd, type StepRunning as be, type StepResult as bf, type StepsRecord as bg, type DynamicMapping as bh, type PathsToStringProps as bi, type ExtractSchemaType as bj, type ExtractSchemaFromStep as bk, type VariableReference as bl, type StreamEvent as bm, type WatchEvent as bn, type ZodPathType as bo, type WorkflowRunState as bp, type MastraLanguageModel as bq, type VoiceEventType as br, type VoiceEventMap as bs, type VoiceConfig as bt, MastraVoice as bu, CompositeVoice as bv, DefaultVoice as bw, type AgentNetworkConfig as bx, type ConvertedTool as by, type MCPServerSSEOptions as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, type PaginationInfo as z };
package/dist/base.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
3
+ var chunkP3Q73CAW_cjs = require('./chunk-P3Q73CAW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraBase", {
8
8
  enumerable: true,
9
- get: function () { return chunkVHZPWE5L_cjs.MastraBase; }
9
+ get: function () { return chunkP3Q73CAW_cjs.MastraBase; }
10
10
  });
package/dist/base.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import '@opentelemetry/api';
2
- import './logger-BF2Sn7JX.cjs';
3
- export { M as MastraBase } from './base-BY9WFI65.cjs';
2
+ import './logger-CpL0z5v_.cjs';
3
+ export { M as MastraBase } from './base-CO-L7hF9.cjs';
4
+ import './error/index.cjs';
4
5
  import 'stream';
5
6
  import '@opentelemetry/sdk-trace-base';
package/dist/base.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import '@opentelemetry/api';
2
- import './logger-BF2Sn7JX.js';
3
- export { M as MastraBase } from './base-C0yUw8BC.js';
2
+ import './logger-DtVDdb81.js';
3
+ export { M as MastraBase } from './base-Bi9KB0TN.js';
4
+ import './error/index.js';
4
5
  import 'stream';
5
6
  import '@opentelemetry/sdk-trace-base';
package/dist/base.js CHANGED
@@ -1 +1 @@
1
- export { MastraBase } from './chunk-JOCKZ2US.js';
1
+ export { MastraBase } from './chunk-5IEKR756.js';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkCYJF6U6B_cjs = require('../chunk-CYJF6U6B.cjs');
3
+ var chunkFEYYOBBG_cjs = require('../chunk-FEYYOBBG.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraBundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkCYJF6U6B_cjs.MastraBundler; }
9
+ get: function () { return chunkFEYYOBBG_cjs.MastraBundler; }
10
10
  });
@@ -1,6 +1,7 @@
1
- import { M as MastraBase } from '../base-BY9WFI65.cjs';
1
+ import { M as MastraBase } from '../base-CO-L7hF9.cjs';
2
2
  import '@opentelemetry/api';
3
- import '../logger-BF2Sn7JX.cjs';
3
+ import '../logger-CpL0z5v_.cjs';
4
+ import '../error/index.cjs';
4
5
  import 'stream';
5
6
  import '@opentelemetry/sdk-trace-base';
6
7
 
@@ -1,6 +1,7 @@
1
- import { M as MastraBase } from '../base-C0yUw8BC.js';
1
+ import { M as MastraBase } from '../base-Bi9KB0TN.js';
2
2
  import '@opentelemetry/api';
3
- import '../logger-BF2Sn7JX.js';
3
+ import '../logger-DtVDdb81.js';
4
+ import '../error/index.js';
4
5
  import 'stream';
5
6
  import '@opentelemetry/sdk-trace-base';
6
7
 
@@ -1 +1 @@
1
- export { MastraBundler } from '../chunk-DTJ4KVHM.js';
1
+ export { MastraBundler } from '../chunk-ATXBSEFT.js';
@@ -20,28 +20,31 @@ var MultiLogger = class {
20
20
  error(message, ...args) {
21
21
  this.loggers.forEach((logger) => logger.error(message, ...args));
22
22
  }
23
+ trackException(error) {
24
+ this.loggers.forEach((logger) => logger.trackException(error));
25
+ }
23
26
  getTransports() {
24
27
  const transports = [];
25
28
  this.loggers.forEach((logger) => transports.push(...logger.getTransports().entries()));
26
29
  return new Map(transports);
27
30
  }
28
- async getLogs(transportId) {
31
+ async getLogs(transportId, params) {
29
32
  for (const logger of this.loggers) {
30
- const logs = await logger.getLogs(transportId);
31
- if (logs.length > 0) {
33
+ const logs = await logger.getLogs(transportId, params);
34
+ if (logs.total > 0) {
32
35
  return logs;
33
36
  }
34
37
  }
35
- return [];
38
+ return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
36
39
  }
37
40
  async getLogsByRunId(args) {
38
41
  for (const logger of this.loggers) {
39
42
  const logs = await logger.getLogsByRunId(args);
40
- if (logs.length > 0) {
43
+ if (logs.total > 0) {
41
44
  return logs;
42
45
  }
43
46
  }
44
- return [];
47
+ return { logs: [], total: 0, page: args.page ?? 1, perPage: args.perPage ?? 100, hasMore: false };
45
48
  }
46
49
  };
47
50
 
@@ -58,18 +61,20 @@ var noopLogger = {
58
61
  cleanup: async () => {
59
62
  },
60
63
  getTransports: () => /* @__PURE__ */ new Map(),
61
- getLogs: async () => [],
62
- getLogsByRunId: async () => []
64
+ trackException: () => {
65
+ },
66
+ getLogs: async () => ({ logs: [], total: 0, page: 1, perPage: 100, hasMore: false }),
67
+ getLogsByRunId: async () => ({ logs: [], total: 0, page: 1, perPage: 100, hasMore: false })
63
68
  };
64
69
  var LoggerTransport = class extends stream.Transform {
65
70
  constructor(opts = {}) {
66
71
  super({ ...opts, objectMode: true });
67
72
  }
68
73
  async getLogsByRunId(_args) {
69
- return [];
74
+ return { logs: [], total: 0, page: _args?.page ?? 1, perPage: _args?.perPage ?? 100, hasMore: false };
70
75
  }
71
- async getLogs() {
72
- return [];
76
+ async getLogs(_args) {
77
+ return { logs: [], total: 0, page: _args?.page ?? 1, perPage: _args?.perPage ?? 100, hasMore: false };
73
78
  }
74
79
  };
75
80
 
@@ -211,7 +211,8 @@ var TABLE_SCHEMAS = {
211
211
  content: { type: "text", nullable: false },
212
212
  role: { type: "text", nullable: false },
213
213
  type: { type: "text", nullable: false },
214
- createdAt: { type: "timestamp", nullable: false }
214
+ createdAt: { type: "timestamp", nullable: false },
215
+ resourceId: { type: "text", nullable: true }
215
216
  },
216
217
  [TABLE_TRACES]: {
217
218
  id: { type: "text", nullable: false, primaryKey: true },
@@ -1,4 +1,4 @@
1
- import { RegisteredLogger, ConsoleLogger } from './chunk-XXVGT7SJ.js';
1
+ import { RegisteredLogger, ConsoleLogger } from './chunk-5YDTZN2X.js';
2
2
 
3
3
  // src/base.ts
4
4
  var MastraBase = class {