@mastra/mcp-docs-server 1.2.15-alpha.6 → 1.2.15-alpha.7
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/capabilities/channels/overview.md +19 -0
- package/.docs/guides/voice/realtime-voice.md +28 -2
- package/.docs/reference/agents/channels.md +2 -0
- package/.docs/reference/channels/slack-provider.md +2 -0
- package/.docs/reference/configuration.md +25 -0
- package/CHANGELOG.md +7 -0
- package/package.json +4 -4
|
@@ -153,6 +153,25 @@ When the agent calls this tool, users see a card with the tool name, arguments,
|
|
|
153
153
|
|
|
154
154
|
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode, `autoResumeSuspendedTools` can resume suspended tools when a later user message arrives on the same thread. This requires memory. Hidden mode only suppresses the approval buttons.
|
|
155
155
|
|
|
156
|
+
## Reply formatting
|
|
157
|
+
|
|
158
|
+
Agent replies post as markdown by default. Platforms with native markdown rendering, such as Slack, render bold text, links, and tables directly. Other platforms convert the markdown to their own format. Agents write standard markdown and it renders correctly everywhere, matching how the same reply renders in Studio.
|
|
159
|
+
|
|
160
|
+
Set `textFormat: 'plain'` on an adapter to post replies as literal plain text instead:
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
channels: {
|
|
164
|
+
adapters: {
|
|
165
|
+
slack: {
|
|
166
|
+
adapter: createSlackAdapter(),
|
|
167
|
+
textFormat: 'plain',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Use this escape hatch if your agent is prompted to emit a platform-specific dialect, such as Slack mrkdwn, instead of standard markdown. If you added such prompt instructions to work around markdown rendering literally, remove them instead. The default now renders standard markdown natively. `textFormat` affects final reply text only. Tool cards, error messages, and natively streamed text are unaffected.
|
|
174
|
+
|
|
156
175
|
## Multi-user awareness
|
|
157
176
|
|
|
158
177
|
In group conversations, Mastra prefixes each message with the sender's name and platform ID so the agent can distinguish between speakers:
|
|
@@ -378,12 +378,38 @@ Tracing is on by default. Pass `observability: false` to `createLiveKitWorker` t
|
|
|
378
378
|
|
|
379
379
|
## Deployment
|
|
380
380
|
|
|
381
|
-
The worker is a separate process from your Mastra server
|
|
381
|
+
The worker is a separate process from your Mastra server, so `mastra build` needs to emit it as its own entry. Add it to [`bundler.entries`](https://mastra.ai/reference/configuration):
|
|
382
|
+
|
|
383
|
+
```typescript
|
|
384
|
+
import { Mastra } from '@mastra/core'
|
|
385
|
+
|
|
386
|
+
export const mastra = new Mastra({
|
|
387
|
+
bundler: {
|
|
388
|
+
entries: { 'voice-worker': './voice-worker.ts' },
|
|
389
|
+
// Keep LiveKit's native modules out of the bundle. `mastra build` only applies
|
|
390
|
+
// this default when you set no other bundler options, so set it explicitly here.
|
|
391
|
+
externals: true,
|
|
392
|
+
},
|
|
393
|
+
})
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
`mastra build` now writes both processes into `.mastra/output`, sharing one `package.json` and one dependency install:
|
|
397
|
+
|
|
398
|
+
```text
|
|
399
|
+
.mastra/output/
|
|
400
|
+
index.mjs # Mastra server
|
|
401
|
+
voice-worker.mjs # LiveKit worker
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Deploy that directory as a single artifact and start each process with its own command:
|
|
382
405
|
|
|
383
406
|
```bash
|
|
384
|
-
node
|
|
407
|
+
node .mastra/output/index.mjs # server
|
|
408
|
+
node .mastra/output/voice-worker.mjs start # worker
|
|
385
409
|
```
|
|
386
410
|
|
|
411
|
+
The worker needs the same environment variables as the server, plus `LIVEKIT_URL`, `LIVEKIT_API_KEY`, and `LIVEKIT_API_SECRET`.
|
|
412
|
+
|
|
387
413
|
LiveKit's guidance on sizing, graceful shutdown, and hosting applies unchanged. See [Deploying agents](https://docs.livekit.io/agents/ops/deployment/). Workers connect outbound to LiveKit, so they don't need inbound ports.
|
|
388
414
|
|
|
389
415
|
## How it works
|
|
@@ -102,6 +102,8 @@ const agent = new Agent({
|
|
|
102
102
|
|
|
103
103
|
**streaming** (`boolean | { updateIntervalMs?: number }`): Stream agent text deltas to the channel as the agent generates them instead of buffering and posting once per step. Requires the underlying adapter to support post-and-edit streaming. Slack defaults to true; other adapters default to false. (Default: `false (true for Slack)`)
|
|
104
104
|
|
|
105
|
+
**textFormat** (`'markdown' | 'plain'`): Dialect for the agent's final reply text. 'markdown' (the default) posts replies as markdown: adapters with native markdown rendering (Slack) render it directly, others convert it to their platform format. 'plain' posts replies as literal plain text, restoring the pre-markdown behavior for agents prompted to emit a platform dialect such as Slack mrkdwn. Applies to final reply text only; tool cards, error messages, and tripwire notices are unaffected. Native streaming is always markdown regardless of this setting. (Default: `'markdown'`)
|
|
106
|
+
|
|
105
107
|
**toolDisplay** (`'cards' | 'text' | 'timeline' | 'grouped' | 'hidden' | ToolDisplayFn`): How tool calls are rendered in the channel. "cards" posts per-tool running/result cards as rich Block Kit. "text" posts the same lifecycle as plain text (no Block Kit). "timeline" and "grouped" stream tool state as inline task\_update chunks (requires streaming: true; Slack only today — other adapters may render a placeholder). "hidden" executes tools silently. Pass a function to render tool events yourself; return { kind: "post", message } for a discrete post/edit, { kind: "stream", chunk } to push into the streaming widget, or undefined to skip rendering that event. Add openIfEmpty: false to a stream result when its chunk should only apply to an active streaming session. Approve/deny prompts always render as a separate card regardless of mode. (Default: `'cards' ('grouped' for Slack)`)
|
|
106
108
|
|
|
107
109
|
**typingStatus** (`boolean | ((chunk: AgentChunkType, ctx: TypingStatusContext) => string | false | null | undefined | void)`): Control the platform typing indicator. true uses built-in defaults (is typing… on text, is calling {tool}… on tool-call, is waiting for approval… on tool-call-approval). false suppresses typing entirely — useful when a live streaming widget (e.g. toolDisplay: "grouped" in Slack) already conveys progress. Pass a function to set custom status copy per chunk; return a string to set the status, or false/null/undefined to leave it unchanged. Compose with defaultTypingStatus (exported from @mastra/core/channels) to fall back to defaults for chunks you don't handle. (Default: `true`)
|
|
@@ -53,6 +53,8 @@ await slack.configure({
|
|
|
53
53
|
|
|
54
54
|
**streaming** (`StreamingConfig | false`): Stream agent text deltas to Slack as they're generated. Pass { updateIntervalMs } to customize the post-and-edit interval, or false to buffer text until step-finish. Disabling streaming restricts toolDisplay to static modes. (Default: `true`)
|
|
55
55
|
|
|
56
|
+
**textFormat** (`'markdown' | 'plain'`): Dialect for the agent's final reply text, forwarded to the Slack adapter. 'markdown' (the default) posts replies as markdown so Slack renders bold text, links, and tables natively. 'plain' posts literal plain text, the escape hatch for agents prompted to emit Slack mrkdwn. Applies to buffered replies (streaming: false) and the streaming fallback; native streaming is always markdown. (Default: `'markdown'`)
|
|
57
|
+
|
|
56
58
|
**toolDisplay** (`ToolDisplay`): How tool calls are rendered in Slack: 'cards', 'text', 'timeline', 'grouped', 'hidden', or a function. 'hidden' suppresses tool call/result rendering entirely. 'timeline' and 'grouped' require streaming. With streaming: false, only static modes are available and the default is 'cards'. (Default: `'grouped'`)
|
|
57
59
|
|
|
58
60
|
**typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set false to disable, or pass a function to return custom status text per stream chunk (return undefined to fall back to the default for that chunk). (Default: `true`)
|
|
@@ -500,6 +500,31 @@ const mastra = new Mastra({
|
|
|
500
500
|
|
|
501
501
|
## Bundler options
|
|
502
502
|
|
|
503
|
+
### bundler.entries
|
|
504
|
+
|
|
505
|
+
**Type:** `Record<string, string>`\
|
|
506
|
+
**Default:** `{}`
|
|
507
|
+
|
|
508
|
+
Additional process entries to emit alongside the server bundle, as a map of output name to source path relative to your Mastra directory. Each entry becomes its own `<name>.mjs` in `.mastra/output`.
|
|
509
|
+
|
|
510
|
+
Use this for long-running processes that run beside your Mastra server rather than inside it, such as a [LiveKit voice worker](https://mastra.ai/guides/voice/realtime-voice). The entry shares the output directory, `package.json`, and installed dependencies with the server, so one `mastra build` produces one deployable artifact you can start with different commands.
|
|
511
|
+
|
|
512
|
+
```typescript
|
|
513
|
+
import { Mastra } from '@mastra/core'
|
|
514
|
+
|
|
515
|
+
export const mastra = new Mastra({
|
|
516
|
+
bundler: {
|
|
517
|
+
entries: { 'voice-worker': './voice-worker.ts' },
|
|
518
|
+
},
|
|
519
|
+
})
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
This emits `.mastra/output/voice-worker.mjs` next to `.mastra/output/index.mjs`. Dependencies imported only by the extra entry are analyzed too, so they're installed into the output.
|
|
523
|
+
|
|
524
|
+
Entry names can contain `/` to nest the output. They can't be `index`, which is the server bundle, `tools`, which is the tool aggregator, or start with `tools/`, which is reserved for tool bundles.
|
|
525
|
+
|
|
526
|
+
> **Note:** `mastra build` applies the [`bundler.externals`](#bundlerexternals) default of `true` only when you set no bundler options at all. Once you set `entries`, set `externals` explicitly as well if your extra entry depends on packages that can't be bundled, such as native modules.
|
|
527
|
+
|
|
503
528
|
### bundler.externals
|
|
504
529
|
|
|
505
530
|
**Type:** `boolean | string[]`\
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.15-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`76e5132`](https://github.com/mastra-ai/mastra/commit/76e51328dbc0749c8304e6b3f21e4401f451b081), [`0282e16`](https://github.com/mastra-ai/mastra/commit/0282e16115538c8e9b248b90f0748eb01cb5dc98)]:
|
|
8
|
+
- @mastra/core@1.58.0-alpha.4
|
|
9
|
+
|
|
3
10
|
## 1.2.15-alpha.6
|
|
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.15-alpha.
|
|
3
|
+
"version": "1.2.15-alpha.7",
|
|
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
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
31
|
"@mastra/mcp": "^1.16.0-alpha.1",
|
|
32
|
-
"@mastra/core": "1.58.0-alpha.
|
|
32
|
+
"@mastra/core": "1.58.0-alpha.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^2.0.0",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"tsx": "^4.23.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
|
+
"@internal/types-builder": "0.0.96",
|
|
48
49
|
"@internal/lint": "0.0.121",
|
|
49
|
-
"@mastra/core": "1.58.0-alpha.
|
|
50
|
-
"@internal/types-builder": "0.0.96"
|
|
50
|
+
"@mastra/core": "1.58.0-alpha.4"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|