@mastra/server 0.0.0-agui-20250501191909 → 0.0.0-cloud-transporter-20250513033346

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.
Files changed (72) hide show
  1. package/README.md +48 -135
  2. package/dist/_tsup-dts-rollup.d.cts +177 -16
  3. package/dist/_tsup-dts-rollup.d.ts +177 -16
  4. package/dist/{chunk-M56ECCHK.cjs → chunk-4YZ3U35L.cjs} +18 -17
  5. package/dist/{chunk-QN4KF3BH.cjs → chunk-57CJTIPW.cjs} +2 -2
  6. package/dist/chunk-5SN4U5AC.cjs +508 -0
  7. package/dist/{chunk-ZLBRQFDD.cjs → chunk-64U3UDTH.cjs} +2 -2
  8. package/dist/chunk-75ZPJI57.cjs +9 -0
  9. package/dist/{chunk-QJ3AHN64.js → chunk-C7564HUT.js} +4 -3
  10. package/dist/{chunk-4BIX6GMY.cjs → chunk-D4IRYCUI.cjs} +72 -26
  11. package/dist/{chunk-RBQASTUP.js → chunk-DJJIUEL2.js} +13 -5
  12. package/dist/{chunk-M3YJLWTU.js → chunk-EJO45KYT.js} +29 -18
  13. package/dist/{chunk-L7XE5QTW.js → chunk-H5PTF3Y4.js} +1 -1
  14. package/dist/{chunk-Q6SHQECN.js → chunk-HFWCEP5S.js} +4 -3
  15. package/dist/{chunk-3EJZQ6TQ.js → chunk-HWZVAG3H.js} +3 -3
  16. package/dist/{chunk-EVCC233P.cjs → chunk-I2B73Y4I.cjs} +70 -59
  17. package/dist/{chunk-4JINXASC.js → chunk-IU5VO2I2.js} +3 -2
  18. package/dist/chunk-LIVAK2DM.js +2001 -0
  19. package/dist/{chunk-3AHQ5RGN.js → chunk-M5ABIP7D.js} +1 -1
  20. package/dist/{chunk-7IWQE76Z.cjs → chunk-MHKNLNAN.cjs} +13 -10
  21. package/dist/{chunk-JPB6RPGB.js → chunk-MIQYDLLM.js} +46 -21
  22. package/dist/chunk-MLKGABMK.js +7 -0
  23. package/dist/{chunk-TRDNDNGQ.js → chunk-NYN7KFXL.js} +1 -7
  24. package/dist/{chunk-FV45V6WC.cjs → chunk-OCWPVYNI.cjs} +0 -7
  25. package/dist/{chunk-SKBVVI24.cjs → chunk-OGCNNUHF.cjs} +9 -9
  26. package/dist/{chunk-WTHDCRMY.js → chunk-OR3CIE2H.js} +7 -4
  27. package/dist/chunk-P6SCPDYW.js +500 -0
  28. package/dist/{chunk-5JNVY6DU.js → chunk-TJKLBTFB.js} +20 -8
  29. package/dist/{chunk-AELYAUEE.cjs → chunk-UCTEMO2Q.cjs} +94 -69
  30. package/dist/{chunk-5YGDYMRB.cjs → chunk-VPNDC2DI.cjs} +14 -13
  31. package/dist/{chunk-Y3SV5XK4.js → chunk-WUC6LSTW.js} +54 -8
  32. package/dist/{chunk-2FJURXCL.cjs → chunk-Y7UWRW5X.cjs} +43 -35
  33. package/dist/{chunk-55HTWX4C.cjs → chunk-YBVOQN4M.cjs} +20 -19
  34. package/dist/chunk-YWLUOY3D.cjs +2004 -0
  35. package/dist/{chunk-D3G23FP3.cjs → chunk-ZE5AAC4I.cjs} +37 -25
  36. package/dist/server/handlers/a2a.cjs +30 -0
  37. package/dist/server/handlers/a2a.d.cts +6 -0
  38. package/dist/server/handlers/a2a.d.ts +6 -0
  39. package/dist/server/handlers/a2a.js +1 -0
  40. package/dist/server/handlers/agents.cjs +7 -7
  41. package/dist/server/handlers/agents.js +1 -1
  42. package/dist/server/handlers/error.cjs +2 -2
  43. package/dist/server/handlers/error.js +1 -1
  44. package/dist/server/handlers/logs.cjs +4 -4
  45. package/dist/server/handlers/logs.js +1 -1
  46. package/dist/server/handlers/memory.cjs +9 -9
  47. package/dist/server/handlers/memory.js +1 -1
  48. package/dist/server/handlers/network.cjs +5 -5
  49. package/dist/server/handlers/network.js +1 -1
  50. package/dist/server/handlers/telemetry.cjs +3 -3
  51. package/dist/server/handlers/telemetry.js +1 -1
  52. package/dist/server/handlers/tools.cjs +5 -5
  53. package/dist/server/handlers/tools.js +1 -1
  54. package/dist/server/handlers/utils.cjs +2 -2
  55. package/dist/server/handlers/utils.js +1 -1
  56. package/dist/server/handlers/vNextWorkflows.cjs +12 -12
  57. package/dist/server/handlers/vNextWorkflows.d.cts +1 -1
  58. package/dist/server/handlers/vNextWorkflows.d.ts +1 -1
  59. package/dist/server/handlers/vNextWorkflows.js +1 -1
  60. package/dist/server/handlers/vector.cjs +7 -7
  61. package/dist/server/handlers/vector.js +1 -1
  62. package/dist/server/handlers/voice.cjs +4 -4
  63. package/dist/server/handlers/voice.js +1 -1
  64. package/dist/server/handlers/workflows.cjs +11 -11
  65. package/dist/server/handlers/workflows.js +1 -1
  66. package/dist/server/handlers.cjs +28 -23
  67. package/dist/server/handlers.d.cts +1 -0
  68. package/dist/server/handlers.d.ts +1 -0
  69. package/dist/server/handlers.js +11 -10
  70. package/package.json +7 -5
  71. package/dist/chunk-5SWCVTNL.cjs +0 -5579
  72. package/dist/chunk-OMN3UI6X.js +0 -5576
@@ -1,4 +1,4 @@
1
- import { HTTPException } from './chunk-TRDNDNGQ.js';
1
+ import { HTTPException } from './chunk-NYN7KFXL.js';
2
2
 
3
3
  // src/server/handlers/error.ts
4
4
  function handleError(error, defaultMessage) {
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkZLBRQFDD_cjs = require('./chunk-ZLBRQFDD.cjs');
4
- var chunkFV45V6WC_cjs = require('./chunk-FV45V6WC.cjs');
3
+ var chunk64U3UDTH_cjs = require('./chunk-64U3UDTH.cjs');
4
+ var chunkOCWPVYNI_cjs = require('./chunk-OCWPVYNI.cjs');
5
+ var chunk75ZPJI57_cjs = require('./chunk-75ZPJI57.cjs');
5
6
 
6
7
  // src/server/handlers/telemetry.ts
7
8
  var telemetry_exports = {};
8
- chunkFV45V6WC_cjs.__export(telemetry_exports, {
9
+ chunk75ZPJI57_cjs.__export(telemetry_exports, {
9
10
  getTelemetryHandler: () => getTelemetryHandler,
10
11
  storeTelemetryHandler: () => storeTelemetryHandler
11
12
  });
@@ -14,15 +15,15 @@ async function getTelemetryHandler({ mastra, body }) {
14
15
  const telemetry = mastra.getTelemetry();
15
16
  const storage = mastra.getStorage();
16
17
  if (!telemetry) {
17
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Telemetry is not initialized" });
18
+ throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Telemetry is not initialized" });
18
19
  }
19
20
  if (!storage) {
20
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Storage is not initialized" });
21
+ throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Storage is not initialized" });
21
22
  }
22
23
  if (!body) {
23
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Body is required" });
24
+ throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Body is required" });
24
25
  }
25
- const { name, scope, page, perPage, attribute } = body;
26
+ const { name, scope, page, perPage, attribute, fromDate, toDate } = body;
26
27
  const attributes = attribute ? Object.fromEntries(
27
28
  (Array.isArray(attribute) ? attribute : [attribute]).map((attr) => {
28
29
  const [key, value] = attr.split(":");
@@ -34,11 +35,13 @@ async function getTelemetryHandler({ mastra, body }) {
34
35
  scope,
35
36
  page: Number(page ?? 0),
36
37
  perPage: Number(perPage ?? 100),
37
- attributes
38
+ attributes,
39
+ fromDate: fromDate ? new Date(fromDate) : void 0,
40
+ toDate: toDate ? new Date(toDate) : void 0
38
41
  });
39
42
  return traces;
40
43
  } catch (error2) {
41
- return chunkZLBRQFDD_cjs.handleError(error2, "Error getting telemetry");
44
+ return chunk64U3UDTH_cjs.handleError(error2, "Error getting telemetry");
42
45
  }
43
46
  }
44
47
  async function storeTelemetryHandler({ mastra, body }) {
@@ -46,7 +49,7 @@ async function storeTelemetryHandler({ mastra, body }) {
46
49
  const storage = mastra.getStorage();
47
50
  const logger = mastra.getLogger();
48
51
  if (!storage) {
49
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Storage is not initialized" });
52
+ throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Storage is not initialized" });
50
53
  }
51
54
  const now = /* @__PURE__ */ new Date();
52
55
  const items = body?.resourceSpans?.[0]?.scopeSpans;
@@ -1,14 +1,16 @@
1
- import { stringify, esm_default } from './chunk-OMN3UI6X.js';
2
- import { handleError } from './chunk-3AHQ5RGN.js';
3
- import { __export, HTTPException } from './chunk-TRDNDNGQ.js';
1
+ import { stringify, esm_default } from './chunk-LIVAK2DM.js';
2
+ import { handleError } from './chunk-M5ABIP7D.js';
3
+ import { HTTPException } from './chunk-NYN7KFXL.js';
4
+ import { __export } from './chunk-MLKGABMK.js';
4
5
  import { ReadableStream } from 'node:stream/web';
6
+ import { RuntimeContext } from '@mastra/core/di';
5
7
 
6
8
  // src/server/handlers/vNextWorkflows.ts
7
9
  var vNextWorkflows_exports = {};
8
10
  __export(vNextWorkflows_exports, {
9
11
  createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
10
12
  getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
11
- getVNextWorkflowRunHandler: () => getVNextWorkflowRunHandler,
13
+ getVNextWorkflowRunByIdHandler: () => getVNextWorkflowRunByIdHandler,
12
14
  getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
13
15
  getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
14
16
  resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
@@ -75,7 +77,7 @@ async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
75
77
  throw new HTTPException(500, { message: error?.message || "Error getting workflow" });
76
78
  }
77
79
  }
78
- async function getVNextWorkflowRunHandler({
80
+ async function getVNextWorkflowRunByIdHandler({
79
81
  mastra,
80
82
  workflowId,
81
83
  runId
@@ -91,7 +93,7 @@ async function getVNextWorkflowRunHandler({
91
93
  if (!workflow) {
92
94
  throw new HTTPException(404, { message: "Workflow not found" });
93
95
  }
94
- const run = await workflow.getWorkflowRun(runId);
96
+ const run = await workflow.getWorkflowRunById(runId);
95
97
  if (!run) {
96
98
  throw new HTTPException(404, { message: "Workflow run not found" });
97
99
  }
@@ -124,7 +126,8 @@ async function startAsyncVNextWorkflowHandler({
124
126
  runtimeContext,
125
127
  workflowId,
126
128
  runId,
127
- inputData
129
+ inputData,
130
+ runtimeContextFromRequest
128
131
  }) {
129
132
  try {
130
133
  if (!workflowId) {
@@ -134,10 +137,14 @@ async function startAsyncVNextWorkflowHandler({
134
137
  if (!workflow) {
135
138
  throw new HTTPException(404, { message: "Workflow not found" });
136
139
  }
140
+ const finalRuntimeContext = new RuntimeContext([
141
+ ...Array.from(runtimeContext?.entries() ?? []),
142
+ ...Array.from(Object.entries(runtimeContextFromRequest ?? {}))
143
+ ]);
137
144
  const _run = workflow.createRun({ runId });
138
145
  const result = await _run.start({
139
146
  inputData,
140
- runtimeContext
147
+ runtimeContext: finalRuntimeContext
141
148
  });
142
149
  return result;
143
150
  } catch (error) {
@@ -149,7 +156,8 @@ async function startVNextWorkflowRunHandler({
149
156
  runtimeContext,
150
157
  workflowId,
151
158
  runId,
152
- inputData
159
+ inputData,
160
+ runtimeContextFromRequest
153
161
  }) {
154
162
  try {
155
163
  if (!workflowId) {
@@ -159,14 +167,18 @@ async function startVNextWorkflowRunHandler({
159
167
  throw new HTTPException(400, { message: "runId required to start run" });
160
168
  }
161
169
  const workflow = mastra.vnext_getWorkflow(workflowId);
162
- const run = await workflow.getWorkflowRun(runId);
170
+ const run = await workflow.getWorkflowRunById(runId);
163
171
  if (!run) {
164
172
  throw new HTTPException(404, { message: "Workflow run not found" });
165
173
  }
174
+ const finalRuntimeContext = new RuntimeContext([
175
+ ...Array.from(runtimeContext?.entries() ?? []),
176
+ ...Array.from(Object.entries(runtimeContextFromRequest ?? {}))
177
+ ]);
166
178
  const _run = workflow.createRun({ runId });
167
- await _run.start({
179
+ void _run.start({
168
180
  inputData,
169
- runtimeContext
181
+ runtimeContext: finalRuntimeContext
170
182
  });
171
183
  return { message: "Workflow run started" };
172
184
  } catch (e) {
@@ -186,7 +198,7 @@ async function watchVNextWorkflowHandler({
186
198
  throw new HTTPException(400, { message: "runId required to watch workflow" });
187
199
  }
188
200
  const workflow = mastra.vnext_getWorkflow(workflowId);
189
- const run = await workflow.getWorkflowRun(runId);
201
+ const run = await workflow.getWorkflowRunById(runId);
190
202
  if (!run) {
191
203
  throw new HTTPException(404, { message: "Workflow run not found" });
192
204
  }
@@ -224,7 +236,8 @@ async function resumeAsyncVNextWorkflowHandler({
224
236
  workflowId,
225
237
  runId,
226
238
  body,
227
- runtimeContext
239
+ runtimeContext,
240
+ runtimeContextFromRequest
228
241
  }) {
229
242
  try {
230
243
  if (!workflowId) {
@@ -237,15 +250,19 @@ async function resumeAsyncVNextWorkflowHandler({
237
250
  throw new HTTPException(400, { message: "step required to resume workflow" });
238
251
  }
239
252
  const workflow = mastra.vnext_getWorkflow(workflowId);
240
- const run = await workflow.getWorkflowRun(runId);
253
+ const run = await workflow.getWorkflowRunById(runId);
241
254
  if (!run) {
242
255
  throw new HTTPException(404, { message: "Workflow run not found" });
243
256
  }
257
+ const finalRuntimeContext = new RuntimeContext([
258
+ ...Array.from(runtimeContext?.entries() ?? []),
259
+ ...Array.from(Object.entries(runtimeContextFromRequest ?? {}))
260
+ ]);
244
261
  const _run = workflow.createRun({ runId });
245
262
  const result = await _run.resume({
246
263
  step: body.step,
247
264
  resumeData: body.resumeData,
248
- runtimeContext
265
+ runtimeContext: finalRuntimeContext
249
266
  });
250
267
  return result;
251
268
  } catch (error) {
@@ -270,12 +287,12 @@ async function resumeVNextWorkflowHandler({
270
287
  throw new HTTPException(400, { message: "step required to resume workflow" });
271
288
  }
272
289
  const workflow = mastra.vnext_getWorkflow(workflowId);
273
- const run = await workflow.getWorkflowRun(runId);
290
+ const run = await workflow.getWorkflowRunById(runId);
274
291
  if (!run) {
275
292
  throw new HTTPException(404, { message: "Workflow run not found" });
276
293
  }
277
294
  const _run = workflow.createRun({ runId });
278
- await _run.resume({
295
+ void _run.resume({
279
296
  step: body.step,
280
297
  resumeData: body.resumeData,
281
298
  runtimeContext
@@ -285,13 +302,21 @@ async function resumeVNextWorkflowHandler({
285
302
  return handleError(error, "Error resuming workflow");
286
303
  }
287
304
  }
288
- async function getVNextWorkflowRunsHandler({ mastra, workflowId }) {
305
+ async function getVNextWorkflowRunsHandler({
306
+ mastra,
307
+ workflowId,
308
+ fromDate,
309
+ toDate,
310
+ limit,
311
+ offset,
312
+ resourceId
313
+ }) {
289
314
  try {
290
315
  if (!workflowId) {
291
316
  throw new HTTPException(400, { message: "Workflow ID is required" });
292
317
  }
293
318
  const workflow = mastra.vnext_getWorkflow(workflowId);
294
- const workflowRuns = await workflow.getWorkflowRuns() || {
319
+ const workflowRuns = await workflow.getWorkflowRuns({ fromDate, toDate, limit, offset, resourceId }) || {
295
320
  runs: [],
296
321
  total: 0
297
322
  };
@@ -301,4 +326,4 @@ async function getVNextWorkflowRunsHandler({ mastra, workflowId }) {
301
326
  }
302
327
  }
303
328
 
304
- export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, vNextWorkflows_exports, watchVNextWorkflowHandler };
329
+ export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunByIdHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, vNextWorkflows_exports, watchVNextWorkflowHandler };
@@ -0,0 +1,7 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export { __export };
@@ -1,9 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
1
  // src/server/http-exception.ts
8
2
  var HTTPException = class extends Error {
9
3
  res;
@@ -37,4 +31,4 @@ var HTTPException = class extends Error {
37
31
  }
38
32
  };
39
33
 
40
- export { HTTPException, __export };
34
+ export { HTTPException };
@@ -1,11 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var __defProp = Object.defineProperty;
4
- var __export = (target, all) => {
5
- for (var name in all)
6
- __defProp(target, name, { get: all[name], enumerable: true });
7
- };
8
-
9
3
  // src/server/http-exception.ts
10
4
  var HTTPException = class extends Error {
11
5
  res;
@@ -40,4 +34,3 @@ var HTTPException = class extends Error {
40
34
  };
41
35
 
42
36
  exports.HTTPException = HTTPException;
43
- exports.__export = __export;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkQN4KF3BH_cjs = require('./chunk-QN4KF3BH.cjs');
4
- var chunkZLBRQFDD_cjs = require('./chunk-ZLBRQFDD.cjs');
5
- var chunkFV45V6WC_cjs = require('./chunk-FV45V6WC.cjs');
3
+ var chunk57CJTIPW_cjs = require('./chunk-57CJTIPW.cjs');
4
+ var chunk64U3UDTH_cjs = require('./chunk-64U3UDTH.cjs');
5
+ var chunk75ZPJI57_cjs = require('./chunk-75ZPJI57.cjs');
6
6
 
7
7
  // src/server/handlers/logs.ts
8
8
  var logs_exports = {};
9
- chunkFV45V6WC_cjs.__export(logs_exports, {
9
+ chunk75ZPJI57_cjs.__export(logs_exports, {
10
10
  getLogTransports: () => getLogTransports,
11
11
  getLogsByRunIdHandler: () => getLogsByRunIdHandler,
12
12
  getLogsHandler: () => getLogsHandler
@@ -16,11 +16,11 @@ async function getLogsHandler({
16
16
  transportId
17
17
  }) {
18
18
  try {
19
- chunkQN4KF3BH_cjs.validateBody({ transportId });
19
+ chunk57CJTIPW_cjs.validateBody({ transportId });
20
20
  const logs = await mastra.getLogs(transportId);
21
21
  return logs;
22
22
  } catch (error) {
23
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting logs");
23
+ return chunk64U3UDTH_cjs.handleError(error, "Error getting logs");
24
24
  }
25
25
  }
26
26
  async function getLogsByRunIdHandler({
@@ -29,11 +29,11 @@ async function getLogsByRunIdHandler({
29
29
  transportId
30
30
  }) {
31
31
  try {
32
- chunkQN4KF3BH_cjs.validateBody({ runId, transportId });
32
+ chunk57CJTIPW_cjs.validateBody({ runId, transportId });
33
33
  const logs = await mastra.getLogsByRunId({ runId, transportId });
34
34
  return logs;
35
35
  } catch (error) {
36
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting logs by run ID");
36
+ return chunk64U3UDTH_cjs.handleError(error, "Error getting logs by run ID");
37
37
  }
38
38
  }
39
39
  async function getLogTransports({ mastra }) {
@@ -44,7 +44,7 @@ async function getLogTransports({ mastra }) {
44
44
  transports: transports ? Object.keys(transports) : []
45
45
  };
46
46
  } catch (error) {
47
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting log Transports");
47
+ return chunk64U3UDTH_cjs.handleError(error, "Error getting log Transports");
48
48
  }
49
49
  }
50
50
 
@@ -1,5 +1,6 @@
1
- import { handleError } from './chunk-3AHQ5RGN.js';
2
- import { __export, HTTPException } from './chunk-TRDNDNGQ.js';
1
+ import { handleError } from './chunk-M5ABIP7D.js';
2
+ import { HTTPException } from './chunk-NYN7KFXL.js';
3
+ import { __export } from './chunk-MLKGABMK.js';
3
4
 
4
5
  // src/server/handlers/telemetry.ts
5
6
  var telemetry_exports = {};
@@ -20,7 +21,7 @@ async function getTelemetryHandler({ mastra, body }) {
20
21
  if (!body) {
21
22
  throw new HTTPException(400, { message: "Body is required" });
22
23
  }
23
- const { name, scope, page, perPage, attribute } = body;
24
+ const { name, scope, page, perPage, attribute, fromDate, toDate } = body;
24
25
  const attributes = attribute ? Object.fromEntries(
25
26
  (Array.isArray(attribute) ? attribute : [attribute]).map((attr) => {
26
27
  const [key, value] = attr.split(":");
@@ -32,7 +33,9 @@ async function getTelemetryHandler({ mastra, body }) {
32
33
  scope,
33
34
  page: Number(page ?? 0),
34
35
  perPage: Number(perPage ?? 100),
35
- attributes
36
+ attributes,
37
+ fromDate: fromDate ? new Date(fromDate) : void 0,
38
+ toDate: toDate ? new Date(toDate) : void 0
36
39
  });
37
40
  return traces;
38
41
  } catch (error2) {