@mastra/mcp-docs-server 1.2.15-alpha.10 → 1.2.15-alpha.13

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.
@@ -289,6 +289,10 @@ const agent = new Agent({
289
289
 
290
290
  ```typescript
291
291
  // In a types.d.ts file in your project
292
+ // The import is required: it makes this file a module, so the block below
293
+ // merges into the existing types instead of replacing the module.
294
+ import '@mastra/core/llm';
295
+
292
296
  declare module '@mastra/core/llm' {
293
297
  interface ProviderModelsMap {
294
298
  'my-provider': readonly ['model-1', 'model-2', 'model-3'];
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Vercel logo](https://models.dev/logos/vercel.svg)Vercel
4
4
 
5
- Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 322 models through Mastra's model router.
5
+ Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 323 models through Mastra's model router.
6
6
 
7
7
  Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
8
8
 
@@ -334,6 +334,7 @@ ANTHROPIC_API_KEY=ant-...
334
334
  | `xai/grok-4.5` |
335
335
  | `xai/grok-build-0.1` |
336
336
  | `xai/grok-imagine-image` |
337
+ | `xai/grok-imagine-image-2.0-preview` |
337
338
  | `xai/grok-imagine-video` |
338
339
  | `xai/grok-imagine-video-1.5` |
339
340
  | `xai/grok-imagine-video-1.5-preview` |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Model Providers
4
4
 
5
- Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 5457 models from 168 providers through a single API.
5
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 5458 models from 168 providers through a single API.
6
6
 
7
7
  ## Features
8
8
 
@@ -51,7 +51,7 @@ for await (const chunk of stream) {
51
51
  | `baseten/zai-org/GLM-5` | 203K | | | | | | $0.95 | $3 |
52
52
  | `baseten/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
53
53
  | `baseten/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
54
- | `baseten/zai-org/GLM-5.2-Fast` | 524K | | | | | | $2 | $7 |
54
+ | `baseten/zai-org/GLM-5.2-Fast` | 1.0M | | | | | | $2 | $7 |
55
55
 
56
56
  ## Advanced configuration
57
57
 
@@ -326,7 +326,7 @@ for await (const chunk of stream) {
326
326
  | `kilo/qwen/qwen3.5-plus-02-15` | 1.0M | | | | | | $0.26 | $2 |
327
327
  | `kilo/qwen/qwen3.5-plus-20260420` | 1.0M | | | | | | $0.30 | $2 |
328
328
  | `kilo/qwen/qwen3.6-27b` | 262K | | | | | | $0.45 | $3 |
329
- | `kilo/qwen/qwen3.6-35b-a3b` | 262K | | | | | | $0.14 | $1 |
329
+ | `kilo/qwen/qwen3.6-35b-a3b` | 262K | | | | | | $0.15 | $1 |
330
330
  | `kilo/qwen/qwen3.6-flash` | 1.0M | | | | | | $0.19 | $1 |
331
331
  | `kilo/qwen/qwen3.6-max-preview` | 262K | | | | | | $1 | $6 |
332
332
  | `kilo/qwen/qwen3.6-plus` | 1.0M | | | | | | $0.33 | $2 |
@@ -567,6 +567,25 @@ export const mastra = new Mastra({
567
567
  })
568
568
  ```
569
569
 
570
+ ### bundler.minify
571
+
572
+ **Type:** `boolean`\
573
+ **Default:** `false`
574
+
575
+ Minifies the bundled output, stripping comments and whitespace and shortening local identifiers. Exported names are preserved.
576
+
577
+ Off by default so build output stays readable and stack traces stay meaningful. Enable it when bundle size matters, such as packaging a container image for an on-prem deployment. `mastra dev` is never minified.
578
+
579
+ ```typescript
580
+ import { Mastra } from '@mastra/core'
581
+
582
+ export const mastra = new Mastra({
583
+ bundler: {
584
+ minify: true,
585
+ },
586
+ })
587
+ ```
588
+
570
589
  ### bundler.transpilePackages
571
590
 
572
591
  **Type:** `string[]`\
@@ -43,6 +43,24 @@ const filter = new RegexFilterProcessor({
43
43
  })
44
44
  ```
45
45
 
46
+ Raise the streaming carryover window for long custom matches (e.g. a fixed-length secret or a value that only matches once its closing delimiter arrives):
47
+
48
+ ```typescript
49
+ import { RegexFilterProcessor } from '@mastra/core/processors'
50
+
51
+ const filter = new RegexFilterProcessor({
52
+ rules: [
53
+ {
54
+ name: 'armored-key',
55
+ pattern: /-----BEGIN KEY-----[A-Z]+-----END KEY-----/g,
56
+ replacement: '[KEY]',
57
+ },
58
+ ],
59
+ strategy: 'redact',
60
+ streamCarryoverSize: 256,
61
+ })
62
+ ```
63
+
46
64
  Attach to an agent:
47
65
 
48
66
  ```typescript
@@ -80,6 +98,8 @@ const agent = new Agent({
80
98
 
81
99
  **includeRedactedValues** (`boolean`): Include the text that was redacted in each report entry. Off by default, because the values are the data the processor removes. (Default: `false`)
82
100
 
101
+ **streamCarryoverSize** (`number`): Trailing characters the streaming redact path holds back between chunks, so a match split across a chunk boundary is redacted whole. The default covers every built-in preset with a wide margin. Raise it for custom rules whose matches stay invisible to the rule until they complete, such as a fixed-length secret or a value with a closing delimiter, when such a match can be longer than the window. (Default: `128`)
102
+
83
103
  ## Returns
84
104
 
85
105
  **id** (`'regex-filter'`): Processor identifier.
@@ -29,6 +29,8 @@ const toolSearch = new ToolSearchProcessor({
29
29
 
30
30
  **options.tools** (`Record<string, Tool>`): All tools that can be searched and loaded dynamically. These tools are not immediately available to the agent — they must be discovered via search and loaded on demand.
31
31
 
32
+ **options.includeResolvedTools** (`boolean`): Also make the tools the agent resolved for this request (MCP tools requiring the caller's credentials, or anything returned by a dynamic tools function) searchable, and withhold them from the prompt until the agent loads them. The meta-tools are never withheld. Request-resolved tools are indexed per request, so each request searches and loads its own tool instances.
33
+
32
34
  **options.search** (`{ topK?: number; minScore?: number; autoLoad?: boolean }`): Configuration for the search behavior.
33
35
 
34
36
  **options.search.topK** (`number`): Maximum number of tools to return in search results.
@@ -120,7 +122,37 @@ The `phase` value describes where the filter is being applied:
120
122
  - `load`: Blocks `load_tool` from loading disallowed tools.
121
123
  - `active`: Hides already-loaded tools from the current request if they're no longer allowed.
122
124
 
123
- If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available. `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`.
125
+ If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available. `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`, or enable `includeResolvedTools`.
126
+
127
+ ## Searching request-resolved tools
128
+
129
+ The `tools` option is fixed at construction, so you can't list tools that only exist per request (MCP tools that need the caller's credentials, or anything returned by a dynamic `tools` function). By default those tools bypass search and occupy prompt space on every turn.
130
+
131
+ Set `includeResolvedTools: true` to index them for the request and withhold them from the prompt until the agent loads them:
132
+
133
+ ```typescript
134
+ import { Agent } from '@mastra/core/agent'
135
+ import { ToolSearchProcessor } from '@mastra/core/processors'
136
+
137
+ const toolSearch = new ToolSearchProcessor({
138
+ tools: staticTools,
139
+ includeResolvedTools: true,
140
+ })
141
+
142
+ const agent = new Agent({
143
+ id: 'mcp-agent',
144
+ name: 'mcp-agent',
145
+ instructions: 'Search for a tool when you need a capability you do not have.',
146
+ model: 'openai/gpt-5.6-sol',
147
+ // Resolved per request, then searchable alongside staticTools
148
+ tools: async ({ requestContext }) => mcpClient.getTools(requestContext.get('userToken')),
149
+ inputProcessors: [toolSearch],
150
+ })
151
+ ```
152
+
153
+ Each request is indexed on its own, so a tool loaded by one caller never resolves to another caller's instance of the same tool name.
154
+
155
+ This option applies to every tool resolved for the request, including memory, workspace, skill, and browser tools. Only the `search_tools` and `load_tool` meta-tools stay in the prompt, so any tool the agent relies on implicitly must be found through search before it can be called.
124
156
 
125
157
  ## Extended usage example
126
158
 
@@ -127,6 +127,24 @@ export const testWorkflow = createWorkflow({
127
127
 
128
128
  **options.pruneSnapshot** (`(params: { snapshot: WorkflowRunState; workflowStatus: WorkflowRunStatus }) => WorkflowRunState`): Optional hook to transform the workflow snapshot immediately before it is persisted. Must return JSON-serializable data and preserve everything the workflow needs to resume (suspended step suspendPayloads, suspendedPaths, executionPath, etc.). Used internally by agent runs to keep snapshots minimal; user workflows persist full snapshots by default.
129
129
 
130
+ **options.onStart** (`(info: WorkflowStartCallbackInfo) => void | Promise<void>`): Callback awaited before a run starts executing, and before any step runs. Fires only on initial start, not on resume, restart, or time travel. Unlike onFinish and onError, errors thrown here are propagated: they reject the start() or stream() call and the run never executes, so this can be used as a pre-flight gate such as a quota check. The run record created by createRun() stays at status pending.
131
+
132
+ **options.onStart.runId** (`string`): The workflow run ID
133
+
134
+ **options.onStart.workflowId** (`string`): The workflow identifier
135
+
136
+ **options.onStart.resourceId** (`string`): Resource or user identifier for multi-tenant scenarios
137
+
138
+ **options.onStart.getInitData** (`() => any`): Returns the initial workflow input data
139
+
140
+ **options.onStart.state** (`Record<string, any>`): The initial workflow state
141
+
142
+ **options.onStart.requestContext** (`RequestContext`): The request context for the run
143
+
144
+ **options.onStart.mastra** (`Mastra`): The Mastra instance, when the workflow is registered
145
+
146
+ **options.onStart.logger** (`IMastraLogger`): The Mastra logger
147
+
130
148
  **options.onFinish** (`(result: WorkflowFinishCallbackResult) => void | Promise<void>`): Callback invoked when workflow completes with any status (success, failed, suspended, tripwire). Receives the workflow result including status, output, error, and step results. Errors thrown in this callback are caught and logged, not propagated.
131
149
 
132
150
  **options.onFinish.status** (`WorkflowRunStatus`): The workflow status: 'success', 'failed', 'suspended', or 'tripwire'
@@ -64,7 +64,7 @@ Configuration options for native OS sandboxing (used with `isolation: 'seatbelt'
64
64
 
65
65
  **readWritePaths** (`string[]`): Additional paths to allow read-write access beyond the workspace directory.
66
66
 
67
- **seatbeltProfilePath** (`string`): Path to a custom seatbelt profile file (macOS only). If the file exists, it's used; if not, a default profile is generated and written to this path.
67
+ **seatbeltProfilePath** (`string`): Path to a custom seatbelt profile file (macOS only). If you wrote the file, it's used exactly as written: Mastra doesn't add mounted paths to it, so the profile must already allow every path you mount. If the file doesn't exist, a default profile is generated and written to this path, and that generated profile allows mounted paths. Mastra marks the profiles it generates, so a later run regenerates them instead of reading them back as your own. To edit a generated profile and keep your edits, delete its marker comment: the file then counts as yours, and mounted paths are no longer added to it.
68
68
 
69
69
  **bwrapArgs** (`string[]`): Additional arguments to pass to bwrap (Linux only).
70
70
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.2.15-alpha.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1c75e32`](https://github.com/mastra-ai/mastra/commit/1c75e32f7fc0b9fb6f548b4407feaec8a1440212), [`c47165c`](https://github.com/mastra-ai/mastra/commit/c47165c983c87594c6952f1fd2fa51a90205034c), [`e08e789`](https://github.com/mastra-ai/mastra/commit/e08e789c1bf4cd2fe46363f7a4728536ceccc9bd), [`35cc901`](https://github.com/mastra-ai/mastra/commit/35cc90102cf834a84827acaf9eee0b6d6d1e2a3b), [`a8b4cf0`](https://github.com/mastra-ai/mastra/commit/a8b4cf02823cffebc4751a53337dfacf097c1ae1), [`f33264f`](https://github.com/mastra-ai/mastra/commit/f33264f517ae603279afd5c4251e2b40f6dd3618), [`689f2c4`](https://github.com/mastra-ai/mastra/commit/689f2c4b6c0835fe455702b01d21daa8abcd9331), [`eeae63e`](https://github.com/mastra-ai/mastra/commit/eeae63e7fbe8e1f237adc69bca6e2ac13c5ca907), [`4c186a0`](https://github.com/mastra-ai/mastra/commit/4c186a017275f45e6ed4c09de0f89550e2d09e8c), [`b0fa077`](https://github.com/mastra-ai/mastra/commit/b0fa077bcbc9b08551846fe372a0d3d15b71ed72)]:
8
+ - @mastra/core@1.58.0-alpha.8
9
+
10
+ ## 1.2.15-alpha.11
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`7fb580a`](https://github.com/mastra-ai/mastra/commit/7fb580ac73fbcacf2ff00872a3395f73ae1b9fa5), [`333785c`](https://github.com/mastra-ai/mastra/commit/333785c93cbb01e42c60167e995457c28897ddbf), [`2eabc09`](https://github.com/mastra-ai/mastra/commit/2eabc097d86d52fbd0123da36a7c874154cc384f), [`83fa004`](https://github.com/mastra-ai/mastra/commit/83fa0044bfda8b703a83883dbd8bef204844d13f)]:
15
+ - @mastra/core@1.58.0-alpha.7
16
+
3
17
  ## 1.2.15-alpha.10
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": "1.2.15-alpha.10",
3
+ "version": "1.2.15-alpha.13",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "jsdom": "^26.1.0",
29
29
  "local-pkg": "^1.1.2",
30
30
  "zod": "^4.4.3",
31
- "@mastra/core": "1.58.0-alpha.6",
31
+ "@mastra/core": "1.58.0-alpha.8",
32
32
  "@mastra/mcp": "^1.16.0-alpha.1"
33
33
  },
34
34
  "devDependencies": {
@@ -45,9 +45,9 @@
45
45
  "tsx": "^4.23.1",
46
46
  "typescript": "^6.0.3",
47
47
  "vitest": "4.1.10",
48
- "@internal/lint": "0.0.121",
49
48
  "@internal/types-builder": "0.0.96",
50
- "@mastra/core": "1.58.0-alpha.6"
49
+ "@mastra/core": "1.58.0-alpha.8",
50
+ "@internal/lint": "0.0.121"
51
51
  },
52
52
  "homepage": "https://mastra.ai",
53
53
  "repository": {