@mastra/server 0.0.1-alpha.3 → 0.0.1-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/dist/_tsup-dts-rollup.d.cts +1 -3
- package/dist/_tsup-dts-rollup.d.ts +1 -3
- package/dist/{chunk-C7YHIQWA.js → chunk-BMA2ORRT.js} +2 -2
- package/dist/{chunk-4AZGCOFY.cjs → chunk-GV52BII2.cjs} +2 -2
- package/dist/{chunk-YCJ2OJTL.cjs → chunk-HKWIEBJD.cjs} +2 -2
- package/dist/{chunk-A4DCRMIV.js → chunk-RXBZWKUR.js} +2 -2
- package/dist/server/handlers/agents.cjs +7 -7
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/telemetry.cjs +3 -3
- package/dist/server/handlers/telemetry.js +1 -1
- package/dist/server/handlers.cjs +4 -4
- package/dist/server/handlers.js +2 -2
- package/package.json +4 -4
|
@@ -211,9 +211,7 @@ export declare function getSpeakersHandler({ mastra, agentId }: VoiceContext): P
|
|
|
211
211
|
voiceId: string;
|
|
212
212
|
}[]>;
|
|
213
213
|
|
|
214
|
-
export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<
|
|
215
|
-
traces: any[];
|
|
216
|
-
}>;
|
|
214
|
+
export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<any[]>;
|
|
217
215
|
|
|
218
216
|
export declare function getThreadByIdHandler({ mastra, agentId, threadId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'>): Promise<StorageThreadType>;
|
|
219
217
|
|
|
@@ -211,9 +211,7 @@ export declare function getSpeakersHandler({ mastra, agentId }: VoiceContext): P
|
|
|
211
211
|
voiceId: string;
|
|
212
212
|
}[]>;
|
|
213
213
|
|
|
214
|
-
export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<
|
|
215
|
-
traces: any[];
|
|
216
|
-
}>;
|
|
214
|
+
export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<any[]>;
|
|
217
215
|
|
|
218
216
|
export declare function getThreadByIdHandler({ mastra, agentId, threadId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'>): Promise<StorageThreadType>;
|
|
219
217
|
|
|
@@ -70,7 +70,7 @@ async function getAgentByIdHandler({ mastra, agentId }) {
|
|
|
70
70
|
async function getEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
71
71
|
try {
|
|
72
72
|
const agent = mastra.getAgent(agentId);
|
|
73
|
-
const evals = await mastra.getStorage()?.
|
|
73
|
+
const evals = await mastra.getStorage()?.__getEvalsByAgentName?.(agent.name, "test") || [];
|
|
74
74
|
return {
|
|
75
75
|
id: agentId,
|
|
76
76
|
name: agent.name,
|
|
@@ -84,7 +84,7 @@ async function getEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
|
84
84
|
async function getLiveEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
85
85
|
try {
|
|
86
86
|
const agent = mastra.getAgent(agentId);
|
|
87
|
-
const evals = await mastra.getStorage()?.
|
|
87
|
+
const evals = await mastra.getStorage()?.__getEvalsByAgentName?.(agent.name, "live") || [];
|
|
88
88
|
return {
|
|
89
89
|
id: agentId,
|
|
90
90
|
name: agent.name,
|
|
@@ -72,7 +72,7 @@ async function getAgentByIdHandler({ mastra, agentId }) {
|
|
|
72
72
|
async function getEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
73
73
|
try {
|
|
74
74
|
const agent = mastra.getAgent(agentId);
|
|
75
|
-
const evals = await mastra.getStorage()?.
|
|
75
|
+
const evals = await mastra.getStorage()?.__getEvalsByAgentName?.(agent.name, "test") || [];
|
|
76
76
|
return {
|
|
77
77
|
id: agentId,
|
|
78
78
|
name: agent.name,
|
|
@@ -86,7 +86,7 @@ async function getEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
|
86
86
|
async function getLiveEvalsByAgentIdHandler({ mastra, agentId }) {
|
|
87
87
|
try {
|
|
88
88
|
const agent = mastra.getAgent(agentId);
|
|
89
|
-
const evals = await mastra.getStorage()?.
|
|
89
|
+
const evals = await mastra.getStorage()?.__getEvalsByAgentName?.(agent.name, "live") || [];
|
|
90
90
|
return {
|
|
91
91
|
id: agentId,
|
|
92
92
|
name: agent.name,
|
|
@@ -30,14 +30,14 @@ async function getTelemetryHandler({ mastra, body }) {
|
|
|
30
30
|
return [key, value];
|
|
31
31
|
})
|
|
32
32
|
) : void 0;
|
|
33
|
-
const traces = await storage.
|
|
33
|
+
const traces = await storage.__getTraces({
|
|
34
34
|
name,
|
|
35
35
|
scope,
|
|
36
36
|
page: Number(page ?? 0),
|
|
37
37
|
perPage: Number(perPage ?? 100),
|
|
38
38
|
attributes
|
|
39
39
|
});
|
|
40
|
-
return
|
|
40
|
+
return traces;
|
|
41
41
|
} catch (error2) {
|
|
42
42
|
return chunkZLBRQFDD_cjs.handleError(error2, "Error getting telemetry");
|
|
43
43
|
}
|
|
@@ -28,14 +28,14 @@ async function getTelemetryHandler({ mastra, body }) {
|
|
|
28
28
|
return [key, value];
|
|
29
29
|
})
|
|
30
30
|
) : void 0;
|
|
31
|
-
const traces = await storage.
|
|
31
|
+
const traces = await storage.__getTraces({
|
|
32
32
|
name,
|
|
33
33
|
scope,
|
|
34
34
|
page: Number(page ?? 0),
|
|
35
35
|
perPage: Number(perPage ?? 100),
|
|
36
36
|
attributes
|
|
37
37
|
});
|
|
38
|
-
return
|
|
38
|
+
return traces;
|
|
39
39
|
} catch (error2) {
|
|
40
40
|
return handleError(error2, "Error getting telemetry");
|
|
41
41
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGV52BII2_cjs = require('../../chunk-GV52BII2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "generateHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkGV52BII2_cjs.generateHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "getAgentByIdHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkGV52BII2_cjs.getAgentByIdHandler; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getAgentsHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkGV52BII2_cjs.getAgentsHandler; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getEvalsByAgentIdHandler", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkGV52BII2_cjs.getEvalsByAgentIdHandler; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "getLiveEvalsByAgentIdHandler", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkGV52BII2_cjs.getLiveEvalsByAgentIdHandler; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "streamGenerateHandler", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkGV52BII2_cjs.streamGenerateHandler; }
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { generateHandler, getAgentByIdHandler, getAgentsHandler, getEvalsByAgentIdHandler, getLiveEvalsByAgentIdHandler, streamGenerateHandler } from '../../chunk-
|
|
1
|
+
export { generateHandler, getAgentByIdHandler, getAgentsHandler, getEvalsByAgentIdHandler, getLiveEvalsByAgentIdHandler, streamGenerateHandler } from '../../chunk-BMA2ORRT.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHKWIEBJD_cjs = require('../../chunk-HKWIEBJD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "getTelemetryHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkHKWIEBJD_cjs.getTelemetryHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "storeTelemetryHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkHKWIEBJD_cjs.storeTelemetryHandler; }
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getTelemetryHandler, storeTelemetryHandler } from '../../chunk-
|
|
1
|
+
export { getTelemetryHandler, storeTelemetryHandler } from '../../chunk-RXBZWKUR.js';
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -4,11 +4,11 @@ var chunk4C3EPMMF_cjs = require('../chunk-4C3EPMMF.cjs');
|
|
|
4
4
|
var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
|
|
5
5
|
var chunkA7DF4ETD_cjs = require('../chunk-A7DF4ETD.cjs');
|
|
6
6
|
var chunkX37I6GZT_cjs = require('../chunk-X37I6GZT.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkGV52BII2_cjs = require('../chunk-GV52BII2.cjs');
|
|
8
8
|
var chunkVB7KH62D_cjs = require('../chunk-VB7KH62D.cjs');
|
|
9
9
|
var chunk2FJURXCL_cjs = require('../chunk-2FJURXCL.cjs');
|
|
10
10
|
var chunk5JOF627H_cjs = require('../chunk-5JOF627H.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkHKWIEBJD_cjs = require('../chunk-HKWIEBJD.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "workflows", {
|
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "agents", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkGV52BII2_cjs.agents_exports; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "logs", {
|
|
36
36
|
enumerable: true,
|
|
@@ -46,5 +46,5 @@ Object.defineProperty(exports, "network", {
|
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "telemetry", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkHKWIEBJD_cjs.telemetry_exports; }
|
|
50
50
|
});
|
package/dist/server/handlers.js
CHANGED
|
@@ -2,8 +2,8 @@ export { tools_exports as tools } from '../chunk-YNSGUC2O.js';
|
|
|
2
2
|
export { vector_exports as vector } from '../chunk-4JINXASC.js';
|
|
3
3
|
export { voice_exports as voice } from '../chunk-3RVHWGWO.js';
|
|
4
4
|
export { workflows_exports as workflows } from '../chunk-ILW7XYNJ.js';
|
|
5
|
-
export { agents_exports as agents } from '../chunk-
|
|
5
|
+
export { agents_exports as agents } from '../chunk-BMA2ORRT.js';
|
|
6
6
|
export { logs_exports as logs } from '../chunk-2JQC6JWP.js';
|
|
7
7
|
export { memory_exports as memory } from '../chunk-RBQASTUP.js';
|
|
8
8
|
export { network_exports as network } from '../chunk-2YONKUWB.js';
|
|
9
|
-
export { telemetry_exports as telemetry } from '../chunk-
|
|
9
|
+
export { telemetry_exports as telemetry } from '../chunk-RXBZWKUR.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"license": "ISC",
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@mastra/core": "^0.8.0-alpha.
|
|
49
|
+
"@mastra/core": "^0.8.0-alpha.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@ai-sdk/openai": "^1.3.2",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vitest": "^2.1.9",
|
|
60
60
|
"zod-to-json-schema": "^3.24.3",
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
61
|
+
"@mastra/core": "0.8.0-alpha.6",
|
|
62
|
+
"@internal/lint": "0.0.1"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
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",
|