@mastra/evals 0.1.0-alpha.10 → 0.1.0-alpha.12
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/CHANGELOG.md +13 -0
- package/dist/attachListeners.d.ts +3 -0
- package/dist/attachListeners.d.ts.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/evals.cjs.development.js +486 -0
- package/dist/evals.cjs.development.js.map +1 -0
- package/dist/evals.cjs.production.min.js +2 -0
- package/dist/evals.cjs.production.min.js.map +1 -0
- package/dist/evals.esm.js +480 -0
- package/dist/evals.esm.js.map +1 -0
- package/dist/evaluation.d.ts +7 -0
- package/dist/evaluation.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/llm.esm.js +2167 -0
- package/dist/llm.esm.js.map +1 -0
- package/dist/metrics/index.d.ts +3 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/judge/index.d.ts +6 -0
- package/dist/metrics/judge/index.d.ts.map +1 -0
- package/dist/metrics/llm/answer-relevancy/index.d.ts +15 -0
- package/dist/metrics/llm/answer-relevancy/index.d.ts.map +1 -0
- package/dist/metrics/llm/answer-relevancy/metricJudge.d.ts +14 -0
- package/dist/metrics/llm/answer-relevancy/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/answer-relevancy/prompts.d.ts +19 -0
- package/dist/metrics/llm/answer-relevancy/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/bias/index.d.ts +13 -0
- package/dist/metrics/llm/bias/index.d.ts.map +1 -0
- package/dist/metrics/llm/bias/metricJudge.d.ts +11 -0
- package/dist/metrics/llm/bias/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/bias/prompts.d.ts +14 -0
- package/dist/metrics/llm/bias/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/context-position/index.d.ts +15 -0
- package/dist/metrics/llm/context-position/index.d.ts.map +1 -0
- package/dist/metrics/llm/context-position/metricJudge.d.ts +14 -0
- package/dist/metrics/llm/context-position/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/context-position/prompts.d.ts +17 -0
- package/dist/metrics/llm/context-position/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/context-precision/index.d.ts +15 -0
- package/dist/metrics/llm/context-precision/index.d.ts.map +1 -0
- package/dist/metrics/llm/context-precision/metricJudge.d.ts +15 -0
- package/dist/metrics/llm/context-precision/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/context-precision/prompts.d.ts +17 -0
- package/dist/metrics/llm/context-precision/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/context-relevancy/index.d.ts +15 -0
- package/dist/metrics/llm/context-relevancy/index.d.ts.map +1 -0
- package/dist/metrics/llm/context-relevancy/metricJudge.d.ts +16 -0
- package/dist/metrics/llm/context-relevancy/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/context-relevancy/prompts.d.ts +13 -0
- package/dist/metrics/llm/context-relevancy/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/contextual-recall/index.d.ts +15 -0
- package/dist/metrics/llm/contextual-recall/index.d.ts.map +1 -0
- package/dist/metrics/llm/contextual-recall/metricJudge.d.ts +16 -0
- package/dist/metrics/llm/contextual-recall/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/contextual-recall/prompts.d.ts +13 -0
- package/dist/metrics/llm/contextual-recall/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/faithfulness/index.d.ts +15 -0
- package/dist/metrics/llm/faithfulness/index.d.ts.map +1 -0
- package/dist/metrics/llm/faithfulness/metricJudge.d.ts +22 -0
- package/dist/metrics/llm/faithfulness/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/faithfulness/prompts.d.ts +20 -0
- package/dist/metrics/llm/faithfulness/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/hallucination/index.d.ts +15 -0
- package/dist/metrics/llm/hallucination/index.d.ts.map +1 -0
- package/dist/metrics/llm/hallucination/metricJudge.d.ts +22 -0
- package/dist/metrics/llm/hallucination/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/hallucination/prompts.d.ts +17 -0
- package/dist/metrics/llm/hallucination/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/index.d.ts +11 -0
- package/dist/metrics/llm/index.d.ts.map +1 -0
- package/dist/metrics/llm/prompt-alignment/index.d.ts +15 -0
- package/dist/metrics/llm/prompt-alignment/index.d.ts.map +1 -0
- package/dist/metrics/llm/prompt-alignment/metricJudge.d.ts +20 -0
- package/dist/metrics/llm/prompt-alignment/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/prompt-alignment/prompts.d.ts +17 -0
- package/dist/metrics/llm/prompt-alignment/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/summarization/index.d.ts +18 -0
- package/dist/metrics/llm/summarization/index.d.ts.map +1 -0
- package/dist/metrics/llm/summarization/metricJudge.d.ts +34 -0
- package/dist/metrics/llm/summarization/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/summarization/prompts.d.ts +30 -0
- package/dist/metrics/llm/summarization/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/toxicity/index.d.ts +13 -0
- package/dist/metrics/llm/toxicity/index.d.ts.map +1 -0
- package/dist/metrics/llm/toxicity/metricJudge.d.ts +14 -0
- package/dist/metrics/llm/toxicity/metricJudge.d.ts.map +1 -0
- package/dist/metrics/llm/toxicity/prompts.d.ts +10 -0
- package/dist/metrics/llm/toxicity/prompts.d.ts.map +1 -0
- package/dist/metrics/llm/types.d.ts +7 -0
- package/dist/metrics/llm/types.d.ts.map +1 -0
- package/dist/metrics/llm/utils.d.ts +17 -0
- package/dist/metrics/llm/utils.d.ts.map +1 -0
- package/dist/metrics/nlp/completeness/index.d.ts +20 -0
- package/dist/metrics/nlp/completeness/index.d.ts.map +1 -0
- package/dist/metrics/nlp/content-similarity/index.d.ts +17 -0
- package/dist/metrics/nlp/content-similarity/index.d.ts.map +1 -0
- package/dist/metrics/nlp/index.d.ts +6 -0
- package/dist/metrics/nlp/index.d.ts.map +1 -0
- package/dist/metrics/nlp/keyword-coverage/index.d.ts +12 -0
- package/dist/metrics/nlp/keyword-coverage/index.d.ts.map +1 -0
- package/dist/metrics/nlp/textual-difference/index.d.ts +14 -0
- package/dist/metrics/nlp/textual-difference/index.d.ts.map +1 -0
- package/dist/metrics/nlp/tone/index.d.ts +17 -0
- package/dist/metrics/nlp/tone/index.d.ts.map +1 -0
- package/dist/nlp.esm.js +212 -0
- package/dist/nlp.esm.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @mastra/evals
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d9c8dd0]
|
|
8
|
+
- @mastra/core@0.1.27-alpha.71
|
|
9
|
+
|
|
10
|
+
## 0.1.0-alpha.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- bdaf834: publish packages
|
|
15
|
+
|
|
3
16
|
## 0.1.0-alpha.10
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachListeners.d.ts","sourceRoot":"","sources":["../src/attachListeners.ts"],"names":[],"mappings":"AAMA,wBAAsB,eAAe,kBAUpC;AAED,wBAAsB,WAAW,kBAOhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@mastra/core');
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
|
|
9
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
10
|
+
try {
|
|
11
|
+
var i = n[a](c),
|
|
12
|
+
u = i.value;
|
|
13
|
+
} catch (n) {
|
|
14
|
+
return void e(n);
|
|
15
|
+
}
|
|
16
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
17
|
+
}
|
|
18
|
+
function _asyncToGenerator(n) {
|
|
19
|
+
return function () {
|
|
20
|
+
var t = this,
|
|
21
|
+
e = arguments;
|
|
22
|
+
return new Promise(function (r, o) {
|
|
23
|
+
var a = n.apply(t, e);
|
|
24
|
+
function _next(n) {
|
|
25
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
26
|
+
}
|
|
27
|
+
function _throw(n) {
|
|
28
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
29
|
+
}
|
|
30
|
+
_next(void 0);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function _regeneratorRuntime() {
|
|
35
|
+
_regeneratorRuntime = function () {
|
|
36
|
+
return e;
|
|
37
|
+
};
|
|
38
|
+
var t,
|
|
39
|
+
e = {},
|
|
40
|
+
r = Object.prototype,
|
|
41
|
+
n = r.hasOwnProperty,
|
|
42
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
43
|
+
t[e] = r.value;
|
|
44
|
+
},
|
|
45
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
46
|
+
a = i.iterator || "@@iterator",
|
|
47
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
48
|
+
u = i.toStringTag || "@@toStringTag";
|
|
49
|
+
function define(t, e, r) {
|
|
50
|
+
return Object.defineProperty(t, e, {
|
|
51
|
+
value: r,
|
|
52
|
+
enumerable: !0,
|
|
53
|
+
configurable: !0,
|
|
54
|
+
writable: !0
|
|
55
|
+
}), t[e];
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
define({}, "");
|
|
59
|
+
} catch (t) {
|
|
60
|
+
define = function (t, e, r) {
|
|
61
|
+
return t[e] = r;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function wrap(t, e, r, n) {
|
|
65
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
66
|
+
a = Object.create(i.prototype),
|
|
67
|
+
c = new Context(n || []);
|
|
68
|
+
return o(a, "_invoke", {
|
|
69
|
+
value: makeInvokeMethod(t, r, c)
|
|
70
|
+
}), a;
|
|
71
|
+
}
|
|
72
|
+
function tryCatch(t, e, r) {
|
|
73
|
+
try {
|
|
74
|
+
return {
|
|
75
|
+
type: "normal",
|
|
76
|
+
arg: t.call(e, r)
|
|
77
|
+
};
|
|
78
|
+
} catch (t) {
|
|
79
|
+
return {
|
|
80
|
+
type: "throw",
|
|
81
|
+
arg: t
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
e.wrap = wrap;
|
|
86
|
+
var h = "suspendedStart",
|
|
87
|
+
l = "suspendedYield",
|
|
88
|
+
f = "executing",
|
|
89
|
+
s = "completed",
|
|
90
|
+
y = {};
|
|
91
|
+
function Generator() {}
|
|
92
|
+
function GeneratorFunction() {}
|
|
93
|
+
function GeneratorFunctionPrototype() {}
|
|
94
|
+
var p = {};
|
|
95
|
+
define(p, a, function () {
|
|
96
|
+
return this;
|
|
97
|
+
});
|
|
98
|
+
var d = Object.getPrototypeOf,
|
|
99
|
+
v = d && d(d(values([])));
|
|
100
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
101
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
102
|
+
function defineIteratorMethods(t) {
|
|
103
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
104
|
+
define(t, e, function (t) {
|
|
105
|
+
return this._invoke(e, t);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function AsyncIterator(t, e) {
|
|
110
|
+
function invoke(r, o, i, a) {
|
|
111
|
+
var c = tryCatch(t[r], t, o);
|
|
112
|
+
if ("throw" !== c.type) {
|
|
113
|
+
var u = c.arg,
|
|
114
|
+
h = u.value;
|
|
115
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
116
|
+
invoke("next", t, i, a);
|
|
117
|
+
}, function (t) {
|
|
118
|
+
invoke("throw", t, i, a);
|
|
119
|
+
}) : e.resolve(h).then(function (t) {
|
|
120
|
+
u.value = t, i(u);
|
|
121
|
+
}, function (t) {
|
|
122
|
+
return invoke("throw", t, i, a);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
a(c.arg);
|
|
126
|
+
}
|
|
127
|
+
var r;
|
|
128
|
+
o(this, "_invoke", {
|
|
129
|
+
value: function (t, n) {
|
|
130
|
+
function callInvokeWithMethodAndArg() {
|
|
131
|
+
return new e(function (e, r) {
|
|
132
|
+
invoke(t, n, e, r);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function makeInvokeMethod(e, r, n) {
|
|
140
|
+
var o = h;
|
|
141
|
+
return function (i, a) {
|
|
142
|
+
if (o === f) throw Error("Generator is already running");
|
|
143
|
+
if (o === s) {
|
|
144
|
+
if ("throw" === i) throw a;
|
|
145
|
+
return {
|
|
146
|
+
value: t,
|
|
147
|
+
done: !0
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
for (n.method = i, n.arg = a;;) {
|
|
151
|
+
var c = n.delegate;
|
|
152
|
+
if (c) {
|
|
153
|
+
var u = maybeInvokeDelegate(c, n);
|
|
154
|
+
if (u) {
|
|
155
|
+
if (u === y) continue;
|
|
156
|
+
return u;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
160
|
+
if (o === h) throw o = s, n.arg;
|
|
161
|
+
n.dispatchException(n.arg);
|
|
162
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
163
|
+
o = f;
|
|
164
|
+
var p = tryCatch(e, r, n);
|
|
165
|
+
if ("normal" === p.type) {
|
|
166
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
167
|
+
return {
|
|
168
|
+
value: p.arg,
|
|
169
|
+
done: n.done
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function maybeInvokeDelegate(e, r) {
|
|
177
|
+
var n = r.method,
|
|
178
|
+
o = e.iterator[n];
|
|
179
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
180
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
181
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
182
|
+
var a = i.arg;
|
|
183
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
184
|
+
}
|
|
185
|
+
function pushTryEntry(t) {
|
|
186
|
+
var e = {
|
|
187
|
+
tryLoc: t[0]
|
|
188
|
+
};
|
|
189
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
190
|
+
}
|
|
191
|
+
function resetTryEntry(t) {
|
|
192
|
+
var e = t.completion || {};
|
|
193
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
194
|
+
}
|
|
195
|
+
function Context(t) {
|
|
196
|
+
this.tryEntries = [{
|
|
197
|
+
tryLoc: "root"
|
|
198
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
199
|
+
}
|
|
200
|
+
function values(e) {
|
|
201
|
+
if (e || "" === e) {
|
|
202
|
+
var r = e[a];
|
|
203
|
+
if (r) return r.call(e);
|
|
204
|
+
if ("function" == typeof e.next) return e;
|
|
205
|
+
if (!isNaN(e.length)) {
|
|
206
|
+
var o = -1,
|
|
207
|
+
i = function next() {
|
|
208
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
209
|
+
return next.value = t, next.done = !0, next;
|
|
210
|
+
};
|
|
211
|
+
return i.next = i;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
215
|
+
}
|
|
216
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
217
|
+
value: GeneratorFunctionPrototype,
|
|
218
|
+
configurable: !0
|
|
219
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
220
|
+
value: GeneratorFunction,
|
|
221
|
+
configurable: !0
|
|
222
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
223
|
+
var e = "function" == typeof t && t.constructor;
|
|
224
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
225
|
+
}, e.mark = function (t) {
|
|
226
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
227
|
+
}, e.awrap = function (t) {
|
|
228
|
+
return {
|
|
229
|
+
__await: t
|
|
230
|
+
};
|
|
231
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
232
|
+
return this;
|
|
233
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
234
|
+
void 0 === i && (i = Promise);
|
|
235
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
236
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
237
|
+
return t.done ? t.value : a.next();
|
|
238
|
+
});
|
|
239
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
240
|
+
return this;
|
|
241
|
+
}), define(g, "toString", function () {
|
|
242
|
+
return "[object Generator]";
|
|
243
|
+
}), e.keys = function (t) {
|
|
244
|
+
var e = Object(t),
|
|
245
|
+
r = [];
|
|
246
|
+
for (var n in e) r.push(n);
|
|
247
|
+
return r.reverse(), function next() {
|
|
248
|
+
for (; r.length;) {
|
|
249
|
+
var t = r.pop();
|
|
250
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
251
|
+
}
|
|
252
|
+
return next.done = !0, next;
|
|
253
|
+
};
|
|
254
|
+
}, e.values = values, Context.prototype = {
|
|
255
|
+
constructor: Context,
|
|
256
|
+
reset: function (e) {
|
|
257
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
258
|
+
},
|
|
259
|
+
stop: function () {
|
|
260
|
+
this.done = !0;
|
|
261
|
+
var t = this.tryEntries[0].completion;
|
|
262
|
+
if ("throw" === t.type) throw t.arg;
|
|
263
|
+
return this.rval;
|
|
264
|
+
},
|
|
265
|
+
dispatchException: function (e) {
|
|
266
|
+
if (this.done) throw e;
|
|
267
|
+
var r = this;
|
|
268
|
+
function handle(n, o) {
|
|
269
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
270
|
+
}
|
|
271
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
272
|
+
var i = this.tryEntries[o],
|
|
273
|
+
a = i.completion;
|
|
274
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
275
|
+
if (i.tryLoc <= this.prev) {
|
|
276
|
+
var c = n.call(i, "catchLoc"),
|
|
277
|
+
u = n.call(i, "finallyLoc");
|
|
278
|
+
if (c && u) {
|
|
279
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
280
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
281
|
+
} else if (c) {
|
|
282
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
283
|
+
} else {
|
|
284
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
285
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
abrupt: function (t, e) {
|
|
291
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
292
|
+
var o = this.tryEntries[r];
|
|
293
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
294
|
+
var i = o;
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
299
|
+
var a = i ? i.completion : {};
|
|
300
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
301
|
+
},
|
|
302
|
+
complete: function (t, e) {
|
|
303
|
+
if ("throw" === t.type) throw t.arg;
|
|
304
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
305
|
+
},
|
|
306
|
+
finish: function (t) {
|
|
307
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
308
|
+
var r = this.tryEntries[e];
|
|
309
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
catch: function (t) {
|
|
313
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
314
|
+
var r = this.tryEntries[e];
|
|
315
|
+
if (r.tryLoc === t) {
|
|
316
|
+
var n = r.completion;
|
|
317
|
+
if ("throw" === n.type) {
|
|
318
|
+
var o = n.arg;
|
|
319
|
+
resetTryEntry(r);
|
|
320
|
+
}
|
|
321
|
+
return o;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
throw Error("illegal catch attempt");
|
|
325
|
+
},
|
|
326
|
+
delegateYield: function (e, r, n) {
|
|
327
|
+
return this.delegate = {
|
|
328
|
+
iterator: values(e),
|
|
329
|
+
resultName: r,
|
|
330
|
+
nextLoc: n
|
|
331
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
332
|
+
}
|
|
333
|
+
}, e;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
var GLOBAL_RUN_ID_ENV_KEY = '_MASTRA_GLOBAL_RUN_ID_';
|
|
337
|
+
|
|
338
|
+
function evaluate(_x, _x2, _x3) {
|
|
339
|
+
return _evaluate.apply(this, arguments);
|
|
340
|
+
}
|
|
341
|
+
function _evaluate() {
|
|
342
|
+
_evaluate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(agent, input, metric) {
|
|
343
|
+
var testInfo, globalRunId, runId, agentOutput, metricResult;
|
|
344
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
345
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
346
|
+
case 0:
|
|
347
|
+
_context2.next = 2;
|
|
348
|
+
return getCurrentTestInfo();
|
|
349
|
+
case 2:
|
|
350
|
+
testInfo = _context2.sent;
|
|
351
|
+
globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY];
|
|
352
|
+
runId = crypto.randomUUID();
|
|
353
|
+
_context2.next = 7;
|
|
354
|
+
return agent.generate(input, {
|
|
355
|
+
runId: runId
|
|
356
|
+
});
|
|
357
|
+
case 7:
|
|
358
|
+
agentOutput = _context2.sent;
|
|
359
|
+
if (!globalRunId) {
|
|
360
|
+
globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY] = crypto.randomUUID();
|
|
361
|
+
console.warn('Global run id not set, you should run "globalSetup" from "@mastra/evals" before evaluating.');
|
|
362
|
+
}
|
|
363
|
+
_context2.next = 11;
|
|
364
|
+
return core.evaluate({
|
|
365
|
+
agentName: agent.name,
|
|
366
|
+
input: input,
|
|
367
|
+
metric: metric,
|
|
368
|
+
output: agentOutput.text,
|
|
369
|
+
globalRunId: globalRunId,
|
|
370
|
+
runId: runId,
|
|
371
|
+
testInfo: testInfo
|
|
372
|
+
});
|
|
373
|
+
case 11:
|
|
374
|
+
metricResult = _context2.sent;
|
|
375
|
+
return _context2.abrupt("return", metricResult);
|
|
376
|
+
case 13:
|
|
377
|
+
case "end":
|
|
378
|
+
return _context2.stop();
|
|
379
|
+
}
|
|
380
|
+
}, _callee2);
|
|
381
|
+
}));
|
|
382
|
+
return _evaluate.apply(this, arguments);
|
|
383
|
+
}
|
|
384
|
+
var getCurrentTestInfo = /*#__PURE__*/function () {
|
|
385
|
+
var _ref = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
386
|
+
var state, _vitest$expect, vitest, _state;
|
|
387
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
388
|
+
while (1) switch (_context.prev = _context.next) {
|
|
389
|
+
case 0:
|
|
390
|
+
if (!(typeof expect !== 'undefined' && expect.getState)) {
|
|
391
|
+
_context.next = 3;
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
state = expect.getState();
|
|
395
|
+
return _context.abrupt("return", {
|
|
396
|
+
testName: state.currentTestName,
|
|
397
|
+
testPath: state.testPath
|
|
398
|
+
});
|
|
399
|
+
case 3:
|
|
400
|
+
_context.prev = 3;
|
|
401
|
+
_context.next = 6;
|
|
402
|
+
return import('vitest');
|
|
403
|
+
case 6:
|
|
404
|
+
vitest = _context.sent;
|
|
405
|
+
if (!(typeof vitest !== 'undefined' && (_vitest$expect = vitest.expect) != null && _vitest$expect.getState)) {
|
|
406
|
+
_context.next = 10;
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
_state = vitest.expect.getState();
|
|
410
|
+
return _context.abrupt("return", {
|
|
411
|
+
testName: _state.currentTestName,
|
|
412
|
+
testPath: _state.testPath
|
|
413
|
+
});
|
|
414
|
+
case 10:
|
|
415
|
+
_context.next = 14;
|
|
416
|
+
break;
|
|
417
|
+
case 12:
|
|
418
|
+
_context.prev = 12;
|
|
419
|
+
_context.t0 = _context["catch"](3);
|
|
420
|
+
case 14:
|
|
421
|
+
return _context.abrupt("return", null);
|
|
422
|
+
case 15:
|
|
423
|
+
case "end":
|
|
424
|
+
return _context.stop();
|
|
425
|
+
}
|
|
426
|
+
}, _callee, null, [[3, 12]]);
|
|
427
|
+
}));
|
|
428
|
+
return function getCurrentTestInfo() {
|
|
429
|
+
return _ref.apply(this, arguments);
|
|
430
|
+
};
|
|
431
|
+
}();
|
|
432
|
+
|
|
433
|
+
function attachListeners() {
|
|
434
|
+
return _attachListeners.apply(this, arguments);
|
|
435
|
+
}
|
|
436
|
+
function _attachListeners() {
|
|
437
|
+
_attachListeners = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
438
|
+
var dotMastraPath;
|
|
439
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
440
|
+
while (1) switch (_context.prev = _context.next) {
|
|
441
|
+
case 0:
|
|
442
|
+
dotMastraPath = path.join(process.cwd(), '.mastra');
|
|
443
|
+
try {
|
|
444
|
+
fs.mkdirSync(dotMastraPath);
|
|
445
|
+
} catch (error) {}
|
|
446
|
+
core.registerHook(core.AvailableHooks.ON_EVALUATION, function (traceObject) {
|
|
447
|
+
fs.appendFile(path.join(dotMastraPath, 'evals.json'), JSON.stringify(traceObject) + '\n', function () {});
|
|
448
|
+
});
|
|
449
|
+
case 3:
|
|
450
|
+
case "end":
|
|
451
|
+
return _context.stop();
|
|
452
|
+
}
|
|
453
|
+
}, _callee);
|
|
454
|
+
}));
|
|
455
|
+
return _attachListeners.apply(this, arguments);
|
|
456
|
+
}
|
|
457
|
+
function globalSetup() {
|
|
458
|
+
return _globalSetup.apply(this, arguments);
|
|
459
|
+
}
|
|
460
|
+
function _globalSetup() {
|
|
461
|
+
_globalSetup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
462
|
+
var globalRunId;
|
|
463
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
464
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
465
|
+
case 0:
|
|
466
|
+
if (!process.env[GLOBAL_RUN_ID_ENV_KEY]) {
|
|
467
|
+
_context2.next = 2;
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
throw new Error('Global run id already set, you should only run "GlobalSetup" once');
|
|
471
|
+
case 2:
|
|
472
|
+
globalRunId = crypto.randomUUID();
|
|
473
|
+
process.env[GLOBAL_RUN_ID_ENV_KEY] = globalRunId;
|
|
474
|
+
case 4:
|
|
475
|
+
case "end":
|
|
476
|
+
return _context2.stop();
|
|
477
|
+
}
|
|
478
|
+
}, _callee2);
|
|
479
|
+
}));
|
|
480
|
+
return _globalSetup.apply(this, arguments);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
exports.attachListeners = attachListeners;
|
|
484
|
+
exports.evaluate = evaluate;
|
|
485
|
+
exports.globalSetup = globalSetup;
|
|
486
|
+
//# sourceMappingURL=evals.cjs.development.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evals.cjs.development.js","sources":["../src/constants.ts","../src/evaluation.ts","../src/attachListeners.ts"],"sourcesContent":["export const GLOBAL_RUN_ID_ENV_KEY = '_MASTRA_GLOBAL_RUN_ID_';\n","import { type Agent, type Metric, evaluate as coreEvaluate } from '@mastra/core';\n\nimport { GLOBAL_RUN_ID_ENV_KEY } from './constants';\n\nexport async function evaluate<T extends Agent>(agent: T, input: Parameters<T['generate']>[0], metric: Metric) {\n const testInfo = await getCurrentTestInfo();\n let globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY];\n const runId = crypto.randomUUID();\n const agentOutput = await agent.generate(input, {\n runId,\n });\n\n if (!globalRunId) {\n globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY] = crypto.randomUUID();\n console.warn('Global run id not set, you should run \"globalSetup\" from \"@mastra/evals\" before evaluating.');\n }\n\n const metricResult = await coreEvaluate({\n agentName: agent.name,\n input,\n metric,\n output: agentOutput.text,\n globalRunId,\n runId,\n testInfo,\n });\n\n return metricResult;\n}\n\nexport const getCurrentTestInfo = async () => {\n // Jest\n if (typeof expect !== 'undefined' && expect.getState) {\n const state = expect.getState();\n return {\n testName: state.currentTestName,\n testPath: state.testPath,\n };\n }\n\n try {\n const vitest = await import('vitest');\n if (typeof vitest !== 'undefined' && vitest.expect?.getState) {\n const state = vitest.expect.getState();\n return {\n testName: state.currentTestName,\n testPath: state.testPath,\n };\n }\n } catch {}\n\n return null;\n};\n","import { AvailableHooks, registerHook } from '@mastra/core';\nimport { mkdirSync, appendFile } from 'fs';\nimport { join } from 'path';\n\nimport { GLOBAL_RUN_ID_ENV_KEY } from './constants';\n\nexport async function attachListeners() {\n const dotMastraPath = join(process.cwd(), '.mastra');\n\n try {\n mkdirSync(dotMastraPath);\n } catch (error) {}\n\n registerHook(AvailableHooks.ON_EVALUATION, traceObject => {\n appendFile(join(dotMastraPath, 'evals.json'), JSON.stringify(traceObject) + '\\n', () => {});\n });\n}\n\nexport async function globalSetup() {\n if (process.env[GLOBAL_RUN_ID_ENV_KEY]) {\n throw new Error('Global run id already set, you should only run \"GlobalSetup\" once');\n }\n\n const globalRunId = crypto.randomUUID();\n process.env[GLOBAL_RUN_ID_ENV_KEY] = globalRunId;\n}\n"],"names":["GLOBAL_RUN_ID_ENV_KEY","evaluate","_x","_x2","_x3","_evaluate","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","agent","input","metric","testInfo","globalRunId","runId","agentOutput","metricResult","wrap","_callee2$","_context2","prev","next","getCurrentTestInfo","sent","process","env","crypto","randomUUID","generate","console","warn","coreEvaluate","agentName","name","output","text","abrupt","stop","_ref","_callee","state","_vitest$expect","vitest","_state","_callee$","_context","expect","getState","testName","currentTestName","testPath","t0","attachListeners","_attachListeners","dotMastraPath","join","cwd","mkdirSync","error","registerHook","AvailableHooks","ON_EVALUATION","traceObject","appendFile","JSON","stringify","globalSetup","_globalSetup","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,qBAAqB,GAAG,wBAAwB;;ACI7D,SAAsBC,QAAQA,CAAAC,EAAA,EAAAC,GAAA,EAAAC,GAAA,EAAA;AAAA,EAAA,OAAAC,SAAA,CAAAC,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA,CAAA;AAwB7B,SAAAF,SAAA,GAAA;AAAAA,EAAAA,SAAA,GAAAG,iBAAA,cAAAC,mBAAA,EAA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,QAAA,CAAA,CAAA;GAClD,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA2D,YAAA,CAAAhE,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@mastra/core"),e=require("fs"),r=require("path");function n(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function c(t){n(i,o,a,c,u,"next",t)}function u(t){n(i,o,a,c,u,"throw",t)}c(void 0)}))}}function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=Object.create((e&&e.prototype instanceof m?e:m).prototype),i=new G(n||[]);return o(a,"_invoke",{value:j(t,r,i)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",v="suspendedYield",y="executing",d="completed",g={};function m(){}function w(){}function x(){}var b={};l(b,c,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(I([])));E&&E!==r&&n.call(E,c)&&(b=E);var _=x.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=h(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function j(e,r,n){var o=p;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?d:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=x,o(_,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),l(_,s,"Generator"),l(_,c,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}var i="_MASTRA_GLOBAL_RUN_ID_";function c(){return(c=o(a().mark((function e(r,n,o){var c,s,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u();case 2:return c=e.sent,s=process.env[i],l=crypto.randomUUID(),e.next=7,r.generate(n,{runId:l});case 7:return f=e.sent,s||(s=process.env[i]=crypto.randomUUID(),console.warn('Global run id not set, you should run "globalSetup" from "@mastra/evals" before evaluating.')),e.next=11,t.evaluate({agentName:r.name,input:n,metric:o,output:f.text,globalRunId:s,runId:l,testInfo:c});case 11:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var u=function(){var t=o(a().mark((function t(){var e,r,n,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof expect||!expect.getState){t.next=3;break}return e=expect.getState(),t.abrupt("return",{testName:e.currentTestName,testPath:e.testPath});case 3:return t.prev=3,t.next=6,import("vitest");case 6:if(void 0===(n=t.sent)||null==(r=n.expect)||!r.getState){t.next=10;break}return o=n.expect.getState(),t.abrupt("return",{testName:o.currentTestName,testPath:o.testPath});case 10:t.next=14;break;case 12:t.prev=12,t.t0=t.catch(3);case 14:return t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[3,12]])})));return function(){return t.apply(this,arguments)}}();function s(){return(s=o(a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=r.join(process.cwd(),".mastra");try{e.mkdirSync(o)}catch(t){}t.registerHook(t.AvailableHooks.ON_EVALUATION,(function(t){e.appendFile(r.join(o,"evals.json"),JSON.stringify(t)+"\n",(function(){}))}));case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function l(){return(l=o(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!process.env[i]){t.next=2;break}throw new Error('Global run id already set, you should only run "GlobalSetup" once');case 2:e=crypto.randomUUID(),process.env[i]=e;case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}exports.attachListeners=function(){return s.apply(this,arguments)},exports.evaluate=function(t,e,r){return c.apply(this,arguments)},exports.globalSetup=function(){return l.apply(this,arguments)};
|
|
2
|
+
//# sourceMappingURL=evals.cjs.production.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evals.cjs.production.min.js","sources":["../src/constants.ts","../src/evaluation.ts","../src/attachListeners.ts"],"sourcesContent":["export const GLOBAL_RUN_ID_ENV_KEY = '_MASTRA_GLOBAL_RUN_ID_';\n","import { type Agent, type Metric, evaluate as coreEvaluate } from '@mastra/core';\n\nimport { GLOBAL_RUN_ID_ENV_KEY } from './constants';\n\nexport async function evaluate<T extends Agent>(agent: T, input: Parameters<T['generate']>[0], metric: Metric) {\n const testInfo = await getCurrentTestInfo();\n let globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY];\n const runId = crypto.randomUUID();\n const agentOutput = await agent.generate(input, {\n runId,\n });\n\n if (!globalRunId) {\n globalRunId = process.env[GLOBAL_RUN_ID_ENV_KEY] = crypto.randomUUID();\n console.warn('Global run id not set, you should run \"globalSetup\" from \"@mastra/evals\" before evaluating.');\n }\n\n const metricResult = await coreEvaluate({\n agentName: agent.name,\n input,\n metric,\n output: agentOutput.text,\n globalRunId,\n runId,\n testInfo,\n });\n\n return metricResult;\n}\n\nexport const getCurrentTestInfo = async () => {\n // Jest\n if (typeof expect !== 'undefined' && expect.getState) {\n const state = expect.getState();\n return {\n testName: state.currentTestName,\n testPath: state.testPath,\n };\n }\n\n try {\n const vitest = await import('vitest');\n if (typeof vitest !== 'undefined' && vitest.expect?.getState) {\n const state = vitest.expect.getState();\n return {\n testName: state.currentTestName,\n testPath: state.testPath,\n };\n }\n } catch {}\n\n return null;\n};\n","import { AvailableHooks, registerHook } from '@mastra/core';\nimport { mkdirSync, appendFile } from 'fs';\nimport { join } from 'path';\n\nimport { GLOBAL_RUN_ID_ENV_KEY } from './constants';\n\nexport async function attachListeners() {\n const dotMastraPath = join(process.cwd(), '.mastra');\n\n try {\n mkdirSync(dotMastraPath);\n } catch (error) {}\n\n registerHook(AvailableHooks.ON_EVALUATION, traceObject => {\n appendFile(join(dotMastraPath, 'evals.json'), JSON.stringify(traceObject) + '\\n', () => {});\n });\n}\n\nexport async function globalSetup() {\n if (process.env[GLOBAL_RUN_ID_ENV_KEY]) {\n throw new Error('Global run id already set, you should only run \"GlobalSetup\" once');\n }\n\n const globalRunId = crypto.randomUUID();\n process.env[GLOBAL_RUN_ID_ENV_KEY] = globalRunId;\n}\n"],"names":["GLOBAL_RUN_ID_ENV_KEY","_evaluate","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","agent","input","metric","testInfo","globalRunId","runId","agentOutput","wrap","_context2","prev","next","getCurrentTestInfo","sent","process","env","crypto","randomUUID","generate","console","warn","coreEvaluate","agentName","name","output","text","abrupt","stop","apply","this","arguments","_ref","_callee","state","_vitest$expect","vitest","_state","_context","expect","getState","testName","currentTestName","testPath","import","t0","_attachListeners","dotMastraPath","join","cwd","mkdirSync","error","registerHook","AvailableHooks","ON_EVALUATION","traceObject","appendFile","JSON","stringify","_globalSetup","Error","_x","_x2","_x3"],"mappings":"oyNAAO,IAAMA,EAAwB,yBC4BpC,SAAAC,IAAA,OAAAA,EAAAC,EAAAC,IAAAC,MAxBM,SAAAC,EAAyCC,EAAUC,EAAqCC,GAAc,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAT,IAAAU,MAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EACpFC,IAAoB,KAAA,EAEV,OAF3BR,EAAQK,EAAAI,KACVR,EAAcS,QAAQC,IAAIpB,GACxBW,EAAQU,OAAOC,aAAYR,EAAAE,KAAA,EACPV,EAAMiB,SAAShB,EAAO,CAC9CI,MAAAA,IACA,KAAA,EAKD,OAPKC,EAAWE,EAAAI,KAIZR,IACHA,EAAcS,QAAQC,IAAIpB,GAAyBqB,OAAOC,aAC1DE,QAAQC,KAAK,gGACdX,EAAAE,KAAA,GAE0BU,WAAa,CACtCC,UAAWrB,EAAMsB,KACjBrB,MAAAA,EACAC,OAAAA,EACAqB,OAAQjB,EAAYkB,KACpBpB,YAAAA,EACAC,MAAAA,EACAF,SAAAA,IACA,KAAA,GARgB,OAAAK,EAAAiB,OAAA,SAAAjB,EAAAI,MAUC,KAAA,GAAA,IAAA,MAAA,OAAAJ,EAAAkB,OAAA,GAAA3B,EACpB,MAAA4B,MAAAC,KAAAC,UAAA,CAEM,IAAMlB,EAAkB,WAAA,IAAAmB,EAAAlC,EAAAC,IAAAC,MAAG,SAAAiC,I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