@mastra/server 0.0.0-extend-clickhouse-20250418135620 → 0.0.0-feat-tool-input-validation-20250731232758

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 (102) hide show
  1. package/LICENSE.md +11 -42
  2. package/README.md +48 -135
  3. package/dist/_tsup-dts-rollup.d.cts +763 -76
  4. package/dist/_tsup-dts-rollup.d.ts +763 -76
  5. package/dist/{chunk-FV45V6WC.cjs → chunk-2KZFMI6P.cjs} +1 -7
  6. package/dist/chunk-2SLFAFTR.cjs +148 -0
  7. package/dist/chunk-36BLNJHS.js +2039 -0
  8. package/dist/chunk-424T5F2J.cjs +157 -0
  9. package/dist/chunk-4D66QEKC.js +81 -0
  10. package/dist/chunk-6KP2OBYA.cjs +544 -0
  11. package/dist/chunk-6T5JUKOQ.js +149 -0
  12. package/dist/chunk-75ZPJI57.cjs +9 -0
  13. package/dist/{chunk-M56ECCHK.cjs → chunk-7TP2LX5L.cjs} +20 -19
  14. package/dist/{chunk-QN4KF3BH.cjs → chunk-CCGRCYWJ.cjs} +2 -2
  15. package/dist/{chunk-YANVFOYA.js → chunk-CRCR3ZUK.js} +56 -34
  16. package/dist/{chunk-7IWQE76Z.cjs → chunk-G7KH752Y.cjs} +16 -10
  17. package/dist/chunk-GHC4YV6R.js +504 -0
  18. package/dist/chunk-HISYIDYH.cjs +2042 -0
  19. package/dist/{chunk-HABV7TZK.cjs → chunk-HRSAZUIK.cjs} +28 -26
  20. package/dist/chunk-I5JKUCGE.cjs +308 -0
  21. package/dist/{chunk-3RVHWGWO.js → chunk-KHZKYUNR.js} +36 -19
  22. package/dist/{chunk-TRDNDNGQ.js → chunk-LCM566I4.js} +2 -7
  23. package/dist/chunk-LF7P5PLR.js +14 -0
  24. package/dist/chunk-MLKGABMK.js +7 -0
  25. package/dist/chunk-PIAJQ75M.js +539 -0
  26. package/dist/chunk-PZQDCRPV.cjs +16 -0
  27. package/dist/chunk-QGX47B5D.cjs +86 -0
  28. package/dist/{chunk-WTHDCRMY.js → chunk-RG473F6Y.js} +12 -6
  29. package/dist/chunk-RHSWAXKB.cjs +118 -0
  30. package/dist/{chunk-L7XE5QTW.js → chunk-RSEO4XPX.js} +1 -1
  31. package/dist/chunk-SDPGVWQJ.cjs +512 -0
  32. package/dist/chunk-T7HAZC2E.js +527 -0
  33. package/dist/chunk-UCV4247U.cjs +332 -0
  34. package/dist/chunk-UEVYOKAH.cjs +555 -0
  35. package/dist/chunk-VTTN2FW3.js +299 -0
  36. package/dist/{chunk-XISBMH56.js → chunk-WBRFIHSF.js} +11 -9
  37. package/dist/{chunk-4JINXASC.js → chunk-WNVFNNWN.js} +5 -4
  38. package/dist/{chunk-4B7OUZXW.js → chunk-ZYAFP2AV.js} +83 -68
  39. package/dist/server/handlers/a2a.cjs +30 -0
  40. package/dist/server/handlers/a2a.d.cts +6 -0
  41. package/dist/server/handlers/a2a.d.ts +6 -0
  42. package/dist/server/handlers/a2a.js +1 -0
  43. package/dist/server/handlers/agents.cjs +11 -7
  44. package/dist/server/handlers/agents.d.cts +1 -0
  45. package/dist/server/handlers/agents.d.ts +1 -0
  46. package/dist/server/handlers/agents.js +1 -1
  47. package/dist/server/handlers/error.cjs +2 -2
  48. package/dist/server/handlers/error.js +1 -1
  49. package/dist/server/handlers/legacyWorkflows.cjs +46 -0
  50. package/dist/server/handlers/legacyWorkflows.d.cts +10 -0
  51. package/dist/server/handlers/legacyWorkflows.d.ts +10 -0
  52. package/dist/server/handlers/legacyWorkflows.js +1 -0
  53. package/dist/server/handlers/logs.cjs +4 -4
  54. package/dist/server/handlers/logs.js +1 -1
  55. package/dist/server/handlers/memory.cjs +33 -9
  56. package/dist/server/handlers/memory.d.cts +6 -0
  57. package/dist/server/handlers/memory.d.ts +6 -0
  58. package/dist/server/handlers/memory.js +1 -1
  59. package/dist/server/handlers/network.cjs +5 -5
  60. package/dist/server/handlers/network.js +1 -1
  61. package/dist/server/handlers/scores.cjs +30 -0
  62. package/dist/server/handlers/scores.d.cts +6 -0
  63. package/dist/server/handlers/scores.d.ts +6 -0
  64. package/dist/server/handlers/scores.js +1 -0
  65. package/dist/server/handlers/telemetry.cjs +3 -3
  66. package/dist/server/handlers/telemetry.js +1 -1
  67. package/dist/server/handlers/tools.cjs +5 -5
  68. package/dist/server/handlers/tools.js +1 -1
  69. package/dist/server/handlers/utils.cjs +2 -2
  70. package/dist/server/handlers/utils.js +1 -1
  71. package/dist/server/handlers/vNextNetwork.cjs +218 -0
  72. package/dist/server/handlers/vNextNetwork.d.cts +6 -0
  73. package/dist/server/handlers/vNextNetwork.d.ts +6 -0
  74. package/dist/server/handlers/vNextNetwork.js +211 -0
  75. package/dist/server/handlers/vector.cjs +7 -7
  76. package/dist/server/handlers/vector.js +1 -1
  77. package/dist/server/handlers/voice.cjs +8 -4
  78. package/dist/server/handlers/voice.d.cts +1 -0
  79. package/dist/server/handlers/voice.d.ts +1 -0
  80. package/dist/server/handlers/voice.js +1 -1
  81. package/dist/server/handlers/workflows.cjs +33 -13
  82. package/dist/server/handlers/workflows.d.cts +7 -2
  83. package/dist/server/handlers/workflows.d.ts +7 -2
  84. package/dist/server/handlers/workflows.js +1 -1
  85. package/dist/server/handlers.cjs +40 -25
  86. package/dist/server/handlers.d.cts +4 -1
  87. package/dist/server/handlers.d.ts +4 -1
  88. package/dist/server/handlers.js +12 -9
  89. package/package.json +17 -15
  90. package/dist/chunk-2FJURXCL.cjs +0 -213
  91. package/dist/chunk-3AHQ5RGN.js +0 -11
  92. package/dist/chunk-3EJZQ6TQ.js +0 -49
  93. package/dist/chunk-4WJ5GHRG.cjs +0 -164
  94. package/dist/chunk-5SWCVTNL.cjs +0 -5579
  95. package/dist/chunk-A7DF4ETD.cjs +0 -100
  96. package/dist/chunk-JLDXUWK7.cjs +0 -126
  97. package/dist/chunk-OMN3UI6X.js +0 -5576
  98. package/dist/chunk-RBQASTUP.js +0 -203
  99. package/dist/chunk-RNU4JMLM.cjs +0 -317
  100. package/dist/chunk-SKBVVI24.cjs +0 -54
  101. package/dist/chunk-TFFNX7FI.js +0 -156
  102. package/dist/chunk-ZLBRQFDD.cjs +0 -13
@@ -1,30 +1,30 @@
1
1
  'use strict';
2
2
 
3
- var chunkM56ECCHK_cjs = require('../../chunk-M56ECCHK.cjs');
3
+ var chunk7TP2LX5L_cjs = require('../../chunk-7TP2LX5L.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createIndex", {
8
8
  enumerable: true,
9
- get: function () { return chunkM56ECCHK_cjs.createIndex; }
9
+ get: function () { return chunk7TP2LX5L_cjs.createIndex; }
10
10
  });
11
11
  Object.defineProperty(exports, "deleteIndex", {
12
12
  enumerable: true,
13
- get: function () { return chunkM56ECCHK_cjs.deleteIndex; }
13
+ get: function () { return chunk7TP2LX5L_cjs.deleteIndex; }
14
14
  });
15
15
  Object.defineProperty(exports, "describeIndex", {
16
16
  enumerable: true,
17
- get: function () { return chunkM56ECCHK_cjs.describeIndex; }
17
+ get: function () { return chunk7TP2LX5L_cjs.describeIndex; }
18
18
  });
19
19
  Object.defineProperty(exports, "listIndexes", {
20
20
  enumerable: true,
21
- get: function () { return chunkM56ECCHK_cjs.listIndexes; }
21
+ get: function () { return chunk7TP2LX5L_cjs.listIndexes; }
22
22
  });
23
23
  Object.defineProperty(exports, "queryVectors", {
24
24
  enumerable: true,
25
- get: function () { return chunkM56ECCHK_cjs.queryVectors; }
25
+ get: function () { return chunk7TP2LX5L_cjs.queryVectors; }
26
26
  });
27
27
  Object.defineProperty(exports, "upsertVectors", {
28
28
  enumerable: true,
29
- get: function () { return chunkM56ECCHK_cjs.upsertVectors; }
29
+ get: function () { return chunk7TP2LX5L_cjs.upsertVectors; }
30
30
  });
@@ -1 +1 @@
1
- export { createIndex, deleteIndex, describeIndex, listIndexes, queryVectors, upsertVectors } from '../../chunk-4JINXASC.js';
1
+ export { createIndex, deleteIndex, describeIndex, listIndexes, queryVectors, upsertVectors } from '../../chunk-WNVFNNWN.js';
@@ -1,18 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var chunkA7DF4ETD_cjs = require('../../chunk-A7DF4ETD.cjs');
3
+ var chunkRHSWAXKB_cjs = require('../../chunk-RHSWAXKB.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "generateSpeechHandler", {
8
8
  enumerable: true,
9
- get: function () { return chunkA7DF4ETD_cjs.generateSpeechHandler; }
9
+ get: function () { return chunkRHSWAXKB_cjs.generateSpeechHandler; }
10
+ });
11
+ Object.defineProperty(exports, "getListenerHandler", {
12
+ enumerable: true,
13
+ get: function () { return chunkRHSWAXKB_cjs.getListenerHandler; }
10
14
  });
11
15
  Object.defineProperty(exports, "getSpeakersHandler", {
12
16
  enumerable: true,
13
- get: function () { return chunkA7DF4ETD_cjs.getSpeakersHandler; }
17
+ get: function () { return chunkRHSWAXKB_cjs.getSpeakersHandler; }
14
18
  });
15
19
  Object.defineProperty(exports, "transcribeSpeechHandler", {
16
20
  enumerable: true,
17
- get: function () { return chunkA7DF4ETD_cjs.transcribeSpeechHandler; }
21
+ get: function () { return chunkRHSWAXKB_cjs.transcribeSpeechHandler; }
18
22
  });
@@ -1,3 +1,4 @@
1
1
  export { getSpeakersHandler } from '../../_tsup-dts-rollup.cjs';
2
2
  export { generateSpeechHandler } from '../../_tsup-dts-rollup.cjs';
3
3
  export { transcribeSpeechHandler } from '../../_tsup-dts-rollup.cjs';
4
+ export { getListenerHandler } from '../../_tsup-dts-rollup.cjs';
@@ -1,3 +1,4 @@
1
1
  export { getSpeakersHandler } from '../../_tsup-dts-rollup.js';
2
2
  export { generateSpeechHandler } from '../../_tsup-dts-rollup.js';
3
3
  export { transcribeSpeechHandler } from '../../_tsup-dts-rollup.js';
4
+ export { getListenerHandler } from '../../_tsup-dts-rollup.js';
@@ -1 +1 @@
1
- export { generateSpeechHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-3RVHWGWO.js';
1
+ export { generateSpeechHandler, getListenerHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-KHZKYUNR.js';
@@ -1,46 +1,66 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNU4JMLM_cjs = require('../../chunk-RNU4JMLM.cjs');
3
+ var chunk6KP2OBYA_cjs = require('../../chunk-6KP2OBYA.cjs');
4
4
 
5
5
 
6
6
 
7
- Object.defineProperty(exports, "createRunHandler", {
7
+ Object.defineProperty(exports, "cancelWorkflowRunHandler", {
8
8
  enumerable: true,
9
- get: function () { return chunkRNU4JMLM_cjs.createRunHandler; }
9
+ get: function () { return chunk6KP2OBYA_cjs.cancelWorkflowRunHandler; }
10
+ });
11
+ Object.defineProperty(exports, "createWorkflowRunHandler", {
12
+ enumerable: true,
13
+ get: function () { return chunk6KP2OBYA_cjs.createWorkflowRunHandler; }
10
14
  });
11
15
  Object.defineProperty(exports, "getWorkflowByIdHandler", {
12
16
  enumerable: true,
13
- get: function () { return chunkRNU4JMLM_cjs.getWorkflowByIdHandler; }
17
+ get: function () { return chunk6KP2OBYA_cjs.getWorkflowByIdHandler; }
14
18
  });
15
- Object.defineProperty(exports, "getWorkflowRunHandler", {
19
+ Object.defineProperty(exports, "getWorkflowRunByIdHandler", {
16
20
  enumerable: true,
17
- get: function () { return chunkRNU4JMLM_cjs.getWorkflowRunHandler; }
21
+ get: function () { return chunk6KP2OBYA_cjs.getWorkflowRunByIdHandler; }
22
+ });
23
+ Object.defineProperty(exports, "getWorkflowRunExecutionResultHandler", {
24
+ enumerable: true,
25
+ get: function () { return chunk6KP2OBYA_cjs.getWorkflowRunExecutionResultHandler; }
18
26
  });
19
27
  Object.defineProperty(exports, "getWorkflowRunsHandler", {
20
28
  enumerable: true,
21
- get: function () { return chunkRNU4JMLM_cjs.getWorkflowRunsHandler; }
29
+ get: function () { return chunk6KP2OBYA_cjs.getWorkflowRunsHandler; }
22
30
  });
23
31
  Object.defineProperty(exports, "getWorkflowsHandler", {
24
32
  enumerable: true,
25
- get: function () { return chunkRNU4JMLM_cjs.getWorkflowsHandler; }
33
+ get: function () { return chunk6KP2OBYA_cjs.getWorkflowsHandler; }
26
34
  });
27
35
  Object.defineProperty(exports, "resumeAsyncWorkflowHandler", {
28
36
  enumerable: true,
29
- get: function () { return chunkRNU4JMLM_cjs.resumeAsyncWorkflowHandler; }
37
+ get: function () { return chunk6KP2OBYA_cjs.resumeAsyncWorkflowHandler; }
30
38
  });
31
39
  Object.defineProperty(exports, "resumeWorkflowHandler", {
32
40
  enumerable: true,
33
- get: function () { return chunkRNU4JMLM_cjs.resumeWorkflowHandler; }
41
+ get: function () { return chunk6KP2OBYA_cjs.resumeWorkflowHandler; }
42
+ });
43
+ Object.defineProperty(exports, "sendWorkflowRunEventHandler", {
44
+ enumerable: true,
45
+ get: function () { return chunk6KP2OBYA_cjs.sendWorkflowRunEventHandler; }
34
46
  });
35
47
  Object.defineProperty(exports, "startAsyncWorkflowHandler", {
36
48
  enumerable: true,
37
- get: function () { return chunkRNU4JMLM_cjs.startAsyncWorkflowHandler; }
49
+ get: function () { return chunk6KP2OBYA_cjs.startAsyncWorkflowHandler; }
38
50
  });
39
51
  Object.defineProperty(exports, "startWorkflowRunHandler", {
40
52
  enumerable: true,
41
- get: function () { return chunkRNU4JMLM_cjs.startWorkflowRunHandler; }
53
+ get: function () { return chunk6KP2OBYA_cjs.startWorkflowRunHandler; }
54
+ });
55
+ Object.defineProperty(exports, "streamVNextWorkflowHandler", {
56
+ enumerable: true,
57
+ get: function () { return chunk6KP2OBYA_cjs.streamVNextWorkflowHandler; }
58
+ });
59
+ Object.defineProperty(exports, "streamWorkflowHandler", {
60
+ enumerable: true,
61
+ get: function () { return chunk6KP2OBYA_cjs.streamWorkflowHandler; }
42
62
  });
43
63
  Object.defineProperty(exports, "watchWorkflowHandler", {
44
64
  enumerable: true,
45
- get: function () { return chunkRNU4JMLM_cjs.watchWorkflowHandler; }
65
+ get: function () { return chunk6KP2OBYA_cjs.watchWorkflowHandler; }
46
66
  });
@@ -1,10 +1,15 @@
1
1
  export { getWorkflowsHandler } from '../../_tsup-dts-rollup.cjs';
2
2
  export { getWorkflowByIdHandler } from '../../_tsup-dts-rollup.cjs';
3
+ export { getWorkflowRunByIdHandler } from '../../_tsup-dts-rollup.cjs';
4
+ export { getWorkflowRunExecutionResultHandler } from '../../_tsup-dts-rollup.cjs';
5
+ export { createWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
3
6
  export { startAsyncWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
4
- export { getWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
5
- export { createRunHandler } from '../../_tsup-dts-rollup.cjs';
6
7
  export { startWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
7
8
  export { watchWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
9
+ export { streamWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
10
+ export { streamVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
8
11
  export { resumeAsyncWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
9
12
  export { resumeWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
10
13
  export { getWorkflowRunsHandler } from '../../_tsup-dts-rollup.cjs';
14
+ export { cancelWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
15
+ export { sendWorkflowRunEventHandler } from '../../_tsup-dts-rollup.cjs';
@@ -1,10 +1,15 @@
1
1
  export { getWorkflowsHandler } from '../../_tsup-dts-rollup.js';
2
2
  export { getWorkflowByIdHandler } from '../../_tsup-dts-rollup.js';
3
+ export { getWorkflowRunByIdHandler } from '../../_tsup-dts-rollup.js';
4
+ export { getWorkflowRunExecutionResultHandler } from '../../_tsup-dts-rollup.js';
5
+ export { createWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
3
6
  export { startAsyncWorkflowHandler } from '../../_tsup-dts-rollup.js';
4
- export { getWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
5
- export { createRunHandler } from '../../_tsup-dts-rollup.js';
6
7
  export { startWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
7
8
  export { watchWorkflowHandler } from '../../_tsup-dts-rollup.js';
9
+ export { streamWorkflowHandler } from '../../_tsup-dts-rollup.js';
10
+ export { streamVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
8
11
  export { resumeAsyncWorkflowHandler } from '../../_tsup-dts-rollup.js';
9
12
  export { resumeWorkflowHandler } from '../../_tsup-dts-rollup.js';
10
13
  export { getWorkflowRunsHandler } from '../../_tsup-dts-rollup.js';
14
+ export { cancelWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
15
+ export { sendWorkflowRunEventHandler } from '../../_tsup-dts-rollup.js';
@@ -1 +1 @@
1
- export { createRunHandler, getWorkflowByIdHandler, getWorkflowRunHandler, getWorkflowRunsHandler, getWorkflowsHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, watchWorkflowHandler } from '../../chunk-4B7OUZXW.js';
1
+ export { cancelWorkflowRunHandler, createWorkflowRunHandler, getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, getWorkflowRunsHandler, getWorkflowsHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, sendWorkflowRunEventHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, streamVNextWorkflowHandler, streamWorkflowHandler, watchWorkflowHandler } from '../../chunk-T7HAZC2E.js';
@@ -1,50 +1,65 @@
1
1
  'use strict';
2
2
 
3
- var chunkHABV7TZK_cjs = require('../chunk-HABV7TZK.cjs');
4
- var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
5
- var chunkA7DF4ETD_cjs = require('../chunk-A7DF4ETD.cjs');
6
- var chunkRNU4JMLM_cjs = require('../chunk-RNU4JMLM.cjs');
7
- var chunk4WJ5GHRG_cjs = require('../chunk-4WJ5GHRG.cjs');
8
- var chunkSKBVVI24_cjs = require('../chunk-SKBVVI24.cjs');
9
- var chunk2FJURXCL_cjs = require('../chunk-2FJURXCL.cjs');
10
- var chunkJLDXUWK7_cjs = require('../chunk-JLDXUWK7.cjs');
11
- var chunk7IWQE76Z_cjs = require('../chunk-7IWQE76Z.cjs');
3
+ var chunk6KP2OBYA_cjs = require('../chunk-6KP2OBYA.cjs');
4
+ var chunk2SLFAFTR_cjs = require('../chunk-2SLFAFTR.cjs');
5
+ var chunk424T5F2J_cjs = require('../chunk-424T5F2J.cjs');
6
+ var chunkG7KH752Y_cjs = require('../chunk-G7KH752Y.cjs');
7
+ var chunkHRSAZUIK_cjs = require('../chunk-HRSAZUIK.cjs');
8
+ var chunk7TP2LX5L_cjs = require('../chunk-7TP2LX5L.cjs');
9
+ var chunkRHSWAXKB_cjs = require('../chunk-RHSWAXKB.cjs');
10
+ var chunkSDPGVWQJ_cjs = require('../chunk-SDPGVWQJ.cjs');
11
+ var chunkI5JKUCGE_cjs = require('../chunk-I5JKUCGE.cjs');
12
+ var chunkUCV4247U_cjs = require('../chunk-UCV4247U.cjs');
13
+ var chunkQGX47B5D_cjs = require('../chunk-QGX47B5D.cjs');
14
+ var chunkUEVYOKAH_cjs = require('../chunk-UEVYOKAH.cjs');
12
15
 
13
16
 
14
17
 
18
+ Object.defineProperty(exports, "workflows", {
19
+ enumerable: true,
20
+ get: function () { return chunk6KP2OBYA_cjs.workflows_exports; }
21
+ });
22
+ Object.defineProperty(exports, "network", {
23
+ enumerable: true,
24
+ get: function () { return chunk2SLFAFTR_cjs.network_exports; }
25
+ });
26
+ Object.defineProperty(exports, "scores", {
27
+ enumerable: true,
28
+ get: function () { return chunk424T5F2J_cjs.scores_exports; }
29
+ });
30
+ Object.defineProperty(exports, "telemetry", {
31
+ enumerable: true,
32
+ get: function () { return chunkG7KH752Y_cjs.telemetry_exports; }
33
+ });
15
34
  Object.defineProperty(exports, "tools", {
16
35
  enumerable: true,
17
- get: function () { return chunkHABV7TZK_cjs.tools_exports; }
36
+ get: function () { return chunkHRSAZUIK_cjs.tools_exports; }
18
37
  });
19
38
  Object.defineProperty(exports, "vector", {
20
39
  enumerable: true,
21
- get: function () { return chunkM56ECCHK_cjs.vector_exports; }
40
+ get: function () { return chunk7TP2LX5L_cjs.vector_exports; }
22
41
  });
23
42
  Object.defineProperty(exports, "voice", {
24
43
  enumerable: true,
25
- get: function () { return chunkA7DF4ETD_cjs.voice_exports; }
44
+ get: function () { return chunkRHSWAXKB_cjs.voice_exports; }
26
45
  });
27
- Object.defineProperty(exports, "workflows", {
46
+ Object.defineProperty(exports, "a2a", {
28
47
  enumerable: true,
29
- get: function () { return chunkRNU4JMLM_cjs.workflows_exports; }
48
+ get: function () { return chunkSDPGVWQJ_cjs.a2a_exports; }
30
49
  });
31
50
  Object.defineProperty(exports, "agents", {
32
51
  enumerable: true,
33
- get: function () { return chunk4WJ5GHRG_cjs.agents_exports; }
34
- });
35
- Object.defineProperty(exports, "logs", {
36
- enumerable: true,
37
- get: function () { return chunkSKBVVI24_cjs.logs_exports; }
52
+ get: function () { return chunkI5JKUCGE_cjs.agents_exports; }
38
53
  });
39
- Object.defineProperty(exports, "memory", {
54
+ Object.defineProperty(exports, "legacyWorkflows", {
40
55
  enumerable: true,
41
- get: function () { return chunk2FJURXCL_cjs.memory_exports; }
56
+ get: function () { return chunkUCV4247U_cjs.legacyWorkflows_exports; }
42
57
  });
43
- Object.defineProperty(exports, "network", {
58
+ Object.defineProperty(exports, "logs", {
44
59
  enumerable: true,
45
- get: function () { return chunkJLDXUWK7_cjs.network_exports; }
60
+ get: function () { return chunkQGX47B5D_cjs.logs_exports; }
46
61
  });
47
- Object.defineProperty(exports, "telemetry", {
62
+ Object.defineProperty(exports, "memory", {
48
63
  enumerable: true,
49
- get: function () { return chunk7IWQE76Z_cjs.telemetry_exports; }
64
+ get: function () { return chunkUEVYOKAH_cjs.memory_exports; }
50
65
  });
@@ -1,9 +1,12 @@
1
1
  export { agents } from '../_tsup-dts-rollup.cjs';
2
+ export { a2a } from '../_tsup-dts-rollup.cjs';
3
+ export { legacyWorkflows } from '../_tsup-dts-rollup.cjs';
2
4
  export { logs } from '../_tsup-dts-rollup.cjs';
3
5
  export { memory } from '../_tsup-dts-rollup.cjs';
4
6
  export { network } from '../_tsup-dts-rollup.cjs';
7
+ export { scores } from '../_tsup-dts-rollup.cjs';
5
8
  export { telemetry } from '../_tsup-dts-rollup.cjs';
6
9
  export { tools } from '../_tsup-dts-rollup.cjs';
7
- export { workflows } from '../_tsup-dts-rollup.cjs';
8
10
  export { vector } from '../_tsup-dts-rollup.cjs';
9
11
  export { voice } from '../_tsup-dts-rollup.cjs';
12
+ export { workflows } from '../_tsup-dts-rollup.cjs';
@@ -1,9 +1,12 @@
1
1
  export { agents } from '../_tsup-dts-rollup.js';
2
+ export { a2a } from '../_tsup-dts-rollup.js';
3
+ export { legacyWorkflows } from '../_tsup-dts-rollup.js';
2
4
  export { logs } from '../_tsup-dts-rollup.js';
3
5
  export { memory } from '../_tsup-dts-rollup.js';
4
6
  export { network } from '../_tsup-dts-rollup.js';
7
+ export { scores } from '../_tsup-dts-rollup.js';
5
8
  export { telemetry } from '../_tsup-dts-rollup.js';
6
9
  export { tools } from '../_tsup-dts-rollup.js';
7
- export { workflows } from '../_tsup-dts-rollup.js';
8
10
  export { vector } from '../_tsup-dts-rollup.js';
9
11
  export { voice } from '../_tsup-dts-rollup.js';
12
+ export { workflows } from '../_tsup-dts-rollup.js';
@@ -1,9 +1,12 @@
1
- export { tools_exports as tools } from '../chunk-XISBMH56.js';
2
- export { vector_exports as vector } from '../chunk-4JINXASC.js';
3
- export { voice_exports as voice } from '../chunk-3RVHWGWO.js';
4
- export { workflows_exports as workflows } from '../chunk-4B7OUZXW.js';
5
- export { agents_exports as agents } from '../chunk-TFFNX7FI.js';
6
- export { logs_exports as logs } from '../chunk-3EJZQ6TQ.js';
7
- export { memory_exports as memory } from '../chunk-RBQASTUP.js';
8
- export { network_exports as network } from '../chunk-YANVFOYA.js';
9
- export { telemetry_exports as telemetry } from '../chunk-WTHDCRMY.js';
1
+ export { workflows_exports as workflows } from '../chunk-T7HAZC2E.js';
2
+ export { network_exports as network } from '../chunk-CRCR3ZUK.js';
3
+ export { scores_exports as scores } from '../chunk-6T5JUKOQ.js';
4
+ export { telemetry_exports as telemetry } from '../chunk-RG473F6Y.js';
5
+ export { tools_exports as tools } from '../chunk-WBRFIHSF.js';
6
+ export { vector_exports as vector } from '../chunk-WNVFNNWN.js';
7
+ export { voice_exports as voice } from '../chunk-KHZKYUNR.js';
8
+ export { a2a_exports as a2a } from '../chunk-GHC4YV6R.js';
9
+ export { agents_exports as agents } from '../chunk-VTTN2FW3.js';
10
+ export { legacyWorkflows_exports as legacyWorkflows } from '../chunk-ZYAFP2AV.js';
11
+ export { logs_exports as logs } from '../chunk-4D66QEKC.js';
12
+ export { memory_exports as memory } from '../chunk-PIAJQ75M.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "0.0.0-extend-clickhouse-20250418135620",
3
+ "version": "0.0.0-feat-tool-input-validation-20250731232758",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -43,26 +43,28 @@
43
43
  },
44
44
  "keywords": [],
45
45
  "author": "",
46
- "license": "Elastic-2.0",
47
- "dependencies": {},
46
+ "license": "Apache-2.0",
48
47
  "peerDependencies": {
49
- "@mastra/core": "0.0.0-extend-clickhouse-20250418135620"
48
+ "zod": "^3.0.0",
49
+ "@mastra/core": "0.0.0-feat-tool-input-validation-20250731232758"
50
50
  },
51
51
  "devDependencies": {
52
- "@ai-sdk/openai": "^1.3.2",
53
- "@microsoft/api-extractor": "^7.52.1",
54
- "@types/node": "^20.17.27",
55
- "eslint": "^9.23.0",
52
+ "@ai-sdk/openai": "^1.3.22",
53
+ "@microsoft/api-extractor": "^7.52.8",
54
+ "@types/node": "^20.19.0",
55
+ "eslint": "^9.30.1",
56
56
  "superjson": "^2.2.2",
57
- "tsup": "^8.4.0",
58
- "typescript": "^5.8.2",
59
- "vitest": "^2.1.9",
60
- "zod-to-json-schema": "^3.24.3",
61
- "@mastra/core": "0.0.0-extend-clickhouse-20250418135620",
62
- "@internal/lint": "0.0.2"
57
+ "tsup": "^8.5.0",
58
+ "typescript": "^5.8.3",
59
+ "vitest": "^3.2.4",
60
+ "zod": "^3.25.67",
61
+ "zod-to-json-schema": "^3.24.5",
62
+ "@internal/lint": "0.0.0-feat-tool-input-validation-20250731232758",
63
+ "@internal/storage-test-utils": "0.0.20",
64
+ "@mastra/core": "0.0.0-feat-tool-input-validation-20250731232758"
63
65
  },
64
66
  "scripts": {
65
- "build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting",
67
+ "build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting --silent",
66
68
  "build:watch": "pnpm build --watch",
67
69
  "pull:openapispec": "node src/server/openapi.script.js",
68
70
  "test": "vitest run",
@@ -1,213 +0,0 @@
1
- 'use strict';
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');
6
-
7
- // src/server/handlers/memory.ts
8
- var memory_exports = {};
9
- chunkFV45V6WC_cjs.__export(memory_exports, {
10
- createThreadHandler: () => createThreadHandler,
11
- deleteThreadHandler: () => deleteThreadHandler,
12
- getMemoryStatusHandler: () => getMemoryStatusHandler,
13
- getMessagesHandler: () => getMessagesHandler,
14
- getThreadByIdHandler: () => getThreadByIdHandler,
15
- getThreadsHandler: () => getThreadsHandler,
16
- saveMessagesHandler: () => saveMessagesHandler,
17
- updateThreadHandler: () => updateThreadHandler
18
- });
19
- function getMemoryFromContext({
20
- mastra,
21
- agentId
22
- }) {
23
- const agent = agentId ? mastra.getAgent(agentId) : null;
24
- if (agentId && !agent) {
25
- throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Agent not found" });
26
- }
27
- const memory = agent?.getMemory?.() || mastra.getMemory();
28
- return memory;
29
- }
30
- async function getMemoryStatusHandler({ mastra, agentId }) {
31
- try {
32
- const memory = getMemoryFromContext({ mastra, agentId });
33
- if (!memory) {
34
- return { result: false };
35
- }
36
- return { result: true };
37
- } catch (error) {
38
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting memory status");
39
- }
40
- }
41
- async function getThreadsHandler({
42
- mastra,
43
- agentId,
44
- resourceId
45
- }) {
46
- try {
47
- const memory = getMemoryFromContext({ mastra, agentId });
48
- if (!memory) {
49
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
50
- }
51
- chunkQN4KF3BH_cjs.validateBody({ resourceId });
52
- const threads = await memory.getThreadsByResourceId({ resourceId });
53
- return threads;
54
- } catch (error) {
55
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting threads");
56
- }
57
- }
58
- async function getThreadByIdHandler({
59
- mastra,
60
- agentId,
61
- threadId
62
- }) {
63
- try {
64
- chunkQN4KF3BH_cjs.validateBody({ threadId });
65
- const memory = getMemoryFromContext({ mastra, agentId });
66
- if (!memory) {
67
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
68
- }
69
- const thread = await memory.getThreadById({ threadId });
70
- if (!thread) {
71
- throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Thread not found" });
72
- }
73
- return thread;
74
- } catch (error) {
75
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting thread");
76
- }
77
- }
78
- async function saveMessagesHandler({
79
- mastra,
80
- agentId,
81
- body
82
- }) {
83
- try {
84
- const memory = getMemoryFromContext({ mastra, agentId });
85
- if (!memory) {
86
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
87
- }
88
- if (!body?.messages) {
89
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Messages are required" });
90
- }
91
- if (!Array.isArray(body.messages)) {
92
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Messages should be an array" });
93
- }
94
- const processedMessages = body.messages.map((message) => ({
95
- ...message,
96
- id: memory.generateId(),
97
- createdAt: message.createdAt ? new Date(message.createdAt) : /* @__PURE__ */ new Date()
98
- }));
99
- const result = await memory.saveMessages({ messages: processedMessages, memoryConfig: {} });
100
- return result;
101
- } catch (error) {
102
- return chunkZLBRQFDD_cjs.handleError(error, "Error saving messages");
103
- }
104
- }
105
- async function createThreadHandler({
106
- mastra,
107
- agentId,
108
- body
109
- }) {
110
- try {
111
- const memory = getMemoryFromContext({ mastra, agentId });
112
- if (!memory) {
113
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
114
- }
115
- chunkQN4KF3BH_cjs.validateBody({ resourceId: body?.resourceId });
116
- const result = await memory.createThread({
117
- resourceId: body?.resourceId,
118
- title: body?.title,
119
- metadata: body?.metadata,
120
- threadId: body?.threadId
121
- });
122
- return result;
123
- } catch (error) {
124
- return chunkZLBRQFDD_cjs.handleError(error, "Error saving thread to memory");
125
- }
126
- }
127
- async function updateThreadHandler({
128
- mastra,
129
- agentId,
130
- threadId,
131
- body
132
- }) {
133
- try {
134
- const memory = getMemoryFromContext({ mastra, agentId });
135
- if (!body) {
136
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Body is required" });
137
- }
138
- const { title, metadata, resourceId } = body;
139
- const updatedAt = /* @__PURE__ */ new Date();
140
- chunkQN4KF3BH_cjs.validateBody({ threadId });
141
- if (!memory) {
142
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
143
- }
144
- const thread = await memory.getThreadById({ threadId });
145
- if (!thread) {
146
- throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Thread not found" });
147
- }
148
- const updatedThread = {
149
- ...thread,
150
- title: title || thread.title,
151
- metadata: metadata || thread.metadata,
152
- resourceId: resourceId || thread.resourceId,
153
- createdAt: thread.createdAt,
154
- updatedAt
155
- };
156
- const result = await memory.saveThread({ thread: updatedThread });
157
- return result;
158
- } catch (error) {
159
- return chunkZLBRQFDD_cjs.handleError(error, "Error updating thread");
160
- }
161
- }
162
- async function deleteThreadHandler({
163
- mastra,
164
- agentId,
165
- threadId
166
- }) {
167
- try {
168
- chunkQN4KF3BH_cjs.validateBody({ threadId });
169
- const memory = getMemoryFromContext({ mastra, agentId });
170
- if (!memory) {
171
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
172
- }
173
- const thread = await memory.getThreadById({ threadId });
174
- if (!thread) {
175
- throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Thread not found" });
176
- }
177
- await memory.deleteThread(threadId);
178
- return { result: "Thread deleted" };
179
- } catch (error) {
180
- return chunkZLBRQFDD_cjs.handleError(error, "Error deleting thread");
181
- }
182
- }
183
- async function getMessagesHandler({
184
- mastra,
185
- agentId,
186
- threadId
187
- }) {
188
- try {
189
- chunkQN4KF3BH_cjs.validateBody({ threadId });
190
- const memory = getMemoryFromContext({ mastra, agentId });
191
- if (!memory) {
192
- throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Memory is not initialized" });
193
- }
194
- const thread = await memory.getThreadById({ threadId });
195
- if (!thread) {
196
- throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Thread not found" });
197
- }
198
- const result = await memory.query({ threadId });
199
- return result;
200
- } catch (error) {
201
- return chunkZLBRQFDD_cjs.handleError(error, "Error getting messages");
202
- }
203
- }
204
-
205
- exports.createThreadHandler = createThreadHandler;
206
- exports.deleteThreadHandler = deleteThreadHandler;
207
- exports.getMemoryStatusHandler = getMemoryStatusHandler;
208
- exports.getMessagesHandler = getMessagesHandler;
209
- exports.getThreadByIdHandler = getThreadByIdHandler;
210
- exports.getThreadsHandler = getThreadsHandler;
211
- exports.memory_exports = memory_exports;
212
- exports.saveMessagesHandler = saveMessagesHandler;
213
- exports.updateThreadHandler = updateThreadHandler;
@@ -1,11 +0,0 @@
1
- import { HTTPException } from './chunk-TRDNDNGQ.js';
2
-
3
- // src/server/handlers/error.ts
4
- function handleError(error, defaultMessage) {
5
- const apiError = error;
6
- throw new HTTPException(apiError.status || 500, {
7
- message: apiError.message || defaultMessage
8
- });
9
- }
10
-
11
- export { handleError };