create-mastra 0.18.0 → 1.0.0-beta.1

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.
@@ -35,8 +35,8 @@ export const weatherTool = createTool({
35
35
  conditions: z.string(),
36
36
  location: z.string(),
37
37
  }),
38
- execute: async ({ context }) => {
39
- return await getWeather(context.location);
38
+ execute: async (inputData) => {
39
+ return await getWeather(inputData.location);
40
40
  },
41
41
  });
42
42
 
@@ -1,10 +1,5 @@
1
1
  // @ts-ignore
2
- // @ts-ignore
3
- import { evaluate } from '@mastra/core/eval';
4
- import { AvailableHooks, registerHook } from '@mastra/core/hooks';
5
- import { TABLE_EVALS } from '@mastra/core/storage';
6
- import { scoreTracesWorkflow } from '@mastra/core/scores/scoreTraces';
7
- import { checkEvalStorageFields } from '@mastra/core/utils';
2
+ import { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';
8
3
  import { mastra } from '#mastra';
9
4
  import { createNodeServer, getToolExports } from '#server';
10
5
  import { tools } from '#tools';
@@ -15,44 +10,6 @@ await createNodeServer(mastra, {
15
10
  tools: getToolExports(tools),
16
11
  });
17
12
 
18
- registerHook(AvailableHooks.ON_GENERATION, ({ input, output, metric, runId, agentName, instructions }) => {
19
- evaluate({
20
- agentName,
21
- input,
22
- metric,
23
- output,
24
- runId,
25
- globalRunId: runId,
26
- instructions,
27
- });
28
- });
29
-
30
13
  if (mastra.getStorage()) {
31
14
  mastra.__registerInternalWorkflow(scoreTracesWorkflow);
32
- }
33
-
34
- registerHook(AvailableHooks.ON_EVALUATION, async traceObject => {
35
- const storage = mastra.getStorage();
36
- if (storage) {
37
- // Check for required fields
38
- const logger = mastra?.getLogger();
39
- const areFieldsValid = checkEvalStorageFields(traceObject, logger);
40
- if (!areFieldsValid) return;
41
-
42
- await storage.insert({
43
- tableName: TABLE_EVALS,
44
- record: {
45
- input: traceObject.input,
46
- output: traceObject.output,
47
- result: JSON.stringify(traceObject.result || {}),
48
- agent_name: traceObject.agentName,
49
- metric_name: traceObject.metricName,
50
- instructions: traceObject.instructions,
51
- test_info: null,
52
- global_run_id: traceObject.globalRunId,
53
- run_id: traceObject.runId,
54
- created_at: new Date().toISOString(),
55
- },
56
- });
57
- }
58
- });
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mastra",
3
- "version": "0.18.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Create Mastra apps with one command",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "@microsoft/api-extractor": "^7.52.8",
43
43
  "@rollup/plugin-commonjs": "28.0.6",
44
44
  "@rollup/plugin-json": "6.1.0",
45
- "@rollup/plugin-node-resolve": "16.0.2",
45
+ "@rollup/plugin-node-resolve": "16.0.3",
46
46
  "@types/fs-extra": "^11.0.4",
47
47
  "@types/node": "^20.19.0",
48
48
  "esbuild": "^0.25.10",
@@ -51,11 +51,11 @@
51
51
  "rollup-plugin-esbuild": "^6.2.1",
52
52
  "rollup-plugin-node-externals": "^8.0.1",
53
53
  "typescript": "^5.8.3",
54
- "@internal/lint": "0.0.58",
55
- "mastra": "^0.18.0"
54
+ "@internal/lint": "0.0.53",
55
+ "mastra": "^1.0.0-beta.1"
56
56
  },
57
57
  "engines": {
58
- "node": ">=20"
58
+ "node": ">=22.13.0"
59
59
  },
60
60
  "homepage": "https://mastra.ai",
61
61
  "repository": {
@@ -66,13 +66,6 @@
66
66
  "bugs": {
67
67
  "url": "https://github.com/mastra-ai/mastra/issues"
68
68
  },
69
- "publishConfig": {
70
- "access": "public",
71
- "publish-branch": [
72
- "main",
73
- "0.x"
74
- ]
75
- },
76
69
  "scripts": {
77
70
  "build": "rollup -c",
78
71
  "lint": "eslint .",