create-mastra 0.1.0-alpha.27 → 0.1.0-alpha.29

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.
@@ -0,0 +1,26 @@
1
+ import { AvailableHooks, registerHook, evaluate } from '@mastra/core';
2
+
3
+ // @ts-ignore
4
+ import { mastra } from './mastra.mjs';
5
+ // @ts-ignore
6
+ import { createNodeServer } from './server.mjs';
7
+
8
+ // @ts-ignore
9
+ const evalStore = [];
10
+ // @ts-ignore
11
+ const server = await createNodeServer(mastra, { playground: true, swaggerUI: true, evalStore });
12
+
13
+ registerHook(AvailableHooks.ON_GENERATION, ({ input, output, metric, runId, agentName }) => {
14
+ evaluate({
15
+ agentName,
16
+ input,
17
+ metric,
18
+ output,
19
+ runId,
20
+ globalRunId: runId,
21
+ });
22
+ });
23
+
24
+ registerHook(AvailableHooks.ON_EVALUATION, async traceObject => {
25
+ evalStore.push(traceObject);
26
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mastra",
3
- "version": "0.1.0-alpha.27",
3
+ "version": "0.1.0-alpha.29",
4
4
  "description": "Create Mastra apps with one command",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,8 @@
9
9
  },
10
10
  "files": [
11
11
  "dist",
12
- "starter-files"
12
+ "starter-files",
13
+ "templates"
13
14
  ],
14
15
  "keywords": [
15
16
  "mastra",
@@ -36,7 +37,7 @@
36
37
  "rollup-plugin-esbuild": "^6.1.1",
37
38
  "rollup-plugin-node-externals": "^8.0.0",
38
39
  "typescript": "^5.5.4",
39
- "mastra": "0.1.57-alpha.113"
40
+ "mastra": "0.1.57-alpha.119"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=20"
File without changes
File without changes