@mastra/mcp-docs-server 1.1.22-alpha.9 → 1.1.23-alpha.0
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/browser/agent-browser.md +75 -0
- package/.docs/docs/browser/overview.md +136 -0
- package/.docs/docs/browser/stagehand.md +128 -0
- package/.docs/docs/observability/tracing/exporters/arthur.md +163 -0
- package/.docs/docs/observability/tracing/exporters/langfuse.md +19 -33
- package/.docs/models/gateways/openrouter.md +4 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/deepseek.md +1 -1
- package/.docs/models/providers/google.md +3 -3
- package/.docs/models/providers/vultr.md +7 -6
- package/.docs/models/providers/zenmux.md +3 -5
- package/.docs/reference/browser/agent-browser.md +374 -0
- package/.docs/reference/browser/mastra-browser.md +284 -0
- package/.docs/reference/browser/stagehand-browser.md +290 -0
- package/.docs/reference/index.md +3 -0
- package/.docs/reference/observability/tracing/exporters/arthur.md +122 -0
- package/.docs/reference/observability/tracing/exporters/langfuse.md +23 -32
- package/CHANGELOG.md +28 -0
- package/package.json +5 -5
|
@@ -16,7 +16,8 @@ interface LangfuseExporterConfig extends BaseExporterConfig {
|
|
|
16
16
|
secretKey?: string
|
|
17
17
|
baseUrl?: string
|
|
18
18
|
realtime?: boolean
|
|
19
|
-
|
|
19
|
+
environment?: string
|
|
20
|
+
release?: string
|
|
20
21
|
}
|
|
21
22
|
```
|
|
22
23
|
|
|
@@ -25,23 +26,17 @@ Extends `BaseExporterConfig`, which includes:
|
|
|
25
26
|
- `logger?: IMastraLogger` - Logger instance
|
|
26
27
|
- `logLevel?: LogLevel | 'debug' | 'info' | 'warn' | 'error'` - Log level (default: INFO)
|
|
27
28
|
|
|
28
|
-
##
|
|
29
|
+
## Properties
|
|
29
30
|
|
|
30
|
-
### `
|
|
31
|
+
### `client`
|
|
31
32
|
|
|
32
33
|
```typescript
|
|
33
|
-
|
|
34
|
+
get client(): LangfuseClient | undefined
|
|
34
35
|
```
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### export
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
async export(spans: ReadOnlySpan[]): Promise<void>
|
|
42
|
-
```
|
|
37
|
+
The `LangfuseClient` instance for advanced Langfuse features. Returns `undefined` when the exporter is disabled (missing credentials). Use this for prompt management, evaluations, datasets, and direct API access.
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
## Methods
|
|
45
40
|
|
|
46
41
|
### flush
|
|
47
42
|
|
|
@@ -49,7 +44,7 @@ Batch exports spans to Langfuse.
|
|
|
49
44
|
async flush(): Promise<void>
|
|
50
45
|
```
|
|
51
46
|
|
|
52
|
-
Force flushes any buffered spans to Langfuse without shutting down
|
|
47
|
+
Force flushes any buffered spans and scores to Langfuse without shutting down. Useful in serverless environments where you need to ensure data is exported before the runtime terminates.
|
|
53
48
|
|
|
54
49
|
### shutdown
|
|
55
50
|
|
|
@@ -57,7 +52,7 @@ Force flushes any buffered spans to Langfuse without shutting down the exporter.
|
|
|
57
52
|
async shutdown(): Promise<void>
|
|
58
53
|
```
|
|
59
54
|
|
|
60
|
-
Flushes pending data and shuts down the client.
|
|
55
|
+
Flushes pending data and shuts down both the span processor and the client.
|
|
61
56
|
|
|
62
57
|
## Usage
|
|
63
58
|
|
|
@@ -85,10 +80,11 @@ const exporter = new LangfuseExporter({
|
|
|
85
80
|
|
|
86
81
|
## Span mapping
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
Mastra spans are converted to OTel format and sent to Langfuse via `LangfuseSpanProcessor`. Langfuse automatically maps spans based on their `gen_ai.*` attributes:
|
|
84
|
+
|
|
85
|
+
- Spans with a `model` attribute → Langfuse generations
|
|
90
86
|
- All other spans → Langfuse spans
|
|
91
|
-
-
|
|
87
|
+
- Parent-child relationships are preserved via OTel trace/span IDs
|
|
92
88
|
|
|
93
89
|
## Prompt linking
|
|
94
90
|
|
|
@@ -96,22 +92,21 @@ Link LLM generations to [Langfuse Prompt Management](https://langfuse.com/docs/p
|
|
|
96
92
|
|
|
97
93
|
```typescript
|
|
98
94
|
import { buildTracingOptions } from '@mastra/observability'
|
|
99
|
-
import { withLangfusePrompt } from '@mastra/langfuse'
|
|
100
|
-
import { Langfuse } from 'langfuse'
|
|
95
|
+
import { LangfuseExporter, withLangfusePrompt } from '@mastra/langfuse'
|
|
101
96
|
|
|
102
|
-
const
|
|
103
|
-
publicKey: process.env.LANGFUSE_PUBLIC_KEY!,
|
|
104
|
-
secretKey: process.env.LANGFUSE_SECRET_KEY!,
|
|
105
|
-
})
|
|
97
|
+
const exporter = new LangfuseExporter()
|
|
106
98
|
|
|
107
|
-
|
|
99
|
+
// Fetch prompt via the Langfuse client
|
|
100
|
+
const prompt = await exporter.client.prompt.get('customer-support', { type: 'text' })
|
|
108
101
|
|
|
109
102
|
const agent = new Agent({
|
|
110
103
|
name: 'support-agent',
|
|
111
|
-
instructions: prompt.
|
|
104
|
+
instructions: prompt.compile(),
|
|
112
105
|
model: 'openai/gpt-5.4',
|
|
113
106
|
defaultGenerateOptions: {
|
|
114
|
-
tracingOptions: buildTracingOptions(
|
|
107
|
+
tracingOptions: buildTracingOptions(
|
|
108
|
+
withLangfusePrompt({ name: prompt.name, version: prompt.version }),
|
|
109
|
+
),
|
|
115
110
|
},
|
|
116
111
|
})
|
|
117
112
|
```
|
|
@@ -123,12 +118,8 @@ const agent = new Agent({
|
|
|
123
118
|
Adds Langfuse prompt metadata to tracing options.
|
|
124
119
|
|
|
125
120
|
```typescript
|
|
126
|
-
//
|
|
127
|
-
withLangfusePrompt(prompt)
|
|
128
|
-
|
|
129
|
-
// With manual fields
|
|
121
|
+
// Link by name and version (required for Langfuse v5)
|
|
130
122
|
withLangfusePrompt({ name: 'my-prompt', version: 1 })
|
|
131
|
-
withLangfusePrompt({ id: 'prompt-uuid' })
|
|
132
123
|
```
|
|
133
124
|
|
|
134
|
-
|
|
125
|
+
The prompt metadata is passed through as span attributes and Langfuse links the generation to the corresponding prompt.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`f32b9e1`](https://github.com/mastra-ai/mastra/commit/f32b9e115a3c754d1c8cfa3f4256fba87b09cfb7), [`7d6f521`](https://github.com/mastra-ai/mastra/commit/7d6f52164d0cca099f0b07cb2bba334360f1c8ab), [`a50d220`](https://github.com/mastra-ai/mastra/commit/a50d220b01ecbc5644d489a3d446c3bd4ab30245), [`665477b`](https://github.com/mastra-ai/mastra/commit/665477bc104fd52cfef8e7610d7664781a70c220), [`4cc2755`](https://github.com/mastra-ai/mastra/commit/4cc2755a7194cb08720ff2ab4dffb4b4a5103dfd), [`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`ed425d7`](https://github.com/mastra-ai/mastra/commit/ed425d78e7c66cbda8209fee910856f98c6c6b82), [`1371703`](https://github.com/mastra-ai/mastra/commit/1371703835080450ef3f9aea58059a95d0da2e5a), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`98f8a8b`](https://github.com/mastra-ai/mastra/commit/98f8a8bdf5761b9982f3ad3acbe7f1cc3efa71f3), [`ba6f7e9`](https://github.com/mastra-ai/mastra/commit/ba6f7e9086d8281393f2acae60fda61de3bff1f9), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a), [`1805ddc`](https://github.com/mastra-ai/mastra/commit/1805ddc9c9b3b14b63749735a13c05a45af43a80), [`fff91cf`](https://github.com/mastra-ai/mastra/commit/fff91cf914de0e731578aacebffdeebef82f0440), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
|
|
8
|
+
- @mastra/core@1.23.0
|
|
9
|
+
|
|
10
|
+
## 1.1.22-alpha.13
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`a50d220`](https://github.com/mastra-ai/mastra/commit/a50d220b01ecbc5644d489a3d446c3bd4ab30245)]:
|
|
15
|
+
- @mastra/core@1.23.0-alpha.9
|
|
16
|
+
|
|
17
|
+
## 1.1.22-alpha.12
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
|
|
22
|
+
- @mastra/core@1.23.0-alpha.8
|
|
23
|
+
|
|
24
|
+
## 1.1.22-alpha.10
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`665477b`](https://github.com/mastra-ai/mastra/commit/665477bc104fd52cfef8e7610d7664781a70c220), [`4cc2755`](https://github.com/mastra-ai/mastra/commit/4cc2755a7194cb08720ff2ab4dffb4b4a5103dfd)]:
|
|
29
|
+
- @mastra/core@1.23.0-alpha.7
|
|
30
|
+
|
|
3
31
|
## 1.1.22-alpha.8
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/core": "1.23.0
|
|
32
|
+
"@mastra/core": "1.23.0",
|
|
33
33
|
"@mastra/mcp": "^1.4.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsx": "^4.21.0",
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"vitest": "4.0.18",
|
|
49
|
-
"@internal/lint": "0.0.
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
49
|
+
"@internal/lint": "0.0.80",
|
|
50
|
+
"@internal/types-builder": "0.0.55",
|
|
51
|
+
"@mastra/core": "1.23.0"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|