@mastra/core 1.16.0-alpha.2 → 1.16.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 (162) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/agent/agent.d.ts.map +1 -1
  3. package/dist/agent/index.cjs +8 -8
  4. package/dist/agent/index.js +1 -1
  5. package/dist/{chunk-4R7XCDYZ.js → chunk-26OOSNWN.js} +3 -3
  6. package/dist/{chunk-4R7XCDYZ.js.map → chunk-26OOSNWN.js.map} +1 -1
  7. package/dist/{chunk-373WBBIV.js → chunk-2CEWKM43.js} +3 -3
  8. package/dist/{chunk-373WBBIV.js.map → chunk-2CEWKM43.js.map} +1 -1
  9. package/dist/{chunk-6FFPNMST.cjs → chunk-2NDTZII6.cjs} +15 -15
  10. package/dist/{chunk-6FFPNMST.cjs.map → chunk-2NDTZII6.cjs.map} +1 -1
  11. package/dist/{chunk-4B2CHAMZ.cjs → chunk-4EZX3JLF.cjs} +9 -9
  12. package/dist/{chunk-4B2CHAMZ.cjs.map → chunk-4EZX3JLF.cjs.map} +1 -1
  13. package/dist/{chunk-L4AQYWBK.cjs → chunk-4LDSJHWQ.cjs} +7 -7
  14. package/dist/{chunk-L4AQYWBK.cjs.map → chunk-4LDSJHWQ.cjs.map} +1 -1
  15. package/dist/{chunk-UA5AY2ES.js → chunk-76GUV7TZ.js} +3 -3
  16. package/dist/{chunk-UA5AY2ES.js.map → chunk-76GUV7TZ.js.map} +1 -1
  17. package/dist/{chunk-JY32HS2J.js → chunk-7LMIK23W.js} +3 -3
  18. package/dist/{chunk-JY32HS2J.js.map → chunk-7LMIK23W.js.map} +1 -1
  19. package/dist/{chunk-FQJZIBZ2.js → chunk-A25ZFPG7.js} +6 -6
  20. package/dist/{chunk-FQJZIBZ2.js.map → chunk-A25ZFPG7.js.map} +1 -1
  21. package/dist/{chunk-TQTUU6QD.cjs → chunk-AVOGYFGK.cjs} +83 -83
  22. package/dist/{chunk-TQTUU6QD.cjs.map → chunk-AVOGYFGK.cjs.map} +1 -1
  23. package/dist/{chunk-PLWEBAHH.cjs → chunk-BF2JWKWL.cjs} +5 -5
  24. package/dist/{chunk-PLWEBAHH.cjs.map → chunk-BF2JWKWL.cjs.map} +1 -1
  25. package/dist/{chunk-DJLBGTUV.cjs → chunk-BXDWBXQW.cjs} +5 -5
  26. package/dist/{chunk-DJLBGTUV.cjs.map → chunk-BXDWBXQW.cjs.map} +1 -1
  27. package/dist/{chunk-CJVTGET7.js → chunk-GZWOMZ7C.js} +3 -3
  28. package/dist/{chunk-CJVTGET7.js.map → chunk-GZWOMZ7C.js.map} +1 -1
  29. package/dist/{chunk-HQKKB3UP.js → chunk-IS7VFXXN.js} +8 -8
  30. package/dist/{chunk-HQKKB3UP.js.map → chunk-IS7VFXXN.js.map} +1 -1
  31. package/dist/{chunk-4DW75LWG.js → chunk-JBAMLTYP.js} +4 -4
  32. package/dist/{chunk-4DW75LWG.js.map → chunk-JBAMLTYP.js.map} +1 -1
  33. package/dist/{chunk-3OZVV5J7.js → chunk-JO36CQSY.js} +4 -4
  34. package/dist/{chunk-3OZVV5J7.js.map → chunk-JO36CQSY.js.map} +1 -1
  35. package/dist/{chunk-55W2K42G.js → chunk-MLCFE6MR.js} +15 -3
  36. package/dist/chunk-MLCFE6MR.js.map +1 -0
  37. package/dist/{chunk-GXAKTLZ3.cjs → chunk-MQ2YFSTS.cjs} +185 -185
  38. package/dist/{chunk-GXAKTLZ3.cjs.map → chunk-MQ2YFSTS.cjs.map} +1 -1
  39. package/dist/{chunk-4MG6J5RS.cjs → chunk-Q7B3NPO3.cjs} +3 -3
  40. package/dist/{chunk-4MG6J5RS.cjs.map → chunk-Q7B3NPO3.cjs.map} +1 -1
  41. package/dist/{chunk-4TMCYZ72.cjs → chunk-RKGUSDHX.cjs} +53 -53
  42. package/dist/{chunk-4TMCYZ72.cjs.map → chunk-RKGUSDHX.cjs.map} +1 -1
  43. package/dist/{chunk-563KV7S2.js → chunk-STU7CG7E.js} +5 -5
  44. package/dist/{chunk-563KV7S2.js.map → chunk-STU7CG7E.js.map} +1 -1
  45. package/dist/{chunk-GZ2ZPBMU.js → chunk-TKGXEXRR.js} +21 -12
  46. package/dist/chunk-TKGXEXRR.js.map +1 -0
  47. package/dist/{chunk-O3WTNJXV.js → chunk-TQO7BSJX.js} +3 -3
  48. package/dist/{chunk-O3WTNJXV.js.map → chunk-TQO7BSJX.js.map} +1 -1
  49. package/dist/{chunk-D5DBRZH3.js → chunk-TUSCHVH3.js} +5 -4
  50. package/dist/chunk-TUSCHVH3.js.map +1 -0
  51. package/dist/{chunk-325Q6NH6.cjs → chunk-V7KMU6NL.cjs} +7 -7
  52. package/dist/{chunk-325Q6NH6.cjs.map → chunk-V7KMU6NL.cjs.map} +1 -1
  53. package/dist/{chunk-2DPHD6NF.cjs → chunk-VQMIFPSC.cjs} +70 -61
  54. package/dist/chunk-VQMIFPSC.cjs.map +1 -0
  55. package/dist/{chunk-L53XY7WT.js → chunk-WEKILIGZ.js} +161 -63
  56. package/dist/chunk-WEKILIGZ.js.map +1 -0
  57. package/dist/{chunk-KWQ4YIWP.cjs → chunk-WZ2EJZ7R.cjs} +6 -6
  58. package/dist/{chunk-KWQ4YIWP.cjs.map → chunk-WZ2EJZ7R.cjs.map} +1 -1
  59. package/dist/{chunk-P7KTLFJM.js → chunk-WZQ2AJZV.js} +8 -8
  60. package/dist/{chunk-P7KTLFJM.js.map → chunk-WZQ2AJZV.js.map} +1 -1
  61. package/dist/{chunk-GYLHNAH7.cjs → chunk-XME4PQE7.cjs} +15 -3
  62. package/dist/chunk-XME4PQE7.cjs.map +1 -0
  63. package/dist/{chunk-Q7EDK6IW.cjs → chunk-XYT5D2T7.cjs} +9 -9
  64. package/dist/{chunk-Q7EDK6IW.cjs.map → chunk-XYT5D2T7.cjs.map} +1 -1
  65. package/dist/{chunk-KQ3SJZG5.cjs → chunk-YSPKTAYB.cjs} +182 -84
  66. package/dist/chunk-YSPKTAYB.cjs.map +1 -0
  67. package/dist/{chunk-3XWXW2YI.cjs → chunk-YVFTL5BS.cjs} +17 -16
  68. package/dist/chunk-YVFTL5BS.cjs.map +1 -0
  69. package/dist/datasets/index.cjs +17 -17
  70. package/dist/datasets/index.js +2 -2
  71. package/dist/docs/SKILL.md +1 -1
  72. package/dist/docs/assets/SOURCE_MAP.json +226 -226
  73. package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +132 -2
  74. package/dist/docs/references/docs-workspace-skills.md +23 -0
  75. package/dist/docs/references/reference-tools-create-tool.md +1 -1
  76. package/dist/docs/references/reference-workspace-workspace-class.md +13 -1
  77. package/dist/evals/index.cjs +5 -5
  78. package/dist/evals/index.js +2 -2
  79. package/dist/evals/scoreTraces/index.cjs +3 -3
  80. package/dist/evals/scoreTraces/index.js +1 -1
  81. package/dist/harness/index.cjs +17 -17
  82. package/dist/harness/index.js +7 -7
  83. package/dist/index.cjs +2 -2
  84. package/dist/index.js +1 -1
  85. package/dist/integration/index.cjs +2 -2
  86. package/dist/integration/index.js +1 -1
  87. package/dist/llm/index.cjs +16 -16
  88. package/dist/llm/index.js +5 -5
  89. package/dist/loop/index.cjs +14 -14
  90. package/dist/loop/index.js +1 -1
  91. package/dist/loop/network/index.d.ts.map +1 -1
  92. package/dist/mastra/index.cjs +2 -2
  93. package/dist/mastra/index.js +1 -1
  94. package/dist/memory/index.cjs +14 -14
  95. package/dist/memory/index.js +1 -1
  96. package/dist/models-dev-2FOUJALF.cjs +12 -0
  97. package/dist/{models-dev-OFI5OSM7.cjs.map → models-dev-2FOUJALF.cjs.map} +1 -1
  98. package/dist/models-dev-A55UVGDD.js +3 -0
  99. package/dist/{models-dev-OU3ACSEQ.js.map → models-dev-A55UVGDD.js.map} +1 -1
  100. package/dist/netlify-I3P5QPXG.cjs +12 -0
  101. package/dist/{netlify-YVCTG2Z3.cjs.map → netlify-I3P5QPXG.cjs.map} +1 -1
  102. package/dist/netlify-MF3L2BRE.js +3 -0
  103. package/dist/{netlify-OPNSZBGQ.js.map → netlify-MF3L2BRE.js.map} +1 -1
  104. package/dist/processor-provider/index.cjs +10 -10
  105. package/dist/processor-provider/index.js +1 -1
  106. package/dist/processors/index.cjs +42 -42
  107. package/dist/processors/index.js +1 -1
  108. package/dist/processors/processors/skills.d.ts.map +1 -1
  109. package/dist/provider-registry-J76YNM72.js +3 -0
  110. package/dist/{provider-registry-KYR3I44P.js.map → provider-registry-J76YNM72.js.map} +1 -1
  111. package/dist/provider-registry-QB6DEJ7U.cjs +40 -0
  112. package/dist/{provider-registry-73NPBVKH.cjs.map → provider-registry-QB6DEJ7U.cjs.map} +1 -1
  113. package/dist/relevance/index.cjs +3 -3
  114. package/dist/relevance/index.js +1 -1
  115. package/dist/storage/index.cjs +74 -74
  116. package/dist/storage/index.js +1 -1
  117. package/dist/stream/index.cjs +8 -8
  118. package/dist/stream/index.js +1 -1
  119. package/dist/test-utils/llm-mock.cjs +4 -4
  120. package/dist/test-utils/llm-mock.js +1 -1
  121. package/dist/tool-loop-agent/index.cjs +4 -4
  122. package/dist/tool-loop-agent/index.js +1 -1
  123. package/dist/tools/index.cjs +7 -7
  124. package/dist/tools/index.js +1 -1
  125. package/dist/tools/is-vercel-tool.cjs +2 -2
  126. package/dist/tools/is-vercel-tool.js +1 -1
  127. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  128. package/dist/tools/tool.d.ts.map +1 -1
  129. package/dist/tools/types.d.ts +1 -0
  130. package/dist/tools/types.d.ts.map +1 -1
  131. package/dist/utils.cjs +23 -23
  132. package/dist/utils.d.ts +1 -0
  133. package/dist/utils.d.ts.map +1 -1
  134. package/dist/utils.js +1 -1
  135. package/dist/vector/index.cjs +7 -7
  136. package/dist/vector/index.js +1 -1
  137. package/dist/workflows/evented/index.cjs +10 -10
  138. package/dist/workflows/evented/index.js +1 -1
  139. package/dist/workflows/index.cjs +24 -24
  140. package/dist/workflows/index.js +1 -1
  141. package/dist/workspace/index.cjs +68 -68
  142. package/dist/workspace/index.js +1 -1
  143. package/dist/workspace/skills/tools.d.ts.map +1 -1
  144. package/dist/workspace/skills/types.d.ts +9 -5
  145. package/dist/workspace/skills/types.d.ts.map +1 -1
  146. package/dist/workspace/skills/workspace-skills.d.ts.map +1 -1
  147. package/dist/workspace/workspace.d.ts +1 -1
  148. package/package.json +7 -7
  149. package/dist/chunk-2DPHD6NF.cjs.map +0 -1
  150. package/dist/chunk-3XWXW2YI.cjs.map +0 -1
  151. package/dist/chunk-55W2K42G.js.map +0 -1
  152. package/dist/chunk-D5DBRZH3.js.map +0 -1
  153. package/dist/chunk-GYLHNAH7.cjs.map +0 -1
  154. package/dist/chunk-GZ2ZPBMU.js.map +0 -1
  155. package/dist/chunk-KQ3SJZG5.cjs.map +0 -1
  156. package/dist/chunk-L53XY7WT.js.map +0 -1
  157. package/dist/models-dev-OFI5OSM7.cjs +0 -12
  158. package/dist/models-dev-OU3ACSEQ.js +0 -3
  159. package/dist/netlify-OPNSZBGQ.js +0 -3
  160. package/dist/netlify-YVCTG2Z3.cjs +0 -12
  161. package/dist/provider-registry-73NPBVKH.cjs +0 -40
  162. package/dist/provider-registry-KYR3I44P.js +0 -3
@@ -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 chunkKQ3SJZG5_cjs = require('./chunk-KQ3SJZG5.cjs');
6
- var chunkQ7EDK6IW_cjs = require('./chunk-Q7EDK6IW.cjs');
5
+ var chunkYSPKTAYB_cjs = require('./chunk-YSPKTAYB.cjs');
6
+ var chunkXYT5D2T7_cjs = require('./chunk-XYT5D2T7.cjs');
7
7
  var chunkO6O5MD7Q_cjs = require('./chunk-O6O5MD7Q.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 chunkTQTUU6QD_cjs = require('./chunk-TQTUU6QD.cjs');
12
- var chunkKWQ4YIWP_cjs = require('./chunk-KWQ4YIWP.cjs');
11
+ var chunkAVOGYFGK_cjs = require('./chunk-AVOGYFGK.cjs');
12
+ var chunkWZ2EJZ7R_cjs = require('./chunk-WZ2EJZ7R.cjs');
13
13
  var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
14
14
  var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
15
- var chunk3XWXW2YI_cjs = require('./chunk-3XWXW2YI.cjs');
15
+ var chunkYVFTL5BS_cjs = require('./chunk-YVFTL5BS.cjs');
16
16
  var chunkG5HKDGNT_cjs = require('./chunk-G5HKDGNT.cjs');
17
17
  var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
18
- var chunkGYLHNAH7_cjs = require('./chunk-GYLHNAH7.cjs');
18
+ var chunkXME4PQE7_cjs = require('./chunk-XME4PQE7.cjs');
19
19
  var chunkXB4FLS7A_cjs = require('./chunk-XB4FLS7A.cjs');
20
- var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.cjs');
21
20
  var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
21
+ var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.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 (chunkGYLHNAH7_cjs.isProviderDefinedTool(tool2)) {
654
+ if (chunkXME4PQE7_cjs.isProviderDefinedTool(tool2)) {
655
655
  return {
656
656
  type: providerToolType,
657
- name: chunkGYLHNAH7_cjs.getProviderToolName(tool2.id),
657
+ name: chunkXME4PQE7_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 ? chunkGYLHNAH7_cjs.getProviderToolName(providerId) : name,
711
+ name: providerId ? chunkXME4PQE7_cjs.getProviderToolName(providerId) : name,
712
712
  id: providerId,
713
713
  args: sdkTool.args
714
714
  };
@@ -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 chunkTQTUU6QD_cjs.resolveModelConfig(result.model);
2072
+ const resolvedModel = await chunkAVOGYFGK_cjs.resolveModelConfig(result.model);
2073
2073
  const isSupported = isSupportedLanguageModel(resolvedModel);
2074
2074
  if (!isSupported) {
2075
2075
  throw new chunk4U7ZLI36_cjs.MastraError({
@@ -5495,7 +5495,7 @@ var createTimeTravelExecutionParams = (params) => {
5495
5495
  result = void 0;
5496
5496
  }
5497
5497
  if (result) {
5498
- const formattedResult = chunk3XWXW2YI_cjs.removeUndefinedValues(result);
5498
+ const formattedResult = chunkYVFTL5BS_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: chunk3XWXW2YI_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
6056
+ input: chunkYVFTL5BS_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 chunkGYLHNAH7_cjs.Tool;
8326
+ return input instanceof chunkXME4PQE7_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 chunkGYLHNAH7_cjs.Tool);
8329
+ return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof Agent) && !(input instanceof chunkXME4PQE7_cjs.Tool);
8330
8330
  }
8331
8331
  function createStep(params, agentOrToolOptions) {
8332
8332
  if (isAgent(params)) {
@@ -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 chunkGYLHNAH7_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 chunkXME4PQE7_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 chunkTQTUU6QD_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
11357
+ const resolvedModel = await chunkAVOGYFGK_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) => chunkGYLHNAH7_cjs.isProviderTool(t) && chunkGYLHNAH7_cjs.getProviderToolName(t.id) === toolName);
12212
+ return Object.values(tools).find((t) => chunkXME4PQE7_cjs.isProviderTool(t) && chunkXME4PQE7_cjs.getProviderToolName(t.id) === toolName);
12213
12213
  }
12214
12214
  function inferProviderExecuted(providerExecuted, tool2) {
12215
12215
  if (providerExecuted !== void 0) return providerExecuted;
12216
- return chunkGYLHNAH7_cjs.isProviderTool(tool2) ? true : void 0;
12216
+ return chunkXME4PQE7_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 (chunkGYLHNAH7_cjs.isMastraTool(tool2)) {
12807
- convertedTools[name] = chunk3XWXW2YI_cjs.makeCoreTool(
12806
+ if (chunkXME4PQE7_cjs.isMastraTool(tool2)) {
12807
+ convertedTools[name] = chunkYVFTL5BS_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 chunkTQTUU6QD_cjs.ModelRouterLanguageModel) {
13014
+ if (currentStep.model instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
13015
13015
  const routerModel = currentStep.model;
13016
13016
  transportResolver = () => routerModel._getStreamTransport();
13017
13017
  }
@@ -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 chunk3XWXW2YI_cjs.delay(10 * 1e3);
14761
+ await chunkYVFTL5BS_cjs.delay(10 * 1e3);
14762
14762
  }
14763
14763
  },
14764
14764
  onFinish: async (props) => {
@@ -16177,6 +16177,7 @@ async function createNetworkLoop({
16177
16177
  requestContext,
16178
16178
  mastra: agent.getMastraInstance(),
16179
16179
  agent: {
16180
+ agentId: agent.id,
16180
16181
  resourceId: initData.threadResourceId || networkName,
16181
16182
  toolCallId,
16182
16183
  threadId: initData.threadId,
@@ -16999,8 +17000,8 @@ var SkillsProcessor = class {
16999
17000
  if (!skillsList || skillsList.length === 0) {
17000
17001
  return "";
17001
17002
  }
17002
- const skillPromises = skillsList.map((meta) => this.skills?.get(meta.name));
17003
- const fullSkills = (await Promise.all(skillPromises)).filter((s) => s !== void 0);
17003
+ const skillPromises = skillsList.map((meta) => this.skills?.get(meta.path));
17004
+ const fullSkills = (await Promise.all(skillPromises)).filter((s) => s !== void 0 && s !== null);
17004
17005
  fullSkills.sort((a, b) => a.name.localeCompare(b.name));
17005
17006
  switch (this._format) {
17006
17007
  case "xml": {
@@ -17073,7 +17074,7 @@ ${skillsMd}`;
17073
17074
  }
17074
17075
  messageList.addSystem({
17075
17076
  role: "system",
17076
- content: 'IMPORTANT: Skills are NOT tools. Do not call skill names directly as tool names. To use a skill, call the `skill` tool with the skill name as the "name" parameter. When a user asks about a topic covered by an available skill, activate it immediately without asking for permission first.'
17077
+ content: 'IMPORTANT: Skills are NOT tools. Do not call skill names directly as tool names. To use a skill, call the `skill` tool with the skill name as the "name" parameter. If multiple skills share the same name, use the skill path (shown in the location field) instead of the name to disambiguate. When a user asks about a topic covered by an available skill, activate it immediately without asking for permission first.'
17077
17078
  });
17078
17079
  }
17079
17080
  }
@@ -19779,7 +19780,7 @@ ${errorMessages}`,
19779
19780
  */
19780
19781
  listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
19781
19782
  if (typeof this.#tools !== "function") {
19782
- return chunk3XWXW2YI_cjs.ensureToolProperties(this.#tools);
19783
+ return chunkYVFTL5BS_cjs.ensureToolProperties(this.#tools);
19783
19784
  }
19784
19785
  const result = this.#tools({
19785
19786
  requestContext,
@@ -19800,7 +19801,7 @@ ${errorMessages}`,
19800
19801
  this.logger.error(mastraError.toString());
19801
19802
  throw mastraError;
19802
19803
  }
19803
- return chunk3XWXW2YI_cjs.ensureToolProperties(tools);
19804
+ return chunkYVFTL5BS_cjs.ensureToolProperties(tools);
19804
19805
  });
19805
19806
  }
19806
19807
  /**
@@ -19846,7 +19847,7 @@ ${errorMessages}`,
19846
19847
  });
19847
19848
  });
19848
19849
  } else {
19849
- llm = new chunkKWQ4YIWP_cjs.MastraLLMV1({
19850
+ llm = new chunkWZ2EJZ7R_cjs.MastraLLMV1({
19850
19851
  model: modelInfo,
19851
19852
  mastra: this.#mastra,
19852
19853
  options: { tracingPolicy: this.#options?.tracingPolicy }
@@ -19872,7 +19873,7 @@ ${errorMessages}`,
19872
19873
  */
19873
19874
  async resolveModelConfig(modelConfig, requestContext) {
19874
19875
  try {
19875
- return await chunkTQTUU6QD_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
19876
+ return await chunkAVOGYFGK_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
19876
19877
  } catch (error) {
19877
19878
  const mastraError = new chunk4U7ZLI36_cjs.MastraError({
19878
19879
  id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
@@ -20351,13 +20352,14 @@ ${errorMessages}`,
20351
20352
  mastra: mastraProxy,
20352
20353
  memory,
20353
20354
  agentName: this.name,
20355
+ agentId: this.id,
20354
20356
  requestContext,
20355
20357
  ...observabilityContext,
20356
20358
  model: await this.getModel({ requestContext }),
20357
20359
  tracingPolicy: this.#options?.tracingPolicy,
20358
20360
  requireApproval: toolObj.requireApproval
20359
20361
  };
20360
- const convertedToCoreTool = chunk3XWXW2YI_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20362
+ const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20361
20363
  convertedMemoryTools[toolName] = convertedToCoreTool;
20362
20364
  }
20363
20365
  }
@@ -20386,7 +20388,7 @@ ${errorMessages}`,
20386
20388
  if (!workspace) {
20387
20389
  return convertedWorkspaceTools;
20388
20390
  }
20389
- const workspaceTools = chunkKQ3SJZG5_cjs.createWorkspaceTools(workspace);
20391
+ const workspaceTools = chunkYSPKTAYB_cjs.createWorkspaceTools(workspace);
20390
20392
  if (Object.keys(workspaceTools).length > 0) {
20391
20393
  this.logger.debug(`[Agent:${this.name}] - Adding workspace tools: ${Object.keys(workspaceTools).join(", ")}`, {
20392
20394
  runId
@@ -20401,6 +20403,7 @@ ${errorMessages}`,
20401
20403
  logger: this.logger,
20402
20404
  mastra: mastraProxy,
20403
20405
  agentName: this.name,
20406
+ agentId: this.id,
20404
20407
  requestContext,
20405
20408
  ...observabilityContext,
20406
20409
  model: await this.getModel({ requestContext }),
@@ -20408,7 +20411,7 @@ ${errorMessages}`,
20408
20411
  requireApproval: toolObj.requireApproval,
20409
20412
  workspace
20410
20413
  };
20411
- const convertedToCoreTool = chunk3XWXW2YI_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20414
+ const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20412
20415
  convertedWorkspaceTools[toolName] = convertedToCoreTool;
20413
20416
  }
20414
20417
  }
@@ -20439,7 +20442,7 @@ ${errorMessages}`,
20439
20442
  if (!workspace?.skills) {
20440
20443
  return convertedSkillTools;
20441
20444
  }
20442
- const skillTools = chunkKQ3SJZG5_cjs.createSkillTools(workspace.skills);
20445
+ const skillTools = chunkYSPKTAYB_cjs.createSkillTools(workspace.skills);
20443
20446
  if (Object.keys(skillTools).length > 0) {
20444
20447
  this.logger.debug(`[Agent:${this.name}] - Adding skill tools: ${Object.keys(skillTools).join(", ")}`, {
20445
20448
  runId
@@ -20454,6 +20457,7 @@ ${errorMessages}`,
20454
20457
  logger: this.logger,
20455
20458
  mastra: mastraProxy,
20456
20459
  agentName: this.name,
20460
+ agentId: this.id,
20457
20461
  requestContext,
20458
20462
  ...observabilityContext,
20459
20463
  model: await this.getModel({ requestContext }),
@@ -20462,7 +20466,7 @@ ${errorMessages}`,
20462
20466
  // Skill tools never require approval
20463
20467
  workspace
20464
20468
  };
20465
- const convertedToCoreTool = chunk3XWXW2YI_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20469
+ const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
20466
20470
  convertedSkillTools[toolName] = convertedToCoreTool;
20467
20471
  }
20468
20472
  }
@@ -20671,6 +20675,7 @@ ${errorMessages}`,
20671
20675
  mastra: mastraProxy,
20672
20676
  memory,
20673
20677
  agentName: this.name,
20678
+ agentId: this.id,
20674
20679
  requestContext,
20675
20680
  ...observabilityContext,
20676
20681
  model: await this.getModel({ requestContext }),
@@ -20678,7 +20683,7 @@ ${errorMessages}`,
20678
20683
  tracingPolicy: this.#options?.tracingPolicy,
20679
20684
  requireApproval: tool2.requireApproval
20680
20685
  };
20681
- return [k, chunk3XWXW2YI_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
20686
+ return [k, chunkYVFTL5BS_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
20682
20687
  })
20683
20688
  );
20684
20689
  const assignedToolEntriesConverted = Object.fromEntries(
@@ -20723,13 +20728,14 @@ ${errorMessages}`,
20723
20728
  mastra: mastraProxy,
20724
20729
  memory,
20725
20730
  agentName: this.name,
20731
+ agentId: this.id,
20726
20732
  requestContext,
20727
20733
  ...observabilityContext,
20728
20734
  model: await this.getModel({ requestContext }),
20729
20735
  tracingPolicy: this.#options?.tracingPolicy,
20730
20736
  requireApproval: toolObj.requireApproval
20731
20737
  };
20732
- const convertedToCoreTool = chunk3XWXW2YI_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
20738
+ const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
20733
20739
  toolsForRequest[toolName] = convertedToCoreTool;
20734
20740
  }
20735
20741
  }
@@ -20769,13 +20775,14 @@ ${errorMessages}`,
20769
20775
  mastra: mastraProxy,
20770
20776
  memory,
20771
20777
  agentName: this.name,
20778
+ agentId: this.id,
20772
20779
  requestContext,
20773
20780
  ...observabilityContext,
20774
20781
  model: await this.getModel({ requestContext }),
20775
20782
  tracingPolicy: this.#options?.tracingPolicy,
20776
20783
  requireApproval: tool2.requireApproval
20777
20784
  };
20778
- const convertedToCoreTool = chunk3XWXW2YI_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
20785
+ const convertedToCoreTool = chunkYVFTL5BS_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
20779
20786
  toolsForRequest[toolName] = convertedToCoreTool;
20780
20787
  }
20781
20788
  }
@@ -20859,7 +20866,7 @@ ${errorMessages}`,
20859
20866
  ).describe("The results from the agent's tool calls").optional()
20860
20867
  });
20861
20868
  const modelVersion = (await agent.getModel({ requestContext })).specificationVersion;
20862
- const toolObj = chunkGYLHNAH7_cjs.createTool({
20869
+ const toolObj = chunkXME4PQE7_cjs.createTool({
20863
20870
  id: `agent-${agentName}`,
20864
20871
  description: agent.getDescription() || `Agent: ${agentName}`,
20865
20872
  inputSchema: agentInputSchema,
@@ -21430,12 +21437,13 @@ ${effectiveInstructions}`;
21430
21437
  mastra: this.#mastra,
21431
21438
  memory: await this.getMemory({ requestContext }),
21432
21439
  agentName: this.name,
21440
+ agentId: this.id,
21433
21441
  requestContext,
21434
21442
  model: await this.getModel({ requestContext }),
21435
21443
  ...observabilityContext,
21436
21444
  tracingPolicy: this.#options?.tracingPolicy
21437
21445
  };
21438
- convertedAgentTools[`agent-${agentName}`] = chunk3XWXW2YI_cjs.makeCoreTool(
21446
+ convertedAgentTools[`agent-${agentName}`] = chunkYVFTL5BS_cjs.makeCoreTool(
21439
21447
  toolObj,
21440
21448
  options,
21441
21449
  void 0,
@@ -21500,7 +21508,7 @@ ${effectiveInstructions}`;
21500
21508
  }
21501
21509
  ]
21502
21510
  };
21503
- const toolObj = chunkGYLHNAH7_cjs.createTool({
21511
+ const toolObj = chunkXME4PQE7_cjs.createTool({
21504
21512
  id: `workflow-${workflowName}`,
21505
21513
  description: workflow.description || `Workflow: ${workflowName}`,
21506
21514
  inputSchema: extendedInputSchema,
@@ -21646,12 +21654,13 @@ ${effectiveInstructions}`;
21646
21654
  mastra: this.#mastra,
21647
21655
  memory: await this.getMemory({ requestContext }),
21648
21656
  agentName: this.name,
21657
+ agentId: this.id,
21649
21658
  requestContext,
21650
21659
  model: await this.getModel({ requestContext }),
21651
21660
  ...observabilityContext,
21652
21661
  tracingPolicy: this.#options?.tracingPolicy
21653
21662
  };
21654
- convertedWorkflowTools[`workflow-${workflowName}`] = chunk3XWXW2YI_cjs.makeCoreTool(
21663
+ convertedWorkflowTools[`workflow-${workflowName}`] = chunkYVFTL5BS_cjs.makeCoreTool(
21655
21664
  toolObj,
21656
21665
  options,
21657
21666
  void 0,
@@ -21683,7 +21692,7 @@ ${effectiveInstructions}`;
21683
21692
  let mastraProxy = void 0;
21684
21693
  const logger = this.logger;
21685
21694
  if (this.#mastra) {
21686
- mastraProxy = chunk3XWXW2YI_cjs.createMastraProxy({ mastra: this.#mastra, logger });
21695
+ mastraProxy = chunkYVFTL5BS_cjs.createMastraProxy({ mastra: this.#mastra, logger });
21687
21696
  }
21688
21697
  const assignedTools = await this.listAssignedTools({
21689
21698
  runId,
@@ -21935,7 +21944,7 @@ ${effectiveInstructions}`;
21935
21944
  const resolvedModel = await this.resolveModelConfig(selection, requestContext);
21936
21945
  this.assertSupportsPreparedModels(resolvedModel);
21937
21946
  let headers;
21938
- if (resolvedModel instanceof chunkTQTUU6QD_cjs.ModelRouterLanguageModel) {
21947
+ if (resolvedModel instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
21939
21948
  headers = resolvedModel.config?.headers;
21940
21949
  }
21941
21950
  return [
@@ -21968,7 +21977,7 @@ ${effectiveInstructions}`;
21968
21977
  throw mastraError;
21969
21978
  }
21970
21979
  let headers;
21971
- if (model instanceof chunkTQTUU6QD_cjs.ModelRouterLanguageModel) {
21980
+ if (model instanceof chunkAVOGYFGK_cjs.ModelRouterLanguageModel) {
21972
21981
  headers = model.config?.headers;
21973
21982
  }
21974
21983
  return {
@@ -22419,7 +22428,7 @@ ${effectiveInstructions}`;
22419
22428
  const defaultOptions = await this.getDefaultOptions({
22420
22429
  requestContext: options?.requestContext
22421
22430
  });
22422
- const mergedOptions = chunk3XWXW2YI_cjs.deepMerge(
22431
+ const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22423
22432
  defaultOptions,
22424
22433
  options ?? {}
22425
22434
  );
@@ -22489,7 +22498,7 @@ ${effectiveInstructions}`;
22489
22498
  const defaultOptions = await this.getDefaultOptions({
22490
22499
  requestContext: streamOptions?.requestContext
22491
22500
  });
22492
- const mergedOptions = chunk3XWXW2YI_cjs.deepMerge(
22501
+ const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22493
22502
  defaultOptions,
22494
22503
  streamOptions ?? {}
22495
22504
  );
@@ -22553,7 +22562,7 @@ ${effectiveInstructions}`;
22553
22562
  const defaultOptions = await this.getDefaultOptions({
22554
22563
  requestContext: streamOptions?.requestContext
22555
22564
  });
22556
- let mergedStreamOptions = chunk3XWXW2YI_cjs.deepMerge(
22565
+ let mergedStreamOptions = chunkYVFTL5BS_cjs.deepMerge(
22557
22566
  defaultOptions,
22558
22567
  streamOptions ?? {}
22559
22568
  );
@@ -22618,7 +22627,7 @@ ${effectiveInstructions}`;
22618
22627
  const defaultOptions = await this.getDefaultOptions({
22619
22628
  requestContext: options?.requestContext
22620
22629
  });
22621
- const mergedOptions = chunk3XWXW2YI_cjs.deepMerge(
22630
+ const mergedOptions = chunkYVFTL5BS_cjs.deepMerge(
22622
22631
  defaultOptions,
22623
22632
  options ?? {}
22624
22633
  );
@@ -24192,7 +24201,7 @@ var TokenLimiterProcessor = class _TokenLimiterProcessor {
24192
24201
  return new TiktokenClass(this.customEncoding);
24193
24202
  });
24194
24203
  } else {
24195
- this.encoderPromise = chunkKQ3SJZG5_cjs.getTiktoken();
24204
+ this.encoderPromise = chunkYSPKTAYB_cjs.getTiktoken();
24196
24205
  }
24197
24206
  }
24198
24207
  return this.encoderPromise;
@@ -24877,7 +24886,7 @@ var ToolSearchProcessor = class {
24877
24886
  minScore: options.search?.minScore ?? 0
24878
24887
  };
24879
24888
  this.ttl = options.ttl ?? 36e5;
24880
- this.bm25Index = new chunkKQ3SJZG5_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
24889
+ this.bm25Index = new chunkYSPKTAYB_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
24881
24890
  this.indexTools();
24882
24891
  if (this.ttl > 0) {
24883
24892
  this.scheduleCleanup();
@@ -25042,7 +25051,7 @@ var ToolSearchProcessor = class {
25042
25051
  messageList.addSystem(
25043
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."
25044
25053
  );
25045
- const searchTool = chunkGYLHNAH7_cjs.createTool({
25054
+ const searchTool = chunkXME4PQE7_cjs.createTool({
25046
25055
  id: "search_tools",
25047
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.",
25048
25057
  inputSchema: v4.z.object({
@@ -25072,7 +25081,7 @@ var ToolSearchProcessor = class {
25072
25081
  };
25073
25082
  }
25074
25083
  });
25075
- const loadTool = chunkGYLHNAH7_cjs.createTool({
25084
+ const loadTool = chunkXME4PQE7_cjs.createTool({
25076
25085
  id: "load_tool",
25077
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).",
25078
25087
  inputSchema: v4.z.object({
@@ -25406,7 +25415,7 @@ var WorkingMemory = class {
25406
25415
  return messageList;
25407
25416
  }
25408
25417
  generateEmptyFromSchemaInternal(schema) {
25409
- const result = chunk3XWXW2YI_cjs.generateEmptyFromSchema(schema);
25418
+ const result = chunkYVFTL5BS_cjs.generateEmptyFromSchema(schema);
25410
25419
  return Object.keys(result).length > 0 ? result : null;
25411
25420
  }
25412
25421
  getWorkingMemoryToolInstruction({
@@ -26051,7 +26060,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
26051
26060
  );
26052
26061
  }
26053
26062
  if (typeof config.embedder === "string") {
26054
- this.embedder = new chunkTQTUU6QD_cjs.ModelRouterEmbeddingModel(config.embedder);
26063
+ this.embedder = new chunkAVOGYFGK_cjs.ModelRouterEmbeddingModel(config.embedder);
26055
26064
  } else {
26056
26065
  this.embedder = config.embedder;
26057
26066
  }
@@ -26090,7 +26099,7 @@ https://mastra.ai/en/docs/memory/overview`
26090
26099
  }
26091
26100
  setEmbedder(embedder, embedderOptions) {
26092
26101
  if (typeof embedder === "string") {
26093
- this.embedder = new chunkTQTUU6QD_cjs.ModelRouterEmbeddingModel(embedder);
26102
+ this.embedder = new chunkAVOGYFGK_cjs.ModelRouterEmbeddingModel(embedder);
26094
26103
  } else {
26095
26104
  this.embedder = embedder;
26096
26105
  }
@@ -26187,7 +26196,7 @@ https://mastra.ai/en/docs/memory/overview`
26187
26196
  "The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
26188
26197
  );
26189
26198
  }
26190
- const mergedConfig = chunk3XWXW2YI_cjs.deepMerge(this.threadConfig, config || {});
26199
+ const mergedConfig = chunkYVFTL5BS_cjs.deepMerge(this.threadConfig, config || {});
26191
26200
  if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
26192
26201
  mergedConfig.workingMemory.schema = config.workingMemory.schema;
26193
26202
  }
@@ -26539,7 +26548,7 @@ var MockMemory = class extends MastraMemory {
26539
26548
  } = {}) {
26540
26549
  super({
26541
26550
  name: "mock",
26542
- storage: storage || new chunkQ7EDK6IW_cjs.InMemoryStore(),
26551
+ storage: storage || new chunkXYT5D2T7_cjs.InMemoryStore(),
26543
26552
  options: {
26544
26553
  ...options,
26545
26554
  workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
@@ -26620,7 +26629,7 @@ var MockMemory = class extends MastraMemory {
26620
26629
  return {};
26621
26630
  }
26622
26631
  return {
26623
- updateWorkingMemory: chunkGYLHNAH7_cjs.createTool({
26632
+ updateWorkingMemory: chunkXME4PQE7_cjs.createTool({
26624
26633
  id: "update-working-memory",
26625
26634
  description: `Update the working memory with new information. Any data not included will be overwritten.`,
26626
26635
  inputSchema: v4.z.object({ memory: v4.z.string() }),
@@ -26848,5 +26857,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
26848
26857
  exports.validateStepResumeData = validateStepResumeData;
26849
26858
  exports.validateStepStateData = validateStepStateData;
26850
26859
  exports.validateStepSuspendData = validateStepSuspendData;
26851
- //# sourceMappingURL=chunk-2DPHD6NF.cjs.map
26852
- //# sourceMappingURL=chunk-2DPHD6NF.cjs.map
26860
+ //# sourceMappingURL=chunk-VQMIFPSC.cjs.map
26861
+ //# sourceMappingURL=chunk-VQMIFPSC.cjs.map