@mastra/mcp-docs-server 0.13.22-alpha.6 → 0.13.22-alpha.8

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.
@@ -1,5 +1,19 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.13.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+
10
+ ## 0.13.0-alpha.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
15
+ - @mastra/core@0.17.0-alpha.7
16
+
3
17
  ## 0.13.0-alpha.6
4
18
 
5
19
  ### Minor Changes
@@ -284,19 +298,5 @@
284
298
  ### Patch Changes
285
299
 
286
300
  - Updated dependencies [[`4474d04`](https://github.com/mastra-ai/mastra/commit/4474d0489b1e152e0985c33a4f529207317d27b5), [`4106a58`](https://github.com/mastra-ai/mastra/commit/4106a58b15b4c0a060a4a9ccab52d119d00d8edb)]:
287
- - @mastra/core@0.15.3-alpha.8
288
-
289
- ## 0.11.3-alpha.7
290
-
291
- ### Patch Changes
292
-
293
- - Updated dependencies [[`7149d8d`](https://github.com/mastra-ai/mastra/commit/7149d8d4bdc1edf0008e0ca9b7925eb0b8b60dbe)]:
294
- - @mastra/core@0.15.3-alpha.7
295
-
296
- ## 0.11.3-alpha.6
297
-
298
- ### Patch Changes
299
-
300
- - Updated dependencies [[`c19bcf7`](https://github.com/mastra-ai/mastra/commit/c19bcf7b43542b02157b5e17303e519933a153ab), [`b42a961`](https://github.com/mastra-ai/mastra/commit/b42a961a5aefd19d6e938a7705fc0ecc90e8f756), [`45e4d39`](https://github.com/mastra-ai/mastra/commit/45e4d391a2a09fc70c48e4d60f505586ada1ba0e), [`0302f50`](https://github.com/mastra-ai/mastra/commit/0302f50861a53c66ff28801fc371b37c5f97e41e), [`74db265`](https://github.com/mastra-ai/mastra/commit/74db265b96aa01a72ffd91dcae0bc3b346cca0f2), [`7f3b8da`](https://github.com/mastra-ai/mastra/commit/7f3b8da6dd21c35d3672e44b4f5dd3502b8f8f92), [`905352b`](https://github.com/mastra-ai/mastra/commit/905352bcda134552400eb252bca1cb05a7975c14), [`f2cda47`](https://github.com/mastra-ai/mastra/commit/f2cda47ae911038c5d5489f54c36517d6f15bdcc), [`cfd377a`](https://github.com/mastra-ai/mastra/commit/cfd377a3a33a9c88b644f6540feed9cd9832db47)]:
301
301
 
302
- ... 2558 more lines hidden. See full changelog in package directory.
302
+ ... 2572 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 0.17.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Improve error message when using V1 model with streamVNext ([#7948](https://github.com/mastra-ai/mastra/pull/7948))
8
+
9
+ - Fix VNext generate/stream usage tokens. They used to be undefined, now we are receiving the proper values. ([#7901](https://github.com/mastra-ai/mastra/pull/7901))
10
+
11
+ ## 0.17.0-alpha.7
12
+
13
+ ### Patch Changes
14
+
15
+ - fix error message when fetching observability things ([#7956](https://github.com/mastra-ai/mastra/pull/7956))
16
+
3
17
  ## 0.17.0-alpha.6
4
18
 
5
19
  ### Minor Changes
@@ -284,19 +298,5 @@
284
298
 
285
299
  - Vnext output schema injection ([#6990](https://github.com/mastra-ai/mastra/pull/6990))
286
300
 
287
- - removed duplicate 'float' switch case ([#7516](https://github.com/mastra-ai/mastra/pull/7516))
288
-
289
- - Fix issue with response message id consistency between stream/generate response and the message ids saveed in the DB. Also fixed the custom generatorId implementation to work with this. ([#7606](https://github.com/mastra-ai/mastra/pull/7606))
290
-
291
- ## 0.16.1-alpha.3
292
-
293
- ### Patch Changes
294
-
295
- - Add prepareStep to generate/stream VNext options. ([#7646](https://github.com/mastra-ai/mastra/pull/7646))
296
-
297
- ## 0.16.1-alpha.2
298
-
299
- ### Patch Changes
300
-
301
301
 
302
- ... 3388 more lines hidden. See full changelog in package directory.
302
+ ... 3402 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,21 @@
1
1
  # @mastra/deployer-cloud
2
2
 
3
+ ## 0.17.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+ - @mastra/deployer@0.17.0-alpha.8
10
+
11
+ ## 0.17.0-alpha.7
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
16
+ - @mastra/core@0.17.0-alpha.7
17
+ - @mastra/deployer@0.17.0-alpha.7
18
+
3
19
  ## 0.17.0-alpha.6
4
20
 
5
21
  ### Patch Changes
@@ -283,20 +299,4 @@
283
299
 
284
300
  ### Patch Changes
285
301
 
286
- - Updated dependencies [[`599d04c`](https://github.com/mastra-ai/mastra/commit/599d04cebe92c1d536fee3190434941b8c91548e)]:
287
- - @mastra/core@0.15.3-alpha.9
288
- - @mastra/deployer@0.15.3-alpha.9
289
-
290
- ## 0.15.3-alpha.8
291
-
292
- ### Patch Changes
293
-
294
- - Updated dependencies [[`4474d04`](https://github.com/mastra-ai/mastra/commit/4474d0489b1e152e0985c33a4f529207317d27b5), [`4106a58`](https://github.com/mastra-ai/mastra/commit/4106a58b15b4c0a060a4a9ccab52d119d00d8edb)]:
295
- - @mastra/core@0.15.3-alpha.8
296
- - @mastra/deployer@0.15.3-alpha.8
297
-
298
- ## 0.15.3-alpha.7
299
-
300
- ### Patch Changes
301
-
302
- ... 127 more lines hidden. See full changelog in package directory.
302
+ ... 143 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,21 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.17.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+ - @mastra/server@0.17.0-alpha.8
10
+
11
+ ## 0.17.0-alpha.7
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
16
+ - @mastra/core@0.17.0-alpha.7
17
+ - @mastra/server@0.17.0-alpha.7
18
+
3
19
  ## 0.17.0-alpha.6
4
20
 
5
21
  ### Minor Changes
@@ -283,20 +299,4 @@
283
299
  - @mastra/core@0.16.0
284
300
  - @mastra/server@0.16.0
285
301
 
286
- ## 0.16.0-alpha.1
287
-
288
- ### Minor Changes
289
-
290
- - 376913a: Update peerdeps of @mastra/core
291
-
292
- ### Patch Changes
293
-
294
- - Updated dependencies [8fbf79e]
295
- - Updated dependencies [376913a]
296
- - @mastra/core@0.16.0-alpha.1
297
- - @mastra/server@0.16.0-alpha.1
298
-
299
- ## 0.16.0-alpha.0
300
-
301
-
302
- ... 4158 more lines hidden. See full changelog in package directory.
302
+ ... 4174 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.22-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+
10
+ ## 0.13.22-alpha.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
15
+ - @mastra/core@0.17.0-alpha.7
16
+
3
17
  ## 0.13.22-alpha.6
4
18
 
5
19
  ### Patch Changes
@@ -284,19 +298,5 @@
284
298
 
285
299
  ### Patch Changes
286
300
 
287
- - [#5816](https://github.com/mastra-ai/mastra/pull/5816) [`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715) Thanks [@dane-ai-mastra](https://github.com/apps/dane-ai-mastra)! - dependencies updates:
288
- - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
289
- - Updated dependency [`zod-to-json-schema@^3.24.6` ↗︎](https://www.npmjs.com/package/zod-to-json-schema/v/3.24.6) (from `^3.24.5`, in `dependencies`)
290
-
291
- - [#7238](https://github.com/mastra-ai/mastra/pull/7238) [`9a98f3c`](https://github.com/mastra-ai/mastra/commit/9a98f3c524f37fb3ebd94c41cd6efed0698a6a2a) Thanks [@alliehowe29](https://github.com/alliehowe29)! - Validate file path after `path.join()`
292
-
293
- - Updated dependencies [[`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715), [`ff89505`](https://github.com/mastra-ai/mastra/commit/ff895057c8c7e91a5535faef46c5e5391085ddfa), [`183dc95`](https://github.com/mastra-ai/mastra/commit/183dc95596f391b977bd1a2c050b8498dac74891), [`a1111e2`](https://github.com/mastra-ai/mastra/commit/a1111e24e705488adfe5e0a6f20c53bddf26cb22), [`61debef`](https://github.com/mastra-ai/mastra/commit/61debefd80ad3a7ed5737e19df6a23d40091689a), [`9beaeff`](https://github.com/mastra-ai/mastra/commit/9beaeffa4a97b1d5fd01a7f8af8708b16067f67c), [`ad78bfc`](https://github.com/mastra-ai/mastra/commit/ad78bfc4ea6a1fff140432bf4f638e01af7af668), [`9eee594`](https://github.com/mastra-ai/mastra/commit/9eee594e35e0ca2a650fcc33fa82009a142b9ed0), [`979912c`](https://github.com/mastra-ai/mastra/commit/979912cfd180aad53287cda08af771df26454e2c), [`7dcf4c0`](https://github.com/mastra-ai/mastra/commit/7dcf4c04f44d9345b1f8bc5d41eae3f11ac61611), [`ad78bfc`](https://github.com/mastra-ai/mastra/commit/ad78bfc4ea6a1fff140432bf4f638e01af7af668), [`0ce418a`](https://github.com/mastra-ai/mastra/commit/0ce418a1ccaa5e125d4483a9651b635046152569), [`8387952`](https://github.com/mastra-ai/mastra/commit/838795227b4edf758c84a2adf6f7fba206c27719), [`5eca5d2`](https://github.com/mastra-ai/mastra/commit/5eca5d2655788863ea0442a46c9ef5d3c6dbe0a8)]:
294
- - @mastra/core@0.15.3-alpha.4
295
- - @mastra/mcp@0.11.3-alpha.1
296
-
297
- ## 0.13.17-alpha.3
298
-
299
- ### Patch Changes
300
-
301
301
 
302
- ... 1782 more lines hidden. See full changelog in package directory.
302
+ ... 1796 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,27 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 6.2.0-alpha.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix VNext generate/stream usage tokens. They used to be undefined, now we are receiving the proper values. ([#7901](https://github.com/mastra-ai/mastra/pull/7901))
8
+
9
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
10
+ - @mastra/core@0.17.0-alpha.8
11
+ - @mastra/client-js@0.13.0-alpha.8
12
+
13
+ ## 6.2.0-alpha.4
14
+
15
+ ### Patch Changes
16
+
17
+ - Fixed createRun change in agent builder that was missed ([#7966](https://github.com/mastra-ai/mastra/pull/7966))
18
+
19
+ - fix error message when fetching observability things ([#7956](https://github.com/mastra-ai/mastra/pull/7956))
20
+
21
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
22
+ - @mastra/core@0.17.0-alpha.7
23
+ - @mastra/client-js@0.13.0-alpha.7
24
+
3
25
  ## 6.2.0-alpha.3
4
26
 
5
27
  ### Minor Changes
@@ -276,27 +298,5 @@
276
298
  - Updated dependencies [f643c65]
277
299
  - Updated dependencies [00c74e7]
278
300
  - Updated dependencies [fef7375]
279
- - Updated dependencies [e3d8fea]
280
- - Updated dependencies [45e4d39]
281
- - Updated dependencies [9eee594]
282
- - Updated dependencies [7149d8d]
283
- - Updated dependencies [822c2e8]
284
- - Updated dependencies [979912c]
285
- - Updated dependencies [7dcf4c0]
286
- - Updated dependencies [4106a58]
287
- - Updated dependencies [ad78bfc]
288
- - Updated dependencies [48f0742]
289
- - Updated dependencies [0302f50]
290
- - Updated dependencies [6ac697e]
291
- - Updated dependencies [74db265]
292
- - Updated dependencies [0ce418a]
293
- - Updated dependencies [af90672]
294
- - Updated dependencies [8387952]
295
- - Updated dependencies [7f3b8da]
296
- - Updated dependencies [905352b]
297
- - Updated dependencies [599d04c]
298
- - Updated dependencies [56041d0]
299
- - Updated dependencies [3412597]
300
- - Updated dependencies [5eca5d2]
301
-
302
- ... 3015 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 3037 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 0.17.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+
10
+ ## 0.17.0-alpha.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
15
+ - @mastra/core@0.17.0-alpha.7
16
+
3
17
  ## 0.17.0-alpha.6
4
18
 
5
19
  ### Minor Changes
@@ -284,19 +298,5 @@
284
298
  - [#7394](https://github.com/mastra-ai/mastra/pull/7394) [`f0dfcac`](https://github.com/mastra-ai/mastra/commit/f0dfcac4458bdf789b975e2d63e984f5d1e7c4d3) Thanks [@NikAiyer](https://github.com/NikAiyer)! - updated core peerdep
285
299
 
286
300
  - Updated dependencies [[`7149d8d`](https://github.com/mastra-ai/mastra/commit/7149d8d4bdc1edf0008e0ca9b7925eb0b8b60dbe)]:
287
- - @mastra/core@0.15.3-alpha.7
288
-
289
- ## 0.15.3-alpha.6
290
-
291
- ### Patch Changes
292
-
293
- - [#7388](https://github.com/mastra-ai/mastra/pull/7388) [`03d0c39`](https://github.com/mastra-ai/mastra/commit/03d0c3963a748294577dd232a53ee01e1e5bcc12) Thanks [@NikAiyer](https://github.com/NikAiyer)! - temp disable agent-builder workflows import
294
-
295
- - Updated dependencies [[`c19bcf7`](https://github.com/mastra-ai/mastra/commit/c19bcf7b43542b02157b5e17303e519933a153ab), [`b42a961`](https://github.com/mastra-ai/mastra/commit/b42a961a5aefd19d6e938a7705fc0ecc90e8f756), [`45e4d39`](https://github.com/mastra-ai/mastra/commit/45e4d391a2a09fc70c48e4d60f505586ada1ba0e), [`0302f50`](https://github.com/mastra-ai/mastra/commit/0302f50861a53c66ff28801fc371b37c5f97e41e), [`74db265`](https://github.com/mastra-ai/mastra/commit/74db265b96aa01a72ffd91dcae0bc3b346cca0f2), [`7f3b8da`](https://github.com/mastra-ai/mastra/commit/7f3b8da6dd21c35d3672e44b4f5dd3502b8f8f92), [`905352b`](https://github.com/mastra-ai/mastra/commit/905352bcda134552400eb252bca1cb05a7975c14), [`f2cda47`](https://github.com/mastra-ai/mastra/commit/f2cda47ae911038c5d5489f54c36517d6f15bdcc), [`cfd377a`](https://github.com/mastra-ai/mastra/commit/cfd377a3a33a9c88b644f6540feed9cd9832db47)]:
296
- - @mastra/core@0.15.3-alpha.6
297
-
298
- ## 0.15.3-alpha.5
299
-
300
- ### Patch Changes
301
301
 
302
- ... 3363 more lines hidden. See full changelog in package directory.
302
+ ... 3377 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,7 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.13.0-alpha.5
4
+
3
5
  ## 0.13.0-alpha.4
4
6
 
5
7
  ### Patch Changes
@@ -296,7 +298,5 @@
296
298
  - d8dec5e: add a cta to invite to deploy to cloud
297
299
  - 89d2f4e: add TTS to the playground
298
300
 
299
- ## 0.10.13
300
-
301
301
 
302
- ... 1412 more lines hidden. See full changelog in package directory.
302
+ ... 1414 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # mastra
2
2
 
3
+ ## 0.13.0-alpha.5
4
+
5
+ ### Patch Changes
6
+
7
+ - fix error message when fetching observability things ([#7956](https://github.com/mastra-ai/mastra/pull/7956))
8
+
9
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
10
+ - @mastra/core@0.17.0-alpha.7
11
+ - @mastra/deployer@0.17.0-alpha.7
12
+
3
13
  ## 0.13.0-alpha.4
4
14
 
5
15
  ### Patch Changes
@@ -288,15 +298,5 @@
288
298
  - 6f715fe: Fix plyground baseUrl, default api baseUrl to playground baseUrl
289
299
  - 01264f1: Mastra dev- load env vars before watch
290
300
  - 3308c9f: fix dev:playground command
291
- - d99baf6: change outline
292
- - 8f22a2c: During package installation do not print audit, funding or any non-error logs
293
- - Updated dependencies [ab48c97]
294
- - Updated dependencies [3e0bd2a]
295
- - Updated dependencies [2b64943]
296
- - Updated dependencies [85ef90b]
297
- - Updated dependencies [aedbbfa]
298
- - Updated dependencies [ff89505]
299
- - Updated dependencies [637f323]
300
- - Updated dependencies [de3cbc6]
301
-
302
- ... 5569 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 5579 more lines hidden. See full changelog in package directory.
@@ -37,7 +37,7 @@ const agent = new Agent({
37
37
 
38
38
  Available options:
39
39
  - `stripControlChars`: Remove control characters (default: false)
40
- - `preserveEmojis`: Keep emojis intact (default: true)
40
+ - `preserveEmojis`: Keep emojis intact (default: true)
41
41
  - `collapseWhitespace`: Collapse multiple spaces/newlines (default: true)
42
42
  - `trim`: Remove leading/trailing whitespace (default: true)
43
43
 
@@ -184,11 +184,11 @@ You can chain multiple processors. They execute sequentially in the order they a
184
184
 
185
185
  ```typescript copy showLineNumbers {9-18}
186
186
  import { Agent } from "@mastra/core/agent";
187
- import {
188
- UnicodeNormalizer,
189
- ModerationProcessor,
187
+ import {
188
+ UnicodeNormalizer,
189
+ ModerationProcessor,
190
190
  PromptInjectionDetector,
191
- PIIDetector
191
+ PIIDetector
192
192
  } from "@mastra/core/processors";
193
193
 
194
194
  const secureAgent = new Agent({
@@ -209,17 +209,19 @@ const secureAgent = new Agent({
209
209
 
210
210
  You can create custom processors by implementing the `Processor` interface. A Processor can be used for input processing when it implements the `processInput` method.
211
211
 
212
- ```typescript copy showLineNumbers {4-19,23-26}
213
- import type { Processor, MastraMessageV2, TripWire } from "@mastra/core/processors";
212
+ ```typescript copy showLineNumbers {5,10-33,39}
213
+ import type { Processor } from "@mastra/core/processors";
214
+ import type { MastraMessageV2 } from "@mastra/core/agent/message-list";
215
+ import { TripWire } from "@mastra/core/agent";
214
216
 
215
217
  class MessageLengthLimiter implements Processor {
216
218
  readonly name = 'message-length-limiter';
217
-
219
+
218
220
  constructor(private maxLength: number = 1000) {}
219
221
 
220
- processInput({ messages, abort }: {
221
- messages: MastraMessageV2[];
222
- abort: (reason?: string) => never
222
+ processInput({ messages, abort }: {
223
+ messages: MastraMessageV2[];
224
+ abort: (reason?: string) => never
223
225
  }): MastraMessageV2[] {
224
226
  // Check total message length
225
227
  try {
@@ -228,7 +230,7 @@ class MessageLengthLimiter implements Processor {
228
230
  .filter(part => part.type === 'text')
229
231
  .reduce((partSum, part) => partSum + (part as any).text.length, 0);
230
232
  }, 0);
231
-
233
+
232
234
  if (totalLength > this.maxLength) {
233
235
  abort(`Message too long: ${totalLength} characters (max: ${this.maxLength})`); // throws a TripWire error
234
236
  }
@@ -238,7 +240,7 @@ class MessageLengthLimiter implements Processor {
238
240
  }
239
241
  throw new Error(`Length validation failed: ${error instanceof Error ? error.message : 'Unknown error'}`); // application level throw a standard error
240
242
  }
241
-
243
+
242
244
  return messages;
243
245
  }
244
246
  }
@@ -279,4 +281,4 @@ If any processor calls `abort()`, the request terminates immediately and subsequ
279
281
 
280
282
  While input processors handle user messages before they reach the language model, **output processors** handle the LLM's responses after generation but before they're returned to the user. This is useful for response validation, content filtering, and safety controls on LLM-generated content.
281
283
 
282
- See the [Output Processors documentation](/docs/agents/output-processors) for details on processing LLM responses.
284
+ See the [Output Processors documentation](/docs/agents/output-processors) for details on processing LLM responses.
@@ -20,9 +20,10 @@ The dependency injection system allows you to:
20
20
 
21
21
  Agents can access `runtimeContext` via the `instructions` parameter, and retrieve variables using `runtimeContext.get()`. This allows agent behavior to adapt dynamically based on user input or external configuration, without changing the underlying implementation.
22
22
 
23
- ```typescript {6-7,14} filename="src/mastra/agents/test-weather-agent.ts" showLineNumbers copy
23
+ ```typescript {7-8,15} filename="src/mastra/agents/test-weather-agent.ts" showLineNumbers copy
24
24
  import { openai } from "@ai-sdk/openai";
25
25
  import { Agent } from "@mastra/core/agent";
26
+ import { testWeatherTool } from "../tools/test-weather-tool";
26
27
 
27
28
  export const testWeatherAgent = new Agent({
28
29
  name: "test-weather-agent",
@@ -38,7 +39,47 @@ export const testWeatherAgent = new Agent({
38
39
  - If no city is mentioned, ask for a city name
39
40
  `;
40
41
  },
41
- model: openai("gpt-4o-mini")
42
+ model: openai("gpt-4o-mini"),
43
+ tools: { testWeatherTool }
44
+ });
45
+ ```
46
+
47
+ ### Example tool
48
+
49
+ This tool exports a `WeatherRuntimeContext` type, which can be used anywhere `RuntimeContext` is used to enable type-safe access to runtime configuration.
50
+
51
+ ```typescript {4-6} filename="src/mastra/tools/test-weather-tool.ts" showLineNumbers copy
52
+ import { createTool } from "@mastra/core/tools";
53
+ import { z } from "zod";
54
+
55
+ export type WeatherRuntimeContext = {
56
+ "temperature-unit": "celsius" | "fahrenheit";
57
+ };
58
+
59
+ export const testWeatherTool = createTool({
60
+ id: "test-weather-tool",
61
+ description: "Get weather for a location",
62
+ inputSchema: z.object({
63
+ location: z.string()
64
+ }),
65
+ outputSchema: z.object({
66
+ metric: z.string(),
67
+ temperature: z.number(),
68
+ weather: z.string()
69
+ }),
70
+ execute: async ({ context, runtimeContext }) => {
71
+ const { location } = context;
72
+ const unit = runtimeContext.get("temperature-unit") as WeatherRuntimeContext["temperature-unit"];
73
+
74
+ const temperature = 30;
75
+ const weather = "Sunny";
76
+
77
+ return {
78
+ metric: unit === "celsius" ? "°C" : "°F",
79
+ temperature,
80
+ weather
81
+ };
82
+ }
42
83
  });
43
84
  ```
44
85
 
@@ -46,16 +87,13 @@ export const testWeatherAgent = new Agent({
46
87
 
47
88
  In this example, `temperature-unit` is set using `runtimeContext.set()` to either **celsius** or **fahrenheit**, allowing the agent to respond with temperatures in the appropriate unit.
48
89
 
49
- ```typescript {12} filename="src/test-weather-agent.ts" showLineNumbers copy
90
+ ```typescript {9, 12} filename="src/test-weather-agent.ts" showLineNumbers copy
50
91
  import { mastra } from "./mastra";
51
92
  import { RuntimeContext } from "@mastra/core/runtime-context";
93
+ import { WeatherRuntimeContext } from "./mastra/tools/test-weather-tool";
52
94
 
53
95
  const agent = mastra.getAgent("testWeatherAgent");
54
96
 
55
- export type WeatherRuntimeContext = {
56
- "temperature-unit": "celsius" | "fahrenheit";
57
- };
58
-
59
97
  const runtimeContext = new RuntimeContext<WeatherRuntimeContext>();
60
98
 
61
99
  runtimeContext.set("temperature-unit", "fahrenheit");
@@ -71,14 +109,11 @@ console.log(response.text);
71
109
 
72
110
  You can populate `runtimeContext` dynamically in server middleware by extracting information from the request. In this example, the `temperature-unit` is set based on the Cloudflare `CF-IPCountry` header to ensure responses match the user's locale.
73
111
 
74
- ```typescript {2,12-21} filename="src/mastra/index.ts" showLineNumbers copy
112
+ ```typescript {2,4,9-18} filename="src/mastra/index.ts" showLineNumbers copy
75
113
  import { Mastra } from "@mastra/core/mastra";
76
114
  import { RuntimeContext } from "@mastra/core/runtime-context";
77
115
  import { testWeatherAgent } from "./agents/test-weather-agent";
78
-
79
- type WeatherRuntimeContext = {
80
- "temperature-unit": "celsius" | "fahrenheit";
81
- };
116
+ import { WeatherRuntimeContext } from "./mastra/tools/test-weather-tool";
82
117
 
83
118
  export const mastra = new Mastra({
84
119
  agents: { testWeatherAgent },
@@ -124,7 +124,7 @@ These properties resolve to final values after the stream completes:
124
124
  },
125
125
  {
126
126
  name: "usage",
127
- type: "Promise<Record<string, number>>",
127
+ type: "Promise<LanguageModelUsage>",
128
128
  description: "Token usage statistics including input tokens, output tokens, total tokens, and reasoning tokens (for reasoning models).",
129
129
  properties: [{
130
130
  type: "Record",
@@ -133,6 +133,7 @@ These properties resolve to final values after the stream completes:
133
133
  { name: "outputTokens", type: "number", description: "Tokens generated in the response" },
134
134
  { name: "totalTokens", type: "number", description: "Sum of input and output tokens" },
135
135
  { name: "reasoningTokens", type: "number", isOptional: true, description: "Hidden reasoning tokens (for reasoning models)" }
136
+ { name: "cachedInputTokens", type: "number", isOptional: true, description: "Number of input tokens that were a cache hit" }
136
137
  ]
137
138
  }]
138
139
  },
@@ -63,7 +63,7 @@ const stream = run.streamVNext({
63
63
  },
64
64
  {
65
65
  name: "stream.usage",
66
- type: "Promise<{ promptTokens: number; completionTokens: number; totalTokens: number }>",
66
+ type: "Promise<{ inputTokens: number; outputTokens: number; totalTokens: number, reasoningTokens?: number, cacheInputTokens?: number }>",
67
67
  description: "A promise that resolves to token usage statistics",
68
68
  },
69
69
  ]}
@@ -63,6 +63,8 @@ An agent stream provides access to various response properties:
63
63
 
64
64
  ### AI SDK v5 Compatibility
65
65
 
66
+ AI SDK v5 uses `LanguageModelV2` for the model providers. If you are getting an error that you are using an AI SDK v4 model you will need to upgrade your model package to the next major version.
67
+
66
68
  For integration with AI SDK v5, use `format` 'aisdk' to get an `AISDKV5OutputStream`:
67
69
 
68
70
  ```typescript {5} showLineNumbers copy
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.22-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
8
+ - @mastra/core@0.17.0-alpha.8
9
+
10
+ ## 0.13.22-alpha.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
15
+ - @mastra/core@0.17.0-alpha.7
16
+
3
17
  ## 0.13.22-alpha.6
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.22-alpha.6",
3
+ "version": "0.13.22-alpha.8",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "uuid": "^11.1.0",
34
34
  "zod": "^3.25.76",
35
35
  "zod-to-json-schema": "^3.24.6",
36
- "@mastra/core": "0.17.0-alpha.6",
36
+ "@mastra/core": "0.17.0-alpha.8",
37
37
  "@mastra/mcp": "^0.13.0-alpha.2"
38
38
  },
39
39
  "devDependencies": {
@@ -50,7 +50,7 @@
50
50
  "typescript": "^5.8.3",
51
51
  "vitest": "^3.2.4",
52
52
  "@internal/lint": "0.0.39",
53
- "@mastra/core": "0.17.0-alpha.6"
53
+ "@mastra/core": "0.17.0-alpha.8"
54
54
  },
55
55
  "homepage": "https://mastra.ai",
56
56
  "repository": {