@mastra/core 0.10.2 → 0.10.4-alpha.0

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 (137) 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-BJBoI-g2.d.cts → base-BURd0RH-.d.cts} +48 -7
  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-BEjkhvZ_.d.ts → base-nFL4giIu.d.ts} +48 -7
  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-3JGO7S6X.cjs → chunk-33LPXZPZ.cjs} +2 -2
  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-DTJ4KVHM.js → chunk-ATXBSEFT.js} +1 -1
  22. package/dist/chunk-BBAQW23O.cjs +68 -0
  23. package/dist/{chunk-OBEALYTK.js → chunk-DO5R43AJ.js} +16 -11
  24. package/dist/{chunk-7AWGDSGR.js → chunk-DU32FMDF.js} +3 -3
  25. package/dist/{chunk-CYJF6U6B.cjs → chunk-FEYYOBBG.cjs} +2 -2
  26. package/dist/{chunk-HZ7ME4LD.cjs → chunk-FFYVLKQW.cjs} +2 -2
  27. package/dist/{chunk-5G3XWKIU.cjs → chunk-FJXOUO3F.cjs} +2 -2
  28. package/dist/{chunk-FGBS7VRU.js → chunk-FNQU5CHU.js} +3 -3
  29. package/dist/{chunk-JBTXWDNO.js → chunk-GEDW7TMB.js} +9 -9
  30. package/dist/{chunk-KUJQVCEL.cjs → chunk-H5IRI46R.cjs} +6 -3
  31. package/dist/{chunk-FLPSXJWQ.js → chunk-HJML6BS7.js} +1 -1
  32. package/dist/{chunk-B2RDYK2X.js → chunk-IG7FGYSW.js} +1 -1
  33. package/dist/{chunk-PMAVDBJY.js → chunk-IM7CLVLZ.js} +1 -1
  34. package/dist/{chunk-XJCP3SLA.js → chunk-JNMQKJH4.js} +1 -1
  35. package/dist/{chunk-WE5ABCZN.js → chunk-KIKYEFSA.js} +3 -3
  36. package/dist/{chunk-VBSKHNCY.cjs → chunk-KQ2KYQLN.cjs} +9 -9
  37. package/dist/{chunk-TAHSAZUN.cjs → chunk-LEK3J7YN.cjs} +2 -2
  38. package/dist/{chunk-TO5645ZP.cjs → chunk-MHN2BI4P.cjs} +25 -25
  39. package/dist/{chunk-VHZPWE5L.cjs → chunk-P3Q73CAW.cjs} +6 -6
  40. package/dist/chunk-PVGSY24V.js +63 -0
  41. package/dist/chunk-QVROTSA5.cjs +408 -0
  42. package/dist/{chunk-SH2C4VTJ.cjs → chunk-QVTGHY2K.cjs} +21 -10
  43. package/dist/{chunk-S4TS74VT.cjs → chunk-RORSYAKV.cjs} +7 -7
  44. package/dist/{chunk-7MWWPVCE.js → chunk-RSN3NZQS.js} +1 -1
  45. package/dist/chunk-TRJIWZKM.js +390 -0
  46. package/dist/{chunk-ZPOETARN.js → chunk-V6I25JEV.js} +1 -1
  47. package/dist/{chunk-SKYO5NFQ.cjs → chunk-VAOBU5SY.cjs} +8 -8
  48. package/dist/{chunk-X6VHQCYN.cjs → chunk-W5I6MEVU.cjs} +2 -2
  49. package/dist/{chunk-JAVP6ACT.js → chunk-YCYAVLYR.js} +4 -1
  50. package/dist/{chunk-TIPFGQCO.js → chunk-YKJZX7TE.js} +18 -7
  51. package/dist/{chunk-RFAN7FAT.cjs → chunk-ZIZ3CVHN.cjs} +32 -9
  52. package/dist/{chunk-PKYG5CWB.cjs → chunk-ZZLBNB3U.cjs} +2 -2
  53. package/dist/deployer/index.cjs +2 -2
  54. package/dist/deployer/index.d.cts +3 -2
  55. package/dist/deployer/index.d.ts +3 -2
  56. package/dist/deployer/index.js +1 -1
  57. package/dist/error/index.cjs +19 -72
  58. package/dist/error/index.d.cts +25 -31
  59. package/dist/error/index.d.ts +25 -31
  60. package/dist/error/index.js +1 -70
  61. package/dist/eval/index.d.cts +4 -3
  62. package/dist/eval/index.d.ts +4 -3
  63. package/dist/index.cjs +45 -45
  64. package/dist/index.d.cts +6 -5
  65. package/dist/index.d.ts +6 -5
  66. package/dist/index.js +13 -13
  67. package/dist/integration/index.d.cts +4 -3
  68. package/dist/integration/index.d.ts +4 -3
  69. package/dist/llm/index.d.cts +4 -3
  70. package/dist/llm/index.d.ts +4 -3
  71. package/dist/logger/index.cjs +10 -10
  72. package/dist/logger/index.d.cts +60 -7
  73. package/dist/logger/index.d.ts +60 -7
  74. package/dist/logger/index.js +2 -2
  75. package/dist/logger-CpL0z5v_.d.cts +158 -0
  76. package/dist/logger-DtVDdb81.d.ts +158 -0
  77. package/dist/mastra/index.cjs +2 -2
  78. package/dist/mastra/index.d.cts +5 -4
  79. package/dist/mastra/index.d.ts +5 -4
  80. package/dist/mastra/index.js +1 -1
  81. package/dist/mcp/index.cjs +4 -4
  82. package/dist/mcp/index.d.cts +5 -4
  83. package/dist/mcp/index.d.ts +5 -4
  84. package/dist/mcp/index.js +3 -3
  85. package/dist/memory/index.cjs +4 -4
  86. package/dist/memory/index.d.cts +4 -3
  87. package/dist/memory/index.d.ts +4 -3
  88. package/dist/memory/index.js +1 -1
  89. package/dist/network/index.cjs +6 -6
  90. package/dist/network/index.d.cts +4 -3
  91. package/dist/network/index.d.ts +4 -3
  92. package/dist/network/index.js +3 -3
  93. package/dist/relevance/index.cjs +4 -4
  94. package/dist/relevance/index.d.cts +5 -4
  95. package/dist/relevance/index.d.ts +5 -4
  96. package/dist/relevance/index.js +1 -1
  97. package/dist/server/index.cjs +2 -2
  98. package/dist/server/index.d.cts +5 -4
  99. package/dist/server/index.d.ts +5 -4
  100. package/dist/server/index.js +1 -1
  101. package/dist/storage/index.cjs +5 -5
  102. package/dist/storage/index.d.cts +6 -5
  103. package/dist/storage/index.d.ts +6 -5
  104. package/dist/storage/index.js +3 -3
  105. package/dist/telemetry/index.d.cts +4 -3
  106. package/dist/telemetry/index.d.ts +4 -3
  107. package/dist/tools/index.d.cts +6 -5
  108. package/dist/tools/index.d.ts +6 -5
  109. package/dist/tts/index.cjs +2 -2
  110. package/dist/tts/index.d.cts +3 -2
  111. package/dist/tts/index.d.ts +3 -2
  112. package/dist/tts/index.js +1 -1
  113. package/dist/utils.cjs +14 -14
  114. package/dist/utils.d.cts +4 -3
  115. package/dist/utils.d.ts +4 -3
  116. package/dist/utils.js +1 -1
  117. package/dist/vector/index.cjs +2 -2
  118. package/dist/vector/index.d.cts +3 -2
  119. package/dist/vector/index.d.ts +3 -2
  120. package/dist/vector/index.js +1 -1
  121. package/dist/voice/index.cjs +4 -4
  122. package/dist/voice/index.d.cts +4 -3
  123. package/dist/voice/index.d.ts +4 -3
  124. package/dist/voice/index.js +1 -1
  125. package/dist/workflows/index.cjs +9 -9
  126. package/dist/workflows/index.d.cts +5 -4
  127. package/dist/workflows/index.d.ts +5 -4
  128. package/dist/workflows/index.js +1 -1
  129. package/dist/workflows/legacy/index.cjs +22 -22
  130. package/dist/workflows/legacy/index.d.cts +5 -4
  131. package/dist/workflows/legacy/index.d.ts +5 -4
  132. package/dist/workflows/legacy/index.js +1 -1
  133. package/package.json +9 -10
  134. package/dist/chunk-WWLMZIHW.cjs +0 -995
  135. package/dist/chunk-Y5BGCPNZ.js +0 -977
  136. package/dist/logger-BF2Sn7JX.d.cts +0 -79
  137. package/dist/logger-BF2Sn7JX.d.ts +0 -79
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkTO5645ZP_cjs = require('../chunk-TO5645ZP.cjs');
4
- var chunkKUJQVCEL_cjs = require('../chunk-KUJQVCEL.cjs');
3
+ var chunkMHN2BI4P_cjs = require('../chunk-MHN2BI4P.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 chunkTO5645ZP_cjs.Agent; }
10
+ get: function () { return chunkMHN2BI4P_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "MessageList", {
13
13
  enumerable: true,
14
- get: function () { return chunkKUJQVCEL_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-BJBoI-g2.cjs';
5
- import '../base-BY9WFI65.cjs';
4
+ export { A as Agent, ar as AgentConfig, bS as AgentGenerateOptions, bT as AgentStreamOptions, bR as DynamicArgument, bp as MastraLanguageModel, bU as MastraMessageContentV2, s as MastraMessageV2, bP as MessageList, T as ToolsInput, bQ as ToolsetsInput } from '../base-BURd0RH-.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-BEjkhvZ_.js';
5
- import '../base-C0yUw8BC.js';
4
+ export { A as Agent, ar as AgentConfig, bS as AgentGenerateOptions, bT as AgentStreamOptions, bR as DynamicArgument, bp as MastraLanguageModel, bU as MastraMessageContentV2, s as MastraMessageV2, bP as MessageList, T as ToolsInput, bQ as ToolsetsInput } from '../base-nFL4giIu.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-JBTXWDNO.js';
2
- export { MessageList } from '../chunk-JAVP6ACT.js';
1
+ export { Agent } from '../chunk-GEDW7TMB.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';
@@ -1680,7 +1695,7 @@ type MastraMessageV2 = {
1680
1695
  type?: string;
1681
1696
  };
1682
1697
  type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
1683
- type MessageSource = 'memory' | 'response' | 'user' | 'system';
1698
+ type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
1684
1699
  declare class MessageList {
1685
1700
  private messages;
1686
1701
  private systemMessages;
@@ -1689,6 +1704,7 @@ declare class MessageList {
1689
1704
  private memoryMessages;
1690
1705
  private newUserMessages;
1691
1706
  private newResponseMessages;
1707
+ private userContextMessages;
1692
1708
  private generateMessageId?;
1693
1709
  constructor({ threadId, resourceId, generateMessageId, }?: {
1694
1710
  threadId?: string;
@@ -3094,11 +3110,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
3094
3110
  * @returns The network with the specified ID, or undefined if not found
3095
3111
  */
3096
3112
  getNetwork(networkId: string): AgentNetwork | undefined;
3097
- getLogsByRunId({ runId, transportId }: {
3113
+ getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
3098
3114
  runId: string;
3099
3115
  transportId: string;
3100
- }): Promise<any[]>;
3101
- getLogs(transportId: string): Promise<any[]>;
3116
+ fromDate?: Date;
3117
+ toDate?: Date;
3118
+ logLevel?: LogLevel;
3119
+ filters?: Record<string, any>;
3120
+ page?: number;
3121
+ perPage?: number;
3122
+ }): Promise<{
3123
+ logs: BaseLogMessage[];
3124
+ total: number;
3125
+ page: number;
3126
+ perPage: number;
3127
+ hasMore: boolean;
3128
+ }>;
3129
+ getLogs(transportId: string, params?: {
3130
+ fromDate?: Date;
3131
+ toDate?: Date;
3132
+ logLevel?: LogLevel;
3133
+ filters?: Record<string, any>;
3134
+ page?: number;
3135
+ perPage?: number;
3136
+ }): Promise<{
3137
+ logs: BaseLogMessage[];
3138
+ total: number;
3139
+ page: number;
3140
+ perPage: number;
3141
+ hasMore: boolean;
3142
+ }>;
3102
3143
  /**
3103
3144
  * Get all registered MCP server instances.
3104
3145
  * @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
@@ -3434,4 +3475,4 @@ declare abstract class MastraStorage extends MastraBase {
3434
3475
  }): Promise<WorkflowRun | null>;
3435
3476
  }
3436
3477
 
3437
- 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 };
3478
+ 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 SerializedStep 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 MemoryProcessorOpts as aX, MemoryProcessor as aY, memoryDefaultOptions as aZ, type StepFlowEntry 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 SerializedStepFlowEntry as b0, createStep as b1, cloneStep as b2, createWorkflow as b3, cloneWorkflow as b4, type WorkflowResult as b5, Run as b6, type ExecutionGraph as b7, ExecutionEngine as b8, type ExecuteFunction as b9, type MCPServerHTTPOptions as bA, type Repository as bB, type VersionDetail as bC, type ArgumentInfo as bD, type PositionalArgumentInfo as bE, type NamedArgumentInfo as bF, type SubcommandInfo as bG, type CommandInfo as bH, type EnvironmentVariableInfo as bI, type PackageInfo as bJ, type RemoteInfo as bK, type MCPServerConfig as bL, type ServerInfo as bM, type ServerDetailInfo as bN, type MCPToolType as bO, MessageList as bP, type ToolsetsInput as bQ, type DynamicArgument as bR, type AgentGenerateOptions as bS, type AgentStreamOptions as bT, type MastraMessageContentV2 as bU, type StepSuccess as ba, type StepFailure as bb, type StepSuspended as bc, type StepRunning as bd, type StepResult as be, type StepsRecord as bf, type DynamicMapping as bg, type PathsToStringProps as bh, type ExtractSchemaType as bi, type ExtractSchemaFromStep as bj, type VariableReference as bk, type StreamEvent as bl, type WatchEvent as bm, type ZodPathType as bn, type WorkflowRunState as bo, type MastraLanguageModel as bp, type VoiceEventType as bq, type VoiceEventMap as br, type VoiceConfig as bs, MastraVoice as bt, CompositeVoice as bu, DefaultVoice as bv, type AgentNetworkConfig as bw, type ConvertedTool as bx, type MCPServerSSEOptions as by, type MCPServerHonoSSEOptions 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';
@@ -1680,7 +1695,7 @@ type MastraMessageV2 = {
1680
1695
  type?: string;
1681
1696
  };
1682
1697
  type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
1683
- type MessageSource = 'memory' | 'response' | 'user' | 'system';
1698
+ type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
1684
1699
  declare class MessageList {
1685
1700
  private messages;
1686
1701
  private systemMessages;
@@ -1689,6 +1704,7 @@ declare class MessageList {
1689
1704
  private memoryMessages;
1690
1705
  private newUserMessages;
1691
1706
  private newResponseMessages;
1707
+ private userContextMessages;
1692
1708
  private generateMessageId?;
1693
1709
  constructor({ threadId, resourceId, generateMessageId, }?: {
1694
1710
  threadId?: string;
@@ -3094,11 +3110,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
3094
3110
  * @returns The network with the specified ID, or undefined if not found
3095
3111
  */
3096
3112
  getNetwork(networkId: string): AgentNetwork | undefined;
3097
- getLogsByRunId({ runId, transportId }: {
3113
+ getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
3098
3114
  runId: string;
3099
3115
  transportId: string;
3100
- }): Promise<any[]>;
3101
- getLogs(transportId: string): Promise<any[]>;
3116
+ fromDate?: Date;
3117
+ toDate?: Date;
3118
+ logLevel?: LogLevel;
3119
+ filters?: Record<string, any>;
3120
+ page?: number;
3121
+ perPage?: number;
3122
+ }): Promise<{
3123
+ logs: BaseLogMessage[];
3124
+ total: number;
3125
+ page: number;
3126
+ perPage: number;
3127
+ hasMore: boolean;
3128
+ }>;
3129
+ getLogs(transportId: string, params?: {
3130
+ fromDate?: Date;
3131
+ toDate?: Date;
3132
+ logLevel?: LogLevel;
3133
+ filters?: Record<string, any>;
3134
+ page?: number;
3135
+ perPage?: number;
3136
+ }): Promise<{
3137
+ logs: BaseLogMessage[];
3138
+ total: number;
3139
+ page: number;
3140
+ perPage: number;
3141
+ hasMore: boolean;
3142
+ }>;
3102
3143
  /**
3103
3144
  * Get all registered MCP server instances.
3104
3145
  * @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
@@ -3434,4 +3475,4 @@ declare abstract class MastraStorage extends MastraBase {
3434
3475
  }): Promise<WorkflowRun | null>;
3435
3476
  }
3436
3477
 
3437
- 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 };
3478
+ 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 SerializedStep 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 MemoryProcessorOpts as aX, MemoryProcessor as aY, memoryDefaultOptions as aZ, type StepFlowEntry 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 SerializedStepFlowEntry as b0, createStep as b1, cloneStep as b2, createWorkflow as b3, cloneWorkflow as b4, type WorkflowResult as b5, Run as b6, type ExecutionGraph as b7, ExecutionEngine as b8, type ExecuteFunction as b9, type MCPServerHTTPOptions as bA, type Repository as bB, type VersionDetail as bC, type ArgumentInfo as bD, type PositionalArgumentInfo as bE, type NamedArgumentInfo as bF, type SubcommandInfo as bG, type CommandInfo as bH, type EnvironmentVariableInfo as bI, type PackageInfo as bJ, type RemoteInfo as bK, type MCPServerConfig as bL, type ServerInfo as bM, type ServerDetailInfo as bN, type MCPToolType as bO, MessageList as bP, type ToolsetsInput as bQ, type DynamicArgument as bR, type AgentGenerateOptions as bS, type AgentStreamOptions as bT, type MastraMessageContentV2 as bU, type StepSuccess as ba, type StepFailure as bb, type StepSuspended as bc, type StepRunning as bd, type StepResult as be, type StepsRecord as bf, type DynamicMapping as bg, type PathsToStringProps as bh, type ExtractSchemaType as bi, type ExtractSchemaFromStep as bj, type VariableReference as bk, type StreamEvent as bl, type WatchEvent as bm, type ZodPathType as bn, type WorkflowRunState as bo, type MastraLanguageModel as bp, type VoiceEventType as bq, type VoiceEventMap as br, type VoiceConfig as bs, MastraVoice as bt, CompositeVoice as bu, DefaultVoice as bv, type AgentNetworkConfig as bw, type ConvertedTool as bx, type MCPServerSSEOptions as by, type MCPServerHonoSSEOptions 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
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
4
- var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
4
+ var chunkP3Q73CAW_cjs = require('./chunk-P3Q73CAW.cjs');
5
5
  var chunkRWTSGWWL_cjs = require('./chunk-RWTSGWWL.cjs');
6
6
 
7
7
  // src/voice/voice.ts
@@ -10,7 +10,7 @@ _MastraVoice_decorators = [chunkTICDQWVJ_cjs.InstrumentClass({
10
10
  prefix: "voice",
11
11
  excludeMethods: ["__setTools", "__setLogger", "__setTelemetry", "#log"]
12
12
  })];
13
- exports.MastraVoice = class MastraVoice extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
13
+ exports.MastraVoice = class MastraVoice extends (_a = chunkP3Q73CAW_cjs.MastraBase) {
14
14
  listeningModel;
15
15
  speechModel;
16
16
  speaker;
@@ -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 {
@@ -36,17 +36,40 @@ var MastraLogger = class {
36
36
  getTransports() {
37
37
  return this.transports;
38
38
  }
39
- async getLogs(transportId) {
39
+ trackException(_error) {
40
+ }
41
+ async getLogs(transportId, params) {
40
42
  if (!transportId || !this.transports.has(transportId)) {
41
- return [];
43
+ return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
42
44
  }
43
- return this.transports.get(transportId).getLogs() ?? [];
45
+ return this.transports.get(transportId).getLogs(params) ?? {
46
+ logs: [],
47
+ total: 0,
48
+ page: params?.page ?? 1,
49
+ perPage: params?.perPage ?? 100,
50
+ hasMore: false
51
+ };
44
52
  }
45
- async getLogsByRunId({ transportId, runId }) {
53
+ async getLogsByRunId({
54
+ transportId,
55
+ runId,
56
+ fromDate,
57
+ toDate,
58
+ logLevel,
59
+ filters,
60
+ page,
61
+ perPage
62
+ }) {
46
63
  if (!transportId || !this.transports.has(transportId) || !runId) {
47
- return [];
64
+ return { logs: [], total: 0, page: page ?? 1, perPage: perPage ?? 100, hasMore: false };
48
65
  }
49
- return this.transports.get(transportId).getLogsByRunId({ runId }) ?? [];
66
+ return this.transports.get(transportId).getLogsByRunId({ runId, fromDate, toDate, logLevel, filters, page, perPage }) ?? {
67
+ logs: [],
68
+ total: 0,
69
+ page: page ?? 1,
70
+ perPage: perPage ?? 100,
71
+ hasMore: false
72
+ };
50
73
  }
51
74
  };
52
75
 
@@ -80,11 +103,11 @@ var ConsoleLogger = class extends MastraLogger {
80
103
  console.error(message, ...args);
81
104
  }
82
105
  }
83
- async getLogs(_transportId) {
84
- return [];
106
+ async getLogs(_transportId, _params) {
107
+ return { logs: [], total: 0, page: _params?.page ?? 1, perPage: _params?.perPage ?? 100, hasMore: false };
85
108
  }
86
109
  async getLogsByRunId(_args) {
87
- return [];
110
+ return { logs: [], total: 0, page: _args.page ?? 1, perPage: _args.perPage ?? 100, hasMore: false };
88
111
  }
89
112
  };
90
113
 
@@ -1,4 +1,4 @@
1
- import { MastraBase } from './chunk-JOCKZ2US.js';
1
+ import { MastraBase } from './chunk-5IEKR756.js';
2
2
  import { readFile } from 'fs/promises';
3
3
  import { parse } from 'dotenv';
4
4