@mastra/mcp-docs-server 1.2.17-alpha.4 → 1.2.17-alpha.5
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 +2 -0
- package/.docs/docs/capabilities/channels.md +1 -1
- package/.docs/integrations/observability/opentelemetry.md +34 -2
- package/.docs/reference/pubsub/base.md +13 -3
- package/.docs/reference/pubsub/caching-pubsub.md +2 -0
- package/.docs/reference/pubsub/event-emitter.md +2 -0
- package/.docs/reference/pubsub/redis-streams.md +11 -3
- package/CHANGELOG.md +7 -0
- package/package.json +3 -3
|
@@ -391,6 +391,8 @@ const agent = new Agent({
|
|
|
391
391
|
|
|
392
392
|
When enabled, the agent detects suspended tools from message history on the next user message. It extracts `resumeData` based on the tool's `resumeSchema`, then automatically resumes the tool.
|
|
393
393
|
|
|
394
|
+
Automatic resumption applies to data-bearing `suspend()` flows. It doesn't approve tools that use `requireApproval`; those tools remain suspended until an explicit approval or decline is submitted through `approveToolCall()`, `declineToolCall()`, `resumeStream({ approved: boolean })`, or an equivalent UI or API action.
|
|
395
|
+
|
|
394
396
|
The following example shows a complete conversational flow:
|
|
395
397
|
|
|
396
398
|
```typescript
|
|
@@ -152,7 +152,7 @@ export const deleteFile = createTool({
|
|
|
152
152
|
|
|
153
153
|
When the agent calls this tool, users see a card with the tool name, arguments, and Approve and Deny actions. The tool only executes after approval.
|
|
154
154
|
|
|
155
|
-
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode, `autoResumeSuspendedTools` can resume
|
|
155
|
+
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode, `autoResumeSuspendedTools` can resume data-bearing `suspend()` flows when a later user message arrives on the same thread. This requires memory. Hidden mode only suppresses approval buttons. It doesn't turn a message into consent. Tools that require approval remain suspended until an explicit approval or decline is submitted through a UI or API action.
|
|
156
156
|
|
|
157
157
|
## Reply formatting
|
|
158
158
|
|
|
@@ -6,13 +6,13 @@ Mastra supports OpenTelemetry (OTEL) through an exporter for sending traces and
|
|
|
6
6
|
|
|
7
7
|
## Exporter
|
|
8
8
|
|
|
9
|
-
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, telemetry.dev, and more.
|
|
9
|
+
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, Sentry, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, telemetry.dev, and more.
|
|
10
10
|
|
|
11
11
|
### Installation
|
|
12
12
|
|
|
13
13
|
Each provider requires specific protocol packages. Install the base exporter plus the protocol package for your provider:
|
|
14
14
|
|
|
15
|
-
#### For HTTP/Protobuf Providers (SigNoz, New Relic, Laminar, MLflow, Latitude, telemetry.dev)
|
|
15
|
+
#### For HTTP/Protobuf Providers (SigNoz, New Relic, Sentry, Laminar, MLflow, Latitude, telemetry.dev)
|
|
16
16
|
|
|
17
17
|
**npm**:
|
|
18
18
|
|
|
@@ -104,6 +104,38 @@ All providers support zero-config setup via environment variables. Set the appro
|
|
|
104
104
|
|
|
105
105
|
### Provider configurations
|
|
106
106
|
|
|
107
|
+
#### Sentry
|
|
108
|
+
|
|
109
|
+
[Sentry](https://sentry.io/) accepts OpenTelemetry traces and logs through its OTLP endpoints. In Sentry, open [**Project Settings** > **Client Keys (DSN)**](https://sentry.io/settings/projects/) and copy the OTLP traces endpoint and authentication header. Add both values to your environment:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
SENTRY_OTLP_ENDPOINT=https://o000000.ingest.sentry.io/api/0000000/integration/otlp/v1/traces
|
|
113
|
+
SENTRY_OTLP_AUTH_HEADER="sentry sentry_key=..."
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Use the `custom` provider with HTTP/Protobuf:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
new OtelExporter({
|
|
120
|
+
provider: {
|
|
121
|
+
custom: {
|
|
122
|
+
endpoint: process.env.SENTRY_OTLP_ENDPOINT!,
|
|
123
|
+
protocol: 'http/protobuf',
|
|
124
|
+
headers: {
|
|
125
|
+
'x-sentry-auth': process.env.SENTRY_OTLP_AUTH_HEADER!,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
See [Sentry's OTLP documentation](https://docs.sentry.io/concepts/otlp/) for endpoint setup, supported signals, and current ingestion limits.
|
|
133
|
+
|
|
134
|
+
Choose an exporter based on your setup:
|
|
135
|
+
|
|
136
|
+
- `OtelExporter`: Sends vendor-neutral traces and logs over OTLP. Use it with an existing OpenTelemetry pipeline or when you want backend portability.
|
|
137
|
+
- [`SentryExporter`](https://mastra.ai/integrations/observability/sentry): Uses the Sentry SDK to map Mastra span types to Sentry operations, add AI monitoring attributes, and capture span errors as Sentry issues.
|
|
138
|
+
|
|
107
139
|
#### MLflow
|
|
108
140
|
|
|
109
141
|
[MLflow](https://mlflow.org/docs/latest/genai/tracing/integrations/listing/mastra) supports native Mastra tracing through its OTLP endpoint at `/v1/traces`. Use the `custom` provider with HTTP/Protobuf and include the experiment header so traces are routed to the correct MLflow experiment:
|
|
@@ -79,10 +79,16 @@ Registers a callback to receive events published to a topic. When `options.group
|
|
|
79
79
|
|
|
80
80
|
Pass `options.batch` to opt in to batched delivery. The callback signature is unchanged: a batch of N events is delivered as N consecutive `cb(event, ack, nack)` calls in publish order. Batching is honored only when the backend's [`supportsNativeBatching`](#properties) is `true`. Other backends ignore the option and deliver events one at a time.
|
|
81
81
|
|
|
82
|
+
Set `options.startFrom` to `"latest"` to receive only events published after a new consumer group is created. The default, `"earliest"`, includes retained events. Existing consumer groups keep their current checkpoint.
|
|
83
|
+
|
|
82
84
|
```typescript
|
|
83
|
-
await pubsub.subscribe(
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
await pubsub.subscribe(
|
|
86
|
+
'my-topic',
|
|
87
|
+
(event, ack, nack) => {
|
|
88
|
+
console.log(event)
|
|
89
|
+
},
|
|
90
|
+
{ startFrom: 'latest' },
|
|
91
|
+
)
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
#### `unsubscribe(topic, cb)`
|
|
@@ -151,6 +157,8 @@ await pubsub.subscribeFromOffset('my-topic', 42, event => {
|
|
|
151
157
|
|
|
152
158
|
**supportsNativeBatching** (`boolean`): Whether the implementation honors options.batch on subscribe(). Defaults to false. Backends that integrate batching internally override this and return true.
|
|
153
159
|
|
|
160
|
+
**supportsOffsets** (`boolean`): Whether subscribeFromOffset() honors numeric offsets. Defaults to false. A non-zero offset on an unsupported implementation falls back to replay subscription and emits a diagnostic warning when a logger is configured.
|
|
161
|
+
|
|
154
162
|
## Types
|
|
155
163
|
|
|
156
164
|
### `Event`
|
|
@@ -175,6 +183,8 @@ await pubsub.subscribeFromOffset('my-topic', 42, event => {
|
|
|
175
183
|
|
|
176
184
|
**batch** (`SubscribeBatchOptions`): Opt in to batched delivery for this subscription. When omitted, events are delivered one at a time. Honored only by backends where supportsNativeBatching is true.
|
|
177
185
|
|
|
186
|
+
**startFrom** (`"earliest" | "latest"`): Starting position used when a backend creates a new consumer group. "earliest" includes retained events. "latest" receives only events published after group creation. Existing groups keep their checkpoint. (Default: `"earliest"`)
|
|
187
|
+
|
|
178
188
|
### `SubscribeBatchOptions`
|
|
179
189
|
|
|
180
190
|
Per-subscription batching policy. The callback signature doesn't change. A batch of N events becomes N consecutive callback invocations in publish order.
|
|
@@ -46,6 +46,8 @@ const pubsub = withCaching(new EventEmitterPubSub(), new InMemoryServerCache())
|
|
|
46
46
|
|
|
47
47
|
**supportsNativeBatching** (`boolean`): Mirrors the inner pub/sub. Returns true only when the wrapped implementation supports batching.
|
|
48
48
|
|
|
49
|
+
**supportsOffsets** (`boolean`): Returns true. Cached events have sequential indexes that support numeric offset replay.
|
|
50
|
+
|
|
49
51
|
## Methods
|
|
50
52
|
|
|
51
53
|
`CachingPubSub` implements the [`PubSub`](https://mastra.ai/reference/pubsub/base) contract. It overrides the replay methods to read cached events. The methods below describe the caching behavior.
|
|
@@ -51,6 +51,8 @@ const pubsub = new EventEmitterPubSub(undefined, { logger })
|
|
|
51
51
|
|
|
52
52
|
**supportsNativeBatching** (`boolean`): Returns true. Subscribers can opt in to batched delivery with options.batch.
|
|
53
53
|
|
|
54
|
+
**supportsOffsets** (`boolean`): Returns false. The in-memory emitter does not retain indexed event history.
|
|
55
|
+
|
|
54
56
|
## Methods
|
|
55
57
|
|
|
56
58
|
`EventEmitterPubSub` implements the [`PubSub`](https://mastra.ai/reference/pubsub/base) contract. The methods below have behavior specific to this implementation.
|
|
@@ -77,6 +77,8 @@ export const mastra = new Mastra({
|
|
|
77
77
|
|
|
78
78
|
**supportedModes** (`ReadonlyArray<"pull" | "push">`): Returns \["pull"].
|
|
79
79
|
|
|
80
|
+
**supportsOffsets** (`boolean`): Returns false. Redis stream anchors support start positions, but not the numeric indexes used by subscribeFromOffset().
|
|
81
|
+
|
|
80
82
|
## Methods
|
|
81
83
|
|
|
82
84
|
`RedisStreamsPubSub` implements the [`PubSub`](https://mastra.ai/reference/pubsub/base) contract. The methods below have behavior specific to this implementation.
|
|
@@ -85,10 +87,16 @@ export const mastra = new Mastra({
|
|
|
85
87
|
|
|
86
88
|
Subscribes to a topic. With `options.group`, members of the group share events through a Redis consumer group. Without a group, the subscriber receives every event through a private consumer group.
|
|
87
89
|
|
|
90
|
+
Set `options.startFrom` to `"latest"` to skip retained entries when Redis creates the consumer group. The default, `"earliest"`, reads retained entries first. This option doesn't reset an existing group's checkpoint.
|
|
91
|
+
|
|
88
92
|
```typescript
|
|
89
|
-
await pubsub.subscribe(
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
await pubsub.subscribe(
|
|
94
|
+
'workflow.events',
|
|
95
|
+
(event, ack, nack) => {
|
|
96
|
+
console.log(event)
|
|
97
|
+
},
|
|
98
|
+
{ group: 'live-workers', startFrom: 'latest' },
|
|
99
|
+
)
|
|
92
100
|
```
|
|
93
101
|
|
|
94
102
|
### `flush()`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.17-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`d8308a2`](https://github.com/mastra-ai/mastra/commit/d8308a2be3c07e777393d1017a381dcae3890d30), [`7aad631`](https://github.com/mastra-ai/mastra/commit/7aad631b43bc10db77d5b8c66b200d7a49d18bf2), [`1794a79`](https://github.com/mastra-ai/mastra/commit/1794a79178c418004a7261b1ad9114066f7ef01d)]:
|
|
8
|
+
- @mastra/core@1.60.0-alpha.3
|
|
9
|
+
|
|
3
10
|
## 1.2.17-alpha.4
|
|
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.17-alpha.
|
|
3
|
+
"version": "1.2.17-alpha.5",
|
|
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.60.0-alpha.
|
|
31
|
+
"@mastra/core": "1.60.0-alpha.3",
|
|
32
32
|
"@mastra/mcp": "^1.16.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.123",
|
|
49
49
|
"@internal/types-builder": "0.0.98",
|
|
50
|
-
"@mastra/core": "1.60.0-alpha.
|
|
50
|
+
"@mastra/core": "1.60.0-alpha.3"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|