@mastra/mcp-docs-server 0.13.14-alpha.1 → 0.13.14-alpha.3

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.
Files changed (31) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +21 -21
  2. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +15 -15
  3. package/.docs/organized/changelogs/%40mastra%2Fcore.md +14 -14
  4. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +19 -0
  5. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +23 -23
  6. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +13 -13
  7. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +9 -9
  8. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +23 -23
  9. package/.docs/organized/changelogs/%40mastra%2Fevals.md +12 -12
  10. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +10 -10
  11. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +16 -16
  12. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +13 -13
  13. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +13 -13
  14. package/.docs/organized/changelogs/%40mastra%2Frag.md +13 -13
  15. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
  16. package/.docs/organized/changelogs/%40mastra%2Fserver.md +19 -19
  17. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +12 -12
  18. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +13 -13
  19. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +13 -13
  20. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +11 -0
  21. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +12 -12
  22. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +12 -12
  23. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +13 -13
  24. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +12 -12
  25. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +12 -12
  26. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +12 -12
  27. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +13 -13
  28. package/.docs/organized/changelogs/create-mastra.md +3 -3
  29. package/.docs/organized/changelogs/mastra.md +10 -10
  30. package/.docs/organized/code-examples/heads-up-game.md +276 -0
  31. package/package.json +5 -5
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-elevenlabs
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -287,16 +298,5 @@
287
298
  - Updated dependencies [b3a3d63]
288
299
  - Updated dependencies [344f453]
289
300
  - Updated dependencies [0a3ae6d]
290
- - Updated dependencies [95911be]
291
- - Updated dependencies [f53a6ac]
292
- - Updated dependencies [5eb5a99]
293
- - Updated dependencies [7e632c5]
294
- - Updated dependencies [1e9fbfa]
295
- - Updated dependencies [eabdcd9]
296
- - Updated dependencies [90be034]
297
- - Updated dependencies [99f050a]
298
- - Updated dependencies [d0ee3c6]
299
- - Updated dependencies [b2ae5aa]
300
- - Updated dependencies [23f258c]
301
-
302
- ... 1112 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 1123 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-gladia
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.4-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-google
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -287,16 +298,5 @@
287
298
  - Updated dependencies [c5bf1ce]
288
299
  - Updated dependencies [add596e]
289
300
  - Updated dependencies [8dc94d8]
290
- - Updated dependencies [ecebbeb]
291
- - Updated dependencies [79d5145]
292
- - Updated dependencies [12b7002]
293
- - Updated dependencies [2901125]
294
- - @mastra/core@0.10.2
295
-
296
- ## 0.10.1-alpha.0
297
-
298
- ### Patch Changes
299
-
300
- - f0d559f: Fix peerdeps for alpha channel
301
301
 
302
- ... 1138 more lines hidden. See full changelog in package directory.
302
+ ... 1149 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-murf
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.10-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -288,15 +299,4 @@
288
299
 
289
300
  ## 0.10.0
290
301
 
291
- ### Minor Changes
292
-
293
- - 83da932: Move @mastra/core to peerdeps
294
-
295
- ### Patch Changes
296
-
297
- - Updated dependencies [b3a3d63]
298
- - Updated dependencies [344f453]
299
- - Updated dependencies [0a3ae6d]
300
- - Updated dependencies [95911be]
301
-
302
- ... 1130 more lines hidden. See full changelog in package directory.
302
+ ... 1141 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-openai-realtime
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -287,16 +298,5 @@
287
298
  - Updated dependencies [ab5adbe]
288
299
  - Updated dependencies [1e8bb40]
289
300
  - Updated dependencies [1b5fc55]
290
- - Updated dependencies [195c428]
291
- - Updated dependencies [f73e11b]
292
- - Updated dependencies [37643b8]
293
- - Updated dependencies [99fd6cf]
294
- - Updated dependencies [c5bf1ce]
295
- - Updated dependencies [add596e]
296
- - Updated dependencies [8dc94d8]
297
- - Updated dependencies [ecebbeb]
298
- - Updated dependencies [79d5145]
299
- - Updated dependencies [12b7002]
300
- - Updated dependencies [2901125]
301
-
302
- ... 840 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 851 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-openai
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.10-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -287,16 +298,5 @@
287
298
  - Updated dependencies [d1ed912]
288
299
  - Updated dependencies [f1f1f1b]
289
300
  - Updated dependencies [f9816ae]
290
- - Updated dependencies [82090c1]
291
- - Updated dependencies [1b443fd]
292
- - Updated dependencies [ce97900]
293
- - Updated dependencies [14a2566]
294
- - @mastra/core@0.10.4-alpha.0
295
-
296
- ## 0.10.1
297
-
298
- ### Patch Changes
299
-
300
- - f0d559f: Fix peerdeps for alpha channel
301
301
 
302
- ... 1160 more lines hidden. See full changelog in package directory.
302
+ ... 1171 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-playai
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -288,15 +299,4 @@
288
299
 
289
300
  ## 0.2.0-alpha.1
290
301
 
291
- ### Minor Changes
292
-
293
- - 83da932: Move @mastra/core to peerdeps
294
-
295
- ### Patch Changes
296
-
297
- - Updated dependencies [b3a3d63]
298
- - Updated dependencies [344f453]
299
- - Updated dependencies [0a3ae6d]
300
- - Updated dependencies [95911be]
301
-
302
- ... 1100 more lines hidden. See full changelog in package directory.
302
+ ... 1111 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-sarvam
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -288,15 +299,4 @@
288
299
 
289
300
  ## 0.2.0-alpha.1
290
301
 
291
- ### Minor Changes
292
-
293
- - 83da932: Move @mastra/core to peerdeps
294
-
295
- ### Patch Changes
296
-
297
- - Updated dependencies [b3a3d63]
298
- - Updated dependencies [344f453]
299
- - Updated dependencies [0a3ae6d]
300
- - Updated dependencies [95911be]
301
-
302
- ... 750 more lines hidden. See full changelog in package directory.
302
+ ... 761 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,16 @@
1
1
  # @mastra/voice-speechify
2
2
 
3
+ ## 0.11.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mastra/core@0.15.0-alpha.3
13
+
3
14
  ## 0.10.9-alpha.0
4
15
 
5
16
  ### Patch Changes
@@ -287,16 +298,5 @@
287
298
  - Updated dependencies [b3a3d63]
288
299
  - Updated dependencies [344f453]
289
300
  - Updated dependencies [0a3ae6d]
290
- - Updated dependencies [95911be]
291
- - Updated dependencies [f53a6ac]
292
- - Updated dependencies [5eb5a99]
293
- - Updated dependencies [7e632c5]
294
- - Updated dependencies [1e9fbfa]
295
- - Updated dependencies [eabdcd9]
296
- - Updated dependencies [90be034]
297
- - Updated dependencies [99f050a]
298
- - Updated dependencies [d0ee3c6]
299
- - Updated dependencies [b2ae5aa]
300
- - Updated dependencies [23f258c]
301
-
302
- ... 1104 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 1115 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,7 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.10.24-alpha.2
4
+
3
5
  ## 0.10.24-alpha.1
4
6
 
5
7
  ## 0.10.24-alpha.0
@@ -296,7 +298,5 @@
296
298
  - 976a62b: remove persistence capabilities in model settings components
297
299
  - 4e809ad: Visualizations for .sleep()/.sleepUntil()/.waitForEvent()
298
300
  - f78f399: Make AgentModelSettings shareable between cloud and playground
299
- - 57929df: agent network display
300
-
301
301
 
302
- ... 1242 more lines hidden. See full changelog in package directory.
302
+ ... 1244 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,14 @@
1
1
  # mastra
2
2
 
3
+ ## 0.10.24-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec)]:
8
+ - @mastra/deployer@0.15.0-alpha.3
9
+ - @mastra/mcp@0.11.0-alpha.2
10
+ - @mastra/core@0.15.0-alpha.3
11
+
3
12
  ## 0.10.24-alpha.1
4
13
 
5
14
  ### Patch Changes
@@ -290,13 +299,4 @@
290
299
 
291
300
  ### Patch Changes
292
301
 
293
- - ea0c5f2: Update to support new scorer api
294
- - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
295
- - 35c5798: Add support for transpilePackages option
296
- - Updated dependencies [cb36de0]
297
- - Updated dependencies [d0496e6]
298
- - Updated dependencies [7b8172f]
299
- - Updated dependencies [cb36de0]
300
- - Updated dependencies [d0496e6]
301
-
302
- ... 5075 more lines hidden. See full changelog in package directory.
302
+ ... 5084 more lines hidden. See full changelog in package directory.
@@ -0,0 +1,276 @@
1
+ ### package.json
2
+ ```json
3
+ {
4
+ "name": "example-headsup",
5
+ "engines": {
6
+ "node": ">=20.9.0"
7
+ },
8
+ "dependencies": {
9
+ "@ai-sdk/openai": "^1.3.23",
10
+ "@mastra/core": "^0.14.1",
11
+ "@mastra/libsql": "^0.13.4",
12
+ "@mastra/loggers": "^0.10.7",
13
+ "@mastra/memory": "^0.13.1",
14
+ "zod": "^3.25.76"
15
+ },
16
+ "devDependencies": {
17
+ "@types/node": "^24.3.0",
18
+ "mastra": "^0.10.23",
19
+ "typescript": "^5.9.2"
20
+ }
21
+ }
22
+ ```
23
+
24
+ ### mastra/agents/example-famous-person-agent.ts
25
+ ```typescript
26
+ import { openai } from '@ai-sdk/openai';
27
+ import { Agent } from '@mastra/core/agent';
28
+ import { Memory } from '@mastra/memory';
29
+ import { LibSQLVector } from '@mastra/libsql';
30
+
31
+ export const famousPersonAgent = new Agent({
32
+ name: 'Famous Person Generator',
33
+ instructions: `You are a famous person generator for a "Heads Up" guessing game.
34
+
35
+ Generate the name of a well-known famous person who:
36
+ - Is recognizable to most people
37
+ - Has distinctive characteristics that can be described with yes/no questions
38
+ - Is appropriate for all audiences
39
+ - Has a clear, unambiguous name
40
+
41
+ IMPORTANT: Use your memory to check what famous people you've already suggested and NEVER repeat a person you've already suggested.
42
+
43
+ Examples: Albert Einstein, Beyoncé, Leonardo da Vinci, Oprah Winfrey, Michael Jordan
44
+
45
+ Return only the person's name, nothing else.`,
46
+ model: openai('gpt-4o'),
47
+ memory: new Memory({
48
+ vector: new LibSQLVector({
49
+ connectionUrl: 'file:../mastra.db',
50
+ }),
51
+ embedder: openai.embedding('text-embedding-3-small'),
52
+ options: {
53
+ lastMessages: 5,
54
+ semanticRecall: {
55
+ topK: 10,
56
+ messageRange: 1,
57
+ },
58
+ },
59
+ }),
60
+ });
61
+
62
+ ```
63
+
64
+ ### mastra/agents/example-game-agent.ts
65
+ ```typescript
66
+ import { openai } from '@ai-sdk/openai';
67
+ import { Agent } from '@mastra/core/agent';
68
+
69
+ export const gameAgent = new Agent({
70
+ name: 'Game Agent',
71
+ instructions: `You are a helpful game assistant for a "Heads Up" guessing game.
72
+
73
+ CRITICAL: You know the famous person's name but you must NEVER reveal it in any response.
74
+
75
+ When a user asks a question about the famous person:
76
+ - Answer truthfully based on the famous person provided
77
+ - Keep responses concise and friendly
78
+ - NEVER mention the person's name, even if it seems natural
79
+ - NEVER reveal gender, nationality, or other characteristics unless specifically asked about them
80
+ - Answer yes/no questions with clear "Yes" or "No" responses
81
+ - Be consistent - same question asked differently should get the same answer
82
+ - Ask for clarification if a question is unclear
83
+ - If multiple questions are asked at once, ask them to ask one at a time
84
+
85
+ When they make a guess:
86
+ - If correct: Congratulate them warmly
87
+ - If incorrect: Politely correct them and encourage them to try again
88
+
89
+ Encourage players to make a guess when they seem to have enough information.
90
+
91
+ You must return a JSON object with:
92
+ - response: Your response to the user
93
+ - gameWon: true if they guessed correctly, false otherwise`,
94
+ model: openai('gpt-4o'),
95
+ });
96
+
97
+ ```
98
+
99
+ ### mastra/index.ts
100
+ ```typescript
101
+ import { Mastra } from '@mastra/core/mastra';
102
+ import { PinoLogger } from '@mastra/loggers';
103
+ import { LibSQLStore } from '@mastra/libsql';
104
+ import { headsUpWorkflow } from './workflows/example-heads-up-workflow';
105
+
106
+ import { famousPersonAgent } from './agents/example-famous-person-agent';
107
+ import { gameAgent } from './agents/example-game-agent';
108
+ import { guessVerifierAgent } from './agents/example-guess-verifier-agent';
109
+
110
+ export const mastra = new Mastra({
111
+ workflows: { headsUpWorkflow },
112
+ agents: { famousPersonAgent, gameAgent, guessVerifierAgent },
113
+ storage: new LibSQLStore({
114
+ // stores telemetry, evals, ... into file storage for persistence across playground refreshes
115
+ url: 'file:../mastra.db',
116
+ }),
117
+ logger: new PinoLogger({
118
+ name: 'Mastra',
119
+ level: 'info',
120
+ }),
121
+ });
122
+
123
+ ```
124
+
125
+ ### mastra/workflows/example-heads-up-workflow.ts
126
+ ```typescript
127
+ import { createWorkflow, createStep } from '@mastra/core/workflows';
128
+ import { z } from 'zod';
129
+ import { Pool } from 'pg';
130
+
131
+ // PostgreSQL client
132
+ const pool = new Pool({
133
+ connectionString: process.env.DATABASE_URL!,
134
+ });
135
+
136
+ const startStep = createStep({
137
+ id: 'start-step',
138
+ description: "Generate a famous person's name",
139
+ inputSchema: z.object({
140
+ start: z.boolean(),
141
+ }),
142
+ outputSchema: z.object({
143
+ famousPerson: z.string(),
144
+ guessCount: z.number(),
145
+ }),
146
+ execute: async ({ mastra }) => {
147
+ const agent = mastra.getAgent('famousPersonAgent');
148
+ const response = await agent.generate("Generate a famous person's name", {
149
+ temperature: 1.2,
150
+ topP: 0.9,
151
+ memory: {
152
+ resource: 'heads-up-game',
153
+ thread: 'famous-person-generator',
154
+ },
155
+ });
156
+ const famousPerson = response.text.trim();
157
+ return { famousPerson, guessCount: 0 };
158
+ },
159
+ });
160
+
161
+ const gameStep = createStep({
162
+ id: 'game-step',
163
+ description: 'Handles the question-answer-continue loop',
164
+ inputSchema: z.object({
165
+ famousPerson: z.string(),
166
+ guessCount: z.number(),
167
+ }),
168
+ resumeSchema: z.object({
169
+ userMessage: z.string(),
170
+ }),
171
+ suspendSchema: z.object({
172
+ agentResponse: z.string(),
173
+ }),
174
+ outputSchema: z.object({
175
+ famousPerson: z.string(),
176
+ gameWon: z.boolean(),
177
+ agentResponse: z.string(),
178
+ guessCount: z.number(),
179
+ }),
180
+ execute: async ({ inputData, mastra, resumeData, suspend }) => {
181
+ let { famousPerson, guessCount } = inputData;
182
+ const { userMessage } = resumeData ?? {};
183
+
184
+ if (!userMessage) {
185
+ // First time - ask for a question
186
+ const message = "I'm thinking of a famous person. Ask me yes/no questions to figure out who it is!";
187
+
188
+ await suspend({
189
+ agentResponse: message,
190
+ });
191
+
192
+ return { famousPerson, gameWon: false, agentResponse: message, guessCount };
193
+ } else {
194
+ // Check if the user's message is a guess by using the guess verifier agent
195
+ const guessVerifier = mastra.getAgent('guessVerifierAgent');
196
+ const verificationResponse = await guessVerifier.generate(
197
+ [
198
+ {
199
+ role: 'user',
200
+ content: `Actual famous person: ${famousPerson}
201
+ User's guess: "${userMessage}"
202
+ Is this correct?`,
203
+ },
204
+ ],
205
+ {
206
+ output: z.object({
207
+ isCorrect: z.boolean(),
208
+ }),
209
+ },
210
+ );
211
+
212
+ const gameWon = verificationResponse.object.isCorrect;
213
+
214
+ // Let the agent handle the user's message (question or guess)
215
+ const agent = mastra.getAgent('gameAgent');
216
+ const response = await agent.generate(`
217
+ The famous person is: ${famousPerson}
218
+ The user asked: "${userMessage}"
219
+ Is this a correct guess: ${gameWon}
220
+ Please respond appropriately.
221
+ `);
222
+
223
+ const agentResponse = response.text;
224
+
225
+ // Increment the guess count
226
+ guessCount++;
227
+
228
+ return { famousPerson, gameWon, agentResponse, guessCount };
229
+ }
230
+ },
231
+ });
232
+
233
+ const winStep = createStep({
234
+ id: 'win-step',
235
+ description: 'Handle game win logic',
236
+ inputSchema: z.object({
237
+ famousPerson: z.string(),
238
+ gameWon: z.boolean(),
239
+ agentResponse: z.string(),
240
+ guessCount: z.number(),
241
+ }),
242
+ outputSchema: z.object({
243
+ famousPerson: z.string(),
244
+ gameWon: z.boolean(),
245
+ guessCount: z.number(),
246
+ }),
247
+ execute: async ({ inputData }) => {
248
+ const { famousPerson, gameWon, guessCount } = inputData;
249
+
250
+ await pool.query('INSERT INTO heads_up_games (famous_person, game_won, guess_count) VALUES ($1, $2, $3)', [
251
+ famousPerson,
252
+ gameWon,
253
+ guessCount,
254
+ ]);
255
+
256
+ return { famousPerson, gameWon, guessCount };
257
+ },
258
+ });
259
+
260
+ export const headsUpWorkflow = createWorkflow({
261
+ id: 'heads-up-workflow',
262
+ inputSchema: z.object({
263
+ start: z.boolean(),
264
+ }),
265
+ outputSchema: z.object({
266
+ famousPerson: z.string(),
267
+ gameWon: z.boolean(),
268
+ guessCount: z.number(),
269
+ }),
270
+ })
271
+ .then(startStep)
272
+ .dountil(gameStep, async ({ inputData: { gameWon } }) => gameWon)
273
+ .then(winStep)
274
+ .commit();
275
+
276
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.14-alpha.1",
3
+ "version": "0.13.14-alpha.3",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,8 +32,8 @@
32
32
  "uuid": "^11.1.0",
33
33
  "zod": "^3.25.67",
34
34
  "zod-to-json-schema": "^3.24.5",
35
- "@mastra/core": "0.14.2-alpha.1",
36
- "@mastra/mcp": "^0.10.13-alpha.1"
35
+ "@mastra/core": "0.15.0-alpha.3",
36
+ "@mastra/mcp": "^0.11.0-alpha.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@hono/node-server": "^1.17.1",
@@ -48,8 +48,8 @@
48
48
  "tsx": "^4.19.4",
49
49
  "typescript": "^5.8.3",
50
50
  "vitest": "^3.2.4",
51
- "@mastra/core": "0.14.2-alpha.1",
52
- "@internal/lint": "0.0.31"
51
+ "@internal/lint": "0.0.31",
52
+ "@mastra/core": "0.15.0-alpha.3"
53
53
  },
54
54
  "scripts": {
55
55
  "prepare-docs": "cross-env PREPARE=true node dist/prepare-docs/prepare.js",