@mastra/mcp-docs-server 0.13.44 → 0.13.45-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.
Files changed (95) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
  2. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
  3. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +253 -53
  4. package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
  5. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
  6. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
  7. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
  8. package/.docs/organized/changelogs/%40mastra%2Fcloud.md +201 -1
  9. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
  10. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
  11. package/.docs/organized/changelogs/%40mastra%2Fcore.md +307 -107
  12. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
  13. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
  14. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
  15. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
  16. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
  17. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
  18. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
  19. package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
  20. package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
  21. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
  22. package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
  23. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
  24. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
  25. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
  26. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
  27. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
  28. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
  29. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
  30. package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
  31. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
  32. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
  33. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
  34. package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
  35. package/.docs/organized/changelogs/%40mastra%2Freact.md +182 -1
  36. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +36 -0
  37. package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
  38. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
  39. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
  40. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
  41. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
  42. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
  43. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +104 -1
  46. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +49 -1
  47. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
  54. package/.docs/organized/changelogs/create-mastra.md +201 -1
  55. package/.docs/organized/changelogs/mastra.md +201 -1
  56. package/.docs/raw/agents/adding-voice.mdx +49 -0
  57. package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
  58. package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
  59. package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
  60. package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
  61. package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
  62. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +23 -1
  63. package/.docs/raw/reference/client-js/memory.mdx +43 -0
  64. package/.docs/raw/reference/core/mastra-class.mdx +8 -0
  65. package/.docs/raw/reference/core/mastra-model-gateway.mdx +223 -0
  66. package/.docs/raw/reference/scorers/answer-relevancy.mdx +28 -98
  67. package/.docs/raw/reference/scorers/answer-similarity.mdx +12 -258
  68. package/.docs/raw/reference/scorers/bias.mdx +29 -87
  69. package/.docs/raw/reference/scorers/completeness.mdx +32 -91
  70. package/.docs/raw/reference/scorers/content-similarity.mdx +29 -99
  71. package/.docs/raw/reference/scorers/context-precision.mdx +28 -130
  72. package/.docs/raw/reference/scorers/faithfulness.mdx +28 -101
  73. package/.docs/raw/reference/scorers/hallucination.mdx +28 -103
  74. package/.docs/raw/reference/scorers/keyword-coverage.mdx +28 -107
  75. package/.docs/raw/reference/scorers/textual-difference.mdx +27 -100
  76. package/.docs/raw/reference/scorers/tone-consistency.mdx +25 -98
  77. package/.docs/raw/reference/scorers/toxicity.mdx +29 -92
  78. package/.docs/raw/reference/storage/cloudflare-d1.mdx +37 -0
  79. package/.docs/raw/reference/storage/lance.mdx +33 -0
  80. package/.docs/raw/reference/storage/libsql.mdx +37 -0
  81. package/.docs/raw/reference/storage/mongodb.mdx +39 -0
  82. package/.docs/raw/reference/storage/mssql.mdx +37 -0
  83. package/.docs/raw/reference/storage/postgresql.mdx +37 -0
  84. package/.docs/raw/reference/streaming/agents/stream.mdx +7 -0
  85. package/.docs/raw/reference/voice/composite-voice.mdx +71 -28
  86. package/.docs/raw/reference/voice/voice.listen.mdx +86 -52
  87. package/.docs/raw/reference/voice/voice.speak.mdx +75 -40
  88. package/.docs/raw/voice/overview.mdx +67 -0
  89. package/.docs/raw/workflows/control-flow.mdx +180 -0
  90. package/CHANGELOG.md +10 -0
  91. package/dist/{chunk-TUAHUTTB.js → chunk-VE65X75W.js} +24 -4
  92. package/dist/prepare-docs/package-changes.d.ts.map +1 -1
  93. package/dist/prepare-docs/prepare.js +1 -1
  94. package/dist/stdio.js +1 -1
  95. package/package.json +5 -5
@@ -898,6 +898,30 @@ const voice = new GeminiLiveVoice({
898
898
  Visit the [Google Gemini Live Reference](/reference/voice/google-gemini-live) for more information on the Google Gemini Live voice provider.
899
899
 
900
900
  </TabItem>
901
+ <TabItem value="aisdk" label="AI SDK">
902
+
903
+ ```typescript
904
+ // AI SDK Voice Configuration
905
+ import { CompositeVoice } from "@mastra/core/voice";
906
+ import { openai } from "@ai-sdk/openai";
907
+ import { elevenlabs } from "@ai-sdk/elevenlabs";
908
+
909
+ // Use AI SDK models directly - no need to install separate packages
910
+ const voice = new CompositeVoice({
911
+ input: openai.transcription('whisper-1'), // AI SDK transcription
912
+ output: elevenlabs.speech('eleven_turbo_v2'), // AI SDK speech
913
+ });
914
+
915
+ // Works seamlessly with your agent
916
+ const voiceAgent = new Agent({
917
+ id: "aisdk-voice-agent",
918
+ name: "AI SDK Voice Agent",
919
+ instructions: "You are a helpful assistant with voice capabilities.",
920
+ model: openai("gpt-4o"),
921
+ voice,
922
+ });
923
+ ```
924
+ </TabItem>
901
925
  </Tabs>
902
926
 
903
927
  ### Using Multiple Voice Providers
@@ -951,6 +975,49 @@ const responseAudio = await voice.speak(`You said: ${transcript}`, {
951
975
  playAudio(responseAudio);
952
976
  ```
953
977
 
978
+ ### Using AI SDK Model Providers
979
+
980
+ You can also use AI SDK models directly with `CompositeVoice`:
981
+
982
+ ```typescript
983
+ import { CompositeVoice } from "@mastra/core/voice";
984
+ import { openai } from "@ai-sdk/openai";
985
+ import { elevenlabs } from "@ai-sdk/elevenlabs";
986
+ import { playAudio, getMicrophoneStream } from "@mastra/node-audio";
987
+
988
+ // Use AI SDK models directly - no provider setup needed
989
+ const voice = new CompositeVoice({
990
+ input: openai.transcription('whisper-1'), // AI SDK transcription
991
+ output: elevenlabs.speech('eleven_turbo_v2'), // AI SDK speech
992
+ });
993
+
994
+ // Works the same way as Mastra providers
995
+ const audioStream = getMicrophoneStream();
996
+ const transcript = await voice.listen(audioStream);
997
+
998
+ console.log("Transcribed text:", transcript);
999
+
1000
+ // Convert text to speech
1001
+ const responseAudio = await voice.speak(`You said: ${transcript}`, {
1002
+ speaker: "Rachel", // ElevenLabs voice
1003
+ });
1004
+
1005
+ playAudio(responseAudio);
1006
+ ```
1007
+
1008
+ You can also mix AI SDK models with Mastra providers:
1009
+
1010
+ ```typescript
1011
+ import { CompositeVoice } from "@mastra/core/voice";
1012
+ import { PlayAIVoice } from "@mastra/voice-playai";
1013
+ import { groq } from "@ai-sdk/groq";
1014
+
1015
+ const voice = new CompositeVoice({
1016
+ input: groq.transcription('whisper-large-v3'), // AI SDK for STT
1017
+ output: new PlayAIVoice(), // Mastra provider for TTS
1018
+ });
1019
+ ```
1020
+
954
1021
  For more information on the CompositeVoice, refer to the [CompositeVoice Reference](/reference/voice/composite-voice).
955
1022
 
956
1023
  ## More Resources
@@ -112,6 +112,70 @@ export const testWorkflow = createWorkflow({
112
112
 
113
113
  > 📹 Watch: How to run steps in parallel and optimize your Mastra workflow → [YouTube (3 minutes)](https://youtu.be/GQJxve5Hki4)
114
114
 
115
+ ### Output structure
116
+
117
+ When steps run in parallel, the output is an object where each key is the step's `id` and the value is that step's output. This allows you to access each parallel step's result independently.
118
+
119
+ ```typescript title="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
120
+ const step1 = createStep({
121
+ id: "format-step",
122
+ inputSchema: z.object({ message: z.string() }),
123
+ outputSchema: z.object({ formatted: z.string() }),
124
+ execute: async ({ inputData }) => ({
125
+ formatted: inputData.message.toUpperCase()
126
+ })
127
+ });
128
+
129
+ const step2 = createStep({
130
+ id: "count-step",
131
+ inputSchema: z.object({ message: z.string() }),
132
+ outputSchema: z.object({ count: z.number() }),
133
+ execute: async ({ inputData }) => ({
134
+ count: inputData.message.length
135
+ })
136
+ });
137
+
138
+ const step3 = createStep({
139
+ id: "combine-step",
140
+ // The inputSchema must match the structure of parallel outputs
141
+ inputSchema: z.object({
142
+ "format-step": z.object({ formatted: z.string() }),
143
+ "count-step": z.object({ count: z.number() })
144
+ }),
145
+ outputSchema: z.object({ result: z.string() }),
146
+ execute: async ({ inputData }) => {
147
+ // Access each parallel step's output by its id
148
+ const formatted = inputData["format-step"].formatted;
149
+ const count = inputData["count-step"].count;
150
+ return {
151
+ result: `${formatted} (${count} characters)`
152
+ };
153
+ }
154
+ });
155
+
156
+ export const testWorkflow = createWorkflow({
157
+ id: "parallel-output-example",
158
+ inputSchema: z.object({ message: z.string() }),
159
+ outputSchema: z.object({ result: z.string() })
160
+ })
161
+ .parallel([step1, step2])
162
+ .then(step3)
163
+ .commit();
164
+
165
+ // When executed with { message: "hello" }
166
+ // The parallel output structure will be:
167
+ // {
168
+ // "format-step": { formatted: "HELLO" },
169
+ // "count-step": { count: 5 }
170
+ // }
171
+ ```
172
+
173
+ **Key points:**
174
+ - Each parallel step's output is keyed by its `id`
175
+ - All parallel steps execute simultaneously
176
+ - The next step receives an object containing all parallel step outputs
177
+ - You must define the `inputSchema` of the following step to match this structure
178
+
115
179
  ## Conditional logic with `.branch()`
116
180
 
117
181
  Use `.branch()` to choose which step to run based on a condition. All steps in a branch need the same `inputSchema` and `outputSchema` because branching requires consistent schemas so workflows can follow different paths.
@@ -158,6 +222,85 @@ export const testWorkflow = createWorkflow({
158
222
  .commit();
159
223
  ```
160
224
 
225
+ ### Output structure
226
+
227
+ When using conditional branching, only one branch executes based on which condition evaluates to `true` first. The output structure is similar to `.parallel()`, where the result is keyed by the executed step's `id`.
228
+
229
+ ```typescript title="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
230
+ const step1 = createStep({
231
+ id: "initial-step",
232
+ inputSchema: z.object({ value: z.number() }),
233
+ outputSchema: z.object({ value: z.number() }),
234
+ execute: async ({ inputData }) => inputData
235
+ });
236
+
237
+ const highValueStep = createStep({
238
+ id: "high-value-step",
239
+ inputSchema: z.object({ value: z.number() }),
240
+ outputSchema: z.object({ result: z.string() }),
241
+ execute: async ({ inputData }) => ({
242
+ result: `High value: ${inputData.value}`
243
+ })
244
+ });
245
+
246
+ const lowValueStep = createStep({
247
+ id: "low-value-step",
248
+ inputSchema: z.object({ value: z.number() }),
249
+ outputSchema: z.object({ result: z.string() }),
250
+ execute: async ({ inputData }) => ({
251
+ result: `Low value: ${inputData.value}`
252
+ })
253
+ });
254
+
255
+ const finalStep = createStep({
256
+ id: "final-step",
257
+ // The inputSchema must account for either branch's output
258
+ inputSchema: z.object({
259
+ "high-value-step": z.object({ result: z.string() }).optional(),
260
+ "low-value-step": z.object({ result: z.string() }).optional()
261
+ }),
262
+ outputSchema: z.object({ message: z.string() }),
263
+ execute: async ({ inputData }) => {
264
+ // Only one branch will have executed
265
+ const result = inputData["high-value-step"]?.result ||
266
+ inputData["low-value-step"]?.result;
267
+ return { message: result };
268
+ }
269
+ });
270
+
271
+ export const testWorkflow = createWorkflow({
272
+ id: "branch-output-example",
273
+ inputSchema: z.object({ value: z.number() }),
274
+ outputSchema: z.object({ message: z.string() })
275
+ })
276
+ .then(step1)
277
+ .branch([
278
+ [async ({ inputData }) => inputData.value > 10, highValueStep],
279
+ [async ({ inputData }) => inputData.value <= 10, lowValueStep]
280
+ ])
281
+ .then(finalStep)
282
+ .commit();
283
+
284
+ // When executed with { value: 15 }
285
+ // Only the high-value-step executes, output structure:
286
+ // {
287
+ // "high-value-step": { result: "High value: 15" }
288
+ // }
289
+
290
+ // When executed with { value: 5 }
291
+ // Only the low-value-step executes, output structure:
292
+ // {
293
+ // "low-value-step": { result: "Low value: 5" }
294
+ // }
295
+ ```
296
+
297
+ **Key points:**
298
+ - Only one branch executes based on condition evaluation order
299
+ - The output is keyed by the executed step's `id`
300
+ - Subsequent steps should handle all possible branch outputs
301
+ - Use optional fields in the `inputSchema` when the next step needs to handle multiple possible branches
302
+ - Conditions are evaluated in the order they're defined
303
+
161
304
  ## Input data mapping
162
305
 
163
306
  When using `.then()`, `.parallel()`, or `.branch()`, it is sometimes necessary to transform the output of a previous step to match the input of the next. In these cases you can use `.map()` to access the `inputData` and transform it to create a suitable data shape for the next step.
@@ -188,6 +331,43 @@ The `.map()` method provides additional helper functions for more complex mappin
188
331
  - [`getInitData()`](/reference/workflows/workflow-methods/map#using-getinitdata): Access the workflow's initial input data
189
332
  - [`mapVariable()`](/reference/workflows/workflow-methods/map#using-mapvariable): Use declarative object syntax to extract and rename fields
190
333
 
334
+ ### Parallel and Branch outputs
335
+
336
+ When working with `.parallel()` or `.branch()` outputs, you can use `.map()` to transform the data structure before passing it to the next step. This is especially useful when you need to flatten or restructure the output.
337
+
338
+ ```typescript title="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
339
+ export const testWorkflow = createWorkflow({...})
340
+ .parallel([step1, step2])
341
+ .map(async ({ inputData }) => {
342
+ // Transform the parallel output structure
343
+ return {
344
+ combined: `${inputData["step1"].value} - ${inputData["step2"].value}`
345
+ };
346
+ })
347
+ .then(nextStep)
348
+ .commit();
349
+ ```
350
+
351
+ You can also use the helper functions provided by `.map()`:
352
+
353
+ ```typescript title="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
354
+ export const testWorkflow = createWorkflow({...})
355
+ .branch([
356
+ [condition1, stepA],
357
+ [condition2, stepB]
358
+ ])
359
+ .map(async ({ inputData, getStepResult }) => {
360
+ // Access specific step results
361
+ const stepAResult = getStepResult("stepA");
362
+ const stepBResult = getStepResult("stepB");
363
+
364
+ // Return the result from whichever branch executed
365
+ return stepAResult || stepBResult;
366
+ })
367
+ .then(nextStep)
368
+ .commit();
369
+ ```
370
+
191
371
  ## Looping steps
192
372
 
193
373
  Workflows support different looping methods that let you repeat steps until or while a condition is met, or iterate over arrays. Loops can be combined with other control methods like `.then()`.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.45-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Ensure changelog truncation includes at least 2 versions before cutting off ([#10576](https://github.com/mastra-ai/mastra/pull/10576))
8
+
9
+ - Updated dependencies [[`5657314`](https://github.com/mastra-ai/mastra/commit/5657314a1f9d49019bb53f357fa48f75a69247ca), [`e5aca78`](https://github.com/mastra-ai/mastra/commit/e5aca78bb7f263bb8b470bedae81efe9805d7544), [`33a607a`](https://github.com/mastra-ai/mastra/commit/33a607a1f716c2029d4a1ff1603dd756129a33b3), [`cc10fc1`](https://github.com/mastra-ai/mastra/commit/cc10fc192d9f527c71a23cc9def10d8718935ee1), [`1f7ee84`](https://github.com/mastra-ai/mastra/commit/1f7ee841a643ef12d90392125881f06fdf877293), [`e7d5149`](https://github.com/mastra-ai/mastra/commit/e7d514995260b63b2108308e85c64de37dcd0f71), [`f195082`](https://github.com/mastra-ai/mastra/commit/f1950822a2425d5ccae78c5d010e02ddb027a869), [`d9986dd`](https://github.com/mastra-ai/mastra/commit/d9986dd3513f7ca3244a8e599a440ccf4d8bc28b), [`a45b0f0`](https://github.com/mastra-ai/mastra/commit/a45b0f0cd19eab1fe4deceae3abf029442c22f74), [`f6e8eb3`](https://github.com/mastra-ai/mastra/commit/f6e8eb3dac53b70b06e906b2818b1d2a5b0486d7), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`3236f35`](https://github.com/mastra-ai/mastra/commit/3236f352ae13cc8552c2965164e97bd125dae48d), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`0230321`](https://github.com/mastra-ai/mastra/commit/02303217870bedea0ef009bea9a952f24ed38aaf), [`7b541f4`](https://github.com/mastra-ai/mastra/commit/7b541f49eda6f5a87b738198edbd136927599475), [`0eea842`](https://github.com/mastra-ai/mastra/commit/0eea8423cbdd37f2111593c6f7d2efcde4b7e4ce), [`8812fb8`](https://github.com/mastra-ai/mastra/commit/8812fb86ec16fa7096d92dbf82b4fd187b56fa61), [`63ae8a2`](https://github.com/mastra-ai/mastra/commit/63ae8a22c0c09bbb8b9779f5f38934cd75f616af), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`ac7ef07`](https://github.com/mastra-ai/mastra/commit/ac7ef07633caee89707142171d2873c888ffef85), [`522f0b4`](https://github.com/mastra-ai/mastra/commit/522f0b45330719858794eabffffde4f343f55549), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`8b51d55`](https://github.com/mastra-ai/mastra/commit/8b51d55bae531edf7e383958d7ecee04df31f5d5), [`2131ac5`](https://github.com/mastra-ai/mastra/commit/2131ac571d5065f0a656c57494bca98691bb7609)]:
10
+ - @mastra/core@0.24.6-alpha.0
11
+ - @mastra/mcp@0.14.4-alpha.0
12
+
3
13
  ## 0.13.44
4
14
 
5
15
  ### Patch Changes
@@ -271,15 +271,35 @@ var SOURCE_DIRS = ["packages", "speech", "stores", "voice", "integrations", "dep
271
271
  fromRepoRoot
272
272
  );
273
273
  var CHANGELOGS_DEST = fromPackageRoot(".docs/organized/changelogs");
274
- var MAX_LINES = 300;
274
+ var MAX_LINES = 500;
275
+ var MIN_VERSIONS = 2;
276
+ var VERSION_HEADER_REGEX = /^## \d+\.\d+\.\d+/;
275
277
  function truncateContent(content, maxLines) {
276
278
  const lines = content.split("\n");
277
279
  if (lines.length <= maxLines) return content;
278
- const visibleLines = lines.slice(0, maxLines);
279
- const hiddenCount = lines.length - maxLines;
280
- return visibleLines.join("\n") + `
280
+ const versionIndices = [];
281
+ for (let i = 0; i < lines.length; i++) {
282
+ if (VERSION_HEADER_REGEX.test(lines[i])) {
283
+ versionIndices.push(i);
284
+ }
285
+ }
286
+ const versionsInMaxLines = versionIndices.filter((idx) => idx < maxLines).length;
287
+ let cutoffLine;
288
+ if (versionsInMaxLines >= MIN_VERSIONS) {
289
+ cutoffLine = maxLines;
290
+ } else if (versionIndices.length > MIN_VERSIONS) {
291
+ cutoffLine = versionIndices[MIN_VERSIONS];
292
+ } else {
293
+ cutoffLine = lines.length;
294
+ }
295
+ const visibleLines = lines.slice(0, cutoffLine);
296
+ const hiddenCount = lines.length - cutoffLine;
297
+ if (hiddenCount > 0) {
298
+ return visibleLines.join("\n") + `
281
299
 
282
300
  ... ${hiddenCount} more lines hidden. See full changelog in package directory.`;
301
+ }
302
+ return visibleLines.join("\n");
283
303
  }
284
304
  async function processPackageDir(packagePath, outputDir) {
285
305
  let packageName;
@@ -1 +1 @@
1
- {"version":3,"file":"package-changes.d.ts","sourceRoot":"","sources":["../../src/prepare-docs/package-changes.ts"],"names":[],"mappings":"AA8DA;;GAEG;AACH,wBAAsB,qBAAqB,kBAmC1C"}
1
+ {"version":3,"file":"package-changes.d.ts","sourceRoot":"","sources":["../../src/prepare-docs/package-changes.ts"],"names":[],"mappings":"AAiGA;;GAEG;AACH,wBAAsB,qBAAqB,kBAmC1C"}
@@ -1 +1 @@
1
- export { prepare } from '../chunk-TUAHUTTB.js';
1
+ export { prepare } from '../chunk-VE65X75W.js';
package/dist/stdio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { fromPackageRoot, prepare, getMatchingPaths, blogPostSchema } from './chunk-TUAHUTTB.js';
2
+ import { fromPackageRoot, prepare, getMatchingPaths, blogPostSchema } from './chunk-VE65X75W.js';
3
3
  import * as fs from 'fs';
4
4
  import { existsSync, mkdirSync } from 'fs';
5
5
  import * as os2 from 'os';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.44",
3
+ "version": "0.13.45-alpha.0",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "uuid": "^11.1.0",
34
34
  "zod": "^3.25.76",
35
35
  "zod-to-json-schema": "^3.24.6",
36
- "@mastra/mcp": "^0.14.3",
37
- "@mastra/core": "0.24.5"
36
+ "@mastra/core": "0.24.6-alpha.0",
37
+ "@mastra/mcp": "^0.14.4-alpha.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hono/node-server": "^1.19.5",
@@ -49,8 +49,8 @@
49
49
  "tsx": "^4.19.4",
50
50
  "typescript": "^5.8.3",
51
51
  "vitest": "^3.2.4",
52
- "@mastra/core": "0.24.5",
53
- "@internal/lint": "0.0.63"
52
+ "@internal/lint": "0.0.63",
53
+ "@mastra/core": "0.24.6-alpha.0"
54
54
  },
55
55
  "homepage": "https://mastra.ai",
56
56
  "repository": {