@mastra/deployer 0.2.9-alpha.3 → 0.2.9-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.
@@ -1374,12 +1374,14 @@ function executeToolHandler(tools$1) {
1374
1374
  return async (c2) => {
1375
1375
  try {
1376
1376
  const mastra = c2.get("mastra");
1377
+ const container = c2.get("container");
1377
1378
  const toolId = decodeURIComponent(c2.req.param("toolId"));
1378
1379
  const { data } = await c2.req.json();
1379
1380
  const result = await tools.executeToolHandler(tools$1)({
1380
1381
  mastra,
1381
1382
  toolId,
1382
- data
1383
+ data,
1384
+ container
1383
1385
  });
1384
1386
  return c2.json(result);
1385
1387
  } catch (error) {
@@ -1390,6 +1392,7 @@ function executeToolHandler(tools$1) {
1390
1392
  async function executeAgentToolHandler(c2) {
1391
1393
  try {
1392
1394
  const mastra = c2.get("mastra");
1395
+ const container = c2.get("container");
1393
1396
  const agentId = c2.req.param("agentId");
1394
1397
  const toolId = c2.req.param("toolId");
1395
1398
  const { data } = await c2.req.json();
@@ -1397,7 +1400,8 @@ async function executeAgentToolHandler(c2) {
1397
1400
  mastra,
1398
1401
  agentId,
1399
1402
  toolId,
1400
- data
1403
+ data,
1404
+ container
1401
1405
  });
1402
1406
  return c2.json(result);
1403
1407
  } catch (error) {
@@ -1895,7 +1899,7 @@ async function createHonoServer(mastra, options = {}) {
1895
1899
  }
1896
1900
  }
1897
1901
  if (server?.cors === false) {
1898
- app.use("*", timeout.timeout(server?.timeout ?? 1e3 * 30));
1902
+ app.use("*", timeout.timeout(server?.timeout ?? 3 * 60 * 1e3));
1899
1903
  } else {
1900
1904
  const corsConfig = {
1901
1905
  origin: "*",
@@ -1906,7 +1910,7 @@ async function createHonoServer(mastra, options = {}) {
1906
1910
  allowHeaders: ["Content-Type", "Authorization", "x-mastra-client-type", ...server?.cors?.allowHeaders ?? []],
1907
1911
  exposeHeaders: ["Content-Length", "X-Requested-With", ...server?.cors?.exposeHeaders ?? []]
1908
1912
  };
1909
- app.use("*", timeout.timeout(server?.timeout ?? 1e3 * 30), cors.cors(corsConfig));
1913
+ app.use("*", timeout.timeout(server?.timeout ?? 3 * 60 * 1e3), cors.cors(corsConfig));
1910
1914
  }
1911
1915
  const bodyLimitOptions = {
1912
1916
  maxSize: 4.5 * 1024 * 1024,
@@ -3836,7 +3840,7 @@ async function createNodeServer(mastra, options = {}) {
3836
3840
  const app = await createHonoServer(mastra, options);
3837
3841
  const serverOptions = mastra.getServer();
3838
3842
  const port = serverOptions?.port ?? (Number(process.env.PORT) || 4111);
3839
- return serve(
3843
+ const server = serve(
3840
3844
  {
3841
3845
  fetch: app.fetch,
3842
3846
  port
@@ -3853,6 +3857,7 @@ async function createNodeServer(mastra, options = {}) {
3853
3857
  }
3854
3858
  }
3855
3859
  );
3860
+ return server;
3856
3861
  }
3857
3862
 
3858
3863
  exports.createHonoServer = createHonoServer;
@@ -1368,12 +1368,14 @@ function executeToolHandler(tools) {
1368
1368
  return async (c2) => {
1369
1369
  try {
1370
1370
  const mastra = c2.get("mastra");
1371
+ const container = c2.get("container");
1371
1372
  const toolId = decodeURIComponent(c2.req.param("toolId"));
1372
1373
  const { data } = await c2.req.json();
1373
1374
  const result = await executeToolHandler$1(tools)({
1374
1375
  mastra,
1375
1376
  toolId,
1376
- data
1377
+ data,
1378
+ container
1377
1379
  });
1378
1380
  return c2.json(result);
1379
1381
  } catch (error) {
@@ -1384,6 +1386,7 @@ function executeToolHandler(tools) {
1384
1386
  async function executeAgentToolHandler(c2) {
1385
1387
  try {
1386
1388
  const mastra = c2.get("mastra");
1389
+ const container = c2.get("container");
1387
1390
  const agentId = c2.req.param("agentId");
1388
1391
  const toolId = c2.req.param("toolId");
1389
1392
  const { data } = await c2.req.json();
@@ -1391,7 +1394,8 @@ async function executeAgentToolHandler(c2) {
1391
1394
  mastra,
1392
1395
  agentId,
1393
1396
  toolId,
1394
- data
1397
+ data,
1398
+ container
1395
1399
  });
1396
1400
  return c2.json(result);
1397
1401
  } catch (error) {
@@ -1889,7 +1893,7 @@ async function createHonoServer(mastra, options = {}) {
1889
1893
  }
1890
1894
  }
1891
1895
  if (server?.cors === false) {
1892
- app.use("*", timeout(server?.timeout ?? 1e3 * 30));
1896
+ app.use("*", timeout(server?.timeout ?? 3 * 60 * 1e3));
1893
1897
  } else {
1894
1898
  const corsConfig = {
1895
1899
  origin: "*",
@@ -1900,7 +1904,7 @@ async function createHonoServer(mastra, options = {}) {
1900
1904
  allowHeaders: ["Content-Type", "Authorization", "x-mastra-client-type", ...server?.cors?.allowHeaders ?? []],
1901
1905
  exposeHeaders: ["Content-Length", "X-Requested-With", ...server?.cors?.exposeHeaders ?? []]
1902
1906
  };
1903
- app.use("*", timeout(server?.timeout ?? 1e3 * 30), cors(corsConfig));
1907
+ app.use("*", timeout(server?.timeout ?? 3 * 60 * 1e3), cors(corsConfig));
1904
1908
  }
1905
1909
  const bodyLimitOptions = {
1906
1910
  maxSize: 4.5 * 1024 * 1024,
@@ -3830,7 +3834,7 @@ async function createNodeServer(mastra, options = {}) {
3830
3834
  const app = await createHonoServer(mastra, options);
3831
3835
  const serverOptions = mastra.getServer();
3832
3836
  const port = serverOptions?.port ?? (Number(process.env.PORT) || 4111);
3833
- return serve(
3837
+ const server = serve(
3834
3838
  {
3835
3839
  fetch: app.fetch,
3836
3840
  port
@@ -3847,6 +3851,7 @@ async function createNodeServer(mastra, options = {}) {
3847
3851
  }
3848
3852
  }
3849
3853
  );
3854
+ return server;
3850
3855
  }
3851
3856
 
3852
3857
  export { createHonoServer, createNodeServer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.2.9-alpha.3",
3
+ "version": "0.2.9-alpha.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -105,8 +105,8 @@
105
105
  "rollup-plugin-node-externals": "^8.0.0",
106
106
  "typescript-paths": "^1.5.1",
107
107
  "zod": "^3.24.2",
108
- "@mastra/core": "^0.8.3-alpha.3",
109
- "@mastra/server": "^1.0.3-alpha.3"
108
+ "@mastra/server": "^1.0.3-alpha.5",
109
+ "@mastra/core": "^0.8.3-alpha.4"
110
110
  },
111
111
  "devDependencies": {
112
112
  "@hono/node-server": "^1.13.8",