@mastra/core 1.23.0-alpha.1 → 1.23.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/agent/index.cjs +13 -13
  3. package/dist/agent/index.js +2 -2
  4. package/dist/agent/message-list/adapters/AIV5Adapter.d.ts.map +1 -1
  5. package/dist/agent/message-list/index.cjs +18 -18
  6. package/dist/agent/message-list/index.js +1 -1
  7. package/dist/browser/index.cjs +2 -2
  8. package/dist/browser/index.js +1 -1
  9. package/dist/channels/index.cjs +4 -4
  10. package/dist/channels/index.js +1 -1
  11. package/dist/{chunk-VW6KVZ5J.js → chunk-2B5UMCYJ.js} +4 -4
  12. package/dist/{chunk-VW6KVZ5J.js.map → chunk-2B5UMCYJ.js.map} +1 -1
  13. package/dist/{chunk-MM743DL3.cjs → chunk-4XGWICCA.cjs} +41 -41
  14. package/dist/{chunk-MM743DL3.cjs.map → chunk-4XGWICCA.cjs.map} +1 -1
  15. package/dist/{chunk-J5E6MWAL.cjs → chunk-4YLTW7WQ.cjs} +3 -3
  16. package/dist/{chunk-J5E6MWAL.cjs.map → chunk-4YLTW7WQ.cjs.map} +1 -1
  17. package/dist/{chunk-4T5MI4MY.cjs → chunk-7FAUTKNJ.cjs} +25 -16
  18. package/dist/chunk-7FAUTKNJ.cjs.map +1 -0
  19. package/dist/{chunk-67H3I6U2.cjs → chunk-7QRTQJN3.cjs} +40 -36
  20. package/dist/chunk-7QRTQJN3.cjs.map +1 -0
  21. package/dist/{chunk-HGR2ESKV.js → chunk-DRKIN7BQ.js} +4 -2
  22. package/dist/chunk-DRKIN7BQ.js.map +1 -0
  23. package/dist/{chunk-QTJXNO73.cjs → chunk-EVEDMEV4.cjs} +17 -17
  24. package/dist/{chunk-QTJXNO73.cjs.map → chunk-EVEDMEV4.cjs.map} +1 -1
  25. package/dist/{chunk-QWJTDFN4.cjs → chunk-FLAZ5DGJ.cjs} +77 -77
  26. package/dist/{chunk-QWJTDFN4.cjs.map → chunk-FLAZ5DGJ.cjs.map} +1 -1
  27. package/dist/{chunk-752IYVJ7.cjs → chunk-GVBTQM5Z.cjs} +7 -7
  28. package/dist/{chunk-752IYVJ7.cjs.map → chunk-GVBTQM5Z.cjs.map} +1 -1
  29. package/dist/{chunk-E4FZAE2V.js → chunk-H2RJTQHF.js} +3 -3
  30. package/dist/{chunk-E4FZAE2V.js.map → chunk-H2RJTQHF.js.map} +1 -1
  31. package/dist/{chunk-CBP34G7K.js → chunk-HERBNLM3.js} +5 -5
  32. package/dist/{chunk-CBP34G7K.js.map → chunk-HERBNLM3.js.map} +1 -1
  33. package/dist/{chunk-44L3XRON.js → chunk-LNXWTBOF.js} +3 -3
  34. package/dist/{chunk-44L3XRON.js.map → chunk-LNXWTBOF.js.map} +1 -1
  35. package/dist/{chunk-FDB7QXFM.cjs → chunk-MIYQSZ2W.cjs} +55 -55
  36. package/dist/{chunk-FDB7QXFM.cjs.map → chunk-MIYQSZ2W.cjs.map} +1 -1
  37. package/dist/{chunk-PND63X2U.js → chunk-MMI2SBWC.js} +28 -24
  38. package/dist/chunk-MMI2SBWC.js.map +1 -0
  39. package/dist/{chunk-VBGSQQ6Z.cjs → chunk-MVPHDFFW.cjs} +9 -9
  40. package/dist/{chunk-VBGSQQ6Z.cjs.map → chunk-MVPHDFFW.cjs.map} +1 -1
  41. package/dist/{chunk-R2KKOX5U.js → chunk-NFVSULGO.js} +16 -7
  42. package/dist/chunk-NFVSULGO.js.map +1 -0
  43. package/dist/{chunk-NPU3H2M6.js → chunk-P3DDJKTX.js} +4 -4
  44. package/dist/{chunk-NPU3H2M6.js.map → chunk-P3DDJKTX.js.map} +1 -1
  45. package/dist/{chunk-ZXVSOWZV.js → chunk-PCBG2WLA.js} +5 -5
  46. package/dist/{chunk-ZXVSOWZV.js.map → chunk-PCBG2WLA.js.map} +1 -1
  47. package/dist/{chunk-ASSX63NG.cjs → chunk-R3SEHW7P.cjs} +185 -185
  48. package/dist/{chunk-ASSX63NG.cjs.map → chunk-R3SEHW7P.cjs.map} +1 -1
  49. package/dist/{chunk-I4FNELWY.js → chunk-UPJU3KI2.js} +9 -9
  50. package/dist/{chunk-I4FNELWY.js.map → chunk-UPJU3KI2.js.map} +1 -1
  51. package/dist/{chunk-2GB3EFMQ.js → chunk-VO2YW23O.js} +6 -6
  52. package/dist/{chunk-2GB3EFMQ.js.map → chunk-VO2YW23O.js.map} +1 -1
  53. package/dist/{chunk-XB5NKHYR.cjs → chunk-WAPY5X7M.cjs} +4 -2
  54. package/dist/chunk-WAPY5X7M.cjs.map +1 -0
  55. package/dist/{chunk-7L77UGLB.js → chunk-WERYKYLS.js} +3 -3
  56. package/dist/{chunk-7L77UGLB.js.map → chunk-WERYKYLS.js.map} +1 -1
  57. package/dist/{chunk-56OCTZBD.js → chunk-X22EW7TQ.js} +2 -2
  58. package/dist/{chunk-56OCTZBD.js.map → chunk-X22EW7TQ.js.map} +1 -1
  59. package/dist/{chunk-7HWDGEET.cjs → chunk-XDU43X6D.cjs} +2 -2
  60. package/dist/{chunk-7HWDGEET.cjs.map → chunk-XDU43X6D.cjs.map} +1 -1
  61. package/dist/{chunk-C7W22LW7.cjs → chunk-Y7AFTO4R.cjs} +10 -10
  62. package/dist/{chunk-C7W22LW7.cjs.map → chunk-Y7AFTO4R.cjs.map} +1 -1
  63. package/dist/{chunk-2ABXM7ZX.cjs → chunk-YSNLPDAH.cjs} +6 -6
  64. package/dist/{chunk-2ABXM7ZX.cjs.map → chunk-YSNLPDAH.cjs.map} +1 -1
  65. package/dist/{chunk-ZINYS2FM.js → chunk-ZBLHRCIL.js} +4 -4
  66. package/dist/{chunk-ZINYS2FM.js.map → chunk-ZBLHRCIL.js.map} +1 -1
  67. package/dist/datasets/index.cjs +17 -17
  68. package/dist/datasets/index.js +2 -2
  69. package/dist/docs/SKILL.md +1 -1
  70. package/dist/docs/assets/SOURCE_MAP.json +347 -347
  71. package/dist/evals/index.cjs +23 -23
  72. package/dist/evals/index.js +3 -3
  73. package/dist/evals/scoreTraces/index.cjs +5 -5
  74. package/dist/evals/scoreTraces/index.js +2 -2
  75. package/dist/harness/index.cjs +7 -7
  76. package/dist/harness/index.js +5 -5
  77. package/dist/index.cjs +2 -2
  78. package/dist/index.js +1 -1
  79. package/dist/llm/index.cjs +20 -20
  80. package/dist/llm/index.js +5 -5
  81. package/dist/llm/model/provider-types.generated.d.ts +7 -5
  82. package/dist/loop/index.cjs +14 -14
  83. package/dist/loop/index.js +1 -1
  84. package/dist/mastra/index.cjs +2 -2
  85. package/dist/mastra/index.js +1 -1
  86. package/dist/mastra-3SMFDQHS.cjs +12 -0
  87. package/dist/{mastra-PWENJ3CT.cjs.map → mastra-3SMFDQHS.cjs.map} +1 -1
  88. package/dist/mastra-RJ5CD2IP.js +3 -0
  89. package/dist/{mastra-VFBM63EH.js.map → mastra-RJ5CD2IP.js.map} +1 -1
  90. package/dist/memory/index.cjs +17 -17
  91. package/dist/memory/index.js +1 -1
  92. package/dist/models-dev-6R5RVMP5.cjs +12 -0
  93. package/dist/{models-dev-NK3HQWLN.cjs.map → models-dev-6R5RVMP5.cjs.map} +1 -1
  94. package/dist/models-dev-BK5CIGHI.js +3 -0
  95. package/dist/{models-dev-LDOOABB3.js.map → models-dev-BK5CIGHI.js.map} +1 -1
  96. package/dist/netlify-FZXHNSAC.cjs +12 -0
  97. package/dist/{netlify-M374SBKN.cjs.map → netlify-FZXHNSAC.cjs.map} +1 -1
  98. package/dist/netlify-W4RS6WT3.js +3 -0
  99. package/dist/{netlify-BD2Y34DD.js.map → netlify-W4RS6WT3.js.map} +1 -1
  100. package/dist/processor-provider/index.cjs +10 -10
  101. package/dist/processor-provider/index.js +1 -1
  102. package/dist/processors/index.cjs +44 -44
  103. package/dist/processors/index.js +1 -1
  104. package/dist/provider-registry-GRUH55IK.cjs +40 -0
  105. package/dist/{provider-registry-YMGOMVKY.cjs.map → provider-registry-GRUH55IK.cjs.map} +1 -1
  106. package/dist/provider-registry-L4DLIKZ5.js +3 -0
  107. package/dist/{provider-registry-OX6F72LR.js.map → provider-registry-L4DLIKZ5.js.map} +1 -1
  108. package/dist/provider-registry.json +20 -16
  109. package/dist/relevance/index.cjs +3 -3
  110. package/dist/relevance/index.js +1 -1
  111. package/dist/storage/constants.cjs +56 -56
  112. package/dist/storage/constants.js +1 -1
  113. package/dist/storage/domains/memory/base.d.ts +2 -2
  114. package/dist/storage/domains/memory/base.d.ts.map +1 -1
  115. package/dist/storage/domains/memory/inmemory.d.ts +2 -2
  116. package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
  117. package/dist/storage/index.cjs +160 -160
  118. package/dist/storage/index.js +2 -2
  119. package/dist/storage/types.d.ts +9 -0
  120. package/dist/storage/types.d.ts.map +1 -1
  121. package/dist/stream/index.cjs +11 -11
  122. package/dist/stream/index.js +2 -2
  123. package/dist/tool-loop-agent/index.cjs +4 -4
  124. package/dist/tool-loop-agent/index.js +1 -1
  125. package/dist/vector/index.cjs +7 -7
  126. package/dist/vector/index.js +1 -1
  127. package/dist/workflows/evented/index.cjs +10 -10
  128. package/dist/workflows/evented/index.js +1 -1
  129. package/dist/workflows/index.cjs +24 -24
  130. package/dist/workflows/index.js +1 -1
  131. package/package.json +5 -5
  132. package/src/llm/model/provider-types.generated.d.ts +7 -5
  133. package/dist/chunk-4T5MI4MY.cjs.map +0 -1
  134. package/dist/chunk-67H3I6U2.cjs.map +0 -1
  135. package/dist/chunk-HGR2ESKV.js.map +0 -1
  136. package/dist/chunk-PND63X2U.js.map +0 -1
  137. package/dist/chunk-R2KKOX5U.js.map +0 -1
  138. package/dist/chunk-XB5NKHYR.cjs.map +0 -1
  139. package/dist/mastra-PWENJ3CT.cjs +0 -12
  140. package/dist/mastra-VFBM63EH.js +0 -3
  141. package/dist/models-dev-LDOOABB3.js +0 -3
  142. package/dist/models-dev-NK3HQWLN.cjs +0 -12
  143. package/dist/netlify-BD2Y34DD.js +0 -3
  144. package/dist/netlify-M374SBKN.cjs +0 -12
  145. package/dist/provider-registry-OX6F72LR.js +0 -3
  146. package/dist/provider-registry-YMGOMVKY.cjs +0 -40
@@ -3,13 +3,13 @@
3
3
  var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
4
4
  var chunkHIC3WGQU_cjs = require('./chunk-HIC3WGQU.cjs');
5
5
  var chunkT26CFBWF_cjs = require('./chunk-T26CFBWF.cjs');
6
- var chunk4T5MI4MY_cjs = require('./chunk-4T5MI4MY.cjs');
7
- var chunkXB5NKHYR_cjs = require('./chunk-XB5NKHYR.cjs');
6
+ var chunk7FAUTKNJ_cjs = require('./chunk-7FAUTKNJ.cjs');
7
+ var chunkWAPY5X7M_cjs = require('./chunk-WAPY5X7M.cjs');
8
8
  var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
9
9
  var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
10
10
  var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
11
11
  var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
12
- var chunkQWJTDFN4_cjs = require('./chunk-QWJTDFN4.cjs');
12
+ var chunkFLAZ5DGJ_cjs = require('./chunk-FLAZ5DGJ.cjs');
13
13
  var chunkINA5PMVU_cjs = require('./chunk-INA5PMVU.cjs');
14
14
  var chunk22FSGATE_cjs = require('./chunk-22FSGATE.cjs');
15
15
  var chunkW232X652_cjs = require('./chunk-W232X652.cjs');
@@ -1307,7 +1307,7 @@ var ProcessorRunner = class _ProcessorRunner {
1307
1307
  writer
1308
1308
  });
1309
1309
  const mutations = messageList.stopRecording();
1310
- if (processResult instanceof chunkXB5NKHYR_cjs.MessageList) {
1310
+ if (processResult instanceof chunkWAPY5X7M_cjs.MessageList) {
1311
1311
  if (processResult !== messageList) {
1312
1312
  throw new chunk4U7ZLI36_cjs.MastraError({
1313
1313
  category: "USER",
@@ -1601,7 +1601,7 @@ var ProcessorRunner = class _ProcessorRunner {
1601
1601
  retryCount
1602
1602
  });
1603
1603
  let mutations;
1604
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
1604
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
1605
1605
  if (result !== messageList) {
1606
1606
  throw new chunk4U7ZLI36_cjs.MastraError({
1607
1607
  category: "USER",
@@ -1971,7 +1971,7 @@ var ProcessorRunner = class _ProcessorRunner {
1971
1971
  writer
1972
1972
  });
1973
1973
  const mutations = messageList.stopRecording();
1974
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
1974
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
1975
1975
  if (result !== messageList) {
1976
1976
  throw new chunk4U7ZLI36_cjs.MastraError({
1977
1977
  category: "USER",
@@ -2043,7 +2043,7 @@ var ProcessorRunner = class _ProcessorRunner {
2043
2043
  processor,
2044
2044
  stepNumber
2045
2045
  }) {
2046
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
2046
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
2047
2047
  if (result !== messageList) {
2048
2048
  throw new chunk4U7ZLI36_cjs.MastraError({
2049
2049
  category: "USER",
@@ -2078,7 +2078,7 @@ var ProcessorRunner = class _ProcessorRunner {
2078
2078
  }
2079
2079
  const { model: _model, ...rest } = result;
2080
2080
  if (result.model) {
2081
- const resolvedModel = await chunkQWJTDFN4_cjs.resolveModelConfig(result.model);
2081
+ const resolvedModel = await chunkFLAZ5DGJ_cjs.resolveModelConfig(result.model);
2082
2082
  const isSupported = isSupportedLanguageModel(resolvedModel);
2083
2083
  if (!isSupported) {
2084
2084
  throw new chunk4U7ZLI36_cjs.MastraError({
@@ -3286,7 +3286,7 @@ var MastraModelOutput = class extends chunkDKK77FIJ_cjs.MastraBase {
3286
3286
  );
3287
3287
  const responseMessages = self.messageList.get.response.aiV4.core();
3288
3288
  const lastResponseMessage = responseMessages[responseMessages.length - 1];
3289
- const outputText = lastResponseMessage ? chunkXB5NKHYR_cjs.coreContentToString(lastResponseMessage.content) : "";
3289
+ const outputText = lastResponseMessage ? chunkWAPY5X7M_cjs.coreContentToString(lastResponseMessage.content) : "";
3290
3290
  if (lastStep && outputText && outputText !== originalText) {
3291
3291
  lastStep.text = outputText;
3292
3292
  }
@@ -4668,13 +4668,13 @@ function convertMastraChunkToAISDKv5({
4668
4668
  case "file": {
4669
4669
  const filePart = mode === "generate" ? {
4670
4670
  type: "file",
4671
- file: new chunkXB5NKHYR_cjs.DefaultGeneratedFile({
4671
+ file: new chunkWAPY5X7M_cjs.DefaultGeneratedFile({
4672
4672
  data: chunk.payload.data,
4673
4673
  mediaType: chunk.payload.mimeType
4674
4674
  })
4675
4675
  } : {
4676
4676
  type: "file",
4677
- file: new chunkXB5NKHYR_cjs.DefaultGeneratedFileWithType({
4677
+ file: new chunkWAPY5X7M_cjs.DefaultGeneratedFileWithType({
4678
4678
  data: chunk.payload.data,
4679
4679
  mediaType: chunk.payload.mimeType
4680
4680
  })
@@ -9995,7 +9995,7 @@ function createStepFromProcessor(processor) {
9995
9995
  phase,
9996
9996
  // Auto-create MessageList from messages if not provided
9997
9997
  // This enables running processor workflows from the UI where messageList can't be serialized
9998
- messageList: messageList ?? (Array.isArray(messages) ? new chunkXB5NKHYR_cjs.MessageList().add(messages, "input").addSystem(systemMessages ?? []) : void 0),
9998
+ messageList: messageList ?? (Array.isArray(messages) ? new chunkWAPY5X7M_cjs.MessageList().add(messages, "input").addSystem(systemMessages ?? []) : void 0),
9999
9999
  stepNumber,
10000
10000
  systemMessages,
10001
10001
  streamParts,
@@ -10052,7 +10052,7 @@ function createStepFromProcessor(processor) {
10052
10052
  messageList: checkedMessageList,
10053
10053
  systemMessages: systemMessages ?? []
10054
10054
  });
10055
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
10055
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
10056
10056
  if (result !== checkedMessageList) {
10057
10057
  throw new chunk4U7ZLI36_cjs.MastraError({
10058
10058
  category: "USER" /* USER */,
@@ -10235,7 +10235,7 @@ function createStepFromProcessor(processor) {
10235
10235
  messageList: passThrough.messageList,
10236
10236
  result: passThrough.result ?? defaultResult
10237
10237
  });
10238
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
10238
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
10239
10239
  if (result !== passThrough.messageList) {
10240
10240
  throw new chunk4U7ZLI36_cjs.MastraError({
10241
10241
  category: "USER" /* USER */,
@@ -10302,7 +10302,7 @@ function createStepFromProcessor(processor) {
10302
10302
  systemMessages: systemMessages ?? [],
10303
10303
  steps: steps ?? []
10304
10304
  });
10305
- if (result instanceof chunkXB5NKHYR_cjs.MessageList) {
10305
+ if (result instanceof chunkWAPY5X7M_cjs.MessageList) {
10306
10306
  if (result !== checkedMessageList) {
10307
10307
  throw new chunk4U7ZLI36_cjs.MastraError({
10308
10308
  category: "USER" /* USER */,
@@ -12813,7 +12813,7 @@ var MastraScorer = class _MastraScorer {
12813
12813
  }
12814
12814
  });
12815
12815
  }
12816
- const resolvedModel = await chunkQWJTDFN4_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
12816
+ const resolvedModel = await chunkFLAZ5DGJ_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
12817
12817
  const judgeModel = resolvedModel.modelId;
12818
12818
  const judge = new Agent({
12819
12819
  id: "judge",
@@ -14521,7 +14521,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
14521
14521
  }
14522
14522
  });
14523
14523
  let transportResolver;
14524
- if (currentStep.model instanceof chunkQWJTDFN4_cjs.ModelRouterLanguageModel) {
14524
+ if (currentStep.model instanceof chunkFLAZ5DGJ_cjs.ModelRouterLanguageModel) {
14525
14525
  const routerModel = currentStep.model;
14526
14526
  transportResolver = () => routerModel._getStreamTransport();
14527
14527
  }
@@ -14888,7 +14888,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
14888
14888
  toolInvocation: {
14889
14889
  state: "result",
14890
14890
  toolCallId: toolCall.toolCallId,
14891
- toolName: chunkXB5NKHYR_cjs.sanitizeToolName(toolCall.toolName),
14891
+ toolName: chunkWAPY5X7M_cjs.sanitizeToolName(toolCall.toolName),
14892
14892
  args: toolCall.args,
14893
14893
  result: toolCall.error?.message ?? toolCall.error
14894
14894
  },
@@ -14923,7 +14923,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
14923
14923
  toolInvocation: {
14924
14924
  state: "result",
14925
14925
  toolCallId: toolCall.toolCallId,
14926
- toolName: chunkXB5NKHYR_cjs.sanitizeToolName(toolCall.toolName),
14926
+ toolName: chunkWAPY5X7M_cjs.sanitizeToolName(toolCall.toolName),
14927
14927
  args: toolCall.args,
14928
14928
  result: toolCall.result
14929
14929
  },
@@ -14980,7 +14980,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
14980
14980
  toolInvocation: {
14981
14981
  state: "result",
14982
14982
  toolCallId: toolCall.toolCallId,
14983
- toolName: chunkXB5NKHYR_cjs.sanitizeToolName(toolCall.toolName),
14983
+ toolName: chunkWAPY5X7M_cjs.sanitizeToolName(toolCall.toolName),
14984
14984
  args: toolCall.args,
14985
14985
  result: toolCall.result
14986
14986
  },
@@ -16556,7 +16556,7 @@ async function prepareMemoryStep({
16556
16556
  );
16557
16557
  }
16558
16558
  } else {
16559
- const messageList = new chunkXB5NKHYR_cjs.MessageList({
16559
+ const messageList = new chunkWAPY5X7M_cjs.MessageList({
16560
16560
  threadId: thread?.id,
16561
16561
  resourceId: thread?.resourceId
16562
16562
  });
@@ -16613,7 +16613,7 @@ async function saveMessagesWithProcessors(memory, messages, processorRunner, con
16613
16613
  await memory.saveMessages({ messages });
16614
16614
  return;
16615
16615
  }
16616
- const messageList = new chunkXB5NKHYR_cjs.MessageList();
16616
+ const messageList = new chunkWAPY5X7M_cjs.MessageList();
16617
16617
  for (const msg of messages) {
16618
16618
  messageList.add(msg, "response");
16619
16619
  }
@@ -18051,7 +18051,7 @@ async function networkLoop({
18051
18051
  "resumeData": "string"
18052
18052
  }
18053
18053
  `;
18054
- const messageList = new chunkXB5NKHYR_cjs.MessageList();
18054
+ const messageList = new chunkWAPY5X7M_cjs.MessageList();
18055
18055
  messageList.addSystem(systemInstructions);
18056
18056
  messageList.add(task, "user");
18057
18057
  const result = llm.stream({
@@ -18692,7 +18692,7 @@ var AgentLegacyHandler = class {
18692
18692
  methodType: methodType === "generate" ? "generateLegacy" : "streamLegacy",
18693
18693
  memoryConfig
18694
18694
  });
18695
- let messageList = new chunkXB5NKHYR_cjs.MessageList({
18695
+ let messageList = new chunkWAPY5X7M_cjs.MessageList({
18696
18696
  threadId,
18697
18697
  resourceId,
18698
18698
  generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
@@ -18851,7 +18851,7 @@ var AgentLegacyHandler = class {
18851
18851
  result: resToLog,
18852
18852
  threadId
18853
18853
  });
18854
- const messageListResponses = new chunkXB5NKHYR_cjs.MessageList({
18854
+ const messageListResponses = new chunkWAPY5X7M_cjs.MessageList({
18855
18855
  threadId,
18856
18856
  resourceId,
18857
18857
  generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
@@ -20027,7 +20027,7 @@ var prepareToolsStepOutputSchema = v4.z.object({
20027
20027
  var prepareMemoryStepOutputSchema = v4.z.object({
20028
20028
  threadExists: v4.z.boolean(),
20029
20029
  thread: storageThreadSchema.optional(),
20030
- messageList: v4.z.instanceof(chunkXB5NKHYR_cjs.MessageList),
20030
+ messageList: v4.z.instanceof(chunkWAPY5X7M_cjs.MessageList),
20031
20031
  /** Shared processor states map that persists across loop iterations for both input and output processors */
20032
20032
  processorStates: v4.z.instanceof(Map),
20033
20033
  /** Tripwire data when input processor triggered abort */
@@ -20069,7 +20069,7 @@ function createPrepareMemoryStep({
20069
20069
  execute: async ({ ...rest }) => {
20070
20070
  const observabilityContext = chunkW6PDQCCN_cjs.resolveObservabilityContext(rest);
20071
20071
  const thread = threadFromArgs;
20072
- const messageList = new chunkXB5NKHYR_cjs.MessageList({
20072
+ const messageList = new chunkWAPY5X7M_cjs.MessageList({
20073
20073
  threadId: thread?.id,
20074
20074
  resourceId,
20075
20075
  generateMessageId: capabilities.generateMessageId,
@@ -21444,7 +21444,7 @@ ${errorMessages}`,
21444
21444
  */
21445
21445
  async resolveModelConfig(modelConfig, requestContext) {
21446
21446
  try {
21447
- return await chunkQWJTDFN4_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
21447
+ return await chunkFLAZ5DGJ_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
21448
21448
  } catch (error) {
21449
21449
  const mastraError = new chunk4U7ZLI36_cjs.MastraError({
21450
21450
  id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
@@ -21764,7 +21764,7 @@ ${errorMessages}`,
21764
21764
  }) {
21765
21765
  const observabilityContext = chunkW6PDQCCN_cjs.resolveObservabilityContext(rest);
21766
21766
  const llm = await this.getLLM({ requestContext, model });
21767
- const normMessage = new chunkXB5NKHYR_cjs.MessageList().add(message, "user").get.all.aiV5.ui().at(-1);
21767
+ const normMessage = new chunkWAPY5X7M_cjs.MessageList().add(message, "user").get.all.aiV5.ui().at(-1);
21768
21768
  if (!normMessage) {
21769
21769
  throw new Error(`Could not generate title from input ${JSON.stringify(message)}`);
21770
21770
  }
@@ -21787,7 +21787,7 @@ ${errorMessages}`,
21787
21787
  const systemInstructions = await this.resolveTitleInstructions(requestContext, instructions);
21788
21788
  let text = "";
21789
21789
  if (isSupportedLanguageModel(llm.getModel())) {
21790
- const messageList = new chunkXB5NKHYR_cjs.MessageList().add(
21790
+ const messageList = new chunkWAPY5X7M_cjs.MessageList().add(
21791
21791
  [
21792
21792
  {
21793
21793
  role: "system",
@@ -21840,7 +21840,7 @@ ${errorMessages}`,
21840
21840
  async genTitle(userMessage, requestContext, observabilityContext, model, instructions) {
21841
21841
  try {
21842
21842
  if (userMessage) {
21843
- const normMessage = new chunkXB5NKHYR_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
21843
+ const normMessage = new chunkWAPY5X7M_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
21844
21844
  if (normMessage) {
21845
21845
  return await this.generateTitleFromUserMessage({
21846
21846
  message: normMessage,
@@ -23691,7 +23691,7 @@ ${effectiveInstructions}`;
23691
23691
  const resolvedModel = await this.resolveModelConfig(selection, requestContext);
23692
23692
  this.assertSupportsPreparedModels(resolvedModel);
23693
23693
  let headers;
23694
- if (resolvedModel instanceof chunkQWJTDFN4_cjs.ModelRouterLanguageModel) {
23694
+ if (resolvedModel instanceof chunkFLAZ5DGJ_cjs.ModelRouterLanguageModel) {
23695
23695
  headers = resolvedModel.config?.headers;
23696
23696
  }
23697
23697
  return [
@@ -23723,7 +23723,7 @@ ${effectiveInstructions}`;
23723
23723
  throw mastraError;
23724
23724
  }
23725
23725
  let headers;
23726
- if (model instanceof chunkQWJTDFN4_cjs.ModelRouterLanguageModel) {
23726
+ if (model instanceof chunkFLAZ5DGJ_cjs.ModelRouterLanguageModel) {
23727
23727
  headers = model.config?.headers;
23728
23728
  }
23729
23729
  return {
@@ -23784,7 +23784,7 @@ ${effectiveInstructions}`;
23784
23784
  model: options.model
23785
23785
  });
23786
23786
  const resolvedModel = llm.getModel();
23787
- const isGatewayModel = resolvedModel instanceof chunkQWJTDFN4_cjs.ModelRouterLanguageModel && resolvedModel.gatewayId === "mastra";
23787
+ const isGatewayModel = resolvedModel instanceof chunkFLAZ5DGJ_cjs.ModelRouterLanguageModel && resolvedModel.gatewayId === "mastra";
23788
23788
  if (resourceId && threadFromArgs && !this.hasOwnMemory() && !isGatewayModel) {
23789
23789
  this.logger.warn("No memory is configured but resourceId and threadId were passed in args", { agent: this.name });
23790
23790
  }
@@ -27943,7 +27943,7 @@ var SemanticRecall = class {
27943
27943
  */
27944
27944
  formatCrossThreadMessages(messages, currentThreadId) {
27945
27945
  let result = ``;
27946
- const v1Messages = new chunkXB5NKHYR_cjs.MessageList().add(messages, "memory").get.all.v1();
27946
+ const v1Messages = new chunkWAPY5X7M_cjs.MessageList().add(messages, "memory").get.all.v1();
27947
27947
  let lastYmd = null;
27948
27948
  for (const msg of v1Messages) {
27949
27949
  const date = msg.createdAt;
@@ -28385,7 +28385,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
28385
28385
  );
28386
28386
  }
28387
28387
  if (typeof config.embedder === "string") {
28388
- this.embedder = new chunkQWJTDFN4_cjs.ModelRouterEmbeddingModel(config.embedder);
28388
+ this.embedder = new chunkFLAZ5DGJ_cjs.ModelRouterEmbeddingModel(config.embedder);
28389
28389
  } else {
28390
28390
  this.embedder = config.embedder;
28391
28391
  }
@@ -28398,7 +28398,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
28398
28398
  }
28399
28399
  if (config.embedder) {
28400
28400
  if (typeof config.embedder === "string") {
28401
- this.embedder = new chunkQWJTDFN4_cjs.ModelRouterEmbeddingModel(config.embedder);
28401
+ this.embedder = new chunkFLAZ5DGJ_cjs.ModelRouterEmbeddingModel(config.embedder);
28402
28402
  } else {
28403
28403
  this.embedder = config.embedder;
28404
28404
  }
@@ -28438,7 +28438,7 @@ https://mastra.ai/en/docs/memory/overview`
28438
28438
  }
28439
28439
  setEmbedder(embedder, embedderOptions) {
28440
28440
  if (typeof embedder === "string") {
28441
- this.embedder = new chunkQWJTDFN4_cjs.ModelRouterEmbeddingModel(embedder);
28441
+ this.embedder = new chunkFLAZ5DGJ_cjs.ModelRouterEmbeddingModel(embedder);
28442
28442
  } else {
28443
28443
  this.embedder = embedder;
28444
28444
  }
@@ -28887,7 +28887,7 @@ var MockMemory = class extends MastraMemory {
28887
28887
  } = {}) {
28888
28888
  super({
28889
28889
  name: "mock",
28890
- storage: storage || new chunk4T5MI4MY_cjs.InMemoryStore(),
28890
+ storage: storage || new chunk7FAUTKNJ_cjs.InMemoryStore(),
28891
28891
  options: {
28892
28892
  ...options,
28893
28893
  workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
@@ -29204,5 +29204,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
29204
29204
  exports.validateStepResumeData = validateStepResumeData;
29205
29205
  exports.validateStepStateData = validateStepStateData;
29206
29206
  exports.validateStepSuspendData = validateStepSuspendData;
29207
- //# sourceMappingURL=chunk-MM743DL3.cjs.map
29208
- //# sourceMappingURL=chunk-MM743DL3.cjs.map
29207
+ //# sourceMappingURL=chunk-4XGWICCA.cjs.map
29208
+ //# sourceMappingURL=chunk-4XGWICCA.cjs.map