@mastra/deployer 0.3.2-alpha.0 → 0.3.2-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.
@@ -1335,11 +1335,19 @@ async function rootHandler(c2) {
1335
1335
  async function getTelemetryHandler(c2) {
1336
1336
  try {
1337
1337
  const mastra = c2.get("mastra");
1338
- const { name, scope, page, perPage } = c2.req.query();
1338
+ const { name, scope, page, perPage, fromDate, toDate } = c2.req.query();
1339
1339
  const attribute = c2.req.queries("attribute");
1340
1340
  const traces = await telemetry.getTelemetryHandler({
1341
1341
  mastra,
1342
- body: { name, scope, page: Number(page ?? 0), perPage: Number(perPage ?? 100), attribute }
1342
+ body: {
1343
+ name,
1344
+ scope,
1345
+ page: Number(page ?? 0),
1346
+ perPage: Number(perPage ?? 100),
1347
+ attribute,
1348
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1349
+ toDate: toDate ? new Date(toDate) : void 0
1350
+ }
1343
1351
  });
1344
1352
  return c2.json({ traces });
1345
1353
  } catch (error) {
@@ -1365,7 +1373,7 @@ async function getToolsHandler(c2) {
1365
1373
  const result = await tools.getToolsHandler({
1366
1374
  tools: tools$1
1367
1375
  });
1368
- return c2.json(result);
1376
+ return c2.json(result || {});
1369
1377
  } catch (error) {
1370
1378
  return handleError(error, "Error getting tools");
1371
1379
  }
@@ -1389,12 +1397,14 @@ function executeToolHandler(tools$1) {
1389
1397
  const mastra = c2.get("mastra");
1390
1398
  const runtimeContext = c2.get("runtimeContext");
1391
1399
  const toolId = decodeURIComponent(c2.req.param("toolId"));
1400
+ const runId = c2.req.query("runId");
1392
1401
  const { data } = await c2.req.json();
1393
1402
  const result = await tools.executeToolHandler(tools$1)({
1394
1403
  mastra,
1395
1404
  toolId,
1396
1405
  data,
1397
- runtimeContext
1406
+ runtimeContext,
1407
+ runId
1398
1408
  });
1399
1409
  return c2.json(result);
1400
1410
  } catch (error) {
@@ -1678,9 +1688,15 @@ async function getVNextWorkflowRunsHandler(c2) {
1678
1688
  try {
1679
1689
  const mastra = c2.get("mastra");
1680
1690
  const workflowId = c2.req.param("workflowId");
1691
+ const { fromDate, toDate, limit, offset, resourceId } = c2.req.query();
1681
1692
  const workflowRuns = await vNextWorkflows.getVNextWorkflowRunsHandler({
1682
1693
  mastra,
1683
- workflowId
1694
+ workflowId,
1695
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1696
+ toDate: toDate ? new Date(toDate) : void 0,
1697
+ limit: limit ? Number(limit) : void 0,
1698
+ offset: offset ? Number(offset) : void 0,
1699
+ resourceId
1684
1700
  });
1685
1701
  return c2.json(workflowRuns);
1686
1702
  } catch (error) {
@@ -1909,9 +1925,15 @@ async function getWorkflowRunsHandler(c2) {
1909
1925
  try {
1910
1926
  const mastra = c2.get("mastra");
1911
1927
  const workflowId = c2.req.param("workflowId");
1928
+ const { fromDate, toDate, limit, offset, resourceId } = c2.req.query();
1912
1929
  const workflowRuns = await workflows.getWorkflowRunsHandler({
1913
1930
  mastra,
1914
- workflowId
1931
+ workflowId,
1932
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1933
+ toDate: toDate ? new Date(toDate) : void 0,
1934
+ limit: limit ? Number(limit) : void 0,
1935
+ offset: offset ? Number(offset) : void 0,
1936
+ resourceId
1915
1937
  });
1916
1938
  return c2.json(workflowRuns);
1917
1939
  } catch (error) {
@@ -3319,7 +3341,12 @@ async function createHonoServer(mastra, options = {}) {
3319
3341
  in: "path",
3320
3342
  required: true,
3321
3343
  schema: { type: "string" }
3322
- }
3344
+ },
3345
+ { name: "fromDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3346
+ { name: "toDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3347
+ { name: "limit", in: "query", required: false, schema: { type: "number" } },
3348
+ { name: "offset", in: "query", required: false, schema: { type: "number" } },
3349
+ { name: "resourceId", in: "query", required: false, schema: { type: "string" } }
3323
3350
  ],
3324
3351
  responses: {
3325
3352
  200: {
@@ -3602,7 +3629,12 @@ async function createHonoServer(mastra, options = {}) {
3602
3629
  in: "path",
3603
3630
  required: true,
3604
3631
  schema: { type: "string" }
3605
- }
3632
+ },
3633
+ { name: "fromDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3634
+ { name: "toDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3635
+ { name: "limit", in: "query", required: false, schema: { type: "number" } },
3636
+ { name: "offset", in: "query", required: false, schema: { type: "number" } },
3637
+ { name: "resourceId", in: "query", required: false, schema: { type: "string" } }
3606
3638
  ],
3607
3639
  responses: {
3608
3640
  200: {
@@ -4017,6 +4049,12 @@ async function createHonoServer(mastra, options = {}) {
4017
4049
  in: "path",
4018
4050
  required: true,
4019
4051
  schema: { type: "string" }
4052
+ },
4053
+ {
4054
+ name: "runId",
4055
+ in: "query",
4056
+ required: false,
4057
+ schema: { type: "string" }
4020
4058
  }
4021
4059
  ],
4022
4060
  requestBody: {
@@ -1329,11 +1329,19 @@ async function rootHandler(c2) {
1329
1329
  async function getTelemetryHandler(c2) {
1330
1330
  try {
1331
1331
  const mastra = c2.get("mastra");
1332
- const { name, scope, page, perPage } = c2.req.query();
1332
+ const { name, scope, page, perPage, fromDate, toDate } = c2.req.query();
1333
1333
  const attribute = c2.req.queries("attribute");
1334
1334
  const traces = await getTelemetryHandler$1({
1335
1335
  mastra,
1336
- body: { name, scope, page: Number(page ?? 0), perPage: Number(perPage ?? 100), attribute }
1336
+ body: {
1337
+ name,
1338
+ scope,
1339
+ page: Number(page ?? 0),
1340
+ perPage: Number(perPage ?? 100),
1341
+ attribute,
1342
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1343
+ toDate: toDate ? new Date(toDate) : void 0
1344
+ }
1337
1345
  });
1338
1346
  return c2.json({ traces });
1339
1347
  } catch (error) {
@@ -1359,7 +1367,7 @@ async function getToolsHandler(c2) {
1359
1367
  const result = await getToolsHandler$1({
1360
1368
  tools
1361
1369
  });
1362
- return c2.json(result);
1370
+ return c2.json(result || {});
1363
1371
  } catch (error) {
1364
1372
  return handleError(error, "Error getting tools");
1365
1373
  }
@@ -1383,12 +1391,14 @@ function executeToolHandler(tools) {
1383
1391
  const mastra = c2.get("mastra");
1384
1392
  const runtimeContext = c2.get("runtimeContext");
1385
1393
  const toolId = decodeURIComponent(c2.req.param("toolId"));
1394
+ const runId = c2.req.query("runId");
1386
1395
  const { data } = await c2.req.json();
1387
1396
  const result = await executeToolHandler$1(tools)({
1388
1397
  mastra,
1389
1398
  toolId,
1390
1399
  data,
1391
- runtimeContext
1400
+ runtimeContext,
1401
+ runId
1392
1402
  });
1393
1403
  return c2.json(result);
1394
1404
  } catch (error) {
@@ -1672,9 +1682,15 @@ async function getVNextWorkflowRunsHandler(c2) {
1672
1682
  try {
1673
1683
  const mastra = c2.get("mastra");
1674
1684
  const workflowId = c2.req.param("workflowId");
1685
+ const { fromDate, toDate, limit, offset, resourceId } = c2.req.query();
1675
1686
  const workflowRuns = await getVNextWorkflowRunsHandler$1({
1676
1687
  mastra,
1677
- workflowId
1688
+ workflowId,
1689
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1690
+ toDate: toDate ? new Date(toDate) : void 0,
1691
+ limit: limit ? Number(limit) : void 0,
1692
+ offset: offset ? Number(offset) : void 0,
1693
+ resourceId
1678
1694
  });
1679
1695
  return c2.json(workflowRuns);
1680
1696
  } catch (error) {
@@ -1903,9 +1919,15 @@ async function getWorkflowRunsHandler(c2) {
1903
1919
  try {
1904
1920
  const mastra = c2.get("mastra");
1905
1921
  const workflowId = c2.req.param("workflowId");
1922
+ const { fromDate, toDate, limit, offset, resourceId } = c2.req.query();
1906
1923
  const workflowRuns = await getWorkflowRunsHandler$1({
1907
1924
  mastra,
1908
- workflowId
1925
+ workflowId,
1926
+ fromDate: fromDate ? new Date(fromDate) : void 0,
1927
+ toDate: toDate ? new Date(toDate) : void 0,
1928
+ limit: limit ? Number(limit) : void 0,
1929
+ offset: offset ? Number(offset) : void 0,
1930
+ resourceId
1909
1931
  });
1910
1932
  return c2.json(workflowRuns);
1911
1933
  } catch (error) {
@@ -3313,7 +3335,12 @@ async function createHonoServer(mastra, options = {}) {
3313
3335
  in: "path",
3314
3336
  required: true,
3315
3337
  schema: { type: "string" }
3316
- }
3338
+ },
3339
+ { name: "fromDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3340
+ { name: "toDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3341
+ { name: "limit", in: "query", required: false, schema: { type: "number" } },
3342
+ { name: "offset", in: "query", required: false, schema: { type: "number" } },
3343
+ { name: "resourceId", in: "query", required: false, schema: { type: "string" } }
3317
3344
  ],
3318
3345
  responses: {
3319
3346
  200: {
@@ -3596,7 +3623,12 @@ async function createHonoServer(mastra, options = {}) {
3596
3623
  in: "path",
3597
3624
  required: true,
3598
3625
  schema: { type: "string" }
3599
- }
3626
+ },
3627
+ { name: "fromDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3628
+ { name: "toDate", in: "query", required: false, schema: { type: "string", format: "date-time" } },
3629
+ { name: "limit", in: "query", required: false, schema: { type: "number" } },
3630
+ { name: "offset", in: "query", required: false, schema: { type: "number" } },
3631
+ { name: "resourceId", in: "query", required: false, schema: { type: "string" } }
3600
3632
  ],
3601
3633
  responses: {
3602
3634
  200: {
@@ -4011,6 +4043,12 @@ async function createHonoServer(mastra, options = {}) {
4011
4043
  in: "path",
4012
4044
  required: true,
4013
4045
  schema: { type: "string" }
4046
+ },
4047
+ {
4048
+ name: "runId",
4049
+ in: "query",
4050
+ required: false,
4051
+ schema: { type: "string" }
4014
4052
  }
4015
4053
  ],
4016
4054
  requestBody: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.3.2-alpha.0",
3
+ "version": "0.3.2-alpha.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -107,8 +107,8 @@
107
107
  "rollup-plugin-node-externals": "^8.0.0",
108
108
  "typescript-paths": "^1.5.1",
109
109
  "zod": "^3.24.2",
110
- "@mastra/core": "^0.9.2-alpha.0",
111
- "@mastra/server": "^2.0.2-alpha.0"
110
+ "@mastra/core": "^0.9.2-alpha.3",
111
+ "@mastra/server": "^2.0.2-alpha.3"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@hono/node-server": "^1.13.8",