create-mastra 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251104230439
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 +2087 -0
- package/LICENSE.md +11 -42
- package/README.md +11 -39
- package/dist/index.js +1468 -639
- package/dist/index.js.map +1 -1
- package/dist/starter-files/tools.ts +2 -2
- package/dist/templates/dev.entry.js +9 -47
- package/package.json +29 -21
- package/dist/starter-files/config.ts +0 -25
- package/dist/starter-files/mastra-pg.docker-compose.yaml +0 -15
|
@@ -35,8 +35,8 @@ export const weatherTool = createTool({
|
|
|
35
35
|
conditions: z.string(),
|
|
36
36
|
location: z.string(),
|
|
37
37
|
}),
|
|
38
|
-
execute: async (
|
|
39
|
-
return await getWeather(
|
|
38
|
+
execute: async (inputData) => {
|
|
39
|
+
return await getWeather(inputData.location);
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -1,53 +1,15 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
|
-
|
|
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 { checkEvalStorageFields } from '@mastra/core/utils';
|
|
2
|
+
import { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';
|
|
7
3
|
import { mastra } from '#mastra';
|
|
8
|
-
import { createNodeServer } from '#server';
|
|
4
|
+
import { createNodeServer, getToolExports } from '#server';
|
|
5
|
+
import { tools } from '#tools';
|
|
9
6
|
// @ts-ignore
|
|
10
|
-
await createNodeServer(mastra, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
agentName,
|
|
15
|
-
input,
|
|
16
|
-
metric,
|
|
17
|
-
output,
|
|
18
|
-
runId,
|
|
19
|
-
globalRunId: runId,
|
|
20
|
-
instructions,
|
|
21
|
-
});
|
|
7
|
+
await createNodeServer(mastra, {
|
|
8
|
+
playground: true,
|
|
9
|
+
isDev: true,
|
|
10
|
+
tools: getToolExports(tools),
|
|
22
11
|
});
|
|
23
12
|
|
|
24
13
|
if (mastra.getStorage()) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
registerHook(AvailableHooks.ON_EVALUATION, async traceObject => {
|
|
30
|
-
const storage = mastra.getStorage();
|
|
31
|
-
if (storage) {
|
|
32
|
-
// Check for required fields
|
|
33
|
-
const logger = mastra?.getLogger();
|
|
34
|
-
const areFieldsValid = checkEvalStorageFields(traceObject, logger);
|
|
35
|
-
if (!areFieldsValid) return;
|
|
36
|
-
|
|
37
|
-
await storage.insert({
|
|
38
|
-
tableName: TABLE_EVALS,
|
|
39
|
-
record: {
|
|
40
|
-
input: traceObject.input,
|
|
41
|
-
output: traceObject.output,
|
|
42
|
-
result: JSON.stringify(traceObject.result || {}),
|
|
43
|
-
agent_name: traceObject.agentName,
|
|
44
|
-
metric_name: traceObject.metricName,
|
|
45
|
-
instructions: traceObject.instructions,
|
|
46
|
-
test_info: null,
|
|
47
|
-
global_run_id: traceObject.globalRunId,
|
|
48
|
-
run_id: traceObject.runId,
|
|
49
|
-
created_at: new Date().toISOString(),
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
14
|
+
mastra.__registerInternalWorkflow(scoreTracesWorkflow);
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mastra",
|
|
3
|
-
"version": "0.0.0-vnext-
|
|
3
|
+
"version": "0.0.0-vnext-20251104230439",
|
|
4
4
|
"description": "Create Mastra apps with one command",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"bin": {
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"
|
|
14
|
-
"templates"
|
|
13
|
+
"CHANGELOG.md"
|
|
15
14
|
],
|
|
16
15
|
"keywords": [
|
|
17
16
|
"mastra",
|
|
@@ -32,32 +31,41 @@
|
|
|
32
31
|
],
|
|
33
32
|
"dependencies": {
|
|
34
33
|
"commander": "^12.1.0",
|
|
35
|
-
"execa": "^9.
|
|
36
|
-
"fs-extra": "^11.3.
|
|
37
|
-
"pino": "^9.
|
|
34
|
+
"execa": "^9.6.0",
|
|
35
|
+
"fs-extra": "^11.3.2",
|
|
36
|
+
"pino": "^9.7.0",
|
|
38
37
|
"pino-pretty": "^13.0.0",
|
|
39
|
-
"posthog-node": "^4.
|
|
40
|
-
"prettier": "^3.
|
|
38
|
+
"posthog-node": "^4.18.0",
|
|
39
|
+
"prettier": "^3.6.2"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
|
-
"@microsoft/api-extractor": "^7.52.
|
|
44
|
-
"@rollup/plugin-commonjs": "
|
|
45
|
-
"@rollup/plugin-json": "
|
|
46
|
-
"@rollup/plugin-node-resolve": "
|
|
42
|
+
"@microsoft/api-extractor": "^7.52.8",
|
|
43
|
+
"@rollup/plugin-commonjs": "28.0.6",
|
|
44
|
+
"@rollup/plugin-json": "6.1.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "16.0.2",
|
|
47
46
|
"@types/fs-extra": "^11.0.4",
|
|
48
|
-
"@types/node": "^20.
|
|
49
|
-
"esbuild": "^0.25.
|
|
50
|
-
"eslint": "^9.
|
|
51
|
-
"rollup": "^4.
|
|
47
|
+
"@types/node": "^20.19.0",
|
|
48
|
+
"esbuild": "^0.25.10",
|
|
49
|
+
"eslint": "^9.37.0",
|
|
50
|
+
"rollup": "^4.50.2",
|
|
52
51
|
"rollup-plugin-esbuild": "^6.2.1",
|
|
53
|
-
"rollup-plugin-node-externals": "^8.0.
|
|
54
|
-
"typescript": "^5.8.
|
|
55
|
-
"@internal/lint": "0.0.0-vnext-
|
|
56
|
-
"mastra": "0.0.0-vnext-
|
|
52
|
+
"rollup-plugin-node-externals": "^8.0.1",
|
|
53
|
+
"typescript": "^5.8.3",
|
|
54
|
+
"@internal/lint": "0.0.0-vnext-20251104230439",
|
|
55
|
+
"mastra": "0.0.0-vnext-20251104230439"
|
|
57
56
|
},
|
|
58
57
|
"engines": {
|
|
59
58
|
"node": ">=20"
|
|
60
59
|
},
|
|
60
|
+
"homepage": "https://mastra.ai",
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
64
|
+
"directory": "packages/create-mastra"
|
|
65
|
+
},
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
68
|
+
},
|
|
61
69
|
"scripts": {
|
|
62
70
|
"build": "rollup -c",
|
|
63
71
|
"lint": "eslint .",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const config = {
|
|
2
|
-
name: 'PROJECT_NAME',
|
|
3
|
-
integrations: [],
|
|
4
|
-
db: {
|
|
5
|
-
provider: 'postgres',
|
|
6
|
-
uri: process.env.DB_URL!,
|
|
7
|
-
},
|
|
8
|
-
runner: {
|
|
9
|
-
provider: 'inngest',
|
|
10
|
-
uri: process.env.INNGEST_URL!,
|
|
11
|
-
signingKey: process.env.INNGEST_SIGNING_KEY!,
|
|
12
|
-
eventKey: process.env.INNGEST_EVENT_KEY!,
|
|
13
|
-
},
|
|
14
|
-
workflows: {
|
|
15
|
-
blueprintDirPath: '/mastra/blueprints',
|
|
16
|
-
systemEvents: {},
|
|
17
|
-
systemApis: [],
|
|
18
|
-
},
|
|
19
|
-
agents: {
|
|
20
|
-
agentDirPath: '/mastra/agents',
|
|
21
|
-
vectorProvider: [],
|
|
22
|
-
},
|
|
23
|
-
systemHostURL: process.env.APP_URL!,
|
|
24
|
-
routeRegistrationPath: '/api/mastra',
|
|
25
|
-
} as const;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
services:
|
|
2
|
-
db:
|
|
3
|
-
image: pgvector/pgvector:pg16
|
|
4
|
-
container_name: 'REPLACE_PROJECT_NAME-db'
|
|
5
|
-
ports:
|
|
6
|
-
- 'REPLACE_DB_PORT:5432'
|
|
7
|
-
environment:
|
|
8
|
-
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
9
|
-
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
10
|
-
POSTGRES_DB: ${POSTGRES_DB:-mastra}
|
|
11
|
-
volumes:
|
|
12
|
-
- pgdata:/var/lib/postgresql/data
|
|
13
|
-
|
|
14
|
-
volumes:
|
|
15
|
-
pgdata:
|