@mastra/mcp-docs-server 1.1.33-alpha.3 → 1.1.33-alpha.6
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/docs/agents/guardrails.md +60 -0
- package/.docs/docs/agents/processors.md +36 -0
- package/.docs/docs/deployment/workflow-runners.md +7 -1
- package/.docs/docs/mcp/overview.md +25 -0
- package/.docs/docs/server/auth/fga.md +141 -0
- package/.docs/docs/server/auth/workos.md +52 -9
- package/.docs/guides/deployment/temporal.md +232 -0
- package/.docs/models/gateways/openrouter.md +3 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba.md +2 -1
- package/.docs/models/providers/cortecs.md +16 -2
- package/.docs/models/providers/firmware.md +7 -6
- package/.docs/models/providers/neuralwatt.md +84 -0
- package/.docs/models/providers/nvidia.md +2 -1
- package/.docs/models/providers/perplexity-agent.md +3 -1
- package/.docs/models/providers/synthetic.md +2 -1
- package/.docs/models/providers/zhipuai-coding-plan.md +9 -8
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/auth/workos.md +54 -9
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/processors/cost-guard-processor.md +112 -0
- package/.docs/reference/processors/processor-interface.md +5 -0
- package/.docs/reference/processors/regex-filter-processor.md +106 -0
- package/.docs/reference/tools/perplexity.md +0 -2
- package/.docs/reference/tools/tavily.md +0 -2
- package/CHANGELOG.md +8 -0
- package/package.json +5 -5
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# RegexFilterProcessor
|
|
2
|
+
|
|
3
|
+
The `RegexFilterProcessor` applies zero-cost regex pattern matching to filter, redact, or block content in agent messages. No LLM calls are made — all detection is regex-based.
|
|
4
|
+
|
|
5
|
+
Supports built-in presets for common patterns (PII, secrets, URLs) and custom regex rules. Can be applied to input, output, or both phases.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
Block PII in input messages:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
13
|
+
|
|
14
|
+
const filter = new RegexFilterProcessor({
|
|
15
|
+
presets: ['pii'],
|
|
16
|
+
strategy: 'block',
|
|
17
|
+
phase: 'input',
|
|
18
|
+
})
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Redact secrets in output:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
25
|
+
|
|
26
|
+
const filter = new RegexFilterProcessor({
|
|
27
|
+
presets: ['secrets'],
|
|
28
|
+
strategy: 'redact',
|
|
29
|
+
phase: 'output',
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Custom rules:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
37
|
+
|
|
38
|
+
const filter = new RegexFilterProcessor({
|
|
39
|
+
rules: [{ name: 'internal-id', pattern: /INTERNAL-\d{6}/g, replacement: '[INTERNAL_ID]' }],
|
|
40
|
+
strategy: 'redact',
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Attach to an agent:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { Agent } from '@mastra/core/agent'
|
|
48
|
+
import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
49
|
+
|
|
50
|
+
const agent = new Agent({
|
|
51
|
+
name: 'my-agent',
|
|
52
|
+
model: 'openai/gpt-5-nano',
|
|
53
|
+
processors: {
|
|
54
|
+
input: [
|
|
55
|
+
new RegexFilterProcessor({
|
|
56
|
+
presets: ['pii', 'secrets'],
|
|
57
|
+
strategy: 'block',
|
|
58
|
+
}),
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Constructor parameters
|
|
65
|
+
|
|
66
|
+
**rules** (`RegexRule[]`): Custom regex rules to apply. Each rule has a name, a regex pattern, and an optional replacement string.
|
|
67
|
+
|
|
68
|
+
**rules.name** (`string`): Display name for the rule (used in match reports and error messages).
|
|
69
|
+
|
|
70
|
+
**rules.pattern** (`RegExp`): The regex pattern to match against.
|
|
71
|
+
|
|
72
|
+
**rules.replacement** (`string`): Replacement string for redact strategy. Defaults to '\[REDACTED]'.
|
|
73
|
+
|
|
74
|
+
**presets** (`('pii' | 'secrets' | 'urls')[]`): Built-in preset categories. 'pii' matches emails, phone numbers, SSNs, credit cards. 'secrets' matches API keys, bearer tokens, AWS keys. 'urls' matches HTTP/HTTPS URLs.
|
|
75
|
+
|
|
76
|
+
**strategy** (`'block' | 'redact' | 'warn'`): Strategy when a pattern match is found. 'block' aborts with a TripWire error. 'redact' replaces matched content with replacement text. 'warn' logs a warning but passes content through unchanged. (Default: `'block'`)
|
|
77
|
+
|
|
78
|
+
**phase** (`'input' | 'output' | 'all'`): Phases to apply the filter. 'input' filters input messages. 'output' filters output stream and result. 'all' filters both. (Default: `'all'`)
|
|
79
|
+
|
|
80
|
+
## Returns
|
|
81
|
+
|
|
82
|
+
**id** (`'regex-filter'`): Processor identifier.
|
|
83
|
+
|
|
84
|
+
**name** (`'Regex Filter'`): Processor display name.
|
|
85
|
+
|
|
86
|
+
**processInput** (`(args: ProcessInputArgs) => ProcessInputResult`): Checks input messages against all configured rules. Blocks, redacts, or warns depending on strategy. Skipped when phase is output.
|
|
87
|
+
|
|
88
|
+
**processOutputStream** (`(args: ProcessOutputStreamArgs) => Promise<ChunkType | null | undefined>`): Checks streaming text-delta chunks against all configured rules. Skipped when phase is input.
|
|
89
|
+
|
|
90
|
+
**processOutputResult** (`(args: ProcessOutputResultArgs) => ProcessorMessageResult`): Checks output messages against all configured rules. Blocks, redacts, or warns depending on strategy. Skipped when phase is input.
|
|
91
|
+
|
|
92
|
+
## Error behavior
|
|
93
|
+
|
|
94
|
+
When the `block` strategy is active (default), `RegexFilterProcessor` throws a `TripWire` error with `retry: false` when any pattern matches. The TripWire metadata includes:
|
|
95
|
+
|
|
96
|
+
- `processorId`: `'regex-filter'`
|
|
97
|
+
- `matches`: Array of match objects with `rule`, `match` (redacted to `'[REDACTED_MATCH]'`), and `index`
|
|
98
|
+
- `strategy`: `'block'`
|
|
99
|
+
|
|
100
|
+
## Built-in presets
|
|
101
|
+
|
|
102
|
+
| Preset | Patterns | Default replacement |
|
|
103
|
+
| --------- | ------------------------------------------------ | ---------------------------------------------- |
|
|
104
|
+
| `pii` | Emails, phone numbers, SSNs, credit card numbers | `[EMAIL]`, `[PHONE]`, `[SSN]`, `[CREDIT_CARD]` |
|
|
105
|
+
| `secrets` | API keys, bearer tokens, AWS access keys | `[API_KEY]`, `[BEARER_TOKEN]`, `[AWS_KEY]` |
|
|
106
|
+
| `urls` | HTTP/HTTPS URLs | `[URL]` |
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Perplexity tools
|
|
2
2
|
|
|
3
|
-
Added in: `@mastra/perplexity@0.1.0-alpha.0`
|
|
4
|
-
|
|
5
3
|
The `@mastra/perplexity` package wraps the [Perplexity Search API](https://docs.perplexity.ai/docs/search/quickstart) as a Mastra-compatible tool. It exposes a factory function that returns a tool created with [`createTool()`](https://mastra.ai/reference/tools/create-tool) and full Zod input/output schemas.
|
|
6
4
|
|
|
7
5
|
For chat completions or agentic workflows powered by Perplexity, use Mastra's built-in [Perplexity model provider](https://mastra.ai/models/providers/perplexity) or [Perplexity Agent provider](https://mastra.ai/models/providers/perplexity-agent). Those are separate from this Search tool.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Tavily tools
|
|
2
2
|
|
|
3
|
-
**Added in:** `@mastra/tavily@0.1.0-alpha.0`
|
|
4
|
-
|
|
5
3
|
The `@mastra/tavily` package wraps the [Tavily](https://app.tavily.com) API as Mastra-compatible tools. It exposes factory functions for search, extract, crawl, and map — each returning a tool created with [`createTool()`](https://mastra.ai/reference/tools/create-tool) that includes full Zod input/output schemas.
|
|
6
4
|
|
|
7
5
|
## Installation
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.33-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`86c0298`](https://github.com/mastra-ai/mastra/commit/86c0298e647306423c842f9d5ac827bd616bd13d), [`7fce309`](https://github.com/mastra-ai/mastra/commit/7fce30912b14170bfc41f0ac736cca0f39fe0cd4), [`86c0298`](https://github.com/mastra-ai/mastra/commit/86c0298e647306423c842f9d5ac827bd616bd13d), [`7997c2e`](https://github.com/mastra-ai/mastra/commit/7997c2e55ddd121562a4098cd8d2b89c68433bf1), [`e97ccb9`](https://github.com/mastra-ai/mastra/commit/e97ccb900f8b7a390ce82c9f8eb8d6eb2c5e3777), [`c5daf48`](https://github.com/mastra-ai/mastra/commit/c5daf48556e98c46ae06caf00f92c249912007e9), [`cd96779`](https://github.com/mastra-ai/mastra/commit/cd9677937f113b2856dc8b9f3d4bdabcee58bb2e)]:
|
|
8
|
+
- @mastra/core@1.32.0-alpha.2
|
|
9
|
+
- @mastra/mcp@1.6.1-alpha.1
|
|
10
|
+
|
|
3
11
|
## 1.1.33-alpha.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.33-alpha.
|
|
3
|
+
"version": "1.1.33-alpha.6",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/core": "1.32.0-alpha.
|
|
33
|
-
"@mastra/mcp": "^1.6.1-alpha.
|
|
32
|
+
"@mastra/core": "1.32.0-alpha.2",
|
|
33
|
+
"@mastra/mcp": "^1.6.1-alpha.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.19.11",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "4.1.5",
|
|
49
49
|
"@internal/lint": "0.0.90",
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
50
|
+
"@internal/types-builder": "0.0.65",
|
|
51
|
+
"@mastra/core": "1.32.0-alpha.2"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|