create-mastra 0.10.23 → 0.10.24-alpha.0
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/package.json +2 -2
- package/dist/starter-files/tools.d.ts +0 -79
- package/dist/starter-files/tools.d.ts.map +0 -1
- package/dist/templates/dev.entry.d.ts +0 -2
- package/dist/templates/dev.entry.d.ts.map +0 -1
- package/dist/templates/scorers/answer-relevancy-scorer.d.ts +0 -2
- package/dist/templates/scorers/answer-relevancy-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/bias-detection-scorer.d.ts +0 -2
- package/dist/templates/scorers/bias-detection-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/completeness-scorer.d.ts +0 -2
- package/dist/templates/scorers/completeness-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/content-similarity-scorer.d.ts +0 -2
- package/dist/templates/scorers/content-similarity-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/faithfulness-scorer.d.ts +0 -2
- package/dist/templates/scorers/faithfulness-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/hallucination-scorer.d.ts +0 -2
- package/dist/templates/scorers/hallucination-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/keyword-coverage-scorer.d.ts +0 -2
- package/dist/templates/scorers/keyword-coverage-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/textual-difference-scorer.d.ts +0 -2
- package/dist/templates/scorers/textual-difference-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/tone-consistency-scorer.d.ts +0 -2
- package/dist/templates/scorers/tone-consistency-scorer.d.ts.map +0 -1
- package/dist/templates/scorers/toxicity-detection-scorer.d.ts +0 -2
- package/dist/templates/scorers/toxicity-detection-scorer.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mastra",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.24-alpha.0",
|
|
4
4
|
"description": "Create Mastra apps with one command",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
54
54
|
"typescript": "^5.8.3",
|
|
55
55
|
"@internal/lint": "0.0.31",
|
|
56
|
-
"mastra": "^0.10.
|
|
56
|
+
"mastra": "^0.10.24-alpha.0"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=20"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const weatherTool: import("@mastra/core/tools").Tool<z.ZodObject<{
|
|
3
|
-
location: z.ZodString;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
location: string;
|
|
6
|
-
}, {
|
|
7
|
-
location: string;
|
|
8
|
-
}>, z.ZodObject<{
|
|
9
|
-
temperature: z.ZodNumber;
|
|
10
|
-
feelsLike: z.ZodNumber;
|
|
11
|
-
humidity: z.ZodNumber;
|
|
12
|
-
windSpeed: z.ZodNumber;
|
|
13
|
-
windGust: z.ZodNumber;
|
|
14
|
-
conditions: z.ZodString;
|
|
15
|
-
location: z.ZodString;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
location: string;
|
|
18
|
-
temperature: number;
|
|
19
|
-
feelsLike: number;
|
|
20
|
-
humidity: number;
|
|
21
|
-
windSpeed: number;
|
|
22
|
-
windGust: number;
|
|
23
|
-
conditions: string;
|
|
24
|
-
}, {
|
|
25
|
-
location: string;
|
|
26
|
-
temperature: number;
|
|
27
|
-
feelsLike: number;
|
|
28
|
-
humidity: number;
|
|
29
|
-
windSpeed: number;
|
|
30
|
-
windGust: number;
|
|
31
|
-
conditions: string;
|
|
32
|
-
}>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
|
|
33
|
-
location: z.ZodString;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
location: string;
|
|
36
|
-
}, {
|
|
37
|
-
location: string;
|
|
38
|
-
}>>> & {
|
|
39
|
-
inputSchema: z.ZodObject<{
|
|
40
|
-
location: z.ZodString;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
location: string;
|
|
43
|
-
}, {
|
|
44
|
-
location: string;
|
|
45
|
-
}>;
|
|
46
|
-
outputSchema: z.ZodObject<{
|
|
47
|
-
temperature: z.ZodNumber;
|
|
48
|
-
feelsLike: z.ZodNumber;
|
|
49
|
-
humidity: z.ZodNumber;
|
|
50
|
-
windSpeed: z.ZodNumber;
|
|
51
|
-
windGust: z.ZodNumber;
|
|
52
|
-
conditions: z.ZodString;
|
|
53
|
-
location: z.ZodString;
|
|
54
|
-
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
location: string;
|
|
56
|
-
temperature: number;
|
|
57
|
-
feelsLike: number;
|
|
58
|
-
humidity: number;
|
|
59
|
-
windSpeed: number;
|
|
60
|
-
windGust: number;
|
|
61
|
-
conditions: string;
|
|
62
|
-
}, {
|
|
63
|
-
location: string;
|
|
64
|
-
temperature: number;
|
|
65
|
-
feelsLike: number;
|
|
66
|
-
humidity: number;
|
|
67
|
-
windSpeed: number;
|
|
68
|
-
windGust: number;
|
|
69
|
-
conditions: string;
|
|
70
|
-
}>;
|
|
71
|
-
execute: (context: import("@mastra/core").ToolExecutionContext<z.ZodObject<{
|
|
72
|
-
location: z.ZodString;
|
|
73
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
location: string;
|
|
75
|
-
}, {
|
|
76
|
-
location: string;
|
|
77
|
-
}>>) => Promise<any>;
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/starter-files/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.entry.d.ts","sourceRoot":"","sources":["../../src/templates/dev.entry.js"],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const answerRelevancyScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createAnswerRelevancyScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createAnswerRelevancyScorer({ model: openai(\"gpt-4o-mini\") });\n \nconst inputMessages = [{ role: 'user', content: \"What are the health benefits of regular exercise?\" }];\nconst outputMessage = { text: \"Regular exercise improves cardiovascular health, strengthens muscles, boosts metabolism, and enhances mental well-being through the release of endorphins.\" };\n \nconst result = await scorer.run({\n input: inputMessages,\n output: outputMessage,\n});\nconsole.log(result);\n";
|
|
2
|
-
//# sourceMappingURL=answer-relevancy-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"answer-relevancy-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/answer-relevancy-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,snBAcjC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const biasDetectionScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createBiasScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createBiasScorer({ model: openai(\"gpt-4o-mini\") });\n \nconst query = \"What makes someone a good leader?\";\nconst response =\n \"Men naturally make better leaders due to their assertiveness and decisiveness. Women tend to be too emotional and collaborative, which can slow down decision-making processes.\";\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { text: response },\n});\nconsole.log(result);\n";
|
|
2
|
-
//# sourceMappingURL=bias-detection-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bias-detection-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/bias-detection-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,8kBAe/B,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const completenessScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createCompletenessScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createCompletenessScorer({ model: openai(\"gpt-4o-mini\") });\n \nconst query = \"Explain the process of photosynthesis, including the inputs, outputs, and stages involved.\";\nconst response =\n \"Photosynthesis is the process by which plants convert sunlight into chemical energy. Inputs: Carbon dioxide (CO2) from the air enters through stomata, water (H2O) is absorbed by roots, and sunlight provides energy captured by chlorophyll. The process occurs in two main stages: 1) Light-dependent reactions in the thylakoids convert light energy to ATP and NADPH while splitting water and releasing oxygen. 2) Light-independent reactions (Calvin cycle) in the stroma use ATP, NADPH, and CO2 to produce glucose. Outputs: Glucose (C6H12O6) serves as food for the plant, and oxygen (O2) is released as a byproduct. The overall equation is: 6CO2 + 6H2O + light energy \u2192 C6H12O6 + 6O2.\";\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { text: response },\n});\n \nconsole.log(result);";
|
|
2
|
-
//# sourceMappingURL=completeness-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"completeness-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/completeness-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,spCAeV,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const contentSimilarityScorer = "\nimport { createContentSimilarityScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createContentSimilarityScorer();\n \nconst query = \"The quick brown fox jumps over the lazy dog.\";\nconst response = \"A quick brown fox jumped over a lazy dog.\";\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { text: response },\n});\n \nconsole.log(result);\n";
|
|
2
|
-
//# sourceMappingURL=content-similarity-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-similarity-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/content-similarity-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,+ZAcnC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const faithfulnessScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createFaithfulnessScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createFaithfulnessScorer({ model: openai(\"gpt-4o-mini\"), options: {\n context: [\n \"The Tesla Model 3 was launched in 2017.\",\n \"It has a range of up to 358 miles.\",\n \"The base model accelerates 0-60 mph in 5.8 seconds.\"\n ]\n});\n \nconst query = \"Tell me about the Tesla Model 3.\";\nconst response = \"The Tesla Model 3 was introduced in 2017. It can travel up to 358 miles on a single charge and the base version goes from 0 to 60 mph in 5.8 seconds.\";\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { text: response },\n});\n \nconsole.log(result);";
|
|
2
|
-
//# sourceMappingURL=faithfulness-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"faithfulness-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/faithfulness-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,6vBAoBV,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const hallucinationScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createHallucinationScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createHallucinationScorer({ model: openai(\"gpt-4o-mini\"), options: {\n context: [\n \"The iPhone was first released in 2007.\",\n \"Steve Jobs unveiled it at Macworld.\",\n \"The original model had a 3.5-inch screen.\"\n ]\n});\n \nconst query = \"When was the first iPhone released?\";\nconst response = \"The iPhone was first released in 2007, when Steve Jobs unveiled it at Macworld. The original iPhone featured a 3.5-inch screen.\";\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { text: response },\n});\n \nconsole.log(result);";
|
|
2
|
-
//# sourceMappingURL=hallucination-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hallucination-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/hallucination-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,kuBAoBX,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const keywordCoverageScorer = "\nimport { createKeywordCoverageScorer } from \"@mastra/evals/scorers/code\";\n \nconst scorer = createKeywordCoverageScorer();\n \nconst input = 'JavaScript frameworks like React and Vue';\nconst output = 'Popular JavaScript frameworks include React and Vue for web development';\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: input }],\n output: { role: 'assistant', text: output },\n});\n \nconsole.log('Score:', result.score);\nconsole.log('AnalyzeStepResult:', result.analyzeStepResult);";
|
|
2
|
-
//# sourceMappingURL=keyword-coverage-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyword-coverage-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/keyword-coverage-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,6gBAc2B,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const textualDifferenceScorer = "\nimport { createTextualDifferenceScorer } from \"@mastra/evals/scorers/code\";\n \nconst scorer = createTextualDifferenceScorer();\n \nconst input = 'The quick brown fox jumps over the lazy dog';\nconst output = 'The quick brown fox jumps over the lazy dog';\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: input }],\n output: { role: 'assistant', text: output },\n});\n \nconsole.log('Score:', result.score);\nconsole.log('AnalyzeStepResult:', result.analyzeStepResult);\n";
|
|
2
|
-
//# sourceMappingURL=textual-difference-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textual-difference-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/textual-difference-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,0fAenC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const toneConsistencyScorer = "\nimport { createToneScorer } from \"@mastra/evals/scorers/code\";\n \nconst scorer = createToneScorer();\n \nconst input = 'This product is fantastic and amazing!';\nconst output = 'The product is excellent and wonderful!';\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: input }],\n output: { role: 'assistant', text: output },\n});\n \nconsole.log('Score:', result.score);\nconsole.log('AnalyzeStepResult:', result.analyzeStepResult);\n";
|
|
2
|
-
//# sourceMappingURL=tone-consistency-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tone-consistency-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/tone-consistency-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,udAejC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const toxicityDetectionScorer = "\nimport { openai } from \"@ai-sdk/openai\";\nimport { createToxicityScorer } from \"@mastra/evals/scorers/llm\";\n \nconst scorer = createToxicityScorer({ model: openai(\"gpt-4o-mini\") });\n \nconst query = 'What do you think about the new team member?';\nconst response = 'That incompetent fool is a complete waste of space. They clearly bought their degree and have no business being here. Everyone hates working with them.';\n \nconst result = await scorer.run({\n input: [{ role: 'user', content: query }],\n output: { role: 'assistant', text: response },\n});\n \nconsole.log('Score:', result.score);\nconsole.log('Reason:', result.reason);";
|
|
2
|
-
//# sourceMappingURL=toxicity-detection-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toxicity-detection-scorer.d.ts","sourceRoot":"","sources":["../../../src/templates/scorers/toxicity-detection-scorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,8oBAeG,CAAC"}
|