@mastra/core 1.16.0-alpha.3 → 1.16.0-alpha.4

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 (155) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/agent/index.cjs +13 -13
  3. package/dist/agent/index.js +2 -2
  4. package/dist/agent/message-list/conversion/output-converter.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/{chunk-JBAMLTYP.js → chunk-3HRPHNFN.js} +4 -4
  8. package/dist/{chunk-JBAMLTYP.js.map → chunk-3HRPHNFN.js.map} +1 -1
  9. package/dist/{chunk-AVOGYFGK.cjs → chunk-4THMANGC.cjs} +83 -83
  10. package/dist/{chunk-AVOGYFGK.cjs.map → chunk-4THMANGC.cjs.map} +1 -1
  11. package/dist/{chunk-26OOSNWN.js → chunk-5SWCNP2L.js} +3 -3
  12. package/dist/{chunk-26OOSNWN.js.map → chunk-5SWCNP2L.js.map} +1 -1
  13. package/dist/{chunk-XYT5D2T7.cjs → chunk-6VYFRSNT.cjs} +13 -13
  14. package/dist/{chunk-XYT5D2T7.cjs.map → chunk-6VYFRSNT.cjs.map} +1 -1
  15. package/dist/{chunk-WZ2EJZ7R.cjs → chunk-7L2ICIDI.cjs} +6 -6
  16. package/dist/{chunk-WZ2EJZ7R.cjs.map → chunk-7L2ICIDI.cjs.map} +1 -1
  17. package/dist/{chunk-BF2JWKWL.cjs → chunk-BQA45RHN.cjs} +5 -5
  18. package/dist/{chunk-BF2JWKWL.cjs.map → chunk-BQA45RHN.cjs.map} +1 -1
  19. package/dist/{chunk-MLCFE6MR.js → chunk-GRMC2OYN.js} +19 -3
  20. package/dist/chunk-GRMC2OYN.js.map +1 -0
  21. package/dist/{chunk-GZWOMZ7C.js → chunk-IWIO6OOO.js} +3 -3
  22. package/dist/{chunk-GZWOMZ7C.js.map → chunk-IWIO6OOO.js.map} +1 -1
  23. package/dist/{chunk-WEKILIGZ.js → chunk-J3NJXIJ4.js} +3 -3
  24. package/dist/{chunk-WEKILIGZ.js.map → chunk-J3NJXIJ4.js.map} +1 -1
  25. package/dist/{chunk-XME4PQE7.cjs → chunk-K4NN2KQQ.cjs} +19 -3
  26. package/dist/chunk-K4NN2KQQ.cjs.map +1 -0
  27. package/dist/{chunk-Q7B3NPO3.cjs → chunk-LY7WIAF5.cjs} +3 -3
  28. package/dist/{chunk-Q7B3NPO3.cjs.map → chunk-LY7WIAF5.cjs.map} +1 -1
  29. package/dist/{chunk-4LDSJHWQ.cjs → chunk-M6632FUT.cjs} +7 -7
  30. package/dist/{chunk-4LDSJHWQ.cjs.map → chunk-M6632FUT.cjs.map} +1 -1
  31. package/dist/{chunk-MQ2YFSTS.cjs → chunk-MDEWERCK.cjs} +185 -185
  32. package/dist/{chunk-MQ2YFSTS.cjs.map → chunk-MDEWERCK.cjs.map} +1 -1
  33. package/dist/{chunk-2CEWKM43.js → chunk-MXISDFVM.js} +3 -3
  34. package/dist/{chunk-2CEWKM43.js.map → chunk-MXISDFVM.js.map} +1 -1
  35. package/dist/{chunk-2NDTZII6.cjs → chunk-NEWK2BT5.cjs} +15 -15
  36. package/dist/{chunk-2NDTZII6.cjs.map → chunk-NEWK2BT5.cjs.map} +1 -1
  37. package/dist/{chunk-VQMIFPSC.cjs → chunk-NTF7UIBI.cjs} +84 -84
  38. package/dist/{chunk-VQMIFPSC.cjs.map → chunk-NTF7UIBI.cjs.map} +1 -1
  39. package/dist/{chunk-TQO7BSJX.js → chunk-OPRJPAB7.js} +3 -3
  40. package/dist/{chunk-TQO7BSJX.js.map → chunk-OPRJPAB7.js.map} +1 -1
  41. package/dist/{chunk-TKGXEXRR.js → chunk-OYAS35A6.js} +10 -10
  42. package/dist/{chunk-TKGXEXRR.js.map → chunk-OYAS35A6.js.map} +1 -1
  43. package/dist/{chunk-O6O5MD7Q.cjs → chunk-PCQBJ3NP.cjs} +5 -2
  44. package/dist/chunk-PCQBJ3NP.cjs.map +1 -0
  45. package/dist/{chunk-4EZX3JLF.cjs → chunk-PNSY2ZGF.cjs} +9 -9
  46. package/dist/{chunk-4EZX3JLF.cjs.map → chunk-PNSY2ZGF.cjs.map} +1 -1
  47. package/dist/{chunk-YVFTL5BS.cjs → chunk-RQBBPR64.cjs} +16 -16
  48. package/dist/{chunk-YVFTL5BS.cjs.map → chunk-RQBBPR64.cjs.map} +1 -1
  49. package/dist/{chunk-YPJ5V2S5.js → chunk-S6VT4LMH.js} +5 -2
  50. package/dist/chunk-S6VT4LMH.js.map +1 -0
  51. package/dist/{chunk-IS7VFXXN.js → chunk-SVE7QF2W.js} +8 -8
  52. package/dist/{chunk-IS7VFXXN.js.map → chunk-SVE7QF2W.js.map} +1 -1
  53. package/dist/{chunk-BXDWBXQW.cjs → chunk-SXVV5X4E.cjs} +13 -13
  54. package/dist/chunk-SXVV5X4E.cjs.map +1 -0
  55. package/dist/{chunk-76GUV7TZ.js → chunk-UQ5BWWRH.js} +4 -4
  56. package/dist/{chunk-76GUV7TZ.js.map → chunk-UQ5BWWRH.js.map} +1 -1
  57. package/dist/{chunk-V7KMU6NL.cjs → chunk-V2XNSBIT.cjs} +7 -7
  58. package/dist/{chunk-V7KMU6NL.cjs.map → chunk-V2XNSBIT.cjs.map} +1 -1
  59. package/dist/{chunk-RKGUSDHX.cjs → chunk-XGTV24L5.cjs} +58 -58
  60. package/dist/{chunk-RKGUSDHX.cjs.map → chunk-XGTV24L5.cjs.map} +1 -1
  61. package/dist/{chunk-7LMIK23W.js → chunk-XKOCRXCP.js} +3 -3
  62. package/dist/{chunk-7LMIK23W.js.map → chunk-XKOCRXCP.js.map} +1 -1
  63. package/dist/{chunk-A25ZFPG7.js → chunk-XU4ZIJEV.js} +7 -7
  64. package/dist/{chunk-A25ZFPG7.js.map → chunk-XU4ZIJEV.js.map} +1 -1
  65. package/dist/{chunk-YSPKTAYB.cjs → chunk-XW4B2RAG.cjs} +24 -24
  66. package/dist/{chunk-YSPKTAYB.cjs.map → chunk-XW4B2RAG.cjs.map} +1 -1
  67. package/dist/{chunk-STU7CG7E.js → chunk-YE4J2QEX.js} +5 -5
  68. package/dist/{chunk-STU7CG7E.js.map → chunk-YE4J2QEX.js.map} +1 -1
  69. package/dist/{chunk-JO36CQSY.js → chunk-YIUXBYAI.js} +12 -12
  70. package/dist/chunk-YIUXBYAI.js.map +1 -0
  71. package/dist/{chunk-WZQ2AJZV.js → chunk-YXBNQTAA.js} +8 -8
  72. package/dist/{chunk-WZQ2AJZV.js.map → chunk-YXBNQTAA.js.map} +1 -1
  73. package/dist/{chunk-TUSCHVH3.js → chunk-ZJMETLCP.js} +4 -4
  74. package/dist/{chunk-TUSCHVH3.js.map → chunk-ZJMETLCP.js.map} +1 -1
  75. package/dist/datasets/index.cjs +17 -17
  76. package/dist/datasets/index.js +2 -2
  77. package/dist/docs/SKILL.md +1 -1
  78. package/dist/docs/assets/SOURCE_MAP.json +216 -216
  79. package/dist/docs/references/docs-memory-observational-memory.md +36 -0
  80. package/dist/docs/references/reference-memory-observational-memory.md +42 -3
  81. package/dist/evals/index.cjs +5 -5
  82. package/dist/evals/index.js +2 -2
  83. package/dist/evals/scoreTraces/index.cjs +3 -3
  84. package/dist/evals/scoreTraces/index.js +1 -1
  85. package/dist/harness/index.cjs +17 -17
  86. package/dist/harness/index.js +7 -7
  87. package/dist/index.cjs +2 -2
  88. package/dist/index.js +1 -1
  89. package/dist/integration/index.cjs +2 -2
  90. package/dist/integration/index.js +1 -1
  91. package/dist/llm/index.cjs +16 -16
  92. package/dist/llm/index.js +5 -5
  93. package/dist/llm/model/provider-types.generated.d.ts +3 -3
  94. package/dist/loop/index.cjs +14 -14
  95. package/dist/loop/index.js +1 -1
  96. package/dist/mastra/index.cjs +2 -2
  97. package/dist/mastra/index.js +1 -1
  98. package/dist/memory/index.cjs +14 -14
  99. package/dist/memory/index.js +1 -1
  100. package/dist/models-dev-JCB4Q53F.js +3 -0
  101. package/dist/{models-dev-A55UVGDD.js.map → models-dev-JCB4Q53F.js.map} +1 -1
  102. package/dist/models-dev-SV7R75OF.cjs +12 -0
  103. package/dist/{models-dev-2FOUJALF.cjs.map → models-dev-SV7R75OF.cjs.map} +1 -1
  104. package/dist/netlify-KG6ZIIC5.js +3 -0
  105. package/dist/{netlify-MF3L2BRE.js.map → netlify-KG6ZIIC5.js.map} +1 -1
  106. package/dist/netlify-SGAVTHDG.cjs +12 -0
  107. package/dist/{netlify-I3P5QPXG.cjs.map → netlify-SGAVTHDG.cjs.map} +1 -1
  108. package/dist/processor-provider/index.cjs +10 -10
  109. package/dist/processor-provider/index.js +1 -1
  110. package/dist/processors/index.cjs +42 -42
  111. package/dist/processors/index.js +1 -1
  112. package/dist/provider-registry-INQUWPG6.js +3 -0
  113. package/dist/{provider-registry-J76YNM72.js.map → provider-registry-INQUWPG6.js.map} +1 -1
  114. package/dist/provider-registry-UIDQJHBI.cjs +40 -0
  115. package/dist/{provider-registry-QB6DEJ7U.cjs.map → provider-registry-UIDQJHBI.cjs.map} +1 -1
  116. package/dist/provider-registry.json +8 -8
  117. package/dist/relevance/index.cjs +3 -3
  118. package/dist/relevance/index.js +1 -1
  119. package/dist/storage/index.cjs +74 -74
  120. package/dist/storage/index.js +1 -1
  121. package/dist/stream/index.cjs +11 -11
  122. package/dist/stream/index.js +2 -2
  123. package/dist/test-utils/llm-mock.cjs +4 -4
  124. package/dist/test-utils/llm-mock.js +1 -1
  125. package/dist/tool-loop-agent/index.cjs +4 -4
  126. package/dist/tool-loop-agent/index.js +1 -1
  127. package/dist/tools/index.cjs +7 -7
  128. package/dist/tools/index.js +1 -1
  129. package/dist/tools/is-vercel-tool.cjs +2 -2
  130. package/dist/tools/is-vercel-tool.js +1 -1
  131. package/dist/tools/validation.d.ts.map +1 -1
  132. package/dist/utils.cjs +23 -23
  133. package/dist/utils.js +1 -1
  134. package/dist/vector/index.cjs +7 -7
  135. package/dist/vector/index.js +1 -1
  136. package/dist/workflows/evented/index.cjs +10 -10
  137. package/dist/workflows/evented/index.js +1 -1
  138. package/dist/workflows/index.cjs +24 -24
  139. package/dist/workflows/index.js +1 -1
  140. package/dist/workspace/index.cjs +68 -68
  141. package/dist/workspace/index.js +1 -1
  142. package/package.json +6 -6
  143. package/src/llm/model/provider-types.generated.d.ts +3 -3
  144. package/dist/chunk-BXDWBXQW.cjs.map +0 -1
  145. package/dist/chunk-JO36CQSY.js.map +0 -1
  146. package/dist/chunk-MLCFE6MR.js.map +0 -1
  147. package/dist/chunk-O6O5MD7Q.cjs.map +0 -1
  148. package/dist/chunk-XME4PQE7.cjs.map +0 -1
  149. package/dist/chunk-YPJ5V2S5.js.map +0 -1
  150. package/dist/models-dev-2FOUJALF.cjs +0 -12
  151. package/dist/models-dev-A55UVGDD.js +0 -3
  152. package/dist/netlify-I3P5QPXG.cjs +0 -12
  153. package/dist/netlify-MF3L2BRE.js +0 -3
  154. package/dist/provider-registry-J76YNM72.js +0 -3
  155. package/dist/provider-registry-QB6DEJ7U.cjs +0 -40
@@ -2,23 +2,23 @@
2
2
 
3
3
  var chunkZC4FJVJZ_cjs = require('./chunk-ZC4FJVJZ.cjs');
4
4
  var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
5
- var chunkYSPKTAYB_cjs = require('./chunk-YSPKTAYB.cjs');
6
- var chunkXYT5D2T7_cjs = require('./chunk-XYT5D2T7.cjs');
7
- var chunkO6O5MD7Q_cjs = require('./chunk-O6O5MD7Q.cjs');
5
+ var chunkXW4B2RAG_cjs = require('./chunk-XW4B2RAG.cjs');
6
+ var chunk6VYFRSNT_cjs = require('./chunk-6VYFRSNT.cjs');
7
+ var chunkPCQBJ3NP_cjs = require('./chunk-PCQBJ3NP.cjs');
8
8
  var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
9
9
  var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
10
10
  var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
11
- var chunkAVOGYFGK_cjs = require('./chunk-AVOGYFGK.cjs');
12
- var chunkWZ2EJZ7R_cjs = require('./chunk-WZ2EJZ7R.cjs');
11
+ var chunk4THMANGC_cjs = require('./chunk-4THMANGC.cjs');
12
+ var chunk7L2ICIDI_cjs = require('./chunk-7L2ICIDI.cjs');
13
13
  var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
14
14
  var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
15
- var chunkYVFTL5BS_cjs = require('./chunk-YVFTL5BS.cjs');
15
+ var chunkRQBBPR64_cjs = require('./chunk-RQBBPR64.cjs');
16
16
  var chunkG5HKDGNT_cjs = require('./chunk-G5HKDGNT.cjs');
17
17
  var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
18
- var chunkXME4PQE7_cjs = require('./chunk-XME4PQE7.cjs');
18
+ var chunkK4NN2KQQ_cjs = require('./chunk-K4NN2KQQ.cjs');
19
19
  var chunkXB4FLS7A_cjs = require('./chunk-XB4FLS7A.cjs');
20
- var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
21
20
  var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.cjs');
21
+ var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
22
22
  var chunkRO47SMI7_cjs = require('./chunk-RO47SMI7.cjs');
23
23
  var chunk7XAECHYL_cjs = require('./chunk-7XAECHYL.cjs');
24
24
  var chunkBVWXTWXP_cjs = require('./chunk-BVWXTWXP.cjs');
@@ -651,10 +651,10 @@ function prepareToolsAndToolChoice({
651
651
  return {
652
652
  tools: filteredTools.map(([name, tool2]) => {
653
653
  try {
654
- if (chunkXME4PQE7_cjs.isProviderDefinedTool(tool2)) {
654
+ if (chunkK4NN2KQQ_cjs.isProviderDefinedTool(tool2)) {
655
655
  return {
656
656
  type: providerToolType,
657
- name: chunkXME4PQE7_cjs.getProviderToolName(tool2.id),
657
+ name: chunkK4NN2KQQ_cjs.getProviderToolName(tool2.id),
658
658
  id: tool2.id,
659
659
  args: tool2.args ?? {}
660
660
  };
@@ -708,7 +708,7 @@ function prepareToolsAndToolChoice({
708
708
  const providerId = sdkTool.id;
709
709
  return {
710
710
  type: providerToolType,
711
- name: providerId ? chunkXME4PQE7_cjs.getProviderToolName(providerId) : name,
711
+ name: providerId ? chunkK4NN2KQQ_cjs.getProviderToolName(providerId) : name,
712
712
  id: providerId,
713
713
  args: sdkTool.args
714
714
  };
@@ -1296,7 +1296,7 @@ var ProcessorRunner = class _ProcessorRunner {
1296
1296
  writer
1297
1297
  });
1298
1298
  const mutations = messageList.stopRecording();
1299
- if (processResult instanceof chunkO6O5MD7Q_cjs.MessageList) {
1299
+ if (processResult instanceof chunkPCQBJ3NP_cjs.MessageList) {
1300
1300
  if (processResult !== messageList) {
1301
1301
  throw new chunk4U7ZLI36_cjs.MastraError({
1302
1302
  category: "USER",
@@ -1590,7 +1590,7 @@ var ProcessorRunner = class _ProcessorRunner {
1590
1590
  retryCount
1591
1591
  });
1592
1592
  let mutations;
1593
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
1593
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
1594
1594
  if (result !== messageList) {
1595
1595
  throw new chunk4U7ZLI36_cjs.MastraError({
1596
1596
  category: "USER",
@@ -1961,7 +1961,7 @@ var ProcessorRunner = class _ProcessorRunner {
1961
1961
  writer
1962
1962
  });
1963
1963
  const mutations = messageList.stopRecording();
1964
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
1964
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
1965
1965
  if (result !== messageList) {
1966
1966
  throw new chunk4U7ZLI36_cjs.MastraError({
1967
1967
  category: "USER",
@@ -2034,7 +2034,7 @@ var ProcessorRunner = class _ProcessorRunner {
2034
2034
  processor,
2035
2035
  stepNumber
2036
2036
  }) {
2037
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
2037
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
2038
2038
  if (result !== messageList) {
2039
2039
  throw new chunk4U7ZLI36_cjs.MastraError({
2040
2040
  category: "USER",
@@ -2069,7 +2069,7 @@ var ProcessorRunner = class _ProcessorRunner {
2069
2069
  }
2070
2070
  const { model: _model, ...rest } = result;
2071
2071
  if (result.model) {
2072
- const resolvedModel = await chunkAVOGYFGK_cjs.resolveModelConfig(result.model);
2072
+ const resolvedModel = await chunk4THMANGC_cjs.resolveModelConfig(result.model);
2073
2073
  const isSupported = isSupportedLanguageModel(resolvedModel);
2074
2074
  if (!isSupported) {
2075
2075
  throw new chunk4U7ZLI36_cjs.MastraError({
@@ -3276,7 +3276,7 @@ var MastraModelOutput = class extends chunkRO47SMI7_cjs.MastraBase {
3276
3276
  );
3277
3277
  const responseMessages = self.messageList.get.response.aiV4.core();
3278
3278
  const lastResponseMessage = responseMessages[responseMessages.length - 1];
3279
- const outputText = lastResponseMessage ? chunkO6O5MD7Q_cjs.coreContentToString(lastResponseMessage.content) : "";
3279
+ const outputText = lastResponseMessage ? chunkPCQBJ3NP_cjs.coreContentToString(lastResponseMessage.content) : "";
3280
3280
  if (lastStep && outputText && outputText !== originalText) {
3281
3281
  lastStep.text = outputText;
3282
3282
  }
@@ -4648,7 +4648,7 @@ function convertMastraChunkToAISDKv5({
4648
4648
  if (mode === "generate") {
4649
4649
  return {
4650
4650
  type: "file",
4651
- file: new chunkO6O5MD7Q_cjs.DefaultGeneratedFile({
4651
+ file: new chunkPCQBJ3NP_cjs.DefaultGeneratedFile({
4652
4652
  data: chunk.payload.data,
4653
4653
  mediaType: chunk.payload.mimeType
4654
4654
  })
@@ -4656,7 +4656,7 @@ function convertMastraChunkToAISDKv5({
4656
4656
  }
4657
4657
  return {
4658
4658
  type: "file",
4659
- file: new chunkO6O5MD7Q_cjs.DefaultGeneratedFileWithType({
4659
+ file: new chunkPCQBJ3NP_cjs.DefaultGeneratedFileWithType({
4660
4660
  data: chunk.payload.data,
4661
4661
  mediaType: chunk.payload.mimeType
4662
4662
  })
@@ -5495,7 +5495,7 @@ var createTimeTravelExecutionParams = (params) => {
5495
5495
  result = void 0;
5496
5496
  }
5497
5497
  if (result) {
5498
- const formattedResult = chunkYVFTL5BS_cjs.removeUndefinedValues(result);
5498
+ const formattedResult = chunkRQBBPR64_cjs.removeUndefinedValues(result);
5499
5499
  stepResults[stepId] = formattedResult;
5500
5500
  }
5501
5501
  });
@@ -6053,7 +6053,7 @@ async function executeLoop(engine, params) {
6053
6053
  options: {
6054
6054
  type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
6055
6055
  name: `condition: '${entry.loopType}'`,
6056
- input: chunkYVFTL5BS_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
6056
+ input: chunkRQBBPR64_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
6057
6057
  attributes: {
6058
6058
  conditionIndex: iteration
6059
6059
  },
@@ -8323,10 +8323,10 @@ function isAgent(input) {
8323
8323
  return input instanceof Agent;
8324
8324
  }
8325
8325
  function isToolStep(input) {
8326
- return input instanceof chunkXME4PQE7_cjs.Tool;
8326
+ return input instanceof chunkK4NN2KQQ_cjs.Tool;
8327
8327
  }
8328
8328
  function isStepParams(input) {
8329
- return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof Agent) && !(input instanceof chunkXME4PQE7_cjs.Tool);
8329
+ return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof Agent) && !(input instanceof chunkK4NN2KQQ_cjs.Tool);
8330
8330
  }
8331
8331
  function createStep(params, agentOrToolOptions) {
8332
8332
  if (isAgent(params)) {
@@ -8681,7 +8681,7 @@ function createStepFromProcessor(processor) {
8681
8681
  phase,
8682
8682
  // Auto-create MessageList from messages if not provided
8683
8683
  // This enables running processor workflows from the UI where messageList can't be serialized
8684
- messageList: messageList ?? (Array.isArray(messages) ? new chunkO6O5MD7Q_cjs.MessageList().add(messages, "input").addSystem(systemMessages ?? []) : void 0),
8684
+ messageList: messageList ?? (Array.isArray(messages) ? new chunkPCQBJ3NP_cjs.MessageList().add(messages, "input").addSystem(systemMessages ?? []) : void 0),
8685
8685
  stepNumber,
8686
8686
  systemMessages,
8687
8687
  streamParts,
@@ -8738,7 +8738,7 @@ function createStepFromProcessor(processor) {
8738
8738
  messageList: checkedMessageList,
8739
8739
  systemMessages: systemMessages ?? []
8740
8740
  });
8741
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
8741
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
8742
8742
  if (result !== checkedMessageList) {
8743
8743
  throw new chunk4U7ZLI36_cjs.MastraError({
8744
8744
  category: "USER" /* USER */,
@@ -8921,7 +8921,7 @@ function createStepFromProcessor(processor) {
8921
8921
  messageList: passThrough.messageList,
8922
8922
  result: passThrough.result ?? defaultResult
8923
8923
  });
8924
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
8924
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
8925
8925
  if (result !== passThrough.messageList) {
8926
8926
  throw new chunk4U7ZLI36_cjs.MastraError({
8927
8927
  category: "USER" /* USER */,
@@ -8988,7 +8988,7 @@ function createStepFromProcessor(processor) {
8988
8988
  systemMessages: systemMessages ?? [],
8989
8989
  steps: steps ?? []
8990
8990
  });
8991
- if (result instanceof chunkO6O5MD7Q_cjs.MessageList) {
8991
+ if (result instanceof chunkPCQBJ3NP_cjs.MessageList) {
8992
8992
  if (result !== checkedMessageList) {
8993
8993
  throw new chunk4U7ZLI36_cjs.MastraError({
8994
8994
  category: "USER" /* USER */,
@@ -9056,7 +9056,7 @@ function cloneStep(step, opts) {
9056
9056
  };
9057
9057
  }
9058
9058
  function isProcessor(obj) {
9059
- return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof Agent) && !(obj instanceof chunkXME4PQE7_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
9059
+ return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof Agent) && !(obj instanceof chunkK4NN2KQQ_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
9060
9060
  }
9061
9061
  function createWorkflow(params) {
9062
9062
  return new Workflow(params);
@@ -11354,7 +11354,7 @@ var MastraScorer = class _MastraScorer {
11354
11354
  }
11355
11355
  });
11356
11356
  }
11357
- const resolvedModel = await chunkAVOGYFGK_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
11357
+ const resolvedModel = await chunk4THMANGC_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
11358
11358
  const judge = new Agent({
11359
11359
  id: "judge",
11360
11360
  name: "judge",
@@ -12209,11 +12209,11 @@ var DefaultStepResult = class {
12209
12209
  // src/tools/provider-tool-utils.ts
12210
12210
  function findProviderToolByName(tools, toolName) {
12211
12211
  if (!tools) return void 0;
12212
- return Object.values(tools).find((t) => chunkXME4PQE7_cjs.isProviderTool(t) && chunkXME4PQE7_cjs.getProviderToolName(t.id) === toolName);
12212
+ return Object.values(tools).find((t) => chunkK4NN2KQQ_cjs.isProviderTool(t) && chunkK4NN2KQQ_cjs.getProviderToolName(t.id) === toolName);
12213
12213
  }
12214
12214
  function inferProviderExecuted(providerExecuted, tool2) {
12215
12215
  if (providerExecuted !== void 0) return providerExecuted;
12216
- return chunkXME4PQE7_cjs.isProviderTool(tool2) ? true : void 0;
12216
+ return chunkK4NN2KQQ_cjs.isProviderTool(tool2) ? true : void 0;
12217
12217
  }
12218
12218
 
12219
12219
  // src/loop/workflows/run-state.ts
@@ -12803,8 +12803,8 @@ function createLLMExecutionStep({
12803
12803
  if (processInputStepResult.tools && currentStep.tools) {
12804
12804
  const convertedTools = {};
12805
12805
  for (const [name, tool2] of Object.entries(currentStep.tools)) {
12806
- if (chunkXME4PQE7_cjs.isMastraTool(tool2)) {
12807
- convertedTools[name] = chunkYVFTL5BS_cjs.makeCoreTool(
12806
+ if (chunkK4NN2KQQ_cjs.isMastraTool(tool2)) {
12807
+ convertedTools[name] = chunkRQBBPR64_cjs.makeCoreTool(
12808
12808
  tool2,
12809
12809
  {
12810
12810
  name,
@@ -13011,7 +13011,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
13011
13011
  }
13012
13012
  });
13013
13013
  let transportResolver;
13014
- if (currentStep.model instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
13014
+ if (currentStep.model instanceof chunk4THMANGC_cjs.ModelRouterLanguageModel) {
13015
13015
  const routerModel = currentStep.model;
13016
13016
  transportResolver = () => routerModel._getStreamTransport();
13017
13017
  }
@@ -13373,7 +13373,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
13373
13373
  toolInvocation: {
13374
13374
  state: "result",
13375
13375
  toolCallId: toolCall.toolCallId,
13376
- toolName: chunkO6O5MD7Q_cjs.sanitizeToolName(toolCall.toolName),
13376
+ toolName: chunkPCQBJ3NP_cjs.sanitizeToolName(toolCall.toolName),
13377
13377
  args: toolCall.args,
13378
13378
  result: toolCall.error?.message ?? toolCall.error
13379
13379
  },
@@ -13408,7 +13408,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
13408
13408
  toolInvocation: {
13409
13409
  state: "result",
13410
13410
  toolCallId: toolCall.toolCallId,
13411
- toolName: chunkO6O5MD7Q_cjs.sanitizeToolName(toolCall.toolName),
13411
+ toolName: chunkPCQBJ3NP_cjs.sanitizeToolName(toolCall.toolName),
13412
13412
  args: toolCall.args,
13413
13413
  result: toolCall.result
13414
13414
  },
@@ -13465,7 +13465,7 @@ function createLLMMappingStep({ models, _internal, ...rest }, llmExecutionStep)
13465
13465
  toolInvocation: {
13466
13466
  state: "result",
13467
13467
  toolCallId: toolCall.toolCallId,
13468
- toolName: chunkO6O5MD7Q_cjs.sanitizeToolName(toolCall.toolName),
13468
+ toolName: chunkPCQBJ3NP_cjs.sanitizeToolName(toolCall.toolName),
13469
13469
  args: toolCall.args,
13470
13470
  result: toolCall.result
13471
13471
  },
@@ -14758,7 +14758,7 @@ var MastraLLMVNext = class extends chunkRO47SMI7_cjs.MastraBase {
14758
14758
  const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
14759
14759
  if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
14760
14760
  this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
14761
- await chunkYVFTL5BS_cjs.delay(10 * 1e3);
14761
+ await chunkRQBBPR64_cjs.delay(10 * 1e3);
14762
14762
  }
14763
14763
  },
14764
14764
  onFinish: async (props) => {
@@ -15034,7 +15034,7 @@ async function prepareMemoryStep({
15034
15034
  );
15035
15035
  }
15036
15036
  } else {
15037
- const messageList = new chunkO6O5MD7Q_cjs.MessageList({
15037
+ const messageList = new chunkPCQBJ3NP_cjs.MessageList({
15038
15038
  threadId: thread?.id,
15039
15039
  resourceId: thread?.resourceId
15040
15040
  });
@@ -15091,7 +15091,7 @@ async function saveMessagesWithProcessors(memory, messages, processorRunner, con
15091
15091
  await memory.saveMessages({ messages });
15092
15092
  return;
15093
15093
  }
15094
- const messageList = new chunkO6O5MD7Q_cjs.MessageList();
15094
+ const messageList = new chunkPCQBJ3NP_cjs.MessageList();
15095
15095
  for (const msg of messages) {
15096
15096
  messageList.add(msg, "response");
15097
15097
  }
@@ -16529,7 +16529,7 @@ async function networkLoop({
16529
16529
  "resumeData": "string"
16530
16530
  }
16531
16531
  `;
16532
- const messageList = new chunkO6O5MD7Q_cjs.MessageList();
16532
+ const messageList = new chunkPCQBJ3NP_cjs.MessageList();
16533
16533
  messageList.addSystem(systemInstructions);
16534
16534
  messageList.add(task, "user");
16535
16535
  const result = llm.stream({
@@ -17185,7 +17185,7 @@ var AgentLegacyHandler = class {
17185
17185
  methodType: methodType === "generate" ? "generateLegacy" : "streamLegacy",
17186
17186
  memoryConfig
17187
17187
  });
17188
- let messageList = new chunkO6O5MD7Q_cjs.MessageList({
17188
+ let messageList = new chunkPCQBJ3NP_cjs.MessageList({
17189
17189
  threadId,
17190
17190
  resourceId,
17191
17191
  generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
@@ -17354,7 +17354,7 @@ var AgentLegacyHandler = class {
17354
17354
  result: resToLog,
17355
17355
  threadId
17356
17356
  });
17357
- const messageListResponses = new chunkO6O5MD7Q_cjs.MessageList({
17357
+ const messageListResponses = new chunkPCQBJ3NP_cjs.MessageList({
17358
17358
  threadId,
17359
17359
  resourceId,
17360
17360
  generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
@@ -18504,7 +18504,7 @@ var prepareToolsStepOutputSchema = v4.z.object({
18504
18504
  var prepareMemoryStepOutputSchema = v4.z.object({
18505
18505
  threadExists: v4.z.boolean(),
18506
18506
  thread: storageThreadSchema.optional(),
18507
- messageList: v4.z.instanceof(chunkO6O5MD7Q_cjs.MessageList),
18507
+ messageList: v4.z.instanceof(chunkPCQBJ3NP_cjs.MessageList),
18508
18508
  /** Shared processor states map that persists across loop iterations for both input and output processors */
18509
18509
  processorStates: v4.z.instanceof(Map),
18510
18510
  /** Tripwire data when input processor triggered abort */
@@ -18545,7 +18545,7 @@ function createPrepareMemoryStep({
18545
18545
  execute: async ({ ...rest }) => {
18546
18546
  const observabilityContext = chunkG5HKDGNT_cjs.resolveObservabilityContext(rest);
18547
18547
  const thread = threadFromArgs;
18548
- const messageList = new chunkO6O5MD7Q_cjs.MessageList({
18548
+ const messageList = new chunkPCQBJ3NP_cjs.MessageList({
18549
18549
  threadId: thread?.id,
18550
18550
  resourceId,
18551
18551
  generateMessageId: capabilities.generateMessageId,
@@ -19780,7 +19780,7 @@ ${errorMessages}`,
19780
19780
  */
19781
19781
  listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
19782
19782
  if (typeof this.#tools !== "function") {
19783
- return chunkYVFTL5BS_cjs.ensureToolProperties(this.#tools);
19783
+ return chunkRQBBPR64_cjs.ensureToolProperties(this.#tools);
19784
19784
  }
19785
19785
  const result = this.#tools({
19786
19786
  requestContext,
@@ -19801,7 +19801,7 @@ ${errorMessages}`,
19801
19801
  this.logger.error(mastraError.toString());
19802
19802
  throw mastraError;
19803
19803
  }
19804
- return chunkYVFTL5BS_cjs.ensureToolProperties(tools);
19804
+ return chunkRQBBPR64_cjs.ensureToolProperties(tools);
19805
19805
  });
19806
19806
  }
19807
19807
  /**
@@ -19847,7 +19847,7 @@ ${errorMessages}`,
19847
19847
  });
19848
19848
  });
19849
19849
  } else {
19850
- llm = new chunkWZ2EJZ7R_cjs.MastraLLMV1({
19850
+ llm = new chunk7L2ICIDI_cjs.MastraLLMV1({
19851
19851
  model: modelInfo,
19852
19852
  mastra: this.#mastra,
19853
19853
  options: { tracingPolicy: this.#options?.tracingPolicy }
@@ -19873,7 +19873,7 @@ ${errorMessages}`,
19873
19873
  */
19874
19874
  async resolveModelConfig(modelConfig, requestContext) {
19875
19875
  try {
19876
- return await chunkAVOGYFGK_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
19876
+ return await chunk4THMANGC_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
19877
19877
  } catch (error) {
19878
19878
  const mastraError = new chunk4U7ZLI36_cjs.MastraError({
19879
19879
  id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
@@ -20201,7 +20201,7 @@ ${errorMessages}`,
20201
20201
  }) {
20202
20202
  const observabilityContext = chunkG5HKDGNT_cjs.resolveObservabilityContext(rest);
20203
20203
  const llm = await this.getLLM({ requestContext, model });
20204
- const normMessage = new chunkO6O5MD7Q_cjs.MessageList().add(message, "user").get.all.aiV5.ui().at(-1);
20204
+ const normMessage = new chunkPCQBJ3NP_cjs.MessageList().add(message, "user").get.all.aiV5.ui().at(-1);
20205
20205
  if (!normMessage) {
20206
20206
  throw new Error(`Could not generate title from input ${JSON.stringify(message)}`);
20207
20207
  }
@@ -20224,7 +20224,7 @@ ${errorMessages}`,
20224
20224
  const systemInstructions = await this.resolveTitleInstructions(requestContext, instructions);
20225
20225
  let text = "";
20226
20226
  if (isSupportedLanguageModel(llm.getModel())) {
20227
- const messageList = new chunkO6O5MD7Q_cjs.MessageList().add(
20227
+ const messageList = new chunkPCQBJ3NP_cjs.MessageList().add(
20228
20228
  [
20229
20229
  {
20230
20230
  role: "system",
@@ -20277,7 +20277,7 @@ ${errorMessages}`,
20277
20277
  async genTitle(userMessage, requestContext, observabilityContext, model, instructions) {
20278
20278
  try {
20279
20279
  if (userMessage) {
20280
- const normMessage = new chunkO6O5MD7Q_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
20280
+ const normMessage = new chunkPCQBJ3NP_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
20281
20281
  if (normMessage) {
20282
20282
  return await this.generateTitleFromUserMessage({
20283
20283
  message: normMessage,
@@ -20359,7 +20359,7 @@ ${errorMessages}`,
20359
20359
  tracingPolicy: this.#options?.tracingPolicy,
20360
20360
  requireApproval: toolObj.requireApproval
20361
20361
  };
20362
- const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20362
+ const convertedToCoreTool = chunkRQBBPR64_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20363
20363
  convertedMemoryTools[toolName] = convertedToCoreTool;
20364
20364
  }
20365
20365
  }
@@ -20388,7 +20388,7 @@ ${errorMessages}`,
20388
20388
  if (!workspace) {
20389
20389
  return convertedWorkspaceTools;
20390
20390
  }
20391
- const workspaceTools = chunkYSPKTAYB_cjs.createWorkspaceTools(workspace);
20391
+ const workspaceTools = chunkXW4B2RAG_cjs.createWorkspaceTools(workspace);
20392
20392
  if (Object.keys(workspaceTools).length > 0) {
20393
20393
  this.logger.debug(`[Agent:${this.name}] - Adding workspace tools: ${Object.keys(workspaceTools).join(", ")}`, {
20394
20394
  runId
@@ -20411,7 +20411,7 @@ ${errorMessages}`,
20411
20411
  requireApproval: toolObj.requireApproval,
20412
20412
  workspace
20413
20413
  };
20414
- const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20414
+ const convertedToCoreTool = chunkRQBBPR64_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20415
20415
  convertedWorkspaceTools[toolName] = convertedToCoreTool;
20416
20416
  }
20417
20417
  }
@@ -20442,7 +20442,7 @@ ${errorMessages}`,
20442
20442
  if (!workspace?.skills) {
20443
20443
  return convertedSkillTools;
20444
20444
  }
20445
- const skillTools = chunkYSPKTAYB_cjs.createSkillTools(workspace.skills);
20445
+ const skillTools = chunkXW4B2RAG_cjs.createSkillTools(workspace.skills);
20446
20446
  if (Object.keys(skillTools).length > 0) {
20447
20447
  this.logger.debug(`[Agent:${this.name}] - Adding skill tools: ${Object.keys(skillTools).join(", ")}`, {
20448
20448
  runId
@@ -20466,7 +20466,7 @@ ${errorMessages}`,
20466
20466
  // Skill tools never require approval
20467
20467
  workspace
20468
20468
  };
20469
- const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20469
+ const convertedToCoreTool = chunkRQBBPR64_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20470
20470
  convertedSkillTools[toolName] = convertedToCoreTool;
20471
20471
  }
20472
20472
  }
@@ -20683,7 +20683,7 @@ ${errorMessages}`,
20683
20683
  tracingPolicy: this.#options?.tracingPolicy,
20684
20684
  requireApproval: tool2.requireApproval
20685
20685
  };
20686
- return [k, chunkYVFTL5BS_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
20686
+ return [k, chunkRQBBPR64_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
20687
20687
  })
20688
20688
  );
20689
20689
  const assignedToolEntriesConverted = Object.fromEntries(
@@ -20735,7 +20735,7 @@ ${errorMessages}`,
20735
20735
  tracingPolicy: this.#options?.tracingPolicy,
20736
20736
  requireApproval: toolObj.requireApproval
20737
20737
  };
20738
- const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
20738
+ const convertedToCoreTool = chunkRQBBPR64_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
20739
20739
  toolsForRequest[toolName] = convertedToCoreTool;
20740
20740
  }
20741
20741
  }
@@ -20782,7 +20782,7 @@ ${errorMessages}`,
20782
20782
  tracingPolicy: this.#options?.tracingPolicy,
20783
20783
  requireApproval: tool2.requireApproval
20784
20784
  };
20785
- const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
20785
+ const convertedToCoreTool = chunkRQBBPR64_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
20786
20786
  toolsForRequest[toolName] = convertedToCoreTool;
20787
20787
  }
20788
20788
  }
@@ -20866,7 +20866,7 @@ ${errorMessages}`,
20866
20866
  ).describe("The results from the agent's tool calls").optional()
20867
20867
  });
20868
20868
  const modelVersion = (await agent.getModel({ requestContext })).specificationVersion;
20869
- const toolObj = chunkXME4PQE7_cjs.createTool({
20869
+ const toolObj = chunkK4NN2KQQ_cjs.createTool({
20870
20870
  id: `agent-${agentName}`,
20871
20871
  description: agent.getDescription() || `Agent: ${agentName}`,
20872
20872
  inputSchema: agentInputSchema,
@@ -21443,7 +21443,7 @@ ${effectiveInstructions}`;
21443
21443
  ...observabilityContext,
21444
21444
  tracingPolicy: this.#options?.tracingPolicy
21445
21445
  };
21446
- convertedAgentTools[`agent-${agentName}`] = chunkYVFTL5BS_cjs.makeCoreTool(
21446
+ convertedAgentTools[`agent-${agentName}`] = chunkRQBBPR64_cjs.makeCoreTool(
21447
21447
  toolObj,
21448
21448
  options,
21449
21449
  void 0,
@@ -21508,7 +21508,7 @@ ${effectiveInstructions}`;
21508
21508
  }
21509
21509
  ]
21510
21510
  };
21511
- const toolObj = chunkXME4PQE7_cjs.createTool({
21511
+ const toolObj = chunkK4NN2KQQ_cjs.createTool({
21512
21512
  id: `workflow-${workflowName}`,
21513
21513
  description: workflow.description || `Workflow: ${workflowName}`,
21514
21514
  inputSchema: extendedInputSchema,
@@ -21660,7 +21660,7 @@ ${effectiveInstructions}`;
21660
21660
  ...observabilityContext,
21661
21661
  tracingPolicy: this.#options?.tracingPolicy
21662
21662
  };
21663
- convertedWorkflowTools[`workflow-${workflowName}`] = chunkYVFTL5BS_cjs.makeCoreTool(
21663
+ convertedWorkflowTools[`workflow-${workflowName}`] = chunkRQBBPR64_cjs.makeCoreTool(
21664
21664
  toolObj,
21665
21665
  options,
21666
21666
  void 0,
@@ -21692,7 +21692,7 @@ ${effectiveInstructions}`;
21692
21692
  let mastraProxy = void 0;
21693
21693
  const logger = this.logger;
21694
21694
  if (this.#mastra) {
21695
- mastraProxy = chunkYVFTL5BS_cjs.createMastraProxy({ mastra: this.#mastra, logger });
21695
+ mastraProxy = chunkRQBBPR64_cjs.createMastraProxy({ mastra: this.#mastra, logger });
21696
21696
  }
21697
21697
  const assignedTools = await this.listAssignedTools({
21698
21698
  runId,
@@ -21944,7 +21944,7 @@ ${effectiveInstructions}`;
21944
21944
  const resolvedModel = await this.resolveModelConfig(selection, requestContext);
21945
21945
  this.assertSupportsPreparedModels(resolvedModel);
21946
21946
  let headers;
21947
- if (resolvedModel instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
21947
+ if (resolvedModel instanceof chunk4THMANGC_cjs.ModelRouterLanguageModel) {
21948
21948
  headers = resolvedModel.config?.headers;
21949
21949
  }
21950
21950
  return [
@@ -21977,7 +21977,7 @@ ${effectiveInstructions}`;
21977
21977
  throw mastraError;
21978
21978
  }
21979
21979
  let headers;
21980
- if (model instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
21980
+ if (model instanceof chunk4THMANGC_cjs.ModelRouterLanguageModel) {
21981
21981
  headers = model.config?.headers;
21982
21982
  }
21983
21983
  return {
@@ -22428,7 +22428,7 @@ ${effectiveInstructions}`;
22428
22428
  const defaultOptions = await this.getDefaultOptions({
22429
22429
  requestContext: options?.requestContext
22430
22430
  });
22431
- const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22431
+ const mergedOptions = chunkRQBBPR64_cjs.deepMerge(
22432
22432
  defaultOptions,
22433
22433
  options ?? {}
22434
22434
  );
@@ -22498,7 +22498,7 @@ ${effectiveInstructions}`;
22498
22498
  const defaultOptions = await this.getDefaultOptions({
22499
22499
  requestContext: streamOptions?.requestContext
22500
22500
  });
22501
- const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22501
+ const mergedOptions = chunkRQBBPR64_cjs.deepMerge(
22502
22502
  defaultOptions,
22503
22503
  streamOptions ?? {}
22504
22504
  );
@@ -22562,7 +22562,7 @@ ${effectiveInstructions}`;
22562
22562
  const defaultOptions = await this.getDefaultOptions({
22563
22563
  requestContext: streamOptions?.requestContext
22564
22564
  });
22565
- let mergedStreamOptions = chunkYVFTL5BS_cjs.deepMerge(
22565
+ let mergedStreamOptions = chunkRQBBPR64_cjs.deepMerge(
22566
22566
  defaultOptions,
22567
22567
  streamOptions ?? {}
22568
22568
  );
@@ -22627,7 +22627,7 @@ ${effectiveInstructions}`;
22627
22627
  const defaultOptions = await this.getDefaultOptions({
22628
22628
  requestContext: options?.requestContext
22629
22629
  });
22630
- const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22630
+ const mergedOptions = chunkRQBBPR64_cjs.deepMerge(
22631
22631
  defaultOptions,
22632
22632
  options ?? {}
22633
22633
  );
@@ -24201,7 +24201,7 @@ var TokenLimiterProcessor = class _TokenLimiterProcessor {
24201
24201
  return new TiktokenClass(this.customEncoding);
24202
24202
  });
24203
24203
  } else {
24204
- this.encoderPromise = chunkYSPKTAYB_cjs.getTiktoken();
24204
+ this.encoderPromise = chunkXW4B2RAG_cjs.getTiktoken();
24205
24205
  }
24206
24206
  }
24207
24207
  return this.encoderPromise;
@@ -24886,7 +24886,7 @@ var ToolSearchProcessor = class {
24886
24886
  minScore: options.search?.minScore ?? 0
24887
24887
  };
24888
24888
  this.ttl = options.ttl ?? 36e5;
24889
- this.bm25Index = new chunkYSPKTAYB_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
24889
+ this.bm25Index = new chunkXW4B2RAG_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
24890
24890
  this.indexTools();
24891
24891
  if (this.ttl > 0) {
24892
24892
  this.scheduleCleanup();
@@ -25051,7 +25051,7 @@ var ToolSearchProcessor = class {
25051
25051
  messageList.addSystem(
25052
25052
  "To discover available tools, call search_tools with a keyword query. To add a tool to the conversation, call load_tool with the tool name. Tools must be loaded before they can be used."
25053
25053
  );
25054
- const searchTool = chunkXME4PQE7_cjs.createTool({
25054
+ const searchTool = chunkK4NN2KQQ_cjs.createTool({
25055
25055
  id: "search_tools",
25056
25056
  description: "Search for available tools by keyword. Use this when you need a capability you don't currently have. Returns a list of matching tools with their names and descriptions. After finding a useful tool, use load_tool to make it available.",
25057
25057
  inputSchema: v4.z.object({
@@ -25081,7 +25081,7 @@ var ToolSearchProcessor = class {
25081
25081
  };
25082
25082
  }
25083
25083
  });
25084
- const loadTool = chunkXME4PQE7_cjs.createTool({
25084
+ const loadTool = chunkK4NN2KQQ_cjs.createTool({
25085
25085
  id: "load_tool",
25086
25086
  description: "Load a specific tool into your context. Call this after finding a tool with search_tools. Once loaded, the tool will be available for use. Args: toolName - The exact name of the tool to load (from search results).",
25087
25087
  inputSchema: v4.z.object({
@@ -25415,7 +25415,7 @@ var WorkingMemory = class {
25415
25415
  return messageList;
25416
25416
  }
25417
25417
  generateEmptyFromSchemaInternal(schema) {
25418
- const result = chunkYVFTL5BS_cjs.generateEmptyFromSchema(schema);
25418
+ const result = chunkRQBBPR64_cjs.generateEmptyFromSchema(schema);
25419
25419
  return Object.keys(result).length > 0 ? result : null;
25420
25420
  }
25421
25421
  getWorkingMemoryToolInstruction({
@@ -25618,7 +25618,7 @@ var SemanticRecall = class {
25618
25618
  */
25619
25619
  formatCrossThreadMessages(messages, currentThreadId) {
25620
25620
  let result = ``;
25621
- const v1Messages = new chunkO6O5MD7Q_cjs.MessageList().add(messages, "memory").get.all.v1();
25621
+ const v1Messages = new chunkPCQBJ3NP_cjs.MessageList().add(messages, "memory").get.all.v1();
25622
25622
  let lastYmd = null;
25623
25623
  for (const msg of v1Messages) {
25624
25624
  const date = msg.createdAt;
@@ -26060,7 +26060,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
26060
26060
  );
26061
26061
  }
26062
26062
  if (typeof config.embedder === "string") {
26063
- this.embedder = new chunkAVOGYFGK_cjs.ModelRouterEmbeddingModel(config.embedder);
26063
+ this.embedder = new chunk4THMANGC_cjs.ModelRouterEmbeddingModel(config.embedder);
26064
26064
  } else {
26065
26065
  this.embedder = config.embedder;
26066
26066
  }
@@ -26099,7 +26099,7 @@ https://mastra.ai/en/docs/memory/overview`
26099
26099
  }
26100
26100
  setEmbedder(embedder, embedderOptions) {
26101
26101
  if (typeof embedder === "string") {
26102
- this.embedder = new chunkAVOGYFGK_cjs.ModelRouterEmbeddingModel(embedder);
26102
+ this.embedder = new chunk4THMANGC_cjs.ModelRouterEmbeddingModel(embedder);
26103
26103
  } else {
26104
26104
  this.embedder = embedder;
26105
26105
  }
@@ -26196,7 +26196,7 @@ https://mastra.ai/en/docs/memory/overview`
26196
26196
  "The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
26197
26197
  );
26198
26198
  }
26199
- const mergedConfig = chunkYVFTL5BS_cjs.deepMerge(this.threadConfig, config || {});
26199
+ const mergedConfig = chunkRQBBPR64_cjs.deepMerge(this.threadConfig, config || {});
26200
26200
  if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
26201
26201
  mergedConfig.workingMemory.schema = config.workingMemory.schema;
26202
26202
  }
@@ -26548,7 +26548,7 @@ var MockMemory = class extends MastraMemory {
26548
26548
  } = {}) {
26549
26549
  super({
26550
26550
  name: "mock",
26551
- storage: storage || new chunkXYT5D2T7_cjs.InMemoryStore(),
26551
+ storage: storage || new chunk6VYFRSNT_cjs.InMemoryStore(),
26552
26552
  options: {
26553
26553
  ...options,
26554
26554
  workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
@@ -26629,7 +26629,7 @@ var MockMemory = class extends MastraMemory {
26629
26629
  return {};
26630
26630
  }
26631
26631
  return {
26632
- updateWorkingMemory: chunkXME4PQE7_cjs.createTool({
26632
+ updateWorkingMemory: chunkK4NN2KQQ_cjs.createTool({
26633
26633
  id: "update-working-memory",
26634
26634
  description: `Update the working memory with new information. Any data not included will be overwritten.`,
26635
26635
  inputSchema: v4.z.object({ memory: v4.z.string() }),
@@ -26857,5 +26857,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
26857
26857
  exports.validateStepResumeData = validateStepResumeData;
26858
26858
  exports.validateStepStateData = validateStepStateData;
26859
26859
  exports.validateStepSuspendData = validateStepSuspendData;
26860
- //# sourceMappingURL=chunk-VQMIFPSC.cjs.map
26861
- //# sourceMappingURL=chunk-VQMIFPSC.cjs.map
26860
+ //# sourceMappingURL=chunk-NTF7UIBI.cjs.map
26861
+ //# sourceMappingURL=chunk-NTF7UIBI.cjs.map