@mastra/evals 0.10.0 → 0.10.1-alpha.0
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/index.cjs +3 -5
- package/dist/index.js +3 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -54,15 +54,13 @@ var getCurrentTestInfo = async () => {
|
|
|
54
54
|
return void 0;
|
|
55
55
|
};
|
|
56
56
|
async function attachListeners(mastra) {
|
|
57
|
-
if (mastra?.storage) {
|
|
58
|
-
await mastra.storage.init();
|
|
59
|
-
}
|
|
60
57
|
hooks.registerHook(hooks.AvailableHooks.ON_EVALUATION, async (traceObject) => {
|
|
61
|
-
|
|
58
|
+
const storage$1 = mastra?.getStorage();
|
|
59
|
+
if (storage$1) {
|
|
62
60
|
const logger = mastra?.getLogger();
|
|
63
61
|
const areFieldsValid = utils.checkEvalStorageFields(traceObject, logger);
|
|
64
62
|
if (!areFieldsValid) return;
|
|
65
|
-
await
|
|
63
|
+
await storage$1.insert({
|
|
66
64
|
tableName: storage.TABLE_EVALS,
|
|
67
65
|
record: {
|
|
68
66
|
input: traceObject.input,
|
package/dist/index.js
CHANGED
|
@@ -52,15 +52,13 @@ var getCurrentTestInfo = async () => {
|
|
|
52
52
|
return void 0;
|
|
53
53
|
};
|
|
54
54
|
async function attachListeners(mastra) {
|
|
55
|
-
if (mastra?.storage) {
|
|
56
|
-
await mastra.storage.init();
|
|
57
|
-
}
|
|
58
55
|
registerHook(AvailableHooks.ON_EVALUATION, async (traceObject) => {
|
|
59
|
-
|
|
56
|
+
const storage = mastra?.getStorage();
|
|
57
|
+
if (storage) {
|
|
60
58
|
const logger = mastra?.getLogger();
|
|
61
59
|
const areFieldsValid = checkEvalStorageFields(traceObject, logger);
|
|
62
60
|
if (!areFieldsValid) return;
|
|
63
|
-
await
|
|
61
|
+
await storage.insert({
|
|
64
62
|
tableName: TABLE_EVALS,
|
|
65
63
|
record: {
|
|
66
64
|
input: traceObject.input,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/evals",
|
|
3
|
-
"version": "0.10.0",
|
|
3
|
+
"version": "0.10.1-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"typescript": "^5.8.2",
|
|
82
82
|
"vitest": "^3.1.2",
|
|
83
83
|
"@internal/lint": "0.0.6",
|
|
84
|
-
"@mastra/core": "0.10.
|
|
84
|
+
"@mastra/core": "0.10.1-alpha.3"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"check": "tsc --noEmit",
|