create-mastra 0.2.9-alpha.0 → 0.2.9-alpha.2
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.
|
@@ -7,7 +7,7 @@ import { checkEvalStorageFields } from '@mastra/core/utils';
|
|
|
7
7
|
import { mastra } from '#mastra';
|
|
8
8
|
import { createNodeServer } from '#server';
|
|
9
9
|
// @ts-ignore
|
|
10
|
-
await createNodeServer(mastra, { playground: true,
|
|
10
|
+
await createNodeServer(mastra, { playground: true, isDev: true });
|
|
11
11
|
|
|
12
12
|
registerHook(AvailableHooks.ON_GENERATION, ({ input, output, metric, runId, agentName, instructions }) => {
|
|
13
13
|
evaluate({
|
|
@@ -21,18 +21,20 @@ registerHook(AvailableHooks.ON_GENERATION, ({ input, output, metric, runId, agen
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
if (mastra.
|
|
25
|
-
|
|
24
|
+
if (mastra.getStorage()) {
|
|
25
|
+
// start storage init in the background
|
|
26
|
+
mastra.getStorage().init();
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
registerHook(AvailableHooks.ON_EVALUATION, async traceObject => {
|
|
29
|
-
|
|
30
|
+
const storage = mastra.getStorage();
|
|
31
|
+
if (storage) {
|
|
30
32
|
// Check for required fields
|
|
31
33
|
const logger = mastra?.getLogger();
|
|
32
34
|
const areFieldsValid = checkEvalStorageFields(traceObject, logger);
|
|
33
35
|
if (!areFieldsValid) return;
|
|
34
36
|
|
|
35
|
-
await
|
|
37
|
+
await storage.insert({
|
|
36
38
|
tableName: TABLE_EVALS,
|
|
37
39
|
record: {
|
|
38
40
|
input: traceObject.input,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mastra",
|
|
3
|
-
"version": "0.2.9-alpha.
|
|
3
|
+
"version": "0.2.9-alpha.2",
|
|
4
4
|
"description": "Create Mastra apps with one command",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
54
54
|
"typescript": "^5.8.2",
|
|
55
55
|
"@internal/lint": "0.0.2",
|
|
56
|
-
"mastra": "^0.
|
|
56
|
+
"mastra": "^0.5.0-alpha.9"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=20"
|