@mastra/server 1.0.3-alpha.3 → 1.0.3-alpha.5
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.
- package/dist/_tsup-dts-rollup.d.cts +4 -2
- package/dist/_tsup-dts-rollup.d.ts +4 -2
- package/dist/{chunk-4C3EPMMF.cjs → chunk-PDC4ZBQW.cjs} +7 -3
- package/dist/{chunk-YNSGUC2O.js → chunk-UV4WTEH4.js} +7 -3
- package/dist/server/handlers/tools.cjs +5 -5
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/package.json +3 -3
|
@@ -87,13 +87,15 @@ export declare function describeIndex({ mastra, vectorName, indexName, }: Pick<V
|
|
|
87
87
|
metric: string | undefined;
|
|
88
88
|
}>;
|
|
89
89
|
|
|
90
|
-
export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
|
|
90
|
+
export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, container, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
|
|
91
91
|
agentId?: string;
|
|
92
92
|
data: any;
|
|
93
|
+
container: Container;
|
|
93
94
|
}): Promise<any>;
|
|
94
95
|
|
|
95
|
-
export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
|
|
96
|
+
export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, container, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
|
|
96
97
|
data?: unknown;
|
|
98
|
+
container: Container;
|
|
97
99
|
}) => Promise<any>;
|
|
98
100
|
|
|
99
101
|
export declare function generateHandler({ mastra, container, agentId, body, }: Context & {
|
|
@@ -87,13 +87,15 @@ export declare function describeIndex({ mastra, vectorName, indexName, }: Pick<V
|
|
|
87
87
|
metric: string | undefined;
|
|
88
88
|
}>;
|
|
89
89
|
|
|
90
|
-
export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
|
|
90
|
+
export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, container, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
|
|
91
91
|
agentId?: string;
|
|
92
92
|
data: any;
|
|
93
|
+
container: Container;
|
|
93
94
|
}): Promise<any>;
|
|
94
95
|
|
|
95
|
-
export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
|
|
96
|
+
export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, container, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
|
|
96
97
|
data?: unknown;
|
|
98
|
+
container: Container;
|
|
97
99
|
}) => Promise<any>;
|
|
98
100
|
|
|
99
101
|
export declare function generateHandler({ mastra, container, agentId, body, }: Context & {
|
|
@@ -57,7 +57,8 @@ function executeToolHandler(tools$1) {
|
|
|
57
57
|
mastra,
|
|
58
58
|
runId,
|
|
59
59
|
toolId,
|
|
60
|
-
data
|
|
60
|
+
data,
|
|
61
|
+
container
|
|
61
62
|
}) => {
|
|
62
63
|
try {
|
|
63
64
|
if (!toolId) {
|
|
@@ -78,7 +79,8 @@ function executeToolHandler(tools$1) {
|
|
|
78
79
|
const result = await tool.execute({
|
|
79
80
|
context: data,
|
|
80
81
|
mastra,
|
|
81
|
-
runId
|
|
82
|
+
runId,
|
|
83
|
+
container
|
|
82
84
|
});
|
|
83
85
|
return result;
|
|
84
86
|
} catch (error) {
|
|
@@ -90,7 +92,8 @@ async function executeAgentToolHandler({
|
|
|
90
92
|
mastra,
|
|
91
93
|
agentId,
|
|
92
94
|
toolId,
|
|
93
|
-
data
|
|
95
|
+
data,
|
|
96
|
+
container
|
|
94
97
|
}) {
|
|
95
98
|
try {
|
|
96
99
|
const agent = agentId ? mastra.getAgent(agentId) : null;
|
|
@@ -106,6 +109,7 @@ async function executeAgentToolHandler({
|
|
|
106
109
|
}
|
|
107
110
|
const result = await tool.execute({
|
|
108
111
|
context: data,
|
|
112
|
+
container,
|
|
109
113
|
mastra,
|
|
110
114
|
runId: agentId
|
|
111
115
|
});
|
|
@@ -55,7 +55,8 @@ function executeToolHandler(tools) {
|
|
|
55
55
|
mastra,
|
|
56
56
|
runId,
|
|
57
57
|
toolId,
|
|
58
|
-
data
|
|
58
|
+
data,
|
|
59
|
+
container
|
|
59
60
|
}) => {
|
|
60
61
|
try {
|
|
61
62
|
if (!toolId) {
|
|
@@ -76,7 +77,8 @@ function executeToolHandler(tools) {
|
|
|
76
77
|
const result = await tool.execute({
|
|
77
78
|
context: data,
|
|
78
79
|
mastra,
|
|
79
|
-
runId
|
|
80
|
+
runId,
|
|
81
|
+
container
|
|
80
82
|
});
|
|
81
83
|
return result;
|
|
82
84
|
} catch (error) {
|
|
@@ -88,7 +90,8 @@ async function executeAgentToolHandler({
|
|
|
88
90
|
mastra,
|
|
89
91
|
agentId,
|
|
90
92
|
toolId,
|
|
91
|
-
data
|
|
93
|
+
data,
|
|
94
|
+
container
|
|
92
95
|
}) {
|
|
93
96
|
try {
|
|
94
97
|
const agent = agentId ? mastra.getAgent(agentId) : null;
|
|
@@ -104,6 +107,7 @@ async function executeAgentToolHandler({
|
|
|
104
107
|
}
|
|
105
108
|
const result = await tool.execute({
|
|
106
109
|
context: data,
|
|
110
|
+
container,
|
|
107
111
|
mastra,
|
|
108
112
|
runId: agentId
|
|
109
113
|
});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPDC4ZBQW_cjs = require('../../chunk-PDC4ZBQW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "executeAgentToolHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkPDC4ZBQW_cjs.executeAgentToolHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "executeToolHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkPDC4ZBQW_cjs.executeToolHandler; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getToolByIdHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkPDC4ZBQW_cjs.getToolByIdHandler; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getToolsHandler", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkPDC4ZBQW_cjs.getToolsHandler; }
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { executeAgentToolHandler, executeToolHandler, getToolByIdHandler, getToolsHandler } from '../../chunk-
|
|
1
|
+
export { executeAgentToolHandler, executeToolHandler, getToolByIdHandler, getToolsHandler } from '../../chunk-UV4WTEH4.js';
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPDC4ZBQW_cjs = require('../chunk-PDC4ZBQW.cjs');
|
|
4
4
|
var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
|
|
5
5
|
var chunkA7DF4ETD_cjs = require('../chunk-A7DF4ETD.cjs');
|
|
6
6
|
var chunkB64YROKU_cjs = require('../chunk-B64YROKU.cjs');
|
|
@@ -14,7 +14,7 @@ var chunkCWSDZEZG_cjs = require('../chunk-CWSDZEZG.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "tools", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkPDC4ZBQW_cjs.tools_exports; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "vector", {
|
|
20
20
|
enumerable: true,
|
package/dist/server/handlers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { tools_exports as tools } from '../chunk-
|
|
1
|
+
export { tools_exports as tools } from '../chunk-UV4WTEH4.js';
|
|
2
2
|
export { vector_exports as vector } from '../chunk-4JINXASC.js';
|
|
3
3
|
export { voice_exports as voice } from '../chunk-3RVHWGWO.js';
|
|
4
4
|
export { workflows_exports as workflows } from '../chunk-OPP7H5TW.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"license": "Elastic-2.0",
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@mastra/core": "^0.8.3-alpha.
|
|
49
|
+
"@mastra/core": "^0.8.3-alpha.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@ai-sdk/openai": "^1.3.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vitest": "^2.1.9",
|
|
60
60
|
"zod-to-json-schema": "^3.24.3",
|
|
61
|
-
"@mastra/core": "0.8.3-alpha.
|
|
61
|
+
"@mastra/core": "0.8.3-alpha.4",
|
|
62
62
|
"@internal/lint": "0.0.2-alpha.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|