@mastra/core 0.10.2-alpha.7 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/agent/index.cjs +4 -4
  2. package/dist/agent/index.d.cts +1 -1
  3. package/dist/agent/index.d.ts +1 -1
  4. package/dist/agent/index.js +2 -2
  5. package/dist/{base-BVo_KTj_.d.ts → base-Bdo-CPMn.d.ts} +3 -2
  6. package/dist/{base-CCeahyG8.d.cts → base-Dmg7H-Iz.d.cts} +3 -2
  7. package/dist/chunk-32C7JDIZ.js +1 -0
  8. package/dist/{chunk-6NJLWXMZ.js → chunk-4TEWSQS5.js} +1 -1
  9. package/dist/{chunk-GNJ7CAHY.js → chunk-4UWPFBC6.js} +1 -1
  10. package/dist/chunk-4Z3OU5RY.cjs +31 -0
  11. package/dist/{chunk-LKO4XMRH.js → chunk-5EB62G6T.js} +2 -2
  12. package/dist/{chunk-MWU2UKZI.js → chunk-677GIYFF.js} +4 -1
  13. package/dist/{chunk-2AFAKGJ4.js → chunk-B4TMM6NT.js} +6 -5
  14. package/dist/{chunk-YZB2YQ63.cjs → chunk-B7SQOKEC.cjs} +2 -2
  15. package/dist/chunk-C4LMN2IR.js +27 -0
  16. package/dist/{chunk-II7UBNGM.cjs → chunk-ERUGEZPR.cjs} +2 -2
  17. package/dist/{chunk-DXK4HYTL.js → chunk-FGBS7VRU.js} +1 -1
  18. package/dist/{chunk-PBHXIWAK.cjs → chunk-FHLDRRKJ.cjs} +6 -3
  19. package/dist/{chunk-P5XIIDTT.cjs → chunk-IBIGJYTD.cjs} +4 -4
  20. package/dist/{chunk-24D3CMWO.js → chunk-K7BZ4VXX.js} +2 -2
  21. package/dist/{chunk-SMPHOXU3.cjs → chunk-LMTSGD2E.cjs} +4 -4
  22. package/dist/{chunk-IJWOVA22.cjs → chunk-MVXVUMLA.cjs} +18 -17
  23. package/dist/chunk-QFTBW7ZZ.cjs +2 -0
  24. package/dist/{chunk-PNPMKRS2.cjs → chunk-VBSKHNCY.cjs} +5 -5
  25. package/dist/{chunk-TN3TNMXO.cjs → chunk-WWLMZIHW.cjs} +6 -31
  26. package/dist/{chunk-26WUL725.js → chunk-Y5BGCPNZ.js} +2 -24
  27. package/dist/error/index.cjs +75 -0
  28. package/dist/error/index.d.cts +80 -0
  29. package/dist/error/index.d.ts +80 -0
  30. package/dist/error/index.js +70 -0
  31. package/dist/eval/index.d.cts +1 -1
  32. package/dist/eval/index.d.ts +1 -1
  33. package/dist/index.cjs +46 -49
  34. package/dist/index.d.cts +3 -3
  35. package/dist/index.d.ts +3 -3
  36. package/dist/index.js +10 -9
  37. package/dist/integration/index.cjs +3 -3
  38. package/dist/integration/index.d.cts +1 -1
  39. package/dist/integration/index.d.ts +1 -1
  40. package/dist/integration/index.js +1 -1
  41. package/dist/llm/index.d.cts +1 -1
  42. package/dist/llm/index.d.ts +1 -1
  43. package/dist/mastra/index.d.cts +1 -1
  44. package/dist/mastra/index.d.ts +1 -1
  45. package/dist/mcp/index.d.cts +1 -1
  46. package/dist/mcp/index.d.ts +1 -1
  47. package/dist/memory/index.cjs +4 -4
  48. package/dist/memory/index.d.cts +1 -1
  49. package/dist/memory/index.d.ts +1 -1
  50. package/dist/memory/index.js +1 -1
  51. package/dist/network/index.cjs +4 -4
  52. package/dist/network/index.d.cts +1 -1
  53. package/dist/network/index.d.ts +1 -1
  54. package/dist/network/index.js +2 -2
  55. package/dist/relevance/index.cjs +4 -4
  56. package/dist/relevance/index.d.cts +1 -1
  57. package/dist/relevance/index.d.ts +1 -1
  58. package/dist/relevance/index.js +1 -1
  59. package/dist/server/index.d.cts +2 -2
  60. package/dist/server/index.d.ts +2 -2
  61. package/dist/storage/index.cjs +2 -2
  62. package/dist/storage/index.d.cts +2 -2
  63. package/dist/storage/index.d.ts +2 -2
  64. package/dist/storage/index.js +1 -1
  65. package/dist/telemetry/index.d.cts +1 -1
  66. package/dist/telemetry/index.d.ts +1 -1
  67. package/dist/tools/index.cjs +4 -4
  68. package/dist/tools/index.d.cts +18 -7
  69. package/dist/tools/index.d.ts +18 -7
  70. package/dist/tools/index.js +1 -1
  71. package/dist/utils.cjs +14 -18
  72. package/dist/utils.d.cts +4 -10
  73. package/dist/utils.d.ts +4 -10
  74. package/dist/utils.js +1 -1
  75. package/dist/voice/index.d.cts +1 -1
  76. package/dist/voice/index.d.ts +1 -1
  77. package/dist/workflows/index.cjs +9 -9
  78. package/dist/workflows/index.d.cts +2 -2
  79. package/dist/workflows/index.d.ts +2 -2
  80. package/dist/workflows/index.js +1 -1
  81. package/dist/workflows/legacy/index.cjs +22 -22
  82. package/dist/workflows/legacy/index.d.cts +2 -2
  83. package/dist/workflows/legacy/index.d.ts +2 -2
  84. package/dist/workflows/legacy/index.js +1 -1
  85. package/error.d.ts +1 -0
  86. package/package.json +2 -2
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkIJWOVA22_cjs = require('../chunk-IJWOVA22.cjs');
4
- var chunkPBHXIWAK_cjs = require('../chunk-PBHXIWAK.cjs');
3
+ var chunkMVXVUMLA_cjs = require('../chunk-MVXVUMLA.cjs');
4
+ var chunkFHLDRRKJ_cjs = require('../chunk-FHLDRRKJ.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkIJWOVA22_cjs.Agent; }
10
+ get: function () { return chunkMVXVUMLA_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "MessageList", {
13
13
  enumerable: true,
14
- get: function () { return chunkPBHXIWAK_cjs.MessageList; }
14
+ get: function () { return chunkFHLDRRKJ_cjs.MessageList; }
15
15
  });
@@ -1,7 +1,7 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { u as Agent, ad as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bk as MastraLanguageModel, bS as MastraMessageContentV2, g as MastraMessageV2, bN as MessageList, w as ToolsInput, bO as ToolsetsInput } from '../base-CCeahyG8.cjs';
4
+ export { A as Agent, ap as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bn as MastraLanguageModel, bS as MastraMessageContentV2, s as MastraMessageV2, bN as MessageList, T as ToolsInput, bO as ToolsetsInput } from '../base-Dmg7H-Iz.cjs';
5
5
  import '../base-BY9WFI65.cjs';
6
6
  import '../types-Bo1uigWx.cjs';
7
7
  import '../runtime-context/index.cjs';
@@ -1,7 +1,7 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { u as Agent, ad as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bk as MastraLanguageModel, bS as MastraMessageContentV2, g as MastraMessageV2, bN as MessageList, w as ToolsInput, bO as ToolsetsInput } from '../base-BVo_KTj_.js';
4
+ export { A as Agent, ap as AgentConfig, bQ as AgentGenerateOptions, bR as AgentStreamOptions, bP as DynamicArgument, bn as MastraLanguageModel, bS as MastraMessageContentV2, s as MastraMessageV2, bN as MessageList, T as ToolsInput, bO as ToolsetsInput } from '../base-Bdo-CPMn.js';
5
5
  import '../base-C0yUw8BC.js';
6
6
  import '../types-Bo1uigWx.js';
7
7
  import '../runtime-context/index.js';
@@ -1,2 +1,2 @@
1
- export { Agent } from '../chunk-2AFAKGJ4.js';
2
- export { MessageList } from '../chunk-MWU2UKZI.js';
1
+ export { Agent } from '../chunk-B4TMM6NT.js';
2
+ export { MessageList } from '../chunk-677GIYFF.js';
@@ -1680,7 +1680,7 @@ type MastraMessageV2 = {
1680
1680
  type?: string;
1681
1681
  };
1682
1682
  type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
1683
- type MessageSource = 'memory' | 'response' | 'user' | 'system';
1683
+ type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
1684
1684
  declare class MessageList {
1685
1685
  private messages;
1686
1686
  private systemMessages;
@@ -1689,6 +1689,7 @@ declare class MessageList {
1689
1689
  private memoryMessages;
1690
1690
  private newUserMessages;
1691
1691
  private newResponseMessages;
1692
+ private userContextMessages;
1692
1693
  private generateMessageId?;
1693
1694
  constructor({ threadId, resourceId, generateMessageId, }?: {
1694
1695
  threadId?: string;
@@ -3434,4 +3435,4 @@ declare abstract class MastraStorage extends MastraBase {
3434
3435
  }): Promise<WorkflowRun | null>;
3435
3436
  }
3436
3437
 
3437
- 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 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 StepsRecord as ba, type DynamicMapping as bb, type PathsToStringProps as bc, type ExtractSchemaType as bd, type ExtractSchemaFromStep as be, type VariableReference as bf, type StreamEvent as bg, type WatchEvent as bh, type ZodPathType as bi, type WorkflowRunState as bj, type MastraLanguageModel as bk, type MastraPrimitives as bl, AgentNetwork as bm, MCPServerBase 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, 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 };
3438
+ export { type StepCondition as $, Agent as A, TABLE_EVALS as B, type CoreTool as C, TABLE_MESSAGES as D, type EvalRow as E, TABLE_THREADS as F, TABLE_TRACES as G, TABLE_SCHEMAS as H, type VariableReference$1 as I, type StepResult$1 as J, type StepAction as K, LegacyWorkflow as L, Mastra as M, type LegacyWorkflowRunResult as N, type WorkflowOptions as O, type StepVariableType as P, type StepNode as Q, type StepGraph as R, type StepExecutionContext as S, type ToolsInput as T, type RetryConfig as U, type VercelTool as V, type WorkflowContext as W, type BaseCondition as X, type ActionContext as Y, WhenConditionReturnValue as Z, type StepDef as _, type MastraPrimitives as a, createStep as a$, type StepConfig as a0, type StepsRecord$1 as a1, type WorkflowLogMessage as a2, type WorkflowEvent as a3, type ResolverFunctionInput as a4, type ResolverFunctionOutput as a5, type SubscriberFunctionOutput as a6, type DependencyCheckOutput as a7, type StepResolverOutput as a8, type WorkflowActors as a9, type StructuredOutputType as aA, type StructuredOutputArrayItem as aB, type StructuredOutput as aC, type GenerateReturn as aD, type StreamReturn as aE, type OutputType as aF, type DefaultLLMTextOptions as aG, type DefaultLLMTextObjectOptions as aH, type DefaultLLMStreamOptions as aI, type DefaultLLMStreamObjectOptions as aJ, type LLMTextOptions as aK, type LLMTextObjectOptions as aL, type LLMStreamOptions as aM, type LLMInnerStreamOptions as aN, type LLMStreamObjectOptions as aO, createMockModel as aP, type Config as aQ, type MessageType as aR, type MessageResponse as aS, type MemoryConfig as aT, type SharedMemoryConfig as aU, type MemoryProcessorOpts as aV, MemoryProcessor as aW, memoryDefaultOptions as aX, type StepFlowEntry as aY, type SerializedStep as aZ, type SerializedStepFlowEntry as a_, type WorkflowActionParams as aa, type WorkflowActions as ab, type LegacyWorkflowState as ac, type StepId as ad, type ExtractSchemaFromStep$1 as ae, type ExtractStepResult as af, type StepInputType as ag, type ExtractSchemaType$1 as ah, type PathsToStringProps$1 as ai, type LegacyWorkflowRunState as aj, type WorkflowResumeResult as ak, Tool as al, createTool as am, type InternalCoreTool as an, type ToolExecutionContext as ao, type AgentConfig as ap, type WorkflowConfig as aq, type LanguageModel as ar, type CoreMessage as as, type CoreSystemMessage as at, type CoreAssistantMessage as au, type CoreUserMessage as av, type CoreToolMessage as aw, type EmbedResult as ax, type EmbedManyResult as ay, type BaseStructuredOutputType as az, MastraMemory as b, cloneStep as b0, createWorkflow as b1, cloneWorkflow as b2, type WorkflowResult as b3, Run as b4, type ExecutionGraph as b5, ExecutionEngine as b6, type ExecuteFunction as b7, type StepSuccess as b8, type StepFailure as b9, type VersionDetail as bA, type ArgumentInfo as bB, type PositionalArgumentInfo as bC, type NamedArgumentInfo as bD, type SubcommandInfo as bE, type CommandInfo as bF, type EnvironmentVariableInfo as bG, type PackageInfo as bH, type RemoteInfo as bI, type MCPServerConfig as bJ, type ServerInfo as bK, type ServerDetailInfo as bL, type MCPToolType as bM, MessageList as bN, type ToolsetsInput as bO, type DynamicArgument as bP, type AgentGenerateOptions as bQ, type AgentStreamOptions as bR, type MastraMessageContentV2 as bS, type StepSuspended as ba, type StepRunning as bb, type StepResult as bc, type StepsRecord as bd, type DynamicMapping as be, type PathsToStringProps as bf, type ExtractSchemaType as bg, type ExtractSchemaFromStep as bh, type VariableReference as bi, type StreamEvent as bj, type WatchEvent as bk, type ZodPathType as bl, type WorkflowRunState as bm, type MastraLanguageModel as bn, type VoiceEventType as bo, type VoiceEventMap as bp, type VoiceConfig as bq, MastraVoice as br, CompositeVoice as bs, DefaultVoice as bt, type AgentNetworkConfig as bu, type ConvertedTool as bv, type MCPServerSSEOptions as bw, type MCPServerHonoSSEOptions as bx, type MCPServerHTTPOptions as by, type Repository as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, TABLE_WORKFLOW_SNAPSHOT as z };
@@ -1680,7 +1680,7 @@ type MastraMessageV2 = {
1680
1680
  type?: string;
1681
1681
  };
1682
1682
  type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
1683
- type MessageSource = 'memory' | 'response' | 'user' | 'system';
1683
+ type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
1684
1684
  declare class MessageList {
1685
1685
  private messages;
1686
1686
  private systemMessages;
@@ -1689,6 +1689,7 @@ declare class MessageList {
1689
1689
  private memoryMessages;
1690
1690
  private newUserMessages;
1691
1691
  private newResponseMessages;
1692
+ private userContextMessages;
1692
1693
  private generateMessageId?;
1693
1694
  constructor({ threadId, resourceId, generateMessageId, }?: {
1694
1695
  threadId?: string;
@@ -3434,4 +3435,4 @@ declare abstract class MastraStorage extends MastraBase {
3434
3435
  }): Promise<WorkflowRun | null>;
3435
3436
  }
3436
3437
 
3437
- 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 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 StepsRecord as ba, type DynamicMapping as bb, type PathsToStringProps as bc, type ExtractSchemaType as bd, type ExtractSchemaFromStep as be, type VariableReference as bf, type StreamEvent as bg, type WatchEvent as bh, type ZodPathType as bi, type WorkflowRunState as bj, type MastraLanguageModel as bk, type MastraPrimitives as bl, AgentNetwork as bm, MCPServerBase 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, 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 };
3438
+ export { type StepCondition as $, Agent as A, TABLE_EVALS as B, type CoreTool as C, TABLE_MESSAGES as D, type EvalRow as E, TABLE_THREADS as F, TABLE_TRACES as G, TABLE_SCHEMAS as H, type VariableReference$1 as I, type StepResult$1 as J, type StepAction as K, LegacyWorkflow as L, Mastra as M, type LegacyWorkflowRunResult as N, type WorkflowOptions as O, type StepVariableType as P, type StepNode as Q, type StepGraph as R, type StepExecutionContext as S, type ToolsInput as T, type RetryConfig as U, type VercelTool as V, type WorkflowContext as W, type BaseCondition as X, type ActionContext as Y, WhenConditionReturnValue as Z, type StepDef as _, type MastraPrimitives as a, createStep as a$, type StepConfig as a0, type StepsRecord$1 as a1, type WorkflowLogMessage as a2, type WorkflowEvent as a3, type ResolverFunctionInput as a4, type ResolverFunctionOutput as a5, type SubscriberFunctionOutput as a6, type DependencyCheckOutput as a7, type StepResolverOutput as a8, type WorkflowActors as a9, type StructuredOutputType as aA, type StructuredOutputArrayItem as aB, type StructuredOutput as aC, type GenerateReturn as aD, type StreamReturn as aE, type OutputType as aF, type DefaultLLMTextOptions as aG, type DefaultLLMTextObjectOptions as aH, type DefaultLLMStreamOptions as aI, type DefaultLLMStreamObjectOptions as aJ, type LLMTextOptions as aK, type LLMTextObjectOptions as aL, type LLMStreamOptions as aM, type LLMInnerStreamOptions as aN, type LLMStreamObjectOptions as aO, createMockModel as aP, type Config as aQ, type MessageType as aR, type MessageResponse as aS, type MemoryConfig as aT, type SharedMemoryConfig as aU, type MemoryProcessorOpts as aV, MemoryProcessor as aW, memoryDefaultOptions as aX, type StepFlowEntry as aY, type SerializedStep as aZ, type SerializedStepFlowEntry as a_, type WorkflowActionParams as aa, type WorkflowActions as ab, type LegacyWorkflowState as ac, type StepId as ad, type ExtractSchemaFromStep$1 as ae, type ExtractStepResult as af, type StepInputType as ag, type ExtractSchemaType$1 as ah, type PathsToStringProps$1 as ai, type LegacyWorkflowRunState as aj, type WorkflowResumeResult as ak, Tool as al, createTool as am, type InternalCoreTool as an, type ToolExecutionContext as ao, type AgentConfig as ap, type WorkflowConfig as aq, type LanguageModel as ar, type CoreMessage as as, type CoreSystemMessage as at, type CoreAssistantMessage as au, type CoreUserMessage as av, type CoreToolMessage as aw, type EmbedResult as ax, type EmbedManyResult as ay, type BaseStructuredOutputType as az, MastraMemory as b, cloneStep as b0, createWorkflow as b1, cloneWorkflow as b2, type WorkflowResult as b3, Run as b4, type ExecutionGraph as b5, ExecutionEngine as b6, type ExecuteFunction as b7, type StepSuccess as b8, type StepFailure as b9, type VersionDetail as bA, type ArgumentInfo as bB, type PositionalArgumentInfo as bC, type NamedArgumentInfo as bD, type SubcommandInfo as bE, type CommandInfo as bF, type EnvironmentVariableInfo as bG, type PackageInfo as bH, type RemoteInfo as bI, type MCPServerConfig as bJ, type ServerInfo as bK, type ServerDetailInfo as bL, type MCPToolType as bM, MessageList as bN, type ToolsetsInput as bO, type DynamicArgument as bP, type AgentGenerateOptions as bQ, type AgentStreamOptions as bR, type MastraMessageContentV2 as bS, type StepSuspended as ba, type StepRunning as bb, type StepResult as bc, type StepsRecord as bd, type DynamicMapping as be, type PathsToStringProps as bf, type ExtractSchemaType as bg, type ExtractSchemaFromStep as bh, type VariableReference as bi, type StreamEvent as bj, type WatchEvent as bk, type ZodPathType as bl, type WorkflowRunState as bm, type MastraLanguageModel as bn, type VoiceEventType as bo, type VoiceEventMap as bp, type VoiceConfig as bq, MastraVoice as br, CompositeVoice as bs, DefaultVoice as bt, type AgentNetworkConfig as bu, type ConvertedTool as bv, type MCPServerSSEOptions as bw, type MCPServerHonoSSEOptions as bx, type MCPServerHTTPOptions as by, type Repository as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, TABLE_WORKFLOW_SNAPSHOT as z };
@@ -0,0 +1 @@
1
+
@@ -1,4 +1,4 @@
1
- import { Agent } from './chunk-2AFAKGJ4.js';
1
+ import { Agent } from './chunk-B4TMM6NT.js';
2
2
  import { CohereClient } from 'cohere-ai';
3
3
 
4
4
  var CohereRelevanceScorer = class {
@@ -1,4 +1,4 @@
1
- import { createTool } from './chunk-26WUL725.js';
1
+ import { createTool } from './chunk-C4LMN2IR.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/integration/integration.ts
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ // src/tools/tool.ts
4
+ var Tool = class {
5
+ id;
6
+ description;
7
+ inputSchema;
8
+ outputSchema;
9
+ execute;
10
+ mastra;
11
+ constructor(opts) {
12
+ this.id = opts.id;
13
+ this.description = opts.description;
14
+ this.inputSchema = opts.inputSchema;
15
+ this.outputSchema = opts.outputSchema;
16
+ this.execute = opts.execute;
17
+ this.mastra = opts.mastra;
18
+ }
19
+ };
20
+ function createTool(opts) {
21
+ return new Tool(opts);
22
+ }
23
+
24
+ // src/tools/toolchecks.ts
25
+ function isVercelTool(tool) {
26
+ return !!(tool && !(tool instanceof Tool) && "parameters" in tool);
27
+ }
28
+
29
+ exports.Tool = Tool;
30
+ exports.createTool = createTool;
31
+ exports.isVercelTool = isVercelTool;
@@ -1,6 +1,6 @@
1
1
  import { augmentWithInit } from './chunk-YOQP5T77.js';
2
- import { MessageList } from './chunk-MWU2UKZI.js';
3
- import { deepMerge } from './chunk-26WUL725.js';
2
+ import { MessageList } from './chunk-677GIYFF.js';
3
+ import { deepMerge } from './chunk-Y5BGCPNZ.js';
4
4
  import { MastraBase } from './chunk-JOCKZ2US.js';
5
5
 
6
6
  // src/memory/memory.ts
@@ -1,4 +1,4 @@
1
- import { isUiMessage, isCoreMessage } from './chunk-26WUL725.js';
1
+ import { isUiMessage, isCoreMessage } from './chunk-Y5BGCPNZ.js';
2
2
  import { randomUUID } from 'crypto';
3
3
  import { convertToCoreMessages } from 'ai';
4
4
  import { convertUint8ArrayToBase64, convertBase64ToUint8Array } from '@ai-sdk/provider-utils';
@@ -354,6 +354,7 @@ var MessageList = class _MessageList {
354
354
  memoryMessages = /* @__PURE__ */ new Set();
355
355
  newUserMessages = /* @__PURE__ */ new Set();
356
356
  newResponseMessages = /* @__PURE__ */ new Set();
357
+ userContextMessages = /* @__PURE__ */ new Set();
357
358
  generateMessageId;
358
359
  constructor({
359
360
  threadId,
@@ -643,6 +644,8 @@ ${JSON.stringify(message, null, 2)}`
643
644
  this.newResponseMessages.add(messageV2);
644
645
  } else if (messageSource === `user`) {
645
646
  this.newUserMessages.add(messageV2);
647
+ } else if (messageSource === `context`) {
648
+ this.userContextMessages.add(messageV2);
646
649
  } else {
647
650
  throw new Error(`Missing message source for message ${messageV2}`);
648
651
  }
@@ -1,9 +1,9 @@
1
1
  import { DefaultVoice } from './chunk-FLPSXJWQ.js';
2
2
  import { executeHook } from './chunk-BB4KXGBU.js';
3
- import { MastraLLM } from './chunk-DXK4HYTL.js';
3
+ import { MastraLLM } from './chunk-FGBS7VRU.js';
4
+ import { MessageList } from './chunk-677GIYFF.js';
4
5
  import { InstrumentClass } from './chunk-EWDGXKOQ.js';
5
- import { MessageList } from './chunk-MWU2UKZI.js';
6
- import { ensureToolProperties, makeCoreTool, createMastraProxy } from './chunk-26WUL725.js';
6
+ import { ensureToolProperties, makeCoreTool, createMastraProxy } from './chunk-Y5BGCPNZ.js';
7
7
  import { MastraBase } from './chunk-JOCKZ2US.js';
8
8
  import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
9
9
  import { RuntimeContext } from './chunk-SGGPJWRQ.js';
@@ -763,7 +763,7 @@ var Agent = class extends (_a = MastraBase) {
763
763
  }).addSystem({
764
764
  role: "system",
765
765
  content: instructions || `${this.instructions}.`
766
- }).add(context || [], "user");
766
+ }).add(context || [], "context");
767
767
  if (!memory || !threadId && !resourceId) {
768
768
  messageList.add(messages, "user");
769
769
  return {
@@ -821,7 +821,7 @@ var Agent = class extends (_a = MastraBase) {
821
821
  const processedList = new MessageList({
822
822
  threadId,
823
823
  resourceId
824
- }).addSystem(instructions || `${this.instructions}.`).addSystem(memorySystemMessage).add(context || [], "user").add(processedMemoryMessages, "memory").add(messageList.get.input.v2(), "user").get.all.prompt();
824
+ }).addSystem(instructions || `${this.instructions}.`).addSystem(memorySystemMessage).add(context || [], "context").add(processedMemoryMessages, "memory").add(messageList.get.input.v2(), "user").get.all.prompt();
825
825
  return {
826
826
  convertedTools,
827
827
  threadId,
@@ -1155,6 +1155,7 @@ var Agent = class extends (_a = MastraBase) {
1155
1155
  runId,
1156
1156
  toolChoice,
1157
1157
  experimental_output,
1158
+ telemetry,
1158
1159
  memory: this.getMemory(),
1159
1160
  runtimeContext,
1160
1161
  ...args
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
3
+ var chunk4Z3OU5RY_cjs = require('./chunk-4Z3OU5RY.cjs');
4
4
  var zod = require('zod');
5
5
 
6
6
  // src/integration/integration.ts
@@ -68,7 +68,7 @@ var OpenAPIToolset = class {
68
68
  const tools = Object.keys(clientMethods).reduce((acc, key) => {
69
69
  const comment = documentations[key]?.comment;
70
70
  const fallbackComment = `Execute ${key}`;
71
- const tool = chunkTN3TNMXO_cjs.createTool({
71
+ const tool = chunk4Z3OU5RY_cjs.createTool({
72
72
  id: key,
73
73
  inputSchema: schemas[key] || zod.z.object({}),
74
74
  description: comment || fallbackComment,
@@ -0,0 +1,27 @@
1
+ // src/tools/tool.ts
2
+ var Tool = class {
3
+ id;
4
+ description;
5
+ inputSchema;
6
+ outputSchema;
7
+ execute;
8
+ mastra;
9
+ constructor(opts) {
10
+ this.id = opts.id;
11
+ this.description = opts.description;
12
+ this.inputSchema = opts.inputSchema;
13
+ this.outputSchema = opts.outputSchema;
14
+ this.execute = opts.execute;
15
+ this.mastra = opts.mastra;
16
+ }
17
+ };
18
+ function createTool(opts) {
19
+ return new Tool(opts);
20
+ }
21
+
22
+ // src/tools/toolchecks.ts
23
+ function isVercelTool(tool) {
24
+ return !!(tool && !(tool instanceof Tool) && "parameters" in tool);
25
+ }
26
+
27
+ export { Tool, createTool, isVercelTool };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIJWOVA22_cjs = require('./chunk-IJWOVA22.cjs');
3
+ var chunkMVXVUMLA_cjs = require('./chunk-MVXVUMLA.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 chunkIJWOVA22_cjs.Agent({
41
+ this.agent = new chunkMVXVUMLA_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.
@@ -1,4 +1,4 @@
1
- import { delay } from './chunk-26WUL725.js';
1
+ import { delay } from './chunk-Y5BGCPNZ.js';
2
2
  import { MastraBase } from './chunk-JOCKZ2US.js';
3
3
  import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
4
4
  import { jsonSchema, generateText, Output, generateObject, streamText, streamObject } from 'ai';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
3
+ var chunkWWLMZIHW_cjs = require('./chunk-WWLMZIHW.cjs');
4
4
  var crypto = require('crypto');
5
5
  var ai = require('ai');
6
6
  var providerUtils = require('@ai-sdk/provider-utils');
@@ -356,6 +356,7 @@ var MessageList = class _MessageList {
356
356
  memoryMessages = /* @__PURE__ */ new Set();
357
357
  newUserMessages = /* @__PURE__ */ new Set();
358
358
  newResponseMessages = /* @__PURE__ */ new Set();
359
+ userContextMessages = /* @__PURE__ */ new Set();
359
360
  generateMessageId;
360
361
  constructor({
361
362
  threadId,
@@ -645,6 +646,8 @@ ${JSON.stringify(message, null, 2)}`
645
646
  this.newResponseMessages.add(messageV2);
646
647
  } else if (messageSource === `user`) {
647
648
  this.newUserMessages.add(messageV2);
649
+ } else if (messageSource === `context`) {
650
+ this.userContextMessages.add(messageV2);
648
651
  } else {
649
652
  throw new Error(`Missing message source for message ${messageV2}`);
650
653
  }
@@ -854,10 +857,10 @@ ${JSON.stringify(message, null, 2)}`
854
857
  };
855
858
  }
856
859
  static isVercelUIMessage(msg) {
857
- return !_MessageList.isMastraMessage(msg) && chunkTN3TNMXO_cjs.isUiMessage(msg);
860
+ return !_MessageList.isMastraMessage(msg) && chunkWWLMZIHW_cjs.isUiMessage(msg);
858
861
  }
859
862
  static isVercelCoreMessage(msg) {
860
- return !_MessageList.isMastraMessage(msg) && chunkTN3TNMXO_cjs.isCoreMessage(msg);
863
+ return !_MessageList.isMastraMessage(msg) && chunkWWLMZIHW_cjs.isCoreMessage(msg);
861
864
  }
862
865
  static isMastraMessage(msg) {
863
866
  return _MessageList.isMastraMessageV2(msg) || _MessageList.isMastraMessageV1(msg);
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkBB6DPGIV_cjs = require('./chunk-BB6DPGIV.cjs');
4
- var chunkIJWOVA22_cjs = require('./chunk-IJWOVA22.cjs');
5
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
4
+ var chunkMVXVUMLA_cjs = require('./chunk-MVXVUMLA.cjs');
5
+ var chunk4Z3OU5RY_cjs = require('./chunk-4Z3OU5RY.cjs');
6
6
  var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
7
7
  var chunkRFAN7FAT_cjs = require('./chunk-RFAN7FAT.cjs');
8
8
  var chunkLABUWBKX_cjs = require('./chunk-LABUWBKX.cjs');
@@ -720,7 +720,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
720
720
 
721
721
  // src/workflows/workflow.ts
722
722
  function createStep(params) {
723
- if (params instanceof chunkIJWOVA22_cjs.Agent) {
723
+ if (params instanceof chunkMVXVUMLA_cjs.Agent) {
724
724
  return {
725
725
  id: params.name,
726
726
  // @ts-ignore
@@ -785,7 +785,7 @@ function createStep(params) {
785
785
  }
786
786
  };
787
787
  }
788
- if (params instanceof chunkTN3TNMXO_cjs.Tool) {
788
+ if (params instanceof chunk4Z3OU5RY_cjs.Tool) {
789
789
  if (!params.inputSchema || !params.outputSchema) {
790
790
  throw new Error("Tool must have input and output schemas defined");
791
791
  }
@@ -1,6 +1,6 @@
1
1
  import { EMITTER_SYMBOL } from './chunk-Y7D2JLKS.js';
2
- import { Agent } from './chunk-2AFAKGJ4.js';
3
- import { Tool } from './chunk-26WUL725.js';
2
+ import { Agent } from './chunk-B4TMM6NT.js';
3
+ import { Tool } from './chunk-C4LMN2IR.js';
4
4
  import { MastraBase } from './chunk-JOCKZ2US.js';
5
5
  import { RegisteredLogger } from './chunk-XXVGT7SJ.js';
6
6
  import { RuntimeContext } from './chunk-SGGPJWRQ.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkLXFZUKP3_cjs = require('./chunk-LXFZUKP3.cjs');
4
- var chunkPBHXIWAK_cjs = require('./chunk-PBHXIWAK.cjs');
5
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
4
+ var chunkFHLDRRKJ_cjs = require('./chunk-FHLDRRKJ.cjs');
5
+ var chunkWWLMZIHW_cjs = require('./chunk-WWLMZIHW.cjs');
6
6
  var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
7
7
 
8
8
  // src/memory/memory.ts
@@ -130,7 +130,7 @@ https://mastra.ai/en/docs/memory/overview`
130
130
  if (config?.workingMemory && "use" in config.workingMemory) {
131
131
  throw new Error("The workingMemory.use option has been removed. Working memory always uses tool-call mode.");
132
132
  }
133
- return chunkTN3TNMXO_cjs.deepMerge(this.threadConfig, config || {});
133
+ return chunkWWLMZIHW_cjs.deepMerge(this.threadConfig, config || {});
134
134
  }
135
135
  /**
136
136
  * Apply all configured message processors to a list of messages.
@@ -221,7 +221,7 @@ https://mastra.ai/en/docs/memory/overview`
221
221
  toolCallIds
222
222
  };
223
223
  const savedMessages = await this.saveMessages({ messages: [message], memoryConfig: config });
224
- const list = new chunkPBHXIWAK_cjs.MessageList({ threadId, resourceId }).add(savedMessages[0], "memory");
224
+ const list = new chunkFHLDRRKJ_cjs.MessageList({ threadId, resourceId }).add(savedMessages[0], "memory");
225
225
  return list.get.all.v1()[0];
226
226
  }
227
227
  /**
@@ -2,10 +2,10 @@
2
2
 
3
3
  var chunk3JGO7S6X_cjs = require('./chunk-3JGO7S6X.cjs');
4
4
  var chunkST5RMVLG_cjs = require('./chunk-ST5RMVLG.cjs');
5
- var chunkPNPMKRS2_cjs = require('./chunk-PNPMKRS2.cjs');
5
+ var chunkVBSKHNCY_cjs = require('./chunk-VBSKHNCY.cjs');
6
+ var chunkFHLDRRKJ_cjs = require('./chunk-FHLDRRKJ.cjs');
6
7
  var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
7
- var chunkPBHXIWAK_cjs = require('./chunk-PBHXIWAK.cjs');
8
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
8
+ var chunkWWLMZIHW_cjs = require('./chunk-WWLMZIHW.cjs');
9
9
  var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
10
10
  var chunkRFAN7FAT_cjs = require('./chunk-RFAN7FAT.cjs');
11
11
  var chunkLABUWBKX_cjs = require('./chunk-LABUWBKX.cjs');
@@ -228,13 +228,13 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
228
228
  if (typeof this.#tools === "function") {
229
229
  throw new Error("Tools are not compatible when tools are a function. Please use getTools() instead.");
230
230
  }
231
- return chunkTN3TNMXO_cjs.ensureToolProperties(this.#tools);
231
+ return chunkWWLMZIHW_cjs.ensureToolProperties(this.#tools);
232
232
  }
233
233
  getTools({
234
234
  runtimeContext = new chunkLABUWBKX_cjs.RuntimeContext()
235
235
  } = {}) {
236
236
  if (typeof this.#tools !== "function") {
237
- return chunkTN3TNMXO_cjs.ensureToolProperties(this.#tools);
237
+ return chunkWWLMZIHW_cjs.ensureToolProperties(this.#tools);
238
238
  }
239
239
  const result = this.#tools({
240
240
  runtimeContext
@@ -244,7 +244,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
244
244
  this.logger.error(`[Agent:${this.name}] - Function-based tools returned empty value`);
245
245
  throw new Error("Tools are required when using a function to provide them. The function returned an empty value.");
246
246
  }
247
- return chunkTN3TNMXO_cjs.ensureToolProperties(tools);
247
+ return chunkWWLMZIHW_cjs.ensureToolProperties(tools);
248
248
  });
249
249
  }
250
250
  get llm() {
@@ -266,7 +266,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
266
266
  runtimeContext
267
267
  });
268
268
  return resolveMaybePromise(model, model2 => {
269
- const llm = new chunkPNPMKRS2_cjs.MastraLLM({
269
+ const llm = new chunkVBSKHNCY_cjs.MastraLLM({
270
270
  model: model2,
271
271
  mastra: this.#mastra
272
272
  });
@@ -393,7 +393,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
393
393
  memoryConfig,
394
394
  resourceId,
395
395
  runId,
396
- messageList = new chunkPBHXIWAK_cjs.MessageList({
396
+ messageList = new chunkFHLDRRKJ_cjs.MessageList({
397
397
  threadId,
398
398
  resourceId
399
399
  })
@@ -525,7 +525,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
525
525
  runtimeContext
526
526
  }) : this.model
527
527
  };
528
- return [k, chunkTN3TNMXO_cjs.makeCoreTool(tool, options)];
528
+ return [k, chunkWWLMZIHW_cjs.makeCoreTool(tool, options)];
529
529
  }));
530
530
  const assignedToolEntriesConverted = Object.fromEntries(assignedCoreToolEntries.filter(entry => Boolean(entry)));
531
531
  toolsForRequest = {
@@ -565,7 +565,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
565
565
  runtimeContext
566
566
  }) : this.model
567
567
  };
568
- const convertedToCoreTool = chunkTN3TNMXO_cjs.makeCoreTool(toolObj, options, "toolset");
568
+ const convertedToCoreTool = chunkWWLMZIHW_cjs.makeCoreTool(toolObj, options, "toolset");
569
569
  toolsForRequest[toolName] = convertedToCoreTool;
570
570
  }
571
571
  }
@@ -606,7 +606,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
606
606
  runtimeContext
607
607
  }) : this.model
608
608
  };
609
- const convertedToCoreTool = chunkTN3TNMXO_cjs.makeCoreTool(rest, options, "client-tool");
609
+ const convertedToCoreTool = chunkWWLMZIHW_cjs.makeCoreTool(rest, options, "client-tool");
610
610
  toolsForRequest[toolName] = convertedToCoreTool;
611
611
  }
612
612
  }
@@ -673,7 +673,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
673
673
  let mastraProxy = void 0;
674
674
  const logger = this.logger;
675
675
  if (this.#mastra) {
676
- mastraProxy = chunkTN3TNMXO_cjs.createMastraProxy({
676
+ mastraProxy = chunkWWLMZIHW_cjs.createMastraProxy({
677
677
  mastra: this.#mastra,
678
678
  logger
679
679
  });
@@ -763,14 +763,14 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
763
763
  runId,
764
764
  runtimeContext
765
765
  });
766
- const messageList = new chunkPBHXIWAK_cjs.MessageList({
766
+ const messageList = new chunkFHLDRRKJ_cjs.MessageList({
767
767
  threadId,
768
768
  resourceId,
769
769
  generateMessageId
770
770
  }).addSystem({
771
771
  role: "system",
772
772
  content: instructions || `${this.instructions}.`
773
- }).add(context || [], "user");
773
+ }).add(context || [], "context");
774
774
  if (!memory || !threadId && !resourceId) {
775
775
  messageList.add(messages, "user");
776
776
  return {
@@ -825,10 +825,10 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
825
825
  systemMessage,
826
826
  memorySystemMessage: memorySystemMessage || void 0
827
827
  });
828
- const processedList = new chunkPBHXIWAK_cjs.MessageList({
828
+ const processedList = new chunkFHLDRRKJ_cjs.MessageList({
829
829
  threadId,
830
830
  resourceId
831
- }).addSystem(instructions || `${this.instructions}.`).addSystem(memorySystemMessage).add(context || [], "user").add(processedMemoryMessages, "memory").add(messageList.get.input.v2(), "user").get.all.prompt();
831
+ }).addSystem(instructions || `${this.instructions}.`).addSystem(memorySystemMessage).add(context || [], "context").add(processedMemoryMessages, "memory").add(messageList.get.input.v2(), "user").get.all.prompt();
832
832
  return {
833
833
  convertedTools,
834
834
  threadId,
@@ -1162,6 +1162,7 @@ exports.Agent = class Agent extends (_a = chunkVHZPWE5L_cjs.MastraBase) {
1162
1162
  runId,
1163
1163
  toolChoice,
1164
1164
  experimental_output,
1165
+ telemetry,
1165
1166
  memory: this.getMemory(),
1166
1167
  runtimeContext,
1167
1168
  ...args
@@ -1911,7 +1912,7 @@ var Machine = class extends EventEmitter__default.default {
1911
1912
  const logger = this.logger;
1912
1913
  let mastraProxy = void 0;
1913
1914
  if (this.#mastra) {
1914
- mastraProxy = chunkTN3TNMXO_cjs.createMastraProxy({
1915
+ mastraProxy = chunkWWLMZIHW_cjs.createMastraProxy({
1915
1916
  mastra: this.#mastra,
1916
1917
  logger
1917
1918
  });
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkTN3TNMXO_cjs = require('./chunk-TN3TNMXO.cjs');
3
+ var chunkWWLMZIHW_cjs = require('./chunk-WWLMZIHW.cjs');
4
4
  var chunkVHZPWE5L_cjs = require('./chunk-VHZPWE5L.cjs');
5
5
  var chunkRFAN7FAT_cjs = require('./chunk-RFAN7FAT.cjs');
6
6
  var ai = require('ai');
@@ -162,7 +162,7 @@ var MastraLLM = class extends MastraLLMBase {
162
162
  });
163
163
  if (props?.response?.headers?.["x-ratelimit-remaining-tokens"] && parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"], 10) < 2e3) {
164
164
  this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
165
- await chunkTN3TNMXO_cjs.delay(10 * 1e3);
165
+ await chunkWWLMZIHW_cjs.delay(10 * 1e3);
166
166
  }
167
167
  },
168
168
  ...rest
@@ -231,7 +231,7 @@ var MastraLLM = class extends MastraLLMBase {
231
231
  });
232
232
  if (props?.response?.headers?.["x-ratelimit-remaining-tokens"] && parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"], 10) < 2e3) {
233
233
  this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
234
- await chunkTN3TNMXO_cjs.delay(10 * 1e3);
234
+ await chunkWWLMZIHW_cjs.delay(10 * 1e3);
235
235
  }
236
236
  },
237
237
  ...rest
@@ -304,7 +304,7 @@ var MastraLLM = class extends MastraLLMBase {
304
304
  });
305
305
  if (props?.response?.headers?.["x-ratelimit-remaining-tokens"] && parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"], 10) < 2e3) {
306
306
  this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
307
- await chunkTN3TNMXO_cjs.delay(10 * 1e3);
307
+ await chunkWWLMZIHW_cjs.delay(10 * 1e3);
308
308
  }
309
309
  },
310
310
  onFinish: async (props) => {
@@ -395,7 +395,7 @@ var MastraLLM = class extends MastraLLMBase {
395
395
  });
396
396
  if (props?.response?.headers?.["x-ratelimit-remaining-tokens"] && parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"], 10) < 2e3) {
397
397
  this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
398
- await chunkTN3TNMXO_cjs.delay(10 * 1e3);
398
+ await chunkWWLMZIHW_cjs.delay(10 * 1e3);
399
399
  }
400
400
  },
401
401
  onFinish: async (props) => {