@mastra/deployer 0.10.11-alpha.2 → 0.10.11-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.
- package/LICENSE.md +11 -42
- package/dist/server/index.cjs +18 -15
- package/dist/server/index.js +4 -1
- package/package.json +5 -5
package/LICENSE.md
CHANGED
|
@@ -1,46 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Apache License 2.0
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
17
|
-
|
|
18
|
-
**Patents**
|
|
19
|
-
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
20
|
-
|
|
21
|
-
**Notices**
|
|
22
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
23
|
-
|
|
24
|
-
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
25
|
-
|
|
26
|
-
**No Other Rights**
|
|
27
|
-
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
28
|
-
|
|
29
|
-
**Termination**
|
|
30
|
-
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
31
|
-
|
|
32
|
-
**No Liability**
|
|
33
|
-
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
34
|
-
|
|
35
|
-
**Definitions**
|
|
36
|
-
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
37
|
-
|
|
38
|
-
_you_ refers to the individual or entity agreeing to these terms.
|
|
39
|
-
|
|
40
|
-
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
41
|
-
|
|
42
|
-
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
43
|
-
|
|
44
|
-
_use_ means anything you do with the software requiring one of your licenses.
|
|
45
|
-
|
|
46
|
-
_trademark_ means trademarks, service marks, and similar rights.
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/dist/server/index.cjs
CHANGED
|
@@ -12,6 +12,7 @@ var fs = require('fs');
|
|
|
12
12
|
var html = require('hono/html');
|
|
13
13
|
var core = require('@mastra/core');
|
|
14
14
|
var runtimeContext = require('@mastra/core/runtime-context');
|
|
15
|
+
var tools = require('@mastra/core/tools');
|
|
15
16
|
var hono = require('hono');
|
|
16
17
|
var bodyLimit = require('hono/body-limit');
|
|
17
18
|
var cors = require('hono/cors');
|
|
@@ -30,7 +31,7 @@ var network = require('@mastra/server/handlers/network');
|
|
|
30
31
|
var agent = require('@mastra/core/agent');
|
|
31
32
|
var zod = require('zod');
|
|
32
33
|
var telemetry = require('@mastra/server/handlers/telemetry');
|
|
33
|
-
var tools = require('@mastra/server/handlers/tools');
|
|
34
|
+
var tools$1 = require('@mastra/server/handlers/tools');
|
|
34
35
|
var vector = require('@mastra/server/handlers/vector');
|
|
35
36
|
var vNextNetwork = require('@mastra/server/handlers/vNextNetwork');
|
|
36
37
|
var voice = require('@mastra/server/handlers/voice');
|
|
@@ -3938,9 +3939,9 @@ async function storeTelemetryHandler(c2) {
|
|
|
3938
3939
|
}
|
|
3939
3940
|
async function getToolsHandler(c2) {
|
|
3940
3941
|
try {
|
|
3941
|
-
const tools
|
|
3942
|
-
const result = await tools.getToolsHandler({
|
|
3943
|
-
tools
|
|
3942
|
+
const tools = c2.get("tools");
|
|
3943
|
+
const result = await tools$1.getToolsHandler({
|
|
3944
|
+
tools
|
|
3944
3945
|
});
|
|
3945
3946
|
return c2.json(result || {});
|
|
3946
3947
|
} catch (error) {
|
|
@@ -3949,10 +3950,10 @@ async function getToolsHandler(c2) {
|
|
|
3949
3950
|
}
|
|
3950
3951
|
async function getToolByIdHandler(c2) {
|
|
3951
3952
|
try {
|
|
3952
|
-
const tools
|
|
3953
|
+
const tools = c2.get("tools");
|
|
3953
3954
|
const toolId = c2.req.param("toolId");
|
|
3954
|
-
const result = await tools.getToolByIdHandler({
|
|
3955
|
-
tools
|
|
3955
|
+
const result = await tools$1.getToolByIdHandler({
|
|
3956
|
+
tools,
|
|
3956
3957
|
toolId
|
|
3957
3958
|
});
|
|
3958
3959
|
return c2.json(result);
|
|
@@ -3960,7 +3961,7 @@ async function getToolByIdHandler(c2) {
|
|
|
3960
3961
|
return handleError(error, "Error getting tool");
|
|
3961
3962
|
}
|
|
3962
3963
|
}
|
|
3963
|
-
function executeToolHandler(tools
|
|
3964
|
+
function executeToolHandler(tools) {
|
|
3964
3965
|
return async (c2) => {
|
|
3965
3966
|
try {
|
|
3966
3967
|
const mastra = c2.get("mastra");
|
|
@@ -3968,7 +3969,7 @@ function executeToolHandler(tools$1) {
|
|
|
3968
3969
|
const toolId = decodeURIComponent(c2.req.param("toolId"));
|
|
3969
3970
|
const runId = c2.req.query("runId");
|
|
3970
3971
|
const { data } = await c2.req.json();
|
|
3971
|
-
const result = await tools.executeToolHandler(tools
|
|
3972
|
+
const result = await tools$1.executeToolHandler(tools)({
|
|
3972
3973
|
mastra,
|
|
3973
3974
|
toolId,
|
|
3974
3975
|
data,
|
|
@@ -3988,7 +3989,7 @@ async function executeAgentToolHandler(c2) {
|
|
|
3988
3989
|
const agentId = c2.req.param("agentId");
|
|
3989
3990
|
const toolId = c2.req.param("toolId");
|
|
3990
3991
|
const { data } = await c2.req.json();
|
|
3991
|
-
const result = await tools.executeAgentToolHandler({
|
|
3992
|
+
const result = await tools$1.executeAgentToolHandler({
|
|
3992
3993
|
mastra,
|
|
3993
3994
|
agentId,
|
|
3994
3995
|
toolId,
|
|
@@ -4702,12 +4703,14 @@ var html2 = `
|
|
|
4702
4703
|
async function createHonoServer(mastra, options = {}) {
|
|
4703
4704
|
const app = new hono.Hono();
|
|
4704
4705
|
const server = mastra.getServer();
|
|
4705
|
-
let tools = {};
|
|
4706
|
+
let tools$1 = {};
|
|
4706
4707
|
try {
|
|
4707
4708
|
const toolImports = (await import('#tools')).tools;
|
|
4708
|
-
tools = toolImports.reduce((acc, toolModule) => {
|
|
4709
|
+
tools$1 = toolImports.reduce((acc, toolModule) => {
|
|
4709
4710
|
Object.entries(toolModule).forEach(([key, tool]) => {
|
|
4710
|
-
|
|
4711
|
+
if (tool instanceof tools.Tool) {
|
|
4712
|
+
acc[key] = tool;
|
|
4713
|
+
}
|
|
4711
4714
|
});
|
|
4712
4715
|
return acc;
|
|
4713
4716
|
}, {});
|
|
@@ -4757,7 +4760,7 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
4757
4760
|
}
|
|
4758
4761
|
c2.set("runtimeContext", runtimeContext$1);
|
|
4759
4762
|
c2.set("mastra", mastra);
|
|
4760
|
-
c2.set("tools", tools);
|
|
4763
|
+
c2.set("tools", tools$1);
|
|
4761
4764
|
c2.set("playground", options.playground === true);
|
|
4762
4765
|
c2.set("isDev", options.isDev === true);
|
|
4763
4766
|
return next();
|
|
@@ -8004,7 +8007,7 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
8004
8007
|
}
|
|
8005
8008
|
}
|
|
8006
8009
|
}),
|
|
8007
|
-
executeToolHandler(tools)
|
|
8010
|
+
executeToolHandler(tools$1)
|
|
8008
8011
|
);
|
|
8009
8012
|
app.post(
|
|
8010
8013
|
"/api/vector/:vectorName/upsert",
|
package/dist/server/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { createReadStream, lstatSync } from 'fs';
|
|
|
10
10
|
import { html } from 'hono/html';
|
|
11
11
|
import { Telemetry } from '@mastra/core';
|
|
12
12
|
import { RuntimeContext } from '@mastra/core/runtime-context';
|
|
13
|
+
import { Tool } from '@mastra/core/tools';
|
|
13
14
|
import { Hono } from 'hono';
|
|
14
15
|
import { bodyLimit } from 'hono/body-limit';
|
|
15
16
|
import { cors } from 'hono/cors';
|
|
@@ -4700,7 +4701,9 @@ async function createHonoServer(mastra, options = {}) {
|
|
|
4700
4701
|
const toolImports = (await import('#tools')).tools;
|
|
4701
4702
|
tools = toolImports.reduce((acc, toolModule) => {
|
|
4702
4703
|
Object.entries(toolModule).forEach(([key, tool]) => {
|
|
4703
|
-
|
|
4704
|
+
if (tool instanceof Tool) {
|
|
4705
|
+
acc[key] = tool;
|
|
4706
|
+
}
|
|
4704
4707
|
});
|
|
4705
4708
|
return acc;
|
|
4706
4709
|
}, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.10.11-alpha.
|
|
3
|
+
"version": "0.10.11-alpha.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"keywords": [],
|
|
85
85
|
"author": "",
|
|
86
|
-
"license": "
|
|
86
|
+
"license": "Apache-2.0",
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@babel/core": "^7.27.7",
|
|
89
89
|
"@babel/helper-module-imports": "^7.27.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
109
109
|
"typescript-paths": "^1.5.1",
|
|
110
110
|
"zod": "^3.25.67",
|
|
111
|
-
"@mastra/server": "^0.10.11-alpha.
|
|
111
|
+
"@mastra/server": "^0.10.11-alpha.4"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@hono/node-server": "^1.14.4",
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"typescript": "^5.8.3",
|
|
129
129
|
"vitest": "^3.2.4",
|
|
130
130
|
"@internal/lint": "0.0.17",
|
|
131
|
-
"@mastra/
|
|
132
|
-
"@mastra/
|
|
131
|
+
"@mastra/mcp": "^0.10.6-alpha.1",
|
|
132
|
+
"@mastra/core": "0.10.11-alpha.4"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"@mastra/core": ">=0.10.9-0 <0.11.0-0"
|