@mastra/core 0.10.2-alpha.4 → 0.10.2-alpha.5

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 (131) hide show
  1. package/dist/agent/index.cjs +4 -4
  2. package/dist/agent/index.d.cts +3 -3
  3. package/dist/agent/index.d.ts +3 -3
  4. package/dist/agent/index.js +2 -2
  5. package/dist/{base-aPYtPBT2.d.cts → base-BY9WFI65.d.cts} +1 -1
  6. package/dist/{base-tc5kgDTD.d.ts → base-C0yUw8BC.d.ts} +1 -1
  7. package/dist/{base-CJfljebX.d.ts → base-Cgbao62E.d.ts} +32 -5
  8. package/dist/{base-D3nqrhQw.d.cts → base-CirJSyr2.d.cts} +32 -5
  9. package/dist/base.cjs +2 -2
  10. package/dist/base.d.cts +2 -2
  11. package/dist/base.d.ts +2 -2
  12. package/dist/base.js +1 -1
  13. package/dist/bundler/index.cjs +2 -2
  14. package/dist/bundler/index.d.cts +2 -2
  15. package/dist/bundler/index.d.ts +2 -2
  16. package/dist/bundler/index.js +1 -1
  17. package/dist/{chunk-4YCQPROE.js → chunk-24D3CMWO.js} +4 -4
  18. package/dist/{chunk-EQTIDVPN.js → chunk-26WUL725.js} +1 -1
  19. package/dist/{chunk-WCGRF63O.js → chunk-2AFAKGJ4.js} +6 -6
  20. package/dist/{chunk-E4PVJAEL.cjs → chunk-3JGO7S6X.cjs} +2 -2
  21. package/dist/{chunk-3YEDPVNU.js → chunk-6NJLWXMZ.js} +1 -1
  22. package/dist/{chunk-MSJ24XNY.js → chunk-7MWWPVCE.js} +1 -1
  23. package/dist/{chunk-TMPFLJLG.cjs → chunk-CYJF6U6B.cjs} +2 -2
  24. package/dist/{chunk-JW5TMK2L.js → chunk-DTJ4KVHM.js} +1 -1
  25. package/dist/{chunk-ZJYHZO6Y.js → chunk-DXK4HYTL.js} +3 -3
  26. package/dist/{chunk-KSJGZAMN.js → chunk-FLPSXJWQ.js} +1 -1
  27. package/dist/{chunk-RMTG7VWR.js → chunk-GNJ7CAHY.js} +1 -1
  28. package/dist/{chunk-4ETGZJWF.cjs → chunk-HZ7ME4LD.cjs} +2 -2
  29. package/dist/{chunk-BCFBT6AN.cjs → chunk-II7UBNGM.cjs} +2 -2
  30. package/dist/{chunk-EZDS6FFZ.cjs → chunk-IJWOVA22.cjs} +23 -23
  31. package/dist/{chunk-FI7R232B.js → chunk-JOCKZ2US.js} +1 -1
  32. package/dist/{chunk-Q5L522HN.js → chunk-LKO4XMRH.js} +3 -3
  33. package/dist/{chunk-U47X2EYV.js → chunk-MWU2UKZI.js} +56 -41
  34. package/dist/{chunk-SE4RJNUA.cjs → chunk-P5XIIDTT.cjs} +10 -10
  35. package/dist/{chunk-OB2PB6SX.cjs → chunk-PBHXIWAK.cjs} +58 -43
  36. package/dist/{chunk-CWSFP2HS.cjs → chunk-PKYG5CWB.cjs} +2 -2
  37. package/dist/{chunk-LHRZV5VG.js → chunk-PMAVDBJY.js} +1 -1
  38. package/dist/{chunk-I5OLBJ26.cjs → chunk-PNPMKRS2.cjs} +9 -9
  39. package/dist/{chunk-SWW4EBUZ.cjs → chunk-RFAN7FAT.cjs} +1 -0
  40. package/dist/{chunk-PD6WZC42.cjs → chunk-SH2C4VTJ.cjs} +3 -3
  41. package/dist/{chunk-52MCT5OL.cjs → chunk-SMPHOXU3.cjs} +7 -7
  42. package/dist/{chunk-PIZM25KI.cjs → chunk-TAHSAZUN.cjs} +2 -2
  43. package/dist/{chunk-L5ADXH5Q.js → chunk-TIPFGQCO.js} +1 -1
  44. package/dist/{chunk-DXLVS7ML.cjs → chunk-TN3TNMXO.cjs} +3 -3
  45. package/dist/{chunk-YEULQPUY.cjs → chunk-VHZPWE5L.cjs} +6 -6
  46. package/dist/{chunk-U3XKEE2T.cjs → chunk-X6VHQCYN.cjs} +2 -2
  47. package/dist/{chunk-2NTUAUGH.js → chunk-XJCP3SLA.js} +1 -1
  48. package/dist/{chunk-VHLL4AZK.js → chunk-XXVGT7SJ.js} +1 -0
  49. package/dist/{chunk-RK6DHZUA.cjs → chunk-YZB2YQ63.cjs} +2 -2
  50. package/dist/{chunk-JU3LCRM2.js → chunk-ZPOETARN.js} +1 -1
  51. package/dist/deployer/index.cjs +2 -2
  52. package/dist/deployer/index.d.cts +2 -2
  53. package/dist/deployer/index.d.ts +2 -2
  54. package/dist/deployer/index.js +1 -1
  55. package/dist/eval/index.d.cts +3 -3
  56. package/dist/eval/index.d.ts +3 -3
  57. package/dist/index.cjs +51 -51
  58. package/dist/index.d.cts +5 -5
  59. package/dist/index.d.ts +5 -5
  60. package/dist/index.js +15 -15
  61. package/dist/integration/index.cjs +3 -3
  62. package/dist/integration/index.d.cts +3 -3
  63. package/dist/integration/index.d.ts +3 -3
  64. package/dist/integration/index.js +1 -1
  65. package/dist/llm/index.d.cts +3 -3
  66. package/dist/llm/index.d.ts +3 -3
  67. package/dist/logger/index.cjs +6 -6
  68. package/dist/logger/index.d.cts +2 -2
  69. package/dist/logger/index.d.ts +2 -2
  70. package/dist/logger/index.js +1 -1
  71. package/dist/{logger-EhZkzZOr.d.cts → logger-BF2Sn7JX.d.cts} +1 -0
  72. package/dist/{logger-EhZkzZOr.d.ts → logger-BF2Sn7JX.d.ts} +1 -0
  73. package/dist/mastra/index.cjs +2 -2
  74. package/dist/mastra/index.d.cts +3 -3
  75. package/dist/mastra/index.d.ts +3 -3
  76. package/dist/mastra/index.js +1 -1
  77. package/dist/mcp/index.cjs +4 -4
  78. package/dist/mcp/index.d.cts +3 -3
  79. package/dist/mcp/index.d.ts +3 -3
  80. package/dist/mcp/index.js +2 -2
  81. package/dist/memory/index.cjs +4 -4
  82. package/dist/memory/index.d.cts +3 -3
  83. package/dist/memory/index.d.ts +3 -3
  84. package/dist/memory/index.js +1 -1
  85. package/dist/network/index.cjs +8 -8
  86. package/dist/network/index.d.cts +3 -3
  87. package/dist/network/index.d.ts +3 -3
  88. package/dist/network/index.js +4 -4
  89. package/dist/relevance/index.cjs +4 -4
  90. package/dist/relevance/index.d.cts +3 -3
  91. package/dist/relevance/index.d.ts +3 -3
  92. package/dist/relevance/index.js +1 -1
  93. package/dist/server/index.cjs +34 -0
  94. package/dist/server/index.d.cts +4 -4
  95. package/dist/server/index.d.ts +4 -4
  96. package/dist/server/index.js +35 -1
  97. package/dist/storage/index.cjs +5 -5
  98. package/dist/storage/index.d.cts +4 -4
  99. package/dist/storage/index.d.ts +4 -4
  100. package/dist/storage/index.js +3 -3
  101. package/dist/telemetry/index.d.cts +3 -3
  102. package/dist/telemetry/index.d.ts +3 -3
  103. package/dist/tools/index.cjs +4 -4
  104. package/dist/tools/index.d.cts +3 -3
  105. package/dist/tools/index.d.ts +3 -3
  106. package/dist/tools/index.js +1 -1
  107. package/dist/tts/index.cjs +2 -2
  108. package/dist/tts/index.d.cts +2 -2
  109. package/dist/tts/index.d.ts +2 -2
  110. package/dist/tts/index.js +1 -1
  111. package/dist/utils.cjs +15 -15
  112. package/dist/utils.d.cts +3 -3
  113. package/dist/utils.d.ts +3 -3
  114. package/dist/utils.js +1 -1
  115. package/dist/vector/index.cjs +2 -2
  116. package/dist/vector/index.d.cts +2 -2
  117. package/dist/vector/index.d.ts +2 -2
  118. package/dist/vector/index.js +1 -1
  119. package/dist/voice/index.cjs +4 -4
  120. package/dist/voice/index.d.cts +3 -3
  121. package/dist/voice/index.d.ts +3 -3
  122. package/dist/voice/index.js +1 -1
  123. package/dist/workflows/index.cjs +9 -9
  124. package/dist/workflows/index.d.cts +4 -4
  125. package/dist/workflows/index.d.ts +4 -4
  126. package/dist/workflows/index.js +1 -1
  127. package/dist/workflows/legacy/index.cjs +22 -22
  128. package/dist/workflows/legacy/index.d.cts +4 -4
  129. package/dist/workflows/legacy/index.d.ts +4 -4
  130. package/dist/workflows/legacy/index.js +1 -1
  131. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkEZDS6FFZ_cjs = require('../chunk-EZDS6FFZ.cjs');
4
- var chunkOB2PB6SX_cjs = require('../chunk-OB2PB6SX.cjs');
3
+ var chunkIJWOVA22_cjs = require('../chunk-IJWOVA22.cjs');
4
+ var chunkPBHXIWAK_cjs = require('../chunk-PBHXIWAK.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkEZDS6FFZ_cjs.Agent; }
10
+ get: function () { return chunkIJWOVA22_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "MessageList", {
13
13
  enumerable: true,
14
- get: function () { return chunkOB2PB6SX_cjs.MessageList; }
14
+ get: function () { return chunkPBHXIWAK_cjs.MessageList; }
15
15
  });
@@ -1,11 +1,11 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { s as Agent, ab as AgentConfig, bN as AgentGenerateOptions, bO as AgentStreamOptions, bM as DynamicArgument, bh as MastraLanguageModel, bP as MastraMessageContentV2, e as MastraMessageV2, bK as MessageList, u as ToolsInput, bL as ToolsetsInput } from '../base-D3nqrhQw.cjs';
5
- import '../base-aPYtPBT2.cjs';
4
+ export { u as Agent, ad as AgentConfig, bP as AgentGenerateOptions, bQ as AgentStreamOptions, bO as DynamicArgument, bj as MastraLanguageModel, bR as MastraMessageContentV2, g as MastraMessageV2, bM as MessageList, w as ToolsInput, bN as ToolsetsInput } from '../base-CirJSyr2.cjs';
5
+ import '../base-BY9WFI65.cjs';
6
6
  import '../types-Bo1uigWx.cjs';
7
7
  import '../runtime-context/index.cjs';
8
- import '../logger-EhZkzZOr.cjs';
8
+ import '../logger-BF2Sn7JX.cjs';
9
9
  import 'stream';
10
10
  import '../tts/index.cjs';
11
11
  import '@opentelemetry/api';
@@ -1,11 +1,11 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { s as Agent, ab as AgentConfig, bN as AgentGenerateOptions, bO as AgentStreamOptions, bM as DynamicArgument, bh as MastraLanguageModel, bP as MastraMessageContentV2, e as MastraMessageV2, bK as MessageList, u as ToolsInput, bL as ToolsetsInput } from '../base-CJfljebX.js';
5
- import '../base-tc5kgDTD.js';
4
+ export { u as Agent, ad as AgentConfig, bP as AgentGenerateOptions, bQ as AgentStreamOptions, bO as DynamicArgument, bj as MastraLanguageModel, bR as MastraMessageContentV2, g as MastraMessageV2, bM as MessageList, w as ToolsInput, bN as ToolsetsInput } from '../base-Cgbao62E.js';
5
+ import '../base-C0yUw8BC.js';
6
6
  import '../types-Bo1uigWx.js';
7
7
  import '../runtime-context/index.js';
8
- import '../logger-EhZkzZOr.js';
8
+ import '../logger-BF2Sn7JX.js';
9
9
  import 'stream';
10
10
  import '../tts/index.js';
11
11
  import '@opentelemetry/api';
@@ -1,2 +1,2 @@
1
- export { Agent } from '../chunk-WCGRF63O.js';
2
- export { MessageList } from '../chunk-U47X2EYV.js';
1
+ export { Agent } from '../chunk-2AFAKGJ4.js';
2
+ export { MessageList } from '../chunk-MWU2UKZI.js';
@@ -1,6 +1,6 @@
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-EhZkzZOr.cjs';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.cjs';
4
4
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
@@ -1,6 +1,6 @@
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-EhZkzZOr.js';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.js';
4
4
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
@@ -1,9 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$1, Schema, ToolExecutionOptions, 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-tc5kgDTD.js';
3
+ import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-C0yUw8BC.js';
4
4
  import { z, ZodSchema } from 'zod';
5
5
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
6
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-EhZkzZOr.js';
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';
@@ -14,7 +14,7 @@ import * as xstate from 'xstate';
14
14
  import { Snapshot } from 'xstate';
15
15
  import EventEmitter from 'node:events';
16
16
  import * as http from 'node:http';
17
- import { Context, Handler, MiddlewareHandler, HonoRequest } from 'hono';
17
+ import { Context, HonoRequest, Handler, MiddlewareHandler } from 'hono';
18
18
  import EventEmitter$1 from 'events';
19
19
  import { EMITTER_SYMBOL } from './workflows/constants.js';
20
20
  import { MockLanguageModelV1 } from 'ai/test';
@@ -2861,6 +2861,29 @@ declare abstract class MCPServerBase extends MastraBase {
2861
2861
  }): Promise<any>;
2862
2862
  }
2863
2863
 
2864
+ interface MastraAuthProviderOptions<TUser = unknown> {
2865
+ name?: string;
2866
+ authorizeUser?: (user: TUser, request: HonoRequest) => Promise<boolean> | boolean;
2867
+ }
2868
+ declare abstract class MastraAuthProvider<TUser = unknown> extends MastraBase {
2869
+ constructor(options?: MastraAuthProviderOptions<TUser>);
2870
+ /**
2871
+ * Authenticate a token and return the payload
2872
+ * @param token - The token to authenticate
2873
+ * @param request - The request
2874
+ * @returns The payload
2875
+ */
2876
+ abstract authenticateToken(token: string, request: HonoRequest): Promise<TUser | null>;
2877
+ /**
2878
+ * Authorize a user for a path and method
2879
+ * @param user - The user to authorize
2880
+ * @param request - The request
2881
+ * @returns The authorization result
2882
+ */
2883
+ abstract authorizeUser(user: TUser, request: HonoRequest): Promise<boolean> | boolean;
2884
+ protected registerOptions(opts?: MastraAuthProviderOptions<TUser>): void;
2885
+ }
2886
+
2864
2887
  type Methods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'ALL';
2865
2888
  type ApiRoute = {
2866
2889
  path: string;
@@ -2888,6 +2911,10 @@ type ContextWithMastra = Context<{
2888
2911
  };
2889
2912
  }>;
2890
2913
  type MastraAuthConfig<TUser = unknown> = {
2914
+ /**
2915
+ * Protected paths for the server
2916
+ */
2917
+ protected?: (RegExp | string | [string, Methods | Methods[]])[];
2891
2918
  /**
2892
2919
  * Public paths for the server
2893
2920
  */
@@ -2978,7 +3005,7 @@ type ServerConfig = {
2978
3005
  /**
2979
3006
  * Authentication configuration for the server
2980
3007
  */
2981
- experimental_auth?: MastraAuthConfig<any>;
3008
+ experimental_auth?: MastraAuthConfig<any> | MastraAuthProvider<any>;
2982
3009
  };
2983
3010
 
2984
3011
  interface Config<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TLegacyWorkflows extends Record<string, LegacyWorkflow> = Record<string, LegacyWorkflow>, TWorkflows extends Record<string, Workflow> = Record<string, Workflow>, TVectors extends Record<string, MastraVector> = Record<string, MastraVector>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TNetworks extends Record<string, AgentNetwork> = Record<string, AgentNetwork>, TMCPServers extends Record<string, MCPServerBase> = Record<string, MCPServerBase>> {
@@ -3402,4 +3429,4 @@ declare abstract class MastraStorage extends MastraBase {
3402
3429
  }): Promise<WorkflowRun | null>;
3403
3430
  }
3404
3431
 
3405
- export { type WorkflowActionParams as $, type ApiRoute as A, type StepNode as B, type ContextWithMastra as C, type StepGraph as D, type EvalRow as E, type BaseCondition as F, type ActionContext as G, WhenConditionReturnValue as H, type StepDef as I, type StepCondition as J, type StepConfig as K, type LegacyWorkflowRuns as L, type Methods as M, type StepsRecord$1 as N, type WorkflowLogMessage as O, type WorkflowEvent as P, type ResolverFunctionInput as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type ResolverFunctionOutput as U, type VariableReference$1 as V, type WorkflowRuns as W, type SubscriberFunctionOutput as X, type DependencyCheckOutput as Y, type StepResolverOutput as Z, type WorkflowActors as _, Mastra as a, Run as a$, type WorkflowActions as a0, type LegacyWorkflowState as a1, type StepId as a2, type ExtractSchemaFromStep$1 as a3, type ExtractStepResult as a4, type StepInputType as a5, type ExtractSchemaType$1 as a6, type PathsToStringProps$1 as a7, type LegacyWorkflowRunState as a8, type WorkflowResumeResult as a9, type DefaultLLMStreamObjectOptions as aA, type LLMTextOptions as aB, type LLMTextObjectOptions as aC, type LLMStreamOptions as aD, type LLMInnerStreamOptions as aE, type LLMStreamObjectOptions as aF, createMockModel as aG, type Config as aH, type MessageType as aI, type MessageResponse as aJ, type MemoryConfig as aK, type SharedMemoryConfig as aL, type MemoryProcessorOpts as aM, MemoryProcessor as aN, memoryDefaultOptions as aO, createTool as aP, type VercelTool as aQ, type CoreTool as aR, type InternalCoreTool as aS, type StepFlowEntry as aT, type SerializedStep as aU, type SerializedStepFlowEntry as aV, createStep as aW, cloneStep as aX, createWorkflow as aY, cloneWorkflow as aZ, type WorkflowResult as a_, type ToolAction as aa, type AgentConfig as ab, MastraMemory as ac, type ToolExecutionContext as ad, Tool as ae, type Step as af, Workflow as ag, type WorkflowConfig as ah, type LanguageModel as ai, type CoreMessage as aj, type CoreSystemMessage as ak, type CoreAssistantMessage as al, type CoreUserMessage as am, type CoreToolMessage as an, type EmbedResult as ao, type EmbedManyResult as ap, type BaseStructuredOutputType as aq, type StructuredOutputType as ar, type StructuredOutputArrayItem as as, type StructuredOutput as at, type GenerateReturn as au, type StreamReturn as av, type OutputType as aw, type DefaultLLMTextOptions as ax, type DefaultLLMTextObjectOptions as ay, type DefaultLLMStreamOptions as az, type MastraAuthConfig as b, type ExecutionGraph as b0, ExecutionEngine as b1, type ExecuteFunction as b2, type StepSuccess as b3, type StepFailure as b4, type StepSuspended as b5, type StepRunning as b6, type StepResult as b7, type StepsRecord as b8, type DynamicMapping as b9, type NamedArgumentInfo as bA, type SubcommandInfo as bB, type CommandInfo as bC, type EnvironmentVariableInfo as bD, type PackageInfo as bE, type RemoteInfo as bF, type MCPServerConfig as bG, type ServerInfo as bH, type ServerDetailInfo as bI, type MCPToolType as bJ, MessageList as bK, type ToolsetsInput as bL, type DynamicArgument as bM, type AgentGenerateOptions as bN, type AgentStreamOptions as bO, type MastraMessageContentV2 as bP, type PathsToStringProps as ba, type ExtractSchemaType as bb, type ExtractSchemaFromStep as bc, type VariableReference as bd, type WatchEvent as be, type ZodPathType as bf, type WorkflowRunState as bg, type MastraLanguageModel as bh, type MastraPrimitives as bi, AgentNetwork as bj, MCPServerBase as bk, type VoiceEventType as bl, type VoiceEventMap as bm, type VoiceConfig as bn, MastraVoice as bo, CompositeVoice as bp, DefaultVoice as bq, type AgentNetworkConfig as br, type ConvertedTool as bs, type MCPServerSSEOptions as bt, type MCPServerHonoSSEOptions as bu, type MCPServerHTTPOptions as bv, type Repository as bw, type VersionDetail as bx, type ArgumentInfo as by, type PositionalArgumentInfo as bz, MastraStorage as c, type StorageThreadType as d, type MastraMessageV2 as e, type StorageGetMessagesArg as f, type MastraMessageV1 as g, type WorkflowRun as h, type LegacyWorkflowRun as i, TABLE_WORKFLOW_SNAPSHOT as j, TABLE_EVALS as k, TABLE_MESSAGES as l, TABLE_THREADS as m, TABLE_TRACES as n, TABLE_SCHEMAS as o, type StepResult$1 as p, LegacyStep as q, LegacyWorkflow as r, Agent as s, type WorkflowContext as t, type ToolsInput as u, type StepAction as v, type LegacyWorkflowRunResult as w, type WorkflowOptions as x, type StepExecutionContext as y, type StepVariableType as z };
3432
+ export { type StepResolverOutput as $, type ApiRoute as A, type StepExecutionContext as B, type ContextWithMastra as C, type StepVariableType as D, type EvalRow as E, type StepNode as F, type StepGraph as G, type BaseCondition as H, type ActionContext as I, WhenConditionReturnValue as J, type StepDef as K, type LegacyWorkflowRuns as L, type Methods as M, type StepCondition as N, type StepConfig as O, type StepsRecord$1 as P, type WorkflowLogMessage as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type WorkflowEvent as U, type VariableReference$1 as V, type WorkflowRuns as W, type ResolverFunctionInput as X, type ResolverFunctionOutput as Y, type SubscriberFunctionOutput as Z, type DependencyCheckOutput as _, Mastra as a, cloneWorkflow as a$, type WorkflowActors as a0, type WorkflowActionParams as a1, type WorkflowActions as a2, type LegacyWorkflowState as a3, type StepId as a4, type ExtractSchemaFromStep$1 as a5, type ExtractStepResult as a6, type StepInputType as a7, type ExtractSchemaType$1 as a8, type PathsToStringProps$1 as a9, type DefaultLLMTextObjectOptions as aA, type DefaultLLMStreamOptions as aB, type DefaultLLMStreamObjectOptions as aC, type LLMTextOptions as aD, type LLMTextObjectOptions as aE, type LLMStreamOptions as aF, type LLMInnerStreamOptions as aG, type LLMStreamObjectOptions as aH, createMockModel as aI, type Config as aJ, type MessageType as aK, type MessageResponse as aL, type MemoryConfig as aM, type SharedMemoryConfig as aN, type MemoryProcessorOpts as aO, MemoryProcessor as aP, memoryDefaultOptions as aQ, createTool as aR, type VercelTool as aS, type CoreTool as aT, type InternalCoreTool as aU, type StepFlowEntry as aV, type SerializedStep as aW, type SerializedStepFlowEntry as aX, createStep as aY, cloneStep as aZ, createWorkflow as a_, type LegacyWorkflowRunState as aa, type WorkflowResumeResult as ab, type ToolAction as ac, type AgentConfig as ad, MastraMemory as ae, type ToolExecutionContext as af, Tool as ag, type Step as ah, Workflow as ai, type WorkflowConfig as aj, type LanguageModel as ak, type CoreMessage as al, type CoreSystemMessage as am, type CoreAssistantMessage as an, type CoreUserMessage as ao, type CoreToolMessage as ap, type EmbedResult as aq, type EmbedManyResult as ar, type BaseStructuredOutputType as as, type StructuredOutputType as at, type StructuredOutputArrayItem as au, type StructuredOutput as av, type GenerateReturn as aw, type StreamReturn as ax, type OutputType as ay, type DefaultLLMTextOptions as az, type MastraAuthConfig as b, type WorkflowResult as b0, Run as b1, type ExecutionGraph as b2, ExecutionEngine as b3, type ExecuteFunction as b4, type StepSuccess as b5, type StepFailure as b6, type StepSuspended as b7, type StepRunning as b8, type StepResult as b9, type ArgumentInfo as bA, type PositionalArgumentInfo as bB, type NamedArgumentInfo as bC, type SubcommandInfo as bD, type CommandInfo as bE, type EnvironmentVariableInfo as bF, type PackageInfo as bG, type RemoteInfo as bH, type MCPServerConfig as bI, type ServerInfo as bJ, type ServerDetailInfo as bK, type MCPToolType as bL, MessageList as bM, type ToolsetsInput as bN, type DynamicArgument as bO, type AgentGenerateOptions as bP, type AgentStreamOptions as bQ, type MastraMessageContentV2 as bR, type StepsRecord as ba, type DynamicMapping as bb, type PathsToStringProps as bc, type ExtractSchemaType as bd, type ExtractSchemaFromStep as be, type VariableReference as bf, type WatchEvent as bg, type ZodPathType as bh, type WorkflowRunState as bi, type MastraLanguageModel as bj, type MastraPrimitives as bk, AgentNetwork as bl, MCPServerBase as bm, type VoiceEventType as bn, type VoiceEventMap as bo, type VoiceConfig as bp, MastraVoice as bq, CompositeVoice as br, DefaultVoice as bs, type AgentNetworkConfig as bt, type ConvertedTool as bu, type MCPServerSSEOptions as bv, type MCPServerHonoSSEOptions as bw, type MCPServerHTTPOptions as bx, type Repository as by, type VersionDetail as bz, MastraAuthProvider as c, type MastraAuthProviderOptions as d, MastraStorage as e, type StorageThreadType as f, type MastraMessageV2 as g, type StorageGetMessagesArg as h, type MastraMessageV1 as i, type WorkflowRun as j, type LegacyWorkflowRun as k, TABLE_WORKFLOW_SNAPSHOT as l, TABLE_EVALS as m, TABLE_MESSAGES as n, TABLE_THREADS as o, TABLE_TRACES as p, TABLE_SCHEMAS as q, type StepResult$1 as r, LegacyStep as s, LegacyWorkflow as t, Agent as u, type WorkflowContext as v, type ToolsInput as w, type StepAction as x, type LegacyWorkflowRunResult as y, type WorkflowOptions as z };
@@ -1,9 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$1, Schema, ToolExecutionOptions, 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-aPYtPBT2.cjs';
3
+ import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-BY9WFI65.cjs';
4
4
  import { z, ZodSchema } from 'zod';
5
5
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
6
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-EhZkzZOr.cjs';
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';
@@ -14,7 +14,7 @@ import * as xstate from 'xstate';
14
14
  import { Snapshot } from 'xstate';
15
15
  import EventEmitter from 'node:events';
16
16
  import * as http from 'node:http';
17
- import { Context, Handler, MiddlewareHandler, HonoRequest } from 'hono';
17
+ import { Context, HonoRequest, Handler, MiddlewareHandler } from 'hono';
18
18
  import EventEmitter$1 from 'events';
19
19
  import { EMITTER_SYMBOL } from './workflows/constants.cjs';
20
20
  import { MockLanguageModelV1 } from 'ai/test';
@@ -2861,6 +2861,29 @@ declare abstract class MCPServerBase extends MastraBase {
2861
2861
  }): Promise<any>;
2862
2862
  }
2863
2863
 
2864
+ interface MastraAuthProviderOptions<TUser = unknown> {
2865
+ name?: string;
2866
+ authorizeUser?: (user: TUser, request: HonoRequest) => Promise<boolean> | boolean;
2867
+ }
2868
+ declare abstract class MastraAuthProvider<TUser = unknown> extends MastraBase {
2869
+ constructor(options?: MastraAuthProviderOptions<TUser>);
2870
+ /**
2871
+ * Authenticate a token and return the payload
2872
+ * @param token - The token to authenticate
2873
+ * @param request - The request
2874
+ * @returns The payload
2875
+ */
2876
+ abstract authenticateToken(token: string, request: HonoRequest): Promise<TUser | null>;
2877
+ /**
2878
+ * Authorize a user for a path and method
2879
+ * @param user - The user to authorize
2880
+ * @param request - The request
2881
+ * @returns The authorization result
2882
+ */
2883
+ abstract authorizeUser(user: TUser, request: HonoRequest): Promise<boolean> | boolean;
2884
+ protected registerOptions(opts?: MastraAuthProviderOptions<TUser>): void;
2885
+ }
2886
+
2864
2887
  type Methods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'ALL';
2865
2888
  type ApiRoute = {
2866
2889
  path: string;
@@ -2888,6 +2911,10 @@ type ContextWithMastra = Context<{
2888
2911
  };
2889
2912
  }>;
2890
2913
  type MastraAuthConfig<TUser = unknown> = {
2914
+ /**
2915
+ * Protected paths for the server
2916
+ */
2917
+ protected?: (RegExp | string | [string, Methods | Methods[]])[];
2891
2918
  /**
2892
2919
  * Public paths for the server
2893
2920
  */
@@ -2978,7 +3005,7 @@ type ServerConfig = {
2978
3005
  /**
2979
3006
  * Authentication configuration for the server
2980
3007
  */
2981
- experimental_auth?: MastraAuthConfig<any>;
3008
+ experimental_auth?: MastraAuthConfig<any> | MastraAuthProvider<any>;
2982
3009
  };
2983
3010
 
2984
3011
  interface Config<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TLegacyWorkflows extends Record<string, LegacyWorkflow> = Record<string, LegacyWorkflow>, TWorkflows extends Record<string, Workflow> = Record<string, Workflow>, TVectors extends Record<string, MastraVector> = Record<string, MastraVector>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TNetworks extends Record<string, AgentNetwork> = Record<string, AgentNetwork>, TMCPServers extends Record<string, MCPServerBase> = Record<string, MCPServerBase>> {
@@ -3402,4 +3429,4 @@ declare abstract class MastraStorage extends MastraBase {
3402
3429
  }): Promise<WorkflowRun | null>;
3403
3430
  }
3404
3431
 
3405
- export { type WorkflowActionParams as $, type ApiRoute as A, type StepNode as B, type ContextWithMastra as C, type StepGraph as D, type EvalRow as E, type BaseCondition as F, type ActionContext as G, WhenConditionReturnValue as H, type StepDef as I, type StepCondition as J, type StepConfig as K, type LegacyWorkflowRuns as L, type Methods as M, type StepsRecord$1 as N, type WorkflowLogMessage as O, type WorkflowEvent as P, type ResolverFunctionInput as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type ResolverFunctionOutput as U, type VariableReference$1 as V, type WorkflowRuns as W, type SubscriberFunctionOutput as X, type DependencyCheckOutput as Y, type StepResolverOutput as Z, type WorkflowActors as _, Mastra as a, Run as a$, type WorkflowActions as a0, type LegacyWorkflowState as a1, type StepId as a2, type ExtractSchemaFromStep$1 as a3, type ExtractStepResult as a4, type StepInputType as a5, type ExtractSchemaType$1 as a6, type PathsToStringProps$1 as a7, type LegacyWorkflowRunState as a8, type WorkflowResumeResult as a9, type DefaultLLMStreamObjectOptions as aA, type LLMTextOptions as aB, type LLMTextObjectOptions as aC, type LLMStreamOptions as aD, type LLMInnerStreamOptions as aE, type LLMStreamObjectOptions as aF, createMockModel as aG, type Config as aH, type MessageType as aI, type MessageResponse as aJ, type MemoryConfig as aK, type SharedMemoryConfig as aL, type MemoryProcessorOpts as aM, MemoryProcessor as aN, memoryDefaultOptions as aO, createTool as aP, type VercelTool as aQ, type CoreTool as aR, type InternalCoreTool as aS, type StepFlowEntry as aT, type SerializedStep as aU, type SerializedStepFlowEntry as aV, createStep as aW, cloneStep as aX, createWorkflow as aY, cloneWorkflow as aZ, type WorkflowResult as a_, type ToolAction as aa, type AgentConfig as ab, MastraMemory as ac, type ToolExecutionContext as ad, Tool as ae, type Step as af, Workflow as ag, type WorkflowConfig as ah, type LanguageModel as ai, type CoreMessage as aj, type CoreSystemMessage as ak, type CoreAssistantMessage as al, type CoreUserMessage as am, type CoreToolMessage as an, type EmbedResult as ao, type EmbedManyResult as ap, type BaseStructuredOutputType as aq, type StructuredOutputType as ar, type StructuredOutputArrayItem as as, type StructuredOutput as at, type GenerateReturn as au, type StreamReturn as av, type OutputType as aw, type DefaultLLMTextOptions as ax, type DefaultLLMTextObjectOptions as ay, type DefaultLLMStreamOptions as az, type MastraAuthConfig as b, type ExecutionGraph as b0, ExecutionEngine as b1, type ExecuteFunction as b2, type StepSuccess as b3, type StepFailure as b4, type StepSuspended as b5, type StepRunning as b6, type StepResult as b7, type StepsRecord as b8, type DynamicMapping as b9, type NamedArgumentInfo as bA, type SubcommandInfo as bB, type CommandInfo as bC, type EnvironmentVariableInfo as bD, type PackageInfo as bE, type RemoteInfo as bF, type MCPServerConfig as bG, type ServerInfo as bH, type ServerDetailInfo as bI, type MCPToolType as bJ, MessageList as bK, type ToolsetsInput as bL, type DynamicArgument as bM, type AgentGenerateOptions as bN, type AgentStreamOptions as bO, type MastraMessageContentV2 as bP, type PathsToStringProps as ba, type ExtractSchemaType as bb, type ExtractSchemaFromStep as bc, type VariableReference as bd, type WatchEvent as be, type ZodPathType as bf, type WorkflowRunState as bg, type MastraLanguageModel as bh, type MastraPrimitives as bi, AgentNetwork as bj, MCPServerBase as bk, type VoiceEventType as bl, type VoiceEventMap as bm, type VoiceConfig as bn, MastraVoice as bo, CompositeVoice as bp, DefaultVoice as bq, type AgentNetworkConfig as br, type ConvertedTool as bs, type MCPServerSSEOptions as bt, type MCPServerHonoSSEOptions as bu, type MCPServerHTTPOptions as bv, type Repository as bw, type VersionDetail as bx, type ArgumentInfo as by, type PositionalArgumentInfo as bz, MastraStorage as c, type StorageThreadType as d, type MastraMessageV2 as e, type StorageGetMessagesArg as f, type MastraMessageV1 as g, type WorkflowRun as h, type LegacyWorkflowRun as i, TABLE_WORKFLOW_SNAPSHOT as j, TABLE_EVALS as k, TABLE_MESSAGES as l, TABLE_THREADS as m, TABLE_TRACES as n, TABLE_SCHEMAS as o, type StepResult$1 as p, LegacyStep as q, LegacyWorkflow as r, Agent as s, type WorkflowContext as t, type ToolsInput as u, type StepAction as v, type LegacyWorkflowRunResult as w, type WorkflowOptions as x, type StepExecutionContext as y, type StepVariableType as z };
3432
+ export { type StepResolverOutput as $, type ApiRoute as A, type StepExecutionContext as B, type ContextWithMastra as C, type StepVariableType as D, type EvalRow as E, type StepNode as F, type StepGraph as G, type BaseCondition as H, type ActionContext as I, WhenConditionReturnValue as J, type StepDef as K, type LegacyWorkflowRuns as L, type Methods as M, type StepCondition as N, type StepConfig as O, type StepsRecord$1 as P, type WorkflowLogMessage as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type WorkflowEvent as U, type VariableReference$1 as V, type WorkflowRuns as W, type ResolverFunctionInput as X, type ResolverFunctionOutput as Y, type SubscriberFunctionOutput as Z, type DependencyCheckOutput as _, Mastra as a, cloneWorkflow as a$, type WorkflowActors as a0, type WorkflowActionParams as a1, type WorkflowActions as a2, type LegacyWorkflowState as a3, type StepId as a4, type ExtractSchemaFromStep$1 as a5, type ExtractStepResult as a6, type StepInputType as a7, type ExtractSchemaType$1 as a8, type PathsToStringProps$1 as a9, type DefaultLLMTextObjectOptions as aA, type DefaultLLMStreamOptions as aB, type DefaultLLMStreamObjectOptions as aC, type LLMTextOptions as aD, type LLMTextObjectOptions as aE, type LLMStreamOptions as aF, type LLMInnerStreamOptions as aG, type LLMStreamObjectOptions as aH, createMockModel as aI, type Config as aJ, type MessageType as aK, type MessageResponse as aL, type MemoryConfig as aM, type SharedMemoryConfig as aN, type MemoryProcessorOpts as aO, MemoryProcessor as aP, memoryDefaultOptions as aQ, createTool as aR, type VercelTool as aS, type CoreTool as aT, type InternalCoreTool as aU, type StepFlowEntry as aV, type SerializedStep as aW, type SerializedStepFlowEntry as aX, createStep as aY, cloneStep as aZ, createWorkflow as a_, type LegacyWorkflowRunState as aa, type WorkflowResumeResult as ab, type ToolAction as ac, type AgentConfig as ad, MastraMemory as ae, type ToolExecutionContext as af, Tool as ag, type Step as ah, Workflow as ai, type WorkflowConfig as aj, type LanguageModel as ak, type CoreMessage as al, type CoreSystemMessage as am, type CoreAssistantMessage as an, type CoreUserMessage as ao, type CoreToolMessage as ap, type EmbedResult as aq, type EmbedManyResult as ar, type BaseStructuredOutputType as as, type StructuredOutputType as at, type StructuredOutputArrayItem as au, type StructuredOutput as av, type GenerateReturn as aw, type StreamReturn as ax, type OutputType as ay, type DefaultLLMTextOptions as az, type MastraAuthConfig as b, type WorkflowResult as b0, Run as b1, type ExecutionGraph as b2, ExecutionEngine as b3, type ExecuteFunction as b4, type StepSuccess as b5, type StepFailure as b6, type StepSuspended as b7, type StepRunning as b8, type StepResult as b9, type ArgumentInfo as bA, type PositionalArgumentInfo as bB, type NamedArgumentInfo as bC, type SubcommandInfo as bD, type CommandInfo as bE, type EnvironmentVariableInfo as bF, type PackageInfo as bG, type RemoteInfo as bH, type MCPServerConfig as bI, type ServerInfo as bJ, type ServerDetailInfo as bK, type MCPToolType as bL, MessageList as bM, type ToolsetsInput as bN, type DynamicArgument as bO, type AgentGenerateOptions as bP, type AgentStreamOptions as bQ, type MastraMessageContentV2 as bR, type StepsRecord as ba, type DynamicMapping as bb, type PathsToStringProps as bc, type ExtractSchemaType as bd, type ExtractSchemaFromStep as be, type VariableReference as bf, type WatchEvent as bg, type ZodPathType as bh, type WorkflowRunState as bi, type MastraLanguageModel as bj, type MastraPrimitives as bk, AgentNetwork as bl, MCPServerBase as bm, type VoiceEventType as bn, type VoiceEventMap as bo, type VoiceConfig as bp, MastraVoice as bq, CompositeVoice as br, DefaultVoice as bs, type AgentNetworkConfig as bt, type ConvertedTool as bu, type MCPServerSSEOptions as bv, type MCPServerHonoSSEOptions as bw, type MCPServerHTTPOptions as bx, type Repository as by, type VersionDetail as bz, MastraAuthProvider as c, type MastraAuthProviderOptions as d, MastraStorage as e, type StorageThreadType as f, type MastraMessageV2 as g, type StorageGetMessagesArg as h, type MastraMessageV1 as i, type WorkflowRun as j, type LegacyWorkflowRun as k, TABLE_WORKFLOW_SNAPSHOT as l, TABLE_EVALS as m, TABLE_MESSAGES as n, TABLE_THREADS as o, TABLE_TRACES as p, TABLE_SCHEMAS as q, type StepResult$1 as r, LegacyStep as s, LegacyWorkflow as t, Agent as u, type WorkflowContext as v, type ToolsInput as w, type StepAction as x, type LegacyWorkflowRunResult as y, type WorkflowOptions as z };
package/dist/base.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkYEULQPUY_cjs = require('./chunk-YEULQPUY.cjs');
3
+ var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraBase", {
8
8
  enumerable: true,
9
- get: function () { return chunkYEULQPUY_cjs.MastraBase; }
9
+ get: function () { return chunkVHZPWE5L_cjs.MastraBase; }
10
10
  });
package/dist/base.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@opentelemetry/api';
2
- import './logger-EhZkzZOr.cjs';
3
- export { M as MastraBase } from './base-aPYtPBT2.cjs';
2
+ import './logger-BF2Sn7JX.cjs';
3
+ export { M as MastraBase } from './base-BY9WFI65.cjs';
4
4
  import 'stream';
5
5
  import '@opentelemetry/sdk-trace-base';
package/dist/base.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@opentelemetry/api';
2
- import './logger-EhZkzZOr.js';
3
- export { M as MastraBase } from './base-tc5kgDTD.js';
2
+ import './logger-BF2Sn7JX.js';
3
+ export { M as MastraBase } from './base-C0yUw8BC.js';
4
4
  import 'stream';
5
5
  import '@opentelemetry/sdk-trace-base';
package/dist/base.js CHANGED
@@ -1 +1 @@
1
- export { MastraBase } from './chunk-FI7R232B.js';
1
+ export { MastraBase } from './chunk-JOCKZ2US.js';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkTMPFLJLG_cjs = require('../chunk-TMPFLJLG.cjs');
3
+ var chunkCYJF6U6B_cjs = require('../chunk-CYJF6U6B.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraBundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkTMPFLJLG_cjs.MastraBundler; }
9
+ get: function () { return chunkCYJF6U6B_cjs.MastraBundler; }
10
10
  });
@@ -1,6 +1,6 @@
1
- import { M as MastraBase } from '../base-aPYtPBT2.cjs';
1
+ import { M as MastraBase } from '../base-BY9WFI65.cjs';
2
2
  import '@opentelemetry/api';
3
- import '../logger-EhZkzZOr.cjs';
3
+ import '../logger-BF2Sn7JX.cjs';
4
4
  import 'stream';
5
5
  import '@opentelemetry/sdk-trace-base';
6
6
 
@@ -1,6 +1,6 @@
1
- import { M as MastraBase } from '../base-tc5kgDTD.js';
1
+ import { M as MastraBase } from '../base-C0yUw8BC.js';
2
2
  import '@opentelemetry/api';
3
- import '../logger-EhZkzZOr.js';
3
+ import '../logger-BF2Sn7JX.js';
4
4
  import 'stream';
5
5
  import '@opentelemetry/sdk-trace-base';
6
6
 
@@ -1 +1 @@
1
- export { MastraBundler } from '../chunk-JW5TMK2L.js';
1
+ export { MastraBundler } from '../chunk-DTJ4KVHM.js';
@@ -1,8 +1,8 @@
1
1
  import { EMITTER_SYMBOL } from './chunk-Y7D2JLKS.js';
2
- import { Agent } from './chunk-WCGRF63O.js';
3
- import { Tool } from './chunk-EQTIDVPN.js';
4
- import { MastraBase } from './chunk-FI7R232B.js';
5
- import { RegisteredLogger } from './chunk-VHLL4AZK.js';
2
+ import { Agent } from './chunk-2AFAKGJ4.js';
3
+ import { Tool } from './chunk-26WUL725.js';
4
+ import { MastraBase } from './chunk-JOCKZ2US.js';
5
+ import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
6
6
  import { RuntimeContext } from './chunk-SGGPJWRQ.js';
7
7
  import { randomUUID } from 'crypto';
8
8
  import EventEmitter from 'events';
@@ -1,4 +1,4 @@
1
- import { MastraBase } from './chunk-FI7R232B.js';
1
+ import { MastraBase } from './chunk-JOCKZ2US.js';
2
2
  import { RuntimeContext } from './chunk-SGGPJWRQ.js';
3
3
  import { createHash } from 'crypto';
4
4
  import jsonSchemaToZod from 'json-schema-to-zod';
@@ -1,11 +1,11 @@
1
- import { DefaultVoice } from './chunk-KSJGZAMN.js';
1
+ import { DefaultVoice } from './chunk-FLPSXJWQ.js';
2
2
  import { executeHook } from './chunk-BB4KXGBU.js';
3
- import { MastraLLM } from './chunk-ZJYHZO6Y.js';
3
+ import { MastraLLM } from './chunk-DXK4HYTL.js';
4
4
  import { InstrumentClass } from './chunk-EWDGXKOQ.js';
5
- import { MessageList } from './chunk-U47X2EYV.js';
6
- import { ensureToolProperties, makeCoreTool, createMastraProxy } from './chunk-EQTIDVPN.js';
7
- import { MastraBase } from './chunk-FI7R232B.js';
8
- import { RegisteredLogger } from './chunk-VHLL4AZK.js';
5
+ import { MessageList } from './chunk-MWU2UKZI.js';
6
+ import { ensureToolProperties, makeCoreTool, createMastraProxy } from './chunk-26WUL725.js';
7
+ import { MastraBase } from './chunk-JOCKZ2US.js';
8
+ import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
9
9
  import { RuntimeContext } from './chunk-SGGPJWRQ.js';
10
10
  import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-C6A6W6XS.js';
11
11
  import { context, trace } from '@opentelemetry/api';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
4
- var chunkYEULQPUY_cjs = require('./chunk-YEULQPUY.cjs');
4
+ var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.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 = chunkYEULQPUY_cjs.MastraBase) {
13
+ exports.MastraVoice = class MastraVoice extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
14
14
  listeningModel;
15
15
  speechModel;
16
16
  speaker;
@@ -1,4 +1,4 @@
1
- import { Agent } from './chunk-WCGRF63O.js';
1
+ import { Agent } from './chunk-2AFAKGJ4.js';
2
2
  import { CohereClient } from 'cohere-ai';
3
3
 
4
4
  var CohereRelevanceScorer = class {
@@ -1,5 +1,5 @@
1
1
  import { TABLE_WORKFLOW_SNAPSHOT, TABLE_EVALS, TABLE_MESSAGES, TABLE_THREADS, TABLE_TRACES, TABLE_SCHEMAS } from './chunk-EWDGXKOQ.js';
2
- import { MastraBase } from './chunk-FI7R232B.js';
2
+ import { MastraBase } from './chunk-JOCKZ2US.js';
3
3
 
4
4
  // src/storage/base.ts
5
5
  var MastraStorage = class extends MastraBase {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkYEULQPUY_cjs = require('./chunk-YEULQPUY.cjs');
3
+ var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
4
4
  var promises = require('fs/promises');
5
5
  var dotenv = require('dotenv');
6
6
 
7
- var MastraBundler = class extends chunkYEULQPUY_cjs.MastraBase {
7
+ var MastraBundler = class extends chunkVHZPWE5L_cjs.MastraBase {
8
8
  constructor({ name, component = "BUNDLER" }) {
9
9
  super({ component, name });
10
10
  }
@@ -1,4 +1,4 @@
1
- import { MastraBase } from './chunk-FI7R232B.js';
1
+ import { MastraBase } from './chunk-JOCKZ2US.js';
2
2
  import { readFile } from 'fs/promises';
3
3
  import { parse } from 'dotenv';
4
4
 
@@ -1,6 +1,6 @@
1
- import { delay } from './chunk-EQTIDVPN.js';
2
- import { MastraBase } from './chunk-FI7R232B.js';
3
- import { RegisteredLogger } from './chunk-VHLL4AZK.js';
1
+ import { delay } from './chunk-26WUL725.js';
2
+ import { MastraBase } from './chunk-JOCKZ2US.js';
3
+ import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
4
4
  import { jsonSchema, generateText, Output, generateObject, streamText, streamObject } from 'ai';
5
5
  import { z } from 'zod';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { InstrumentClass } from './chunk-EWDGXKOQ.js';
2
- import { MastraBase } from './chunk-FI7R232B.js';
2
+ import { MastraBase } from './chunk-JOCKZ2US.js';
3
3
  import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-C6A6W6XS.js';
4
4
 
5
5
  // src/voice/voice.ts
@@ -1,4 +1,4 @@
1
- import { createTool } from './chunk-EQTIDVPN.js';
1
+ import { createTool } from './chunk-26WUL725.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/integration/integration.ts
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
4
- var chunkYEULQPUY_cjs = require('./chunk-YEULQPUY.cjs');
4
+ var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
5
5
  var chunkRWTSGWWL_cjs = require('./chunk-RWTSGWWL.cjs');
6
6
 
7
7
  // src/tts/index.ts
@@ -10,7 +10,7 @@ _MastraTTS_decorators = [chunkTICDQWVJ_cjs.InstrumentClass({
10
10
  prefix: "tts",
11
11
  excludeMethods: ["__setTools", "__setLogger", "__setTelemetry", "#log"]
12
12
  })];
13
- exports.MastraTTS = class MastraTTS extends (_a = chunkYEULQPUY_cjs.MastraBase) {
13
+ exports.MastraTTS = class MastraTTS extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
14
14
  model;
15
15
  constructor({
16
16
  model
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkEZDS6FFZ_cjs = require('./chunk-EZDS6FFZ.cjs');
3
+ var chunkIJWOVA22_cjs = require('./chunk-IJWOVA22.cjs');
4
4
  var cohereAi = require('cohere-ai');
5
5
 
6
6
  var CohereRelevanceScorer = class {
@@ -38,7 +38,7 @@ Relevance score (0-1):`;
38
38
  var MastraAgentRelevanceScorer = class {
39
39
  agent;
40
40
  constructor(name, model) {
41
- this.agent = new chunkEZDS6FFZ_cjs.Agent({
41
+ this.agent = new chunkIJWOVA22_cjs.Agent({
42
42
  name: `Relevance Scorer ${name}`,
43
43
  instructions: `You are a specialized agent for evaluating the relevance of text to queries.
44
44
  Your task is to rate how well a text passage answers a given query.