@mastra/server 0.10.2-alpha.6 → 0.10.2-alpha.7

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.
@@ -108,7 +108,8 @@ async function executeAgentToolHandler({
108
108
  if (!agent) {
109
109
  throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Tool not found" });
110
110
  }
111
- const tool = Object.values(agent?.tools || {}).find((tool2) => tool2.id === toolId);
111
+ const agentTools = await agent.getTools({ runtimeContext });
112
+ const tool = Object.values(agentTools || {}).find((tool2) => tool2.id === toolId);
112
113
  if (!tool) {
113
114
  throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Tool not found" });
114
115
  }
@@ -106,7 +106,8 @@ async function executeAgentToolHandler({
106
106
  if (!agent) {
107
107
  throw new HTTPException(404, { message: "Tool not found" });
108
108
  }
109
- const tool = Object.values(agent?.tools || {}).find((tool2) => tool2.id === toolId);
109
+ const agentTools = await agent.getTools({ runtimeContext });
110
+ const tool = Object.values(agentTools || {}).find((tool2) => tool2.id === toolId);
110
111
  if (!tool) {
111
112
  throw new HTTPException(404, { message: "Tool not found" });
112
113
  }
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var chunkZE5AAC4I_cjs = require('../../chunk-ZE5AAC4I.cjs');
3
+ var chunk7VOSGHNC_cjs = require('../../chunk-7VOSGHNC.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "executeAgentToolHandler", {
8
8
  enumerable: true,
9
- get: function () { return chunkZE5AAC4I_cjs.executeAgentToolHandler; }
9
+ get: function () { return chunk7VOSGHNC_cjs.executeAgentToolHandler; }
10
10
  });
11
11
  Object.defineProperty(exports, "executeToolHandler", {
12
12
  enumerable: true,
13
- get: function () { return chunkZE5AAC4I_cjs.executeToolHandler; }
13
+ get: function () { return chunk7VOSGHNC_cjs.executeToolHandler; }
14
14
  });
15
15
  Object.defineProperty(exports, "getToolByIdHandler", {
16
16
  enumerable: true,
17
- get: function () { return chunkZE5AAC4I_cjs.getToolByIdHandler; }
17
+ get: function () { return chunk7VOSGHNC_cjs.getToolByIdHandler; }
18
18
  });
19
19
  Object.defineProperty(exports, "getToolsHandler", {
20
20
  enumerable: true,
21
- get: function () { return chunkZE5AAC4I_cjs.getToolsHandler; }
21
+ get: function () { return chunk7VOSGHNC_cjs.getToolsHandler; }
22
22
  });
@@ -1 +1 @@
1
- export { executeAgentToolHandler, executeToolHandler, getToolByIdHandler, getToolsHandler } from '../../chunk-TJKLBTFB.js';
1
+ export { executeAgentToolHandler, executeToolHandler, getToolByIdHandler, getToolsHandler } from '../../chunk-B6AYBJUA.js';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkVPNDC2DI_cjs = require('../chunk-VPNDC2DI.cjs');
4
4
  var chunkB4MQFJ7G_cjs = require('../chunk-B4MQFJ7G.cjs');
5
- var chunkZE5AAC4I_cjs = require('../chunk-ZE5AAC4I.cjs');
5
+ var chunk7VOSGHNC_cjs = require('../chunk-7VOSGHNC.cjs');
6
6
  var chunkBNEY4P4P_cjs = require('../chunk-BNEY4P4P.cjs');
7
7
  var chunkCMMOIUFC_cjs = require('../chunk-CMMOIUFC.cjs');
8
8
  var chunkMMO2HDM6_cjs = require('../chunk-MMO2HDM6.cjs');
@@ -24,7 +24,7 @@ Object.defineProperty(exports, "telemetry", {
24
24
  });
25
25
  Object.defineProperty(exports, "tools", {
26
26
  enumerable: true,
27
- get: function () { return chunkZE5AAC4I_cjs.tools_exports; }
27
+ get: function () { return chunk7VOSGHNC_cjs.tools_exports; }
28
28
  });
29
29
  Object.defineProperty(exports, "vector", {
30
30
  enumerable: true,
@@ -1,6 +1,6 @@
1
1
  export { network_exports as network } from '../chunk-C7564HUT.js';
2
2
  export { telemetry_exports as telemetry } from '../chunk-BFOA2QQY.js';
3
- export { tools_exports as tools } from '../chunk-TJKLBTFB.js';
3
+ export { tools_exports as tools } from '../chunk-B6AYBJUA.js';
4
4
  export { vector_exports as vector } from '../chunk-55DOQLP6.js';
5
5
  export { voice_exports as voice } from '../chunk-CP55EVBK.js';
6
6
  export { workflows_exports as workflows } from '../chunk-KUNQFY2W.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "0.10.2-alpha.6",
3
+ "version": "0.10.2-alpha.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -60,8 +60,8 @@
60
60
  "vitest": "^2.1.9",
61
61
  "zod": "^3.24.3",
62
62
  "zod-to-json-schema": "^3.24.5",
63
- "@internal/lint": "0.0.7",
64
- "@mastra/core": "0.10.2-alpha.6"
63
+ "@mastra/core": "0.10.2-alpha.7",
64
+ "@internal/lint": "0.0.7"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting",