@mastra/mcp-docs-server 0.13.7-alpha.0 → 0.13.7-alpha.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.
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +7 -7
- package/.docs/organized/changelogs/mastra.md +12 -12
- package/.docs/raw/community/contributing-templates.mdx +192 -0
- package/.docs/raw/getting-started/installation.mdx +16 -0
- package/.docs/raw/getting-started/templates.mdx +95 -0
- package/.docs/raw/reference/agents/generate.mdx +18 -1
- package/.docs/raw/reference/agents/stream.mdx +18 -1
- package/.docs/raw/reference/core/mastra-class.mdx +1 -1
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +115 -0
- package/.docs/raw/reference/scorers/bias.mdx +127 -0
- package/.docs/raw/reference/scorers/completeness.mdx +89 -0
- package/.docs/raw/reference/scorers/content-similarity.mdx +96 -0
- package/.docs/raw/reference/scorers/custom-code-scorer.mdx +155 -0
- package/.docs/raw/reference/scorers/faithfulness.mdx +123 -0
- package/.docs/raw/reference/scorers/hallucination.mdx +135 -0
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +92 -0
- package/.docs/raw/reference/scorers/llm-scorer.mdx +166 -0
- package/.docs/raw/reference/scorers/mastra-scorer.mdx +218 -0
- package/.docs/raw/reference/scorers/textual-difference.mdx +76 -0
- package/.docs/raw/reference/scorers/tone-consistency.mdx +75 -0
- package/.docs/raw/reference/scorers/toxicity.mdx +109 -0
- package/.docs/raw/reference/templates.mdx +222 -0
- package/package.json +5 -5
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 0.10.17-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
|
|
3
13
|
## 0.10.17-alpha.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -288,15 +298,5 @@
|
|
|
288
298
|
|
|
289
299
|
## 0.10.8
|
|
290
300
|
|
|
291
|
-
### Patch Changes
|
|
292
|
-
|
|
293
|
-
- 9047bda: clientTools - stream tool-result part
|
|
294
|
-
- a606c75: show right suspend schema for nested workflow on playground
|
|
295
|
-
- 1760a1c: Use workflow stream in playground instead of watch
|
|
296
|
-
- 038e5ae: Add cancel workflow run
|
|
297
|
-
- 7e801dd: Add tools to network api response
|
|
298
|
-
- Updated dependencies [9dda1ac]
|
|
299
|
-
- Updated dependencies [c984582]
|
|
300
|
-
- Updated dependencies [7e801dd]
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1724 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 0.12.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e0f73c6: Make input optional for scorer run
|
|
8
|
+
- cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
|
|
9
|
+
- a77c823: include PATCH method in default CORS configuration
|
|
10
|
+
|
|
3
11
|
## 0.12.0-alpha.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -290,13 +298,5 @@
|
|
|
290
298
|
|
|
291
299
|
- b8f16b2: Fixes generateTitle overwriting working memory when both get used in the same LLM response cycle.
|
|
292
300
|
- 3e04487: Fix provider tools to check for output schema before attaching to tool
|
|
293
|
-
- a344ac7: Fix tool streaming in agent network
|
|
294
|
-
- dc4ca0a: Fixed a regression where intentionally serialized JSON message content was being parsed back into an object by MessageList
|
|
295
|
-
|
|
296
|
-
## 0.10.8-alpha.1
|
|
297
|
-
|
|
298
|
-
### Patch Changes
|
|
299
|
-
|
|
300
|
-
- b8f16b2: Fixes generateTitle overwriting working memory when both get used in the same LLM response cycle.
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 2280 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.12.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a77c823: include PATCH method in default CORS configuration
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
- @mastra/server@0.12.0-alpha.1
|
|
13
|
+
|
|
3
14
|
## 0.12.0-alpha.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -287,16 +298,5 @@
|
|
|
287
298
|
- Updated dependencies [f36e4f1]
|
|
288
299
|
- Updated dependencies [7f6e403]
|
|
289
300
|
- @mastra/core@0.10.11
|
|
290
|
-
- @mastra/server@0.10.11
|
|
291
|
-
|
|
292
|
-
## 0.10.11-alpha.4
|
|
293
|
-
|
|
294
|
-
### Patch Changes
|
|
295
|
-
|
|
296
|
-
- 40cd025: Check if tool is actually a tool for /api/tools
|
|
297
|
-
- @mastra/core@0.10.11-alpha.4
|
|
298
|
-
- @mastra/server@0.10.11-alpha.4
|
|
299
|
-
|
|
300
|
-
## 0.10.11-alpha.3
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 3045 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/evals
|
|
2
2
|
|
|
3
|
+
## 0.10.8-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e0f73c6: Make input optional for scorer run
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
|
|
3
13
|
## 0.10.8-alpha.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -288,15 +298,5 @@
|
|
|
288
298
|
|
|
289
299
|
- 83da932: Move @mastra/core to peerdeps
|
|
290
300
|
|
|
291
|
-
### Patch Changes
|
|
292
|
-
|
|
293
|
-
- Updated dependencies [b3a3d63]
|
|
294
|
-
- Updated dependencies [344f453]
|
|
295
|
-
- Updated dependencies [0a3ae6d]
|
|
296
|
-
- Updated dependencies [95911be]
|
|
297
|
-
- Updated dependencies [5eb5a99]
|
|
298
|
-
- Updated dependencies [7e632c5]
|
|
299
|
-
- Updated dependencies [1e9fbfa]
|
|
300
|
-
- Updated dependencies [b2ae5aa]
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1798 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 0.13.7-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [e0f73c6]
|
|
8
|
+
- Updated dependencies [cda801d]
|
|
9
|
+
- Updated dependencies [a77c823]
|
|
10
|
+
- @mastra/core@0.12.0-alpha.1
|
|
11
|
+
|
|
3
12
|
## 0.13.7-alpha.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
|
|
290
299
|
- 3bb8b36: include storage instance to memory config
|
|
291
300
|
|
|
292
|
-
### Patch Changes
|
|
293
|
-
|
|
294
|
-
- 1ccccff: dependencies updates:
|
|
295
|
-
- Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.3`, in `dependencies`)
|
|
296
|
-
- 1ccccff: dependencies updates:
|
|
297
|
-
- Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.3`, in `dependencies`)
|
|
298
|
-
- 26f0031: Removed @latest from @mastra/mcp-docs-server scaffolded configuration for Windsurf/Cursor/VSCode. There is an npx caching issue that causes @latest to break the MCP server for many users, and for now removing @latest makes it work. We will debug this more but for now having a working docs server is more important than it updating every time users start their IDE.
|
|
299
|
-
- Updated dependencies [d1ed912]
|
|
300
|
-
- Updated dependencies [f6fd25f]
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1028 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 0.11.6-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
|
|
3
13
|
## 0.11.6-alpha.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -288,15 +298,5 @@
|
|
|
288
298
|
- Updated dependencies [d8f2d19]
|
|
289
299
|
- Updated dependencies [9d52b17]
|
|
290
300
|
- Updated dependencies [8ba1b51]
|
|
291
|
-
- @mastra/core@0.10.7-alpha.0
|
|
292
|
-
|
|
293
|
-
## 0.10.4
|
|
294
|
-
|
|
295
|
-
### Patch Changes
|
|
296
|
-
|
|
297
|
-
- 4051477: dependencies updates:
|
|
298
|
-
- Added dependency [`zod-to-json-schema@^3.24.5` ↗︎](https://www.npmjs.com/package/zod-to-json-schema/v/3.24.5) (to `dependencies`)
|
|
299
|
-
- 63f6b7d: dependencies updates:
|
|
300
|
-
- Updated dependency [`@upstash/redis@^1.35.0` ↗︎](https://www.npmjs.com/package/@upstash/redis/v/1.35.0) (from `^1.34.5`, in `dependencies`)
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 2416 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 5.1.16-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6336993: Fix workflow input form overflow
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
- @mastra/client-js@0.10.17-alpha.1
|
|
13
|
+
|
|
3
14
|
## 5.1.16-alpha.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -287,16 +298,5 @@
|
|
|
287
298
|
- Updated dependencies [18da791]
|
|
288
299
|
- Updated dependencies [cb16baf]
|
|
289
300
|
- Updated dependencies [f36e4f1]
|
|
290
|
-
- Updated dependencies [7f6e403]
|
|
291
|
-
- @mastra/core@0.10.11
|
|
292
|
-
- @mastra/client-js@0.10.10
|
|
293
|
-
|
|
294
|
-
## 5.1.11-alpha.4
|
|
295
|
-
|
|
296
|
-
### Patch Changes
|
|
297
|
-
|
|
298
|
-
- c1cceea: Bump peerdeps of @matra/core
|
|
299
|
-
- @mastra/core@0.10.11-alpha.4
|
|
300
|
-
- @mastra/client-js@0.10.10-alpha.4
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 2213 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.12.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [e0f73c6]
|
|
8
|
+
- Updated dependencies [cda801d]
|
|
9
|
+
- Updated dependencies [a77c823]
|
|
10
|
+
- @mastra/core@0.12.0-alpha.1
|
|
11
|
+
|
|
3
12
|
## 0.12.0-alpha.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
|
|
291
300
|
### Patch Changes
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
- 038e5ae: Add cancel workflow run
|
|
295
|
-
- 81a1b3b: Update peerdeps
|
|
296
|
-
- 7e801dd: Add tools to network api response
|
|
297
|
-
- Updated dependencies [9dda1ac]
|
|
298
|
-
- Updated dependencies [c984582]
|
|
299
|
-
- Updated dependencies [7e801dd]
|
|
300
|
-
- Updated dependencies [a606c75]
|
|
301
|
-
|
|
302
|
-
... 2512 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 2521 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.10.14-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6336993: Fix workflow input form overflow
|
|
8
|
+
|
|
3
9
|
## 0.10.14-alpha.0
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -292,11 +298,5 @@
|
|
|
292
298
|
|
|
293
299
|
## 0.10.3
|
|
294
300
|
|
|
295
|
-
### Patch Changes
|
|
296
|
-
|
|
297
|
-
- e719504: don't start posthog when the browser is Brave
|
|
298
|
-
- 8f60de4: fix workflow output when the schema is a primitive
|
|
299
|
-
|
|
300
|
-
## 0.10.3-alpha.1
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1130 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.10.16-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6336993: Fix workflow input form overflow
|
|
8
|
+
- Updated dependencies [e0f73c6]
|
|
9
|
+
- Updated dependencies [cda801d]
|
|
10
|
+
- Updated dependencies [a77c823]
|
|
11
|
+
- @mastra/core@0.12.0-alpha.1
|
|
12
|
+
- @mastra/deployer@0.12.0-alpha.1
|
|
13
|
+
|
|
3
14
|
## 0.10.16-alpha.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -287,16 +298,5 @@
|
|
|
287
298
|
|
|
288
299
|
## 0.10.11
|
|
289
300
|
|
|
290
|
-
### Patch Changes
|
|
291
301
|
|
|
292
|
-
|
|
293
|
-
- af9e40e: Map log level number to string value
|
|
294
|
-
- f457d86: reset localstorage when resetting model settings
|
|
295
|
-
- 8722d53: Fix multi modal remaining steps
|
|
296
|
-
- 565cc0c: fix redirection when clicking on the playground breadcrumbs
|
|
297
|
-
- 4219597: add JSON input close to form input
|
|
298
|
-
- 2873c7f: dependencies updates:
|
|
299
|
-
- Updated dependency [`dotenv@^16.6.1` ↗︎](https://www.npmjs.com/package/dotenv/v/16.6.1) (from `^16.5.0`, in `dependencies`)
|
|
300
|
-
- a9f51e4: Fix plaground get tools not including x-mastra-dev-header"
|
|
301
|
-
|
|
302
|
-
... 4563 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 4574 more lines hidden. See full changelog in package directory.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Contributing Templates"
|
|
3
|
+
description: "How to contribute your own templates to the Mastra ecosystem"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { Callout } from "nextra/components";
|
|
7
|
+
|
|
8
|
+
# Contributing Templates
|
|
9
|
+
|
|
10
|
+
The Mastra community plays a vital role in creating templates that showcase innovative application patterns. This guide explains how to contribute your own templates to the Mastra ecosystem.
|
|
11
|
+
|
|
12
|
+
## Template Contribution Process
|
|
13
|
+
|
|
14
|
+
### 1. Review Requirements
|
|
15
|
+
|
|
16
|
+
Before creating a template, ensure you understand:
|
|
17
|
+
|
|
18
|
+
- [Templates Reference](/reference/templates) - Technical requirements and conventions
|
|
19
|
+
- [Project Structure](/docs/getting-started/project-structure) - Standard Mastra project organization
|
|
20
|
+
- Community guidelines and quality standards
|
|
21
|
+
|
|
22
|
+
### 2. Develop Your Template
|
|
23
|
+
|
|
24
|
+
Create your template following the established patterns:
|
|
25
|
+
|
|
26
|
+
- Focus on a specific use case or pattern
|
|
27
|
+
- Include comprehensive documentation
|
|
28
|
+
- Test thoroughly with fresh installations
|
|
29
|
+
- Follow all technical requirements
|
|
30
|
+
|
|
31
|
+
### 3. Submit for Review
|
|
32
|
+
|
|
33
|
+
Once your template is ready, submit it through our contribution form. Templates undergo an approval process to ensure quality and consistency.
|
|
34
|
+
|
|
35
|
+
## Submission Guidelines
|
|
36
|
+
|
|
37
|
+
### Template Criteria
|
|
38
|
+
|
|
39
|
+
We accept templates that:
|
|
40
|
+
|
|
41
|
+
- **Demonstrate unique value** - Show innovative use cases or patterns not covered by existing templates
|
|
42
|
+
- **Follow conventions** - Adhere to all technical requirements and structural guidelines
|
|
43
|
+
- **Include quality documentation** - Provide clear setup instructions and usage examples
|
|
44
|
+
- **Work reliably** - Function correctly with minimal setup after installation
|
|
45
|
+
|
|
46
|
+
### Quality Standards
|
|
47
|
+
|
|
48
|
+
Templates must meet these quality benchmarks:
|
|
49
|
+
|
|
50
|
+
- **Code quality** - Clean, well-commented, and maintainable code
|
|
51
|
+
- **Error handling** - Proper error handling for external APIs and user inputs
|
|
52
|
+
- **Type safety** - Full TypeScript typing with Zod validation where appropriate
|
|
53
|
+
- **Documentation** - Comprehensive README with setup and usage instructions
|
|
54
|
+
- **Testing** - Verified to work with fresh installations
|
|
55
|
+
|
|
56
|
+
## Submission Process
|
|
57
|
+
|
|
58
|
+
### 1. Prepare Your Template
|
|
59
|
+
|
|
60
|
+
Ensure your template meets all requirements outlined in the [Templates Reference](/reference/templates):
|
|
61
|
+
|
|
62
|
+
- Proper project structure in `src/mastra/` directory
|
|
63
|
+
- Standard TypeScript configuration
|
|
64
|
+
- Comprehensive `.env.example` file
|
|
65
|
+
- Detailed README with setup instructions
|
|
66
|
+
|
|
67
|
+
### 2. Submit Your Template
|
|
68
|
+
|
|
69
|
+
Submit your template using our contribution form:
|
|
70
|
+
|
|
71
|
+
**[Submit Template Contribution](https://forms.gle/5qcU5UTKYcgFdVfE7)**
|
|
72
|
+
|
|
73
|
+
### Required Information
|
|
74
|
+
|
|
75
|
+
When submitting your template, provide:
|
|
76
|
+
|
|
77
|
+
- **Template Name** - Clear, descriptive name indicating the use case
|
|
78
|
+
- **Template Author Name** - Your name or organization name
|
|
79
|
+
- **Template Author Email** - Contact email for communication about your submission
|
|
80
|
+
- **GitHub URL** - Link to your template repository
|
|
81
|
+
- **Description** - Detailed explanation of what the template does and its value
|
|
82
|
+
- **Optional Image** - Screenshot or diagram showing the template in action
|
|
83
|
+
- **Optional Demo Video** - Link to a video demonstrating the template's functionality
|
|
84
|
+
|
|
85
|
+
## Review Process
|
|
86
|
+
|
|
87
|
+
### Review Criteria
|
|
88
|
+
|
|
89
|
+
Templates are evaluated on:
|
|
90
|
+
|
|
91
|
+
- **Technical compliance** - Adherence to template rules and conventions
|
|
92
|
+
- **Code quality** - Clean, maintainable, and well-documented code
|
|
93
|
+
- **Uniqueness** - Novel use cases or innovative implementation patterns
|
|
94
|
+
- **Educational value** - Ability to teach Mastra concepts effectively
|
|
95
|
+
- **Community benefit** - Potential value to the broader Mastra community
|
|
96
|
+
|
|
97
|
+
### Feedback and Iteration
|
|
98
|
+
|
|
99
|
+
If your template needs improvements:
|
|
100
|
+
|
|
101
|
+
- You'll receive specific feedback on required changes
|
|
102
|
+
- Make the requested modifications and resubmit
|
|
103
|
+
- The review process continues until the template meets standards
|
|
104
|
+
|
|
105
|
+
## Community Guidelines
|
|
106
|
+
|
|
107
|
+
### Template Ideas
|
|
108
|
+
|
|
109
|
+
Consider creating templates for:
|
|
110
|
+
|
|
111
|
+
- **Industry-specific use cases** - Healthcare, finance, education, etc.
|
|
112
|
+
- **Integration patterns** - Specific API or service integrations
|
|
113
|
+
- **Advanced techniques** - Complex workflows, multi-agent systems, or novel patterns
|
|
114
|
+
- **Learning resources** - Step-by-step tutorials for specific concepts
|
|
115
|
+
|
|
116
|
+
### Development Best Practices
|
|
117
|
+
|
|
118
|
+
- **Start simple** - Begin with a minimal working example and add complexity gradually
|
|
119
|
+
- **Document thoroughly** - Include detailed comments and comprehensive README
|
|
120
|
+
- **Test extensively** - Verify your template works across different environments
|
|
121
|
+
- **Seek feedback** - Share with the community for early feedback before submission
|
|
122
|
+
|
|
123
|
+
### Community Engagement
|
|
124
|
+
|
|
125
|
+
- **Join Discord** - Participate in the [Mastra Discord community](https://discord.gg/BTYqqHKUrf)
|
|
126
|
+
- **Share progress** - Update the community on your template development
|
|
127
|
+
- **Help others** - Assist other contributors with their templates
|
|
128
|
+
- **Stay updated** - Keep track of new Mastra features and conventions
|
|
129
|
+
|
|
130
|
+
## Template Maintenance
|
|
131
|
+
|
|
132
|
+
### Ongoing Responsibilities
|
|
133
|
+
|
|
134
|
+
As a template contributor, you may be asked to:
|
|
135
|
+
|
|
136
|
+
- **Update dependencies** - Keep templates current with latest Mastra versions
|
|
137
|
+
- **Fix issues** - Address bugs or compatibility problems
|
|
138
|
+
- **Improve documentation** - Enhance instructions based on user feedback
|
|
139
|
+
- **Add features** - Extend templates with new capabilities
|
|
140
|
+
|
|
141
|
+
### Community Support
|
|
142
|
+
|
|
143
|
+
The Mastra team and community provide:
|
|
144
|
+
|
|
145
|
+
- **Technical guidance** - Help with complex implementation challenges
|
|
146
|
+
- **Review feedback** - Detailed feedback to improve template quality
|
|
147
|
+
- **Promotion** - Showcase approved templates to the community
|
|
148
|
+
- **Maintenance assistance** - Support for keeping templates up-to-date
|
|
149
|
+
|
|
150
|
+
## Validation Checklist
|
|
151
|
+
|
|
152
|
+
Before submitting a template, verify:
|
|
153
|
+
|
|
154
|
+
- [ ] All code organized in `src/mastra/` directory
|
|
155
|
+
- [ ] Uses standard Mastra TypeScript configuration
|
|
156
|
+
- [ ] Includes comprehensive `.env.example`
|
|
157
|
+
- [ ] Has detailed README with setup instructions
|
|
158
|
+
- [ ] No monorepo or web framework boilerplate
|
|
159
|
+
- [ ] Successfully runs after fresh install and environment setup
|
|
160
|
+
- [ ] Follows all code quality standards
|
|
161
|
+
- [ ] Demonstrates clear, valuable use case
|
|
162
|
+
|
|
163
|
+
## Community Showcase
|
|
164
|
+
|
|
165
|
+
### Template Gallery
|
|
166
|
+
|
|
167
|
+
Approved templates will be featured in:
|
|
168
|
+
|
|
169
|
+
- **mastra.ai/templates** - Community template gallery (coming soon)
|
|
170
|
+
- **Documentation** - Referenced in relevant documentation sections
|
|
171
|
+
- **Community highlights** - Featured in newsletters and community updates
|
|
172
|
+
|
|
173
|
+
### Recognition
|
|
174
|
+
|
|
175
|
+
Template contributors receive:
|
|
176
|
+
|
|
177
|
+
- **Attribution** - Your name and contact information with the template
|
|
178
|
+
- **Community recognition** - Acknowledgment in community channels
|
|
179
|
+
|
|
180
|
+
## Getting Started
|
|
181
|
+
|
|
182
|
+
Ready to contribute a template?
|
|
183
|
+
|
|
184
|
+
1. **Explore existing templates** - Review current templates for inspiration and patterns
|
|
185
|
+
2. **Plan your template** - Define the use case and value proposition
|
|
186
|
+
3. **Follow the requirements** - Ensure compliance with all technical requirements
|
|
187
|
+
4. **Build and test** - Create a working, well-documented template
|
|
188
|
+
5. **Submit for review** - Use the contribution form to submit your template
|
|
189
|
+
|
|
190
|
+
<Callout type="info">
|
|
191
|
+
Your contributions help grow the Mastra ecosystem and provide valuable resources for the entire community. We look forward to seeing your innovative templates!
|
|
192
|
+
</Callout>
|
|
@@ -68,6 +68,22 @@ You can also run the Mastra CLI in non-interactive mode by passing all required
|
|
|
68
68
|
npx create-mastra@latest --project-name hello-mastra --example --components tools,agents,workflows --llm openai
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
**Install with a template**
|
|
72
|
+
|
|
73
|
+
Start with a pre-built template that demonstrates specific use cases:
|
|
74
|
+
|
|
75
|
+
```bash copy
|
|
76
|
+
npx create-mastra@latest --template template-name
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
For example, to create a text-to-SQL application:
|
|
80
|
+
|
|
81
|
+
```bash copy
|
|
82
|
+
npx create-mastra@latest --template text-to-sql
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
> Browse available templates and learn more in [Templates](/docs/getting-started/templates).
|
|
86
|
+
|
|
71
87
|
> See the [create-mastra](/reference/cli/create-mastra) documentation for a full list of available CLI options.
|
|
72
88
|
|
|
73
89
|
### Add your API key
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Templates | Getting Started | Mastra Docs"
|
|
3
|
+
description: Pre-built project structures that demonstrate common Mastra use cases and patterns
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { Callout } from "nextra/components";
|
|
7
|
+
import { Tabs, Tab } from "@/components/tabs";
|
|
8
|
+
|
|
9
|
+
# Templates
|
|
10
|
+
|
|
11
|
+
Templates are pre-built Mastra projects that demonstrate specific use cases and patterns. They provide working examples you can run immediately and customize for your needs.
|
|
12
|
+
|
|
13
|
+
## What Templates Offer
|
|
14
|
+
|
|
15
|
+
Templates include:
|
|
16
|
+
|
|
17
|
+
- **Complete working examples** - Functional code demonstrating specific patterns
|
|
18
|
+
- **Best practices** - Proper project structure and Mastra conventions
|
|
19
|
+
- **Educational value** - Learn different Mastra features through examples
|
|
20
|
+
- **Quick start** - Bootstrap projects faster than starting from scratch
|
|
21
|
+
|
|
22
|
+
## Using Templates
|
|
23
|
+
|
|
24
|
+
Install a template using the `create-mastra` command:
|
|
25
|
+
|
|
26
|
+
<Tabs items={["npx", "npm", "yarn", "pnpm", "bun"]}>
|
|
27
|
+
<Tab>
|
|
28
|
+
```bash copy
|
|
29
|
+
npx create-mastra@latest --template template-name
|
|
30
|
+
```
|
|
31
|
+
</Tab>
|
|
32
|
+
<Tab>
|
|
33
|
+
```bash copy
|
|
34
|
+
npm create mastra@latest --template template-name
|
|
35
|
+
```
|
|
36
|
+
</Tab>
|
|
37
|
+
<Tab>
|
|
38
|
+
```bash copy
|
|
39
|
+
yarn create mastra@latest --template template-name
|
|
40
|
+
```
|
|
41
|
+
</Tab>
|
|
42
|
+
<Tab>
|
|
43
|
+
```bash copy
|
|
44
|
+
pnpm create mastra@latest --template template-name
|
|
45
|
+
```
|
|
46
|
+
</Tab>
|
|
47
|
+
<Tab>
|
|
48
|
+
```bash copy
|
|
49
|
+
bun create mastra@latest --template template-name
|
|
50
|
+
```
|
|
51
|
+
</Tab>
|
|
52
|
+
</Tabs>
|
|
53
|
+
|
|
54
|
+
For example, to create a text-to-SQL application:
|
|
55
|
+
|
|
56
|
+
```bash copy
|
|
57
|
+
npx create-mastra@latest --template text-to-sql
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Setting Up a Template
|
|
61
|
+
|
|
62
|
+
After installation:
|
|
63
|
+
|
|
64
|
+
1. **Navigate to your project**:
|
|
65
|
+
```bash copy
|
|
66
|
+
cd your-project-name
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
2. **Configure environment variables**:
|
|
70
|
+
```bash copy
|
|
71
|
+
cp .env.example .env
|
|
72
|
+
```
|
|
73
|
+
Edit `.env` with your API keys as specified in the template's README.
|
|
74
|
+
|
|
75
|
+
3. **Start development**:
|
|
76
|
+
```bash copy
|
|
77
|
+
npm run dev
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
<Callout type="info">
|
|
81
|
+
Each template includes a comprehensive README with specific setup instructions and usage examples.
|
|
82
|
+
</Callout>
|
|
83
|
+
|
|
84
|
+
## Available Templates
|
|
85
|
+
|
|
86
|
+
Browse available templates in the [templates directory](https://github.com/mastra-ai/mastra/tree/main/templates) on GitHub.
|
|
87
|
+
|
|
88
|
+
## Next Steps
|
|
89
|
+
|
|
90
|
+
- **Explore code** - Understand how templates implement functionality
|
|
91
|
+
- **Customize** - Modify agents, tools, and workflows for your use case
|
|
92
|
+
- **Learn patterns** - Study templates to understand Mastra best practices
|
|
93
|
+
- **Contribute** - Create your own templates for the community
|
|
94
|
+
|
|
95
|
+
For detailed information on creating templates, see the [Templates Reference](/reference/templates).
|
|
@@ -16,16 +16,27 @@ The `messages` parameter can be:
|
|
|
16
16
|
- A single string
|
|
17
17
|
- An array of strings
|
|
18
18
|
- An array of message objects with `role` and `content` properties
|
|
19
|
+
- An array of `UIMessageWithMetadata` objects (for messages with metadata)
|
|
19
20
|
|
|
20
|
-
The message object
|
|
21
|
+
The message object structures:
|
|
21
22
|
|
|
22
23
|
```typescript
|
|
23
24
|
interface Message {
|
|
24
25
|
role: "system" | "user" | "assistant";
|
|
25
26
|
content: string;
|
|
26
27
|
}
|
|
28
|
+
|
|
29
|
+
// For messages with metadata
|
|
30
|
+
interface UIMessageWithMetadata {
|
|
31
|
+
role: "user" | "assistant";
|
|
32
|
+
content: string;
|
|
33
|
+
parts: Array<{ type: string; text?: string; [key: string]: any }>;
|
|
34
|
+
metadata?: Record<string, unknown>; // Optional metadata field
|
|
35
|
+
}
|
|
27
36
|
```
|
|
28
37
|
|
|
38
|
+
When using `UIMessageWithMetadata`, the metadata will be preserved throughout the conversation and stored with the messages in memory.
|
|
39
|
+
|
|
29
40
|
### `options` (Optional)
|
|
30
41
|
|
|
31
42
|
An optional object that can include configuration for output structure, memory management, tool usage, telemetry, and more.
|
|
@@ -175,6 +186,12 @@ An optional object that can include configuration for output structure, memory m
|
|
|
175
186
|
description:
|
|
176
187
|
"Tools that are executed on the 'client' side of the request. These tools do not have execute functions in the definition.",
|
|
177
188
|
},
|
|
189
|
+
{
|
|
190
|
+
name: "savePerStep",
|
|
191
|
+
type: "boolean",
|
|
192
|
+
isOptional: true,
|
|
193
|
+
description: "Save messages incrementally after each stream step completes (default: false).",
|
|
194
|
+
}
|
|
178
195
|
]}
|
|
179
196
|
/>
|
|
180
197
|
|