@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
|
@@ -2,27 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
# SensitiveDataFilter
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`SensitiveDataFilter` is a span output processor that redacts values whose field names match a configured list. [`Observability`](https://mastra.ai/reference/observability/tracing/configuration) applies it to plain observability configurations by default.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Usage example
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
To opt out or customize the auto-applied filter, use the `sensitiveDataFilter` option on the [`Observability` registry config](https://mastra.ai/reference/observability/tracing/configuration):
|
|
9
|
+
Configure the automatically applied filter with the top-level `sensitiveDataFilter` option. The filter runs after user-provided span output processors so it can redact values they add or expose.
|
|
12
10
|
|
|
13
11
|
```typescript
|
|
14
|
-
import {
|
|
12
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
13
|
+
import { Observability, MastraStorageExporter } from '@mastra/observability'
|
|
14
|
+
|
|
15
|
+
export const mastra = new Mastra({
|
|
16
|
+
observability: new Observability({
|
|
17
|
+
configs: {
|
|
18
|
+
default: {
|
|
19
|
+
serviceName: 'my-service',
|
|
20
|
+
exporters: [new MastraStorageExporter()],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
sensitiveDataFilter: {
|
|
24
|
+
sensitiveFields: ['password', 'authorization', 'customerSecret'],
|
|
25
|
+
redactionToken: '[HIDDEN]',
|
|
26
|
+
redactionStyle: 'full',
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
})
|
|
30
|
+
```
|
|
15
31
|
|
|
32
|
+
Passing `sensitiveFields` replaces the default field list. Include every default field you still want to redact.
|
|
33
|
+
|
|
34
|
+
To disable automatic filtering for all plain configurations, set `sensitiveDataFilter` to `false`:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
16
37
|
new Observability({
|
|
17
|
-
configs: {
|
|
18
|
-
|
|
38
|
+
configs: {
|
|
39
|
+
debug: {
|
|
40
|
+
serviceName: 'debug-service',
|
|
41
|
+
exporters: [new MastraStorageExporter()],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
19
44
|
sensitiveDataFilter: false,
|
|
20
|
-
// or customize it
|
|
21
|
-
// sensitiveDataFilter: { sensitiveFields: ['mySecret'], redactionStyle: 'partial' },
|
|
22
45
|
})
|
|
23
46
|
```
|
|
24
47
|
|
|
25
|
-
If a
|
|
48
|
+
If a plain configuration already contains a `SensitiveDataFilter` in `spanOutputProcessors`, `Observability` uses that instance and doesn't add another. Pre-instantiated `ObservabilityInstance` values aren't modified. Add the processor when constructing those instances if they need filtering.
|
|
26
49
|
|
|
27
50
|
## Constructor
|
|
28
51
|
|
|
@@ -30,120 +53,82 @@ If a config already includes a `SensitiveDataFilter` in `spanOutputProcessors`,
|
|
|
30
53
|
new SensitiveDataFilter(options?: SensitiveDataFilterOptions)
|
|
31
54
|
```
|
|
32
55
|
|
|
33
|
-
|
|
56
|
+
**sensitiveFields** (`string[]`): Complete list of field names to redact. Matching is case-insensitive and ignores separators. Replaces the default list when provided. (Default: `['password', 'token', 'secret', 'key', 'apikey', 'auth', 'authorization', 'bearer', 'bearertoken', 'jwt', 'credential', 'clientsecret', 'privatekey', 'refresh', 'ssn']`)
|
|
57
|
+
|
|
58
|
+
**redactionToken** (`string`): Replacement value used for full redaction and short values under partial redaction. (Default: `'[REDACTED]'`)
|
|
59
|
+
|
|
60
|
+
**redactionStyle** (`'full' | 'partial'`): Controls whether matched values are fully or partially redacted. (Default: `'full'`)
|
|
34
61
|
|
|
35
62
|
```typescript
|
|
36
63
|
interface SensitiveDataFilterOptions {
|
|
37
|
-
/**
|
|
38
|
-
* List of sensitive field names to redact.
|
|
39
|
-
* Matching is case-insensitive and normalizes separators
|
|
40
|
-
* (api-key, api_key, Api Key → apikey).
|
|
41
|
-
* Defaults include: password, token, secret, key, apikey, auth,
|
|
42
|
-
* authorization, bearer, bearertoken, jwt, credential,
|
|
43
|
-
* clientsecret, privatekey, refresh, ssn.
|
|
44
|
-
*/
|
|
45
64
|
sensitiveFields?: string[]
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The token used for full redaction.
|
|
49
|
-
* Default: "[REDACTED]"
|
|
50
|
-
*/
|
|
51
65
|
redactionToken?: string
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Style of redaction to use:
|
|
55
|
-
* - "full": always replace with redactionToken
|
|
56
|
-
* - "partial": show 3 characters from the start and end, redact the middle
|
|
57
|
-
* Default: "full"
|
|
58
|
-
*/
|
|
59
66
|
redactionStyle?: RedactionStyle
|
|
60
67
|
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## `RedactionStyle`
|
|
64
68
|
|
|
65
|
-
```typescript
|
|
66
69
|
type RedactionStyle = 'full' | 'partial'
|
|
67
70
|
```
|
|
68
71
|
|
|
69
|
-
##
|
|
70
|
-
|
|
71
|
-
### process
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
process(span: AnySpan): AnySpan
|
|
75
|
-
```
|
|
72
|
+
## Redaction styles
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
### Full redaction
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
Full redaction replaces each matched primitive value with `redactionToken`.
|
|
80
77
|
|
|
81
|
-
|
|
78
|
+
```jsonc
|
|
79
|
+
// Before
|
|
80
|
+
{ "apiKey": "sk-abc123xyz789", "userId": "user_123" }
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
// After
|
|
83
|
+
{ "apiKey": "[REDACTED]", "userId": "user_123" }
|
|
85
84
|
```
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
### Partial redaction
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
Partial redaction preserves the first and last three characters. Values with six or fewer characters use `redactionToken` instead. Non-string primitive values are converted to strings before redaction.
|
|
90
89
|
|
|
91
90
|
```typescript
|
|
92
|
-
|
|
91
|
+
const filter = new SensitiveDataFilter({
|
|
92
|
+
redactionStyle: 'partial',
|
|
93
|
+
})
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
```jsonc
|
|
97
|
+
// Before
|
|
98
|
+
{ "apiKey": "sk-abc123xyz789" }
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
[
|
|
101
|
-
'password',
|
|
102
|
-
'token',
|
|
103
|
-
'secret',
|
|
104
|
-
'key',
|
|
105
|
-
'apikey',
|
|
106
|
-
'auth',
|
|
107
|
-
'authorization',
|
|
108
|
-
'bearer',
|
|
109
|
-
'bearertoken',
|
|
110
|
-
'jwt',
|
|
111
|
-
'credential',
|
|
112
|
-
'clientsecret',
|
|
113
|
-
'privatekey',
|
|
114
|
-
'refresh',
|
|
115
|
-
'ssn',
|
|
116
|
-
]
|
|
100
|
+
// After
|
|
101
|
+
{ "apiKey": "sk-…789" }
|
|
117
102
|
```
|
|
118
103
|
|
|
119
|
-
##
|
|
104
|
+
## Field matching
|
|
120
105
|
|
|
121
|
-
|
|
106
|
+
Field names are lowercased and stripped of non-alphanumeric characters before comparison:
|
|
122
107
|
|
|
123
|
-
-
|
|
108
|
+
- `api-key`, `api_key`, `Api Key`, and `apiKey` normalize to `apikey`.
|
|
109
|
+
- Matching is exact after normalization. `token` matches `Token`, but doesn't match `promptTokens`, `tokenCount`, or `authToken`.
|
|
124
110
|
|
|
125
|
-
|
|
111
|
+
When a matched field contains an object or array, the filter traverses that value and redacts sensitive fields within it rather than replacing the complete structure.
|
|
126
112
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- `token` matches `token`, `Token`, `TOKEN`
|
|
130
|
-
- `token` doesn't match `promptTokens` or `tokenCount`
|
|
131
|
-
|
|
132
|
-
### Redaction Styles
|
|
133
|
-
|
|
134
|
-
#### Full Redaction (default)
|
|
113
|
+
## Processing behavior
|
|
135
114
|
|
|
136
|
-
|
|
115
|
+
`process()` filters these top-level span fields independently:
|
|
137
116
|
|
|
138
|
-
|
|
117
|
+
- `attributes`
|
|
118
|
+
- `metadata`
|
|
119
|
+
- `input`
|
|
120
|
+
- `output`
|
|
121
|
+
- `errorInfo`
|
|
139
122
|
|
|
140
|
-
|
|
141
|
-
- Values ≤ 6 characters are fully redacted
|
|
142
|
-
- Non-string values are converted to strings before partial redaction
|
|
123
|
+
Within each field, the processor:
|
|
143
124
|
|
|
144
|
-
|
|
125
|
+
- Traverses nested objects and arrays.
|
|
126
|
+
- Parses and filters JSON strings that contain objects or arrays. It then serializes the filtered value.
|
|
127
|
+
- Leaves invalid JSON strings unchanged.
|
|
128
|
+
- Preserves `Date` instances.
|
|
129
|
+
- Replaces repeated object references with `[Circular Reference]`.
|
|
145
130
|
|
|
146
|
-
If filtering
|
|
131
|
+
If filtering fails anywhere within one top-level span field, that complete field is replaced with this marker:
|
|
147
132
|
|
|
148
133
|
```typescript
|
|
149
134
|
{
|
|
@@ -153,14 +138,41 @@ If filtering a field fails, the field is replaced with:
|
|
|
153
138
|
}
|
|
154
139
|
```
|
|
155
140
|
|
|
156
|
-
|
|
141
|
+
## Methods
|
|
142
|
+
|
|
143
|
+
### Processing
|
|
157
144
|
|
|
158
|
-
|
|
145
|
+
#### `process(span)`
|
|
159
146
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
147
|
+
Redacts the supported fields on the supplied span in place and returns the same span.
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
import type { AnySpan } from '@mastra/core/observability'
|
|
151
|
+
import { SensitiveDataFilter } from '@mastra/observability'
|
|
152
|
+
|
|
153
|
+
const filter = new SensitiveDataFilter()
|
|
154
|
+
|
|
155
|
+
export function redactSpan(span: AnySpan): AnySpan {
|
|
156
|
+
return filter.process(span)
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**span** (`AnySpan`): Span whose attributes, metadata, input, output, and error information are filtered.
|
|
161
|
+
|
|
162
|
+
Returns: `AnySpan`
|
|
163
|
+
|
|
164
|
+
### Lifecycle
|
|
165
|
+
|
|
166
|
+
#### `shutdown()`
|
|
167
|
+
|
|
168
|
+
Completes processor shutdown. The current processor has no resources or state to clean up.
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
await filter.shutdown()
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Returns: `Promise<void>`
|
|
175
|
+
|
|
176
|
+
## Properties
|
|
165
177
|
|
|
166
|
-
|
|
178
|
+
**name** (`string`): Processor identifier. (Default: `'sensitive-data-filter'`)
|
|
@@ -94,4 +94,4 @@ If `spanFilter` throws an error, Mastra keeps the span and logs the error to avo
|
|
|
94
94
|
|
|
95
95
|
- [Tracing overview](https://mastra.ai/docs/observability/tracing/overview) for setup and concepts
|
|
96
96
|
- [Configuration API](https://mastra.ai/reference/observability/tracing/configuration) for `ObservabilityInstanceConfig`
|
|
97
|
-
- [Sensitive data filter](https://mastra.ai/
|
|
97
|
+
- [Sensitive data filter](https://mastra.ai/reference/observability/tracing/processors/sensitive-data-filter) for redacting span data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Storage
|
|
3
|
+
# Storage
|
|
4
4
|
|
|
5
5
|
Mastra storage is organized into domains. Each domain owns a set of tables or collections. Depending on your adapter and configuration, you may use all domains or only a subset.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Templates
|
|
4
4
|
|
|
5
5
|
This reference explains how to use existing Mastra templates and create your own. It also covers contributing templates to the community ecosystem.
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ You can then use the following voice capabilities:
|
|
|
29
29
|
|
|
30
30
|
Turn your agent's responses into natural-sounding speech using Mastra's TTS capabilities. Choose from multiple providers like OpenAI, ElevenLabs, and more.
|
|
31
31
|
|
|
32
|
-
For detailed configuration options and advanced features, check out our [Text-to-Speech guide](https://mastra.ai/
|
|
32
|
+
For detailed configuration options and advanced features, check out our [Text-to-Speech guide](https://mastra.ai/reference/voice/text-to-speech).
|
|
33
33
|
|
|
34
34
|
**OpenAI**:
|
|
35
35
|
|
|
@@ -304,7 +304,7 @@ Visit the [Murf Voice Reference](https://mastra.ai/integrations/voice/murf) for
|
|
|
304
304
|
|
|
305
305
|
### Speech to Text (STT)
|
|
306
306
|
|
|
307
|
-
Transcribe spoken content using providers like OpenAI, ElevenLabs, and more. For detailed configuration options and more, check out [Speech to Text](https://mastra.ai/
|
|
307
|
+
Transcribe spoken content using providers like OpenAI, ElevenLabs, and more. For detailed configuration options and more, check out [Speech to Text](https://mastra.ai/reference/voice/speech-to-text).
|
|
308
308
|
|
|
309
309
|
You can download a sample audio file from [here](https://github.com/mastra-ai/realtime-voice-demo/raw/refs/heads/main/how_can_i_help_you.mp3).
|
|
310
310
|
|
|
@@ -537,7 +537,7 @@ Visit the [Sarvam Voice Reference](https://mastra.ai/integrations/voice/sarvam)
|
|
|
537
537
|
|
|
538
538
|
### Speech to Speech (STS)
|
|
539
539
|
|
|
540
|
-
Create conversational experiences with speech-to-speech capabilities. The unified API enables real-time voice interactions between users and AI agents. For detailed configuration options and advanced features, check out [Speech to Speech](https://mastra.ai/
|
|
540
|
+
Create conversational experiences with speech-to-speech capabilities. The unified API enables real-time voice interactions between users and AI agents. For detailed configuration options and advanced features, check out [Speech to Speech](https://mastra.ai/reference/voice/speech-to-speech).
|
|
541
541
|
|
|
542
542
|
**OpenAI**:
|
|
543
543
|
|
|
@@ -54,7 +54,7 @@ const micStream = getMicrophoneStream()
|
|
|
54
54
|
await agent.voice.send(micStream)
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/
|
|
57
|
+
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/reference/voice/overview).
|
|
58
58
|
|
|
59
59
|
## Use tools in realtime sessions
|
|
60
60
|
|
|
@@ -96,4 +96,4 @@ const transcription = await agent.voice.listen(audioStream, {
|
|
|
96
96
|
console.log(`Transcription: ${transcription}`)
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/
|
|
99
|
+
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/reference/voice/overview).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Text-to-Speech (TTS) in Mastra offers a unified API for synthesizing spoken audio from text using providers. By incorporating TTS into your applications, you can enhance user experience with natural voice interactions and improve accessibility for users with visual impairments, plus create more engaging multimodal interfaces.
|
|
6
6
|
|
|
7
|
-
TTS is a core component of any voice application. Combined with STT (Speech-to-Text), it forms the foundation of voice interaction systems. Newer models support STS ([Speech-to-Speech](https://mastra.ai/
|
|
7
|
+
TTS is a core component of any voice application. Combined with STT (Speech-to-Text), it forms the foundation of voice interaction systems. Newer models support STS ([Speech-to-Speech](https://mastra.ai/reference/voice/speech-to-speech)) which can be used for real-time interactions but come at high cost ($).
|
|
8
8
|
|
|
9
9
|
## Configuration
|
|
10
10
|
|
|
@@ -101,4 +101,4 @@ await new Promise<void>((resolve, reject) => {
|
|
|
101
101
|
})
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/
|
|
104
|
+
For a broader overview of voice providers on agents, see [Voice in Mastra](https://mastra.ai/reference/voice/overview).
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.16-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`088e41e`](https://github.com/mastra-ai/mastra/commit/088e41e434ed05f2c674b254f1034ec46a57a7be), [`b2f0013`](https://github.com/mastra-ai/mastra/commit/b2f0013375588d40c03c13e843b99c0ff8872ca5), [`3b541ae`](https://github.com/mastra-ai/mastra/commit/3b541ae5d410c52b80a7e381d84d021cddb9a449), [`ae79e34`](https://github.com/mastra-ai/mastra/commit/ae79e34c0bd8674fc24c7524217bfc4a051c6136), [`a6c4399`](https://github.com/mastra-ai/mastra/commit/a6c4399763590b3dae21a2c81826e89a3b1deee4)]:
|
|
8
|
+
- @mastra/core@1.59.0-alpha.0
|
|
9
|
+
|
|
3
10
|
## 1.2.15
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16-alpha.1",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/
|
|
32
|
-
"@mastra/
|
|
31
|
+
"@mastra/mcp": "^1.16.0",
|
|
32
|
+
"@mastra/core": "1.59.0-alpha.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^2.0.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.122",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
49
|
+
"@internal/types-builder": "0.0.97",
|
|
50
|
+
"@mastra/core": "1.59.0-alpha.0"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Mastra platform exporter
|
|
4
|
-
|
|
5
|
-
The `MastraPlatformExporter` sends traces, logs, metrics, scores, and feedback to the Mastra platform. Use it to route observability data from any Mastra app to a hosted project in the Mastra platform.
|
|
6
|
-
|
|
7
|
-
> **Note:** `MastraPlatformExporter` was previously called `CloudExporter`. The original `CloudExporter` class is still exported from `@mastra/observability` for backward compatibility, but it's deprecated. New code should use `MastraPlatformExporter`.
|
|
8
|
-
|
|
9
|
-
> **Self-hosted or standalone apps:** If you host your Mastra application on your own infrastructure (not on Mastra platform), you still need a deployed Studio project to view traces, logs, and metrics. `MastraPlatformExporter` sends data to a Studio project, so one must exist before you can use it.
|
|
10
|
-
>
|
|
11
|
-
> 1. [Create a Mastra project](https://mastra.ai/guides/getting-started/quickstart) if you don't have one yet.
|
|
12
|
-
> 2. [Deploy Studio](https://mastra.ai/docs/studio/deployment) to the Mastra platform with `mastra studio deploy`.
|
|
13
|
-
> 3. Follow the [quickstart steps below](#quickstart) to create an access token and find your project ID.
|
|
14
|
-
|
|
15
|
-
## Version compatibility
|
|
16
|
-
|
|
17
|
-
- `MastraPlatformExporter` is available starting in `@mastra/observability@1.12.0`. In `1.8.0` through `1.11.x` the same exporter includes only as `CloudExporter`. The constructor signature and environment variables are identical.
|
|
18
|
-
- In `@mastra/observability@1.8.0` through `1.9.1`, set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT=https://observability.mastra.ai` in addition to `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID`.
|
|
19
|
-
- Starting in `@mastra/observability@1.9.2`, the exporter defaults to `https://observability.mastra.ai`, so `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT` is only required when you want to send telemetry to a different collector.
|
|
20
|
-
|
|
21
|
-
## Quickstart
|
|
22
|
-
|
|
23
|
-
To connect `MastraPlatformExporter`, create an access token, find the destination `projectId`, and add the exporter to your observability config.
|
|
24
|
-
|
|
25
|
-
### 1. Create an access token
|
|
26
|
-
|
|
27
|
-
Run the following command:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
mastra auth tokens create exporter-token
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This command prints a token secret that you can use as `MASTRA_PLATFORM_ACCESS_TOKEN`.
|
|
34
|
-
|
|
35
|
-
If you already have an access token, copy the **Observability** value from the Mastra platform instead. You can find it in either of these places:
|
|
36
|
-
|
|
37
|
-
- On the **Projects** page, open the project list and find the **Observability** row on the project card.
|
|
38
|
-
- On the project **Overview** page, find the **Observability** row directly below the deployment URL.
|
|
39
|
-
|
|
40
|
-
Set the token as an environment variable:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
MASTRA_PLATFORM_ACCESS_TOKEN=<your-platform-access-token>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 2. Find your `projectId`
|
|
47
|
-
|
|
48
|
-
Run the following command:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
mastra studio deploy list
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The output looks similar to this:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
✅ <your-project-name> (<your-project-id>)
|
|
58
|
-
Latest: 00000000-0000-0000-0000-000000000000 — running
|
|
59
|
-
URL: https://260407.studio.mastra.cloud
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
In this output, the value in parentheses is the `projectId`:
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
<your-project-id>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Set it as an environment variable:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
MASTRA_PROJECT_ID=<your-project-id>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 3. Set your environment variables
|
|
75
|
-
|
|
76
|
-
Set both values in your environment so `MastraPlatformExporter` can authenticate and route telemetry to the correct project:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
MASTRA_PLATFORM_ACCESS_TOKEN=<your-platform-access-token>
|
|
80
|
-
MASTRA_PROJECT_ID=<your-project-id>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
If you use `@mastra/observability@1.8.0` through `1.9.1`, also set the Mastra platform collector explicitly:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT=https://observability.mastra.ai
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
If you want to send telemetry somewhere other than Mastra platform, set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT` as well. Pass either a base origin or a full traces publish URL ending in `/spans/publish`.
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT=https://collector.example.com
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
When you pass a base origin, `MastraPlatformExporter` derives the matching publish URLs for traces, logs, metrics, scores, and feedback automatically.
|
|
96
|
-
|
|
97
|
-
### 4. Enable `MastraPlatformExporter`
|
|
98
|
-
|
|
99
|
-
The following example demonstrates how to add `MastraPlatformExporter` to your observability config:
|
|
100
|
-
|
|
101
|
-
```ts
|
|
102
|
-
import { Mastra } from '@mastra/core'
|
|
103
|
-
import { Observability, MastraPlatformExporter } from '@mastra/observability'
|
|
104
|
-
|
|
105
|
-
export const mastra = new Mastra({
|
|
106
|
-
observability: new Observability({
|
|
107
|
-
configs: {
|
|
108
|
-
production: {
|
|
109
|
-
serviceName: 'api-server',
|
|
110
|
-
exporters: [new MastraPlatformExporter()],
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
}),
|
|
114
|
-
})
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Set `serviceName` on the observability config, not on `MastraPlatformExporter` itself.
|
|
118
|
-
|
|
119
|
-
Use a stable `serviceName` value. In Studio, traces can be filtered by **Deployments → Service Name**, so a consistent name makes traces easier to find.
|
|
120
|
-
|
|
121
|
-
Visit [Observability configuration reference](https://mastra.ai/reference/observability/tracing/configuration) for the full observability config shape.
|
|
122
|
-
|
|
123
|
-
If you prefer, rely entirely on environment variables:
|
|
124
|
-
|
|
125
|
-
```ts
|
|
126
|
-
new MastraPlatformExporter()
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
With `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `MastraPlatformExporter` sends data to the Mastra platform project you configured. If you also set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`, it sends data to that collector instead. Visit [MastraPlatformExporter reference](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for the full list of configuration options.
|
|
130
|
-
|
|
131
|
-
## Recommended configuration
|
|
132
|
-
|
|
133
|
-
Include `MastraStorageExporter` if you also want to inspect local traces in Studio or persist observability data to your configured storage.
|
|
134
|
-
|
|
135
|
-
```ts
|
|
136
|
-
import { Mastra } from '@mastra/core'
|
|
137
|
-
import {
|
|
138
|
-
Observability,
|
|
139
|
-
MastraStorageExporter,
|
|
140
|
-
MastraPlatformExporter,
|
|
141
|
-
SensitiveDataFilter,
|
|
142
|
-
} from '@mastra/observability'
|
|
143
|
-
|
|
144
|
-
export const mastra = new Mastra({
|
|
145
|
-
observability: new Observability({
|
|
146
|
-
configs: {
|
|
147
|
-
default: {
|
|
148
|
-
serviceName: 'mastra',
|
|
149
|
-
exporters: [new MastraStorageExporter(), new MastraPlatformExporter()],
|
|
150
|
-
spanOutputProcessors: [new SensitiveDataFilter()],
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
})
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Complete configuration
|
|
158
|
-
|
|
159
|
-
`MastraPlatformExporter` defaults to Mastra platform. If you want to send telemetry to a different collector, set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT` in your environment or pass `endpoint` in code.
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT=https://collector.example.com
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
The following example demonstrates how to override the collector endpoint and batching behavior in code:
|
|
166
|
-
|
|
167
|
-
```ts
|
|
168
|
-
new MastraPlatformExporter({
|
|
169
|
-
endpoint: 'https://collector.example.com',
|
|
170
|
-
maxBatchSize: 1000,
|
|
171
|
-
maxBatchWaitMs: 5000,
|
|
172
|
-
logLevel: 'info',
|
|
173
|
-
})
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Viewing data in Mastra Studio
|
|
177
|
-
|
|
178
|
-
After you enable `MastraPlatformExporter`, open your project in [Mastra Studio](https://projects.mastra.ai) to inspect the exported data.
|
|
179
|
-
|
|
180
|
-
- Open the project you set `MASTRA_PROJECT_ID` to and select **Open Studio**.
|
|
181
|
-
- In Studio, go to **Traces** to inspect agent and workflow traces.
|
|
182
|
-
- Open the filter menu and use **Deployments → Service Name** to isolate traces from a specific app or deployment.
|
|
183
|
-
- Use the **Logs** page in the project dashboard to inspect exported logs.
|
|
184
|
-
|
|
185
|
-
When you deploy with Mastra Studio, set **Deployment → Service Name** to a stable value and keep it aligned with the `serviceName` in your observability config. This makes traces easier to filter in Studio through **Deployments → Service Name** when multiple services or deployments send data to the same project.
|
|
186
|
-
|
|
187
|
-
## Performance
|
|
188
|
-
|
|
189
|
-
> **Note:** MastraPlatformExporter uses batching to optimize network usage. Events are buffered and sent in batches, reducing overhead while maintaining near real-time visibility.
|
|
190
|
-
|
|
191
|
-
### Batching behavior
|
|
192
|
-
|
|
193
|
-
- Events are batched up to `maxBatchSize` (default: 1000).
|
|
194
|
-
- Batches are sent when full or after `maxBatchWaitMs` (default: 5 seconds).
|
|
195
|
-
- Failed batches are retried with exponential backoff.
|
|
196
|
-
- The exporter degrades gracefully if Mastra Studio is unreachable.
|
|
197
|
-
|
|
198
|
-
## Related
|
|
199
|
-
|
|
200
|
-
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview)
|
|
201
|
-
- [MastraStorageExporter](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Integrations overview
|
|
4
|
-
|
|
5
|
-
Mastra observability integrations control where observability data goes and how it's transformed on the way out. Use integrations to store data in Mastra storage, send it to Mastra platform, connect to external observability providers, or redact exported span data.
|
|
6
|
-
|
|
7
|
-
## When to use integrations
|
|
8
|
-
|
|
9
|
-
- Keep observability available in Studio with `MastraStorageExporter`.
|
|
10
|
-
- Send hosted observability data to Mastra platform with `MastraPlatformExporter`.
|
|
11
|
-
- Forward traces to external providers such as Datadog, Langfuse, or OpenTelemetry backends.
|
|
12
|
-
- Redact sensitive values before they leave the runtime.
|
|
13
|
-
|
|
14
|
-
## Choose an integration path
|
|
15
|
-
|
|
16
|
-
- Studio workflow: Start with [Mastra Storage](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage).
|
|
17
|
-
- Hosted Mastra workflow: Add [Mastra platform](https://mastra.ai/docs/observability/integrations/exporters/mastra-platform).
|
|
18
|
-
- External observability stack: Choose one or more exporter pages under the sidebar `Exporters` section.
|
|
19
|
-
- Existing distributed trace context: Use a bridge, then add exporters as needed.
|
|
20
|
-
|
|
21
|
-
## Exporters
|
|
22
|
-
|
|
23
|
-
Exporters send observability data to a destination:
|
|
24
|
-
|
|
25
|
-
- [Mastra Storage](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage): Persist observability data for Studio.
|
|
26
|
-
- [Mastra platform](https://mastra.ai/docs/observability/integrations/exporters/mastra-platform): Send hosted observability data to Mastra platform.
|
|
27
|
-
- External providers: Use exporter pages for Datadog, Langfuse, OpenTelemetry, and other supported platforms.
|
|
28
|
-
|
|
29
|
-
## Bridges
|
|
30
|
-
|
|
31
|
-
Bridges connect Mastra to an existing distributed tracing context:
|
|
32
|
-
|
|
33
|
-
- [OpenTelemetry bridge](https://mastra.ai/integrations/observability/opentelemetry): Integrate Mastra with an existing OpenTelemetry trace.
|
|
34
|
-
- [Datadog bridge](https://mastra.ai/integrations/observability/datadog): Send Mastra traces to Datadog and its LLM Observability product.
|
|
35
|
-
|
|
36
|
-
## Processors
|
|
37
|
-
|
|
38
|
-
Processors transform or redact spans before export:
|
|
39
|
-
|
|
40
|
-
- [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter): Redact sensitive fields before spans leave the runtime.
|
|
41
|
-
|
|
42
|
-
## Next steps
|
|
43
|
-
|
|
44
|
-
- [Configuration](https://mastra.ai/docs/observability/overview)
|
|
45
|
-
- [Tracing](https://mastra.ai/docs/observability/tracing/overview)
|
|
46
|
-
- [Mastra Storage](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage)
|
|
47
|
-
- [OpenTelemetry bridge](https://mastra.ai/integrations/observability/opentelemetry)
|