@mastra/mcp-docs-server 1.2.15 → 1.2.16-alpha.1
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/agent-approval.md +5 -5
- package/.docs/docs/agents/overview.md +4 -4
- package/.docs/docs/browser/overview.md +1 -1
- package/.docs/docs/capabilities/channels.md +5 -5
- package/.docs/docs/capabilities/subagents.md +1 -1
- package/.docs/docs/connections/overview.md +1 -1
- package/.docs/docs/datasets/overview.md +1 -1
- package/.docs/docs/deployment/cloud-providers.md +4 -2
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +4 -1
- package/.docs/docs/deployment/sandbox.md +1 -1
- package/.docs/docs/deployment/web-framework.md +1 -1
- package/.docs/docs/deployment/workers.md +248 -2
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/guides/multi-agent-systems.md +1 -1
- package/.docs/docs/harness/agent-controller.md +5 -5
- package/.docs/docs/harness/overview.md +1 -1
- package/.docs/docs/index.md +3 -3
- package/.docs/docs/long-running-agents/signal-providers.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +63 -18
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -2
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/overview.md +1 -5
- package/.docs/docs/observability/tracing/overview.md +3 -6
- package/.docs/docs/server/auth/workers.md +1 -1
- package/.docs/docs/server/auth.md +5 -5
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/storage/overview.md +7 -6
- package/.docs/docs/workflows/human-in-the-loop.md +2 -2
- package/.docs/docs/workflows/overview.md +2 -2
- package/.docs/docs/workspace/sandbox.md +11 -12
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
- package/.docs/integrations/agentic-ui/assistant-ui.md +1 -1
- package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
- package/.docs/integrations/agentic-ui/openui.md +1 -1
- package/.docs/integrations/databases/postgresql.md +8 -8
- package/.docs/integrations/deploy/amazon-ec2.md +2 -2
- package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -1
- package/.docs/integrations/deploy/aws-lambda.md +2 -2
- package/.docs/integrations/deploy/azure-app-services.md +2 -2
- package/.docs/integrations/deploy/cloudflare.md +2 -2
- package/.docs/integrations/deploy/digital-ocean.md +2 -2
- package/.docs/integrations/deploy/inngest.md +1 -1
- package/.docs/integrations/deploy/kubernetes.md +2 -3
- package/.docs/integrations/deploy/netlify.md +2 -2
- package/.docs/integrations/deploy/temporal.md +1 -1
- package/.docs/integrations/deploy/vercel.md +2 -2
- package/.docs/integrations/file-storage/agentfs.md +1 -1
- package/.docs/integrations/file-storage/amazon-s3.md +1 -1
- package/.docs/integrations/file-storage/archil.md +1 -1
- package/.docs/integrations/file-storage/azure-blob.md +1 -1
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/file-storage/google-drive.md +1 -1
- package/.docs/integrations/file-storage/mesa.md +1 -1
- package/.docs/integrations/file-storage/vercel-files.md +1 -1
- package/.docs/integrations/frameworks/astro.md +1 -1
- package/.docs/integrations/frameworks/electron.md +1 -1
- package/.docs/integrations/frameworks/express.md +1 -1
- package/.docs/integrations/frameworks/hono.md +1 -1
- package/.docs/integrations/frameworks/nestjs.md +1 -1
- package/.docs/integrations/frameworks/next-js.md +1 -1
- package/.docs/integrations/frameworks/nuxt.md +1 -1
- package/.docs/integrations/frameworks/sveltekit.md +1 -1
- package/.docs/integrations/frameworks/vite-react.md +1 -1
- package/.docs/integrations/sandboxes/agentcore.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +1 -1
- package/.docs/integrations/sandboxes/blaxel.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +1 -1
- package/.docs/integrations/sandboxes/docker.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +1 -1
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/vercel.md +3 -1
- package/.docs/integrations/tools/firecrawl.md +2 -2
- package/.docs/integrations/voice/livekit.md +3 -3
- package/.docs/integrations.md +108 -108
- package/.docs/models/gateways/vercel.md +1 -2
- package/.docs/models/providers/digitalocean.md +1 -1
- package/.docs/models/providers/kilo.md +7 -6
- package/.docs/models/providers/nano-gpt.md +3 -3
- package/.docs/models/providers/opencode.md +0 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/index.md +5 -1
- package/.docs/reference/manual-install.md +1 -1
- package/.docs/reference/migrations/network-to-supervisor.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/tracing.md +1 -3
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +0 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +111 -99
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/{guides → reference}/voice/overview.md +3 -3
- package/.docs/{guides → reference}/voice/speech-to-speech.md +1 -1
- package/.docs/{guides → reference}/voice/speech-to-text.md +1 -1
- package/.docs/{guides → reference}/voice/text-to-speech.md +2 -2
- package/CHANGELOG.md +7 -0
- package/package.json +5 -5
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +0 -201
- package/.docs/docs/observability/integrations/overview.md +0 -47
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +0 -302
- package/.docs/guides/deployment/mastra-workers.md +0 -578
- package/.docs/guides/getting-started/quickstart.md +0 -88
- package/.docs/guides/guide/ai-recruiter.md +0 -228
- package/.docs/guides/guide/code-review-bot.md +0 -228
- package/.docs/guides/guide/coding-agent.md +0 -392
- package/.docs/guides/guide/dev-assistant.md +0 -309
- package/.docs/guides/guide/docs-manager.md +0 -240
- package/.docs/guides/guide/github-actions-pr-description.md +0 -238
- package/.docs/guides/guide/notes-mcp-server.md +0 -418
- package/.docs/guides/guide/research-assistant.md +0 -350
- package/.docs/guides/guide/research-coordinator.md +0 -418
- package/.docs/guides/guide/signal-provider.md +0 -221
- package/.docs/guides/index.md +0 -24
- /package/.docs/{reference → docs}/mastra-platform/api.md +0 -0
- /package/.docs/{guides/agent-frameworks/ai-sdk.md → reference/ai-sdk/overview.md} +0 -0
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Sensitive data filter
|
|
4
|
-
|
|
5
|
-
The Sensitive Data Filter is a span processor that redacts sensitive information from your traces during the processing pipeline before export. This ensures that passwords, API keys, tokens, and other confidential data never leave your application or get stored in observability platforms.
|
|
6
|
-
|
|
7
|
-
## Default configuration
|
|
8
|
-
|
|
9
|
-
The Sensitive Data Filter is included in the recommended observability configuration:
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
import {
|
|
13
|
-
Observability,
|
|
14
|
-
MastraStorageExporter,
|
|
15
|
-
MastraPlatformExporter,
|
|
16
|
-
SensitiveDataFilter,
|
|
17
|
-
} from '@mastra/observability'
|
|
18
|
-
|
|
19
|
-
export const mastra = new Mastra({
|
|
20
|
-
observability: new Observability({
|
|
21
|
-
configs: {
|
|
22
|
-
default: {
|
|
23
|
-
serviceName: 'mastra',
|
|
24
|
-
exporters: [new MastraStorageExporter(), new MastraPlatformExporter()],
|
|
25
|
-
spanOutputProcessors: [
|
|
26
|
-
new SensitiveDataFilter(), // Redacts sensitive fields before export
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
storage: new LibSQLStore({
|
|
32
|
-
id: 'mastra-storage',
|
|
33
|
-
url: 'file:./mastra.db',
|
|
34
|
-
}),
|
|
35
|
-
})
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
With the default configuration, the filter redacts these common sensitive field names:
|
|
39
|
-
|
|
40
|
-
- `password`
|
|
41
|
-
- `token`
|
|
42
|
-
- `secret`
|
|
43
|
-
- `key`
|
|
44
|
-
- `apikey`
|
|
45
|
-
- `auth`
|
|
46
|
-
- `authorization`
|
|
47
|
-
- `bearer`
|
|
48
|
-
- `bearertoken`
|
|
49
|
-
- `jwt`
|
|
50
|
-
- `credential`
|
|
51
|
-
- `clientsecret`
|
|
52
|
-
- `privatekey`
|
|
53
|
-
- `refresh`
|
|
54
|
-
- `ssn`
|
|
55
|
-
|
|
56
|
-
> **Note:** Field matching is case-insensitive and normalizes separators. For example, `api-key`, `api_key`, and `Api Key` are all treated as `apikey`.
|
|
57
|
-
|
|
58
|
-
## How it works
|
|
59
|
-
|
|
60
|
-
The Sensitive Data Filter processes spans before they're sent to exporters, scanning through:
|
|
61
|
-
|
|
62
|
-
- **Attributes** - Span metadata and properties
|
|
63
|
-
- **Metadata** - Custom metadata attached to spans
|
|
64
|
-
- **Input** - Data sent to agents, tools, and LLMs
|
|
65
|
-
- **Output** - Responses and results
|
|
66
|
-
- **Error Information** - Stack traces and error details
|
|
67
|
-
|
|
68
|
-
When a sensitive field is detected, its value is replaced with `[REDACTED]` by default. The filter handles nested objects, arrays, and circular references safely.
|
|
69
|
-
|
|
70
|
-
## Custom configuration
|
|
71
|
-
|
|
72
|
-
You can customize which fields are redacted and how redaction displays:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
import { SensitiveDataFilter, MastraStorageExporter, Observability } from '@mastra/observability'
|
|
76
|
-
|
|
77
|
-
export const mastra = new Mastra({
|
|
78
|
-
observability: new Observability({
|
|
79
|
-
configs: {
|
|
80
|
-
production: {
|
|
81
|
-
serviceName: 'my-service',
|
|
82
|
-
exporters: [new MastraStorageExporter()],
|
|
83
|
-
spanOutputProcessors: [
|
|
84
|
-
new SensitiveDataFilter({
|
|
85
|
-
// Add custom sensitive fields
|
|
86
|
-
sensitiveFields: [
|
|
87
|
-
// Default fields
|
|
88
|
-
'password',
|
|
89
|
-
'token',
|
|
90
|
-
'secret',
|
|
91
|
-
'key',
|
|
92
|
-
'apikey',
|
|
93
|
-
// Custom fields for your application
|
|
94
|
-
'creditCard',
|
|
95
|
-
'bankAccount',
|
|
96
|
-
'routingNumber',
|
|
97
|
-
'email',
|
|
98
|
-
'phoneNumber',
|
|
99
|
-
'dateOfBirth',
|
|
100
|
-
],
|
|
101
|
-
// Custom redaction token
|
|
102
|
-
redactionToken: '***SENSITIVE***',
|
|
103
|
-
// Redaction style
|
|
104
|
-
redactionStyle: 'full', // or 'partial'
|
|
105
|
-
}),
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
}),
|
|
110
|
-
})
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Redaction styles
|
|
114
|
-
|
|
115
|
-
The filter supports two redaction styles:
|
|
116
|
-
|
|
117
|
-
### Full Redaction (Default)
|
|
118
|
-
|
|
119
|
-
Replaces the entire value with a fixed token:
|
|
120
|
-
|
|
121
|
-
```jsonc
|
|
122
|
-
// Before
|
|
123
|
-
{
|
|
124
|
-
"apiKey": "sk-abc123xyz789def456",
|
|
125
|
-
"userId": "user_12345"
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// After
|
|
129
|
-
{
|
|
130
|
-
"apiKey": "[REDACTED]",
|
|
131
|
-
"userId": "user_12345"
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Partial Redaction
|
|
136
|
-
|
|
137
|
-
Shows the first and last 3 characters, useful for debugging without exposing full values:
|
|
138
|
-
|
|
139
|
-
```ts
|
|
140
|
-
new SensitiveDataFilter({
|
|
141
|
-
redactionStyle: 'partial',
|
|
142
|
-
})
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
```json
|
|
146
|
-
// Before
|
|
147
|
-
{
|
|
148
|
-
"apiKey": "sk-abc123xyz789def456",
|
|
149
|
-
"creditCard": "4111111111111111"
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// After
|
|
153
|
-
{
|
|
154
|
-
"apiKey": "sk-…456",
|
|
155
|
-
"creditCard": "411…111"
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Values shorter than 7 characters are fully redacted to prevent information leakage.
|
|
160
|
-
|
|
161
|
-
## Field matching rules
|
|
162
|
-
|
|
163
|
-
The filter uses intelligent field matching:
|
|
164
|
-
|
|
165
|
-
1. **Case-Insensitive**: `APIKey`, `apikey`, and `ApiKey` are all matched
|
|
166
|
-
|
|
167
|
-
2. **Separator-Agnostic**: `api-key`, `api_key`, and `apiKey` are treated identically
|
|
168
|
-
|
|
169
|
-
3. **Exact Matching**: After normalization, fields must match exactly
|
|
170
|
-
|
|
171
|
-
- `token` matches `token`, `Token`, `TOKEN`
|
|
172
|
-
- `token` doesn't match `promptTokens` or `tokenCount`
|
|
173
|
-
|
|
174
|
-
## Nested object handling
|
|
175
|
-
|
|
176
|
-
The filter recursively processes nested structures:
|
|
177
|
-
|
|
178
|
-
```json
|
|
179
|
-
// Before
|
|
180
|
-
{
|
|
181
|
-
"user": {
|
|
182
|
-
"id": "12345",
|
|
183
|
-
"credentials": {
|
|
184
|
-
"password": "SuperSecret123!",
|
|
185
|
-
"apiKey": "sk-production-key"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"config": {
|
|
189
|
-
"auth": {
|
|
190
|
-
"jwt": "eyJhbGciOiJIUzI1NiIs..."
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// After
|
|
196
|
-
{
|
|
197
|
-
"user": {
|
|
198
|
-
"id": "12345",
|
|
199
|
-
"credentials": {
|
|
200
|
-
"password": "[REDACTED]",
|
|
201
|
-
"apiKey": "[REDACTED]"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"config": {
|
|
205
|
-
"auth": {
|
|
206
|
-
"jwt": "[REDACTED]"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Performance considerations
|
|
213
|
-
|
|
214
|
-
The Sensitive Data Filter is designed to be lightweight and efficient:
|
|
215
|
-
|
|
216
|
-
- **Synchronous Processing**: No async operations, minimal latency impact
|
|
217
|
-
- **Circular Reference Handling**: Safely handles complex object graphs
|
|
218
|
-
- **Error Recovery**: If filtering fails, the field is replaced with an error marker rather than crashing
|
|
219
|
-
|
|
220
|
-
## Disabling the filter
|
|
221
|
-
|
|
222
|
-
If you need to disable sensitive data filtering (not recommended for production):
|
|
223
|
-
|
|
224
|
-
```ts
|
|
225
|
-
export const mastra = new Mastra({
|
|
226
|
-
observability: new Observability({
|
|
227
|
-
configs: {
|
|
228
|
-
debug: {
|
|
229
|
-
serviceName: 'debug-service',
|
|
230
|
-
spanOutputProcessors: [], // No processors, including no SensitiveDataFilter
|
|
231
|
-
exporters: [new MastraStorageExporter()],
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
}),
|
|
235
|
-
})
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
> **Warning:** Only disable sensitive data filtering in controlled environments. Never disable it when sending traces to external services or shared storage.
|
|
239
|
-
|
|
240
|
-
## Common use cases
|
|
241
|
-
|
|
242
|
-
### Healthcare Applications
|
|
243
|
-
|
|
244
|
-
```ts
|
|
245
|
-
new SensitiveDataFilter({
|
|
246
|
-
sensitiveFields: [
|
|
247
|
-
// HIPAA-related fields
|
|
248
|
-
'ssn',
|
|
249
|
-
'socialSecurityNumber',
|
|
250
|
-
'medicalRecordNumber',
|
|
251
|
-
'mrn',
|
|
252
|
-
'healthInsuranceNumber',
|
|
253
|
-
'diagnosisCode',
|
|
254
|
-
'icd10',
|
|
255
|
-
'prescription',
|
|
256
|
-
'medication',
|
|
257
|
-
],
|
|
258
|
-
})
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Financial Services
|
|
262
|
-
|
|
263
|
-
```ts
|
|
264
|
-
new SensitiveDataFilter({
|
|
265
|
-
sensitiveFields: [
|
|
266
|
-
// PCI compliance fields
|
|
267
|
-
'creditCard',
|
|
268
|
-
'ccNumber',
|
|
269
|
-
'cardNumber',
|
|
270
|
-
'cvv',
|
|
271
|
-
'cvc',
|
|
272
|
-
'securityCode',
|
|
273
|
-
'expirationDate',
|
|
274
|
-
'expiry',
|
|
275
|
-
'bankAccount',
|
|
276
|
-
'accountNumber',
|
|
277
|
-
'routingNumber',
|
|
278
|
-
'iban',
|
|
279
|
-
'swift',
|
|
280
|
-
],
|
|
281
|
-
})
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
## Error handling
|
|
285
|
-
|
|
286
|
-
If the filter encounters an error while processing a field, it replaces the field with a safe error marker:
|
|
287
|
-
|
|
288
|
-
```json
|
|
289
|
-
{
|
|
290
|
-
"problematicField": {
|
|
291
|
-
"error": {
|
|
292
|
-
"processor": "sensitive-data-filter"
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
As a result, processing errors don't prevent traces from being exported or cause application crashes.
|
|
299
|
-
|
|
300
|
-
## Related
|
|
301
|
-
|
|
302
|
-
- [SensitiveDataFilter API](https://mastra.ai/reference/observability/tracing/processors/sensitive-data-filter)
|