@mastra/mcp-docs-server 1.2.25-alpha.6 → 1.2.25-alpha.8
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/harness/agent-controller.md +26 -0
- package/.docs/docs/harness/signal-providers.md +2 -1
- package/.docs/docs/index.md +11 -0
- package/.docs/docs/mastra-platform/deploy.md +7 -3
- package/.docs/docs/mastra-platform/overview.md +1 -0
- package/.docs/docs/sandbox/overview.md +3 -2
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
- package/.docs/reference/observability/tracing/trace-query.md +42 -0
- package/package.json +4 -4
|
@@ -133,6 +133,32 @@ const session = await controller.createSession({
|
|
|
133
133
|
|
|
134
134
|
Use [`session.thread.create()`](https://mastra.ai/reference/agent-controller/session) and [`session.thread.switch()`](https://mastra.ai/reference/agent-controller/session) to move one live Session between conversations.
|
|
135
135
|
|
|
136
|
+
### List stored messages from the client
|
|
137
|
+
|
|
138
|
+
Use the Agent Controller client to page through a thread's stored messages. Passing an options object returns the messages with pagination metadata:
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { MastraClient } from '@mastra/client-js'
|
|
142
|
+
|
|
143
|
+
const client = new MastraClient({ baseUrl: 'http://localhost:4111' })
|
|
144
|
+
const session = client.getAgentController('assistant-controller').session('user-123')
|
|
145
|
+
|
|
146
|
+
const result = await session.listMessages('support-ticket-42', {
|
|
147
|
+
page: 0,
|
|
148
|
+
perPage: 20,
|
|
149
|
+
orderBy: { field: 'createdAt', direction: 'DESC' },
|
|
150
|
+
filter: {
|
|
151
|
+
dateRange: { start: new Date('2026-01-01') },
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
console.log(result.messages)
|
|
156
|
+
console.log(result.total)
|
|
157
|
+
console.log(result.hasMore)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`page` is zero-indexed. Omitting `perPage` uses the storage default of 40 messages. Use `include` to request a message by ID with adjacent messages. `limit` is a deprecated alias for `perPage`; existing paged callers may use `{ limit, page }`, but must use `perPage` with `orderBy`, `filter`, or `include`. The existing numeric form, `session.listMessages(threadId, limit)`, remains available when you need the newest message window as an array, ordered oldest-first.
|
|
161
|
+
|
|
136
162
|
## Switch modes and models
|
|
137
163
|
|
|
138
164
|
Modes change the instructions and tools used by the shared backing agent without replacing the Session or thread. Configure mode-specific tools and visibility on the controller:
|
|
@@ -210,4 +210,5 @@ For a production provider that watches GitHub pull requests, see the [GitHub Cha
|
|
|
210
210
|
- [Signals](https://mastra.ai/docs/harness/signals)
|
|
211
211
|
- [Notification signals](https://mastra.ai/docs/harness/signals)
|
|
212
212
|
- [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider)
|
|
213
|
-
- [`WebhookSignalProvider` reference](https://mastra.ai/reference/signals/webhook-signal-provider)
|
|
213
|
+
- [`WebhookSignalProvider` reference](https://mastra.ai/reference/signals/webhook-signal-provider)
|
|
214
|
+
- [Mastra Factory](https://factory.mastra.ai/) uses signal providers to integrate with external systems like GitHub and Linear, bringing issues and pull requests into a collaborative work board.
|
package/.docs/docs/index.md
CHANGED
|
@@ -192,6 +192,17 @@ Templates: [Docs Chatbot](https://mastra.ai/templates/docs-chatbot), [Slack Agen
|
|
|
192
192
|
|
|
193
193
|
</details>
|
|
194
194
|
|
|
195
|
+
<details>
|
|
196
|
+
**Software factories**
|
|
197
|
+
|
|
198
|
+
Coordinate coding agents to turn issues into tested code and pull requests. Let people review plans and changes before they're merged.
|
|
199
|
+
|
|
200
|
+
Used by Mastra.
|
|
201
|
+
|
|
202
|
+
Get started with [Mastra Factory](https://factory.mastra.ai/).
|
|
203
|
+
|
|
204
|
+
</details>
|
|
205
|
+
|
|
195
206
|
<details>
|
|
196
207
|
**Internal copilots**
|
|
197
208
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[`mastra deploy`](https://mastra.ai/reference/cli/mastra) is the single command for releasing a Mastra application to the [Mastra platform](https://mastra.ai/docs/mastra-platform/overview).
|
|
8
8
|
|
|
9
|
-
One command builds your project and validates it before
|
|
9
|
+
One command builds your project and validates it before deploying, plus creates the platform project and environment on your first run, deploys, streams build logs, and prints your public URL once the deploy is serving traffic.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
mastra deploy
|
|
@@ -63,6 +63,10 @@ A local `.env` file is optional. Environment variables stored on the platform ar
|
|
|
63
63
|
> })
|
|
64
64
|
> ```
|
|
65
65
|
|
|
66
|
+
If the build statically finds `backgroundTasks.enabled: true`, the deploy artifact includes a worker manifest. Mastra Cloud automatically provisions or updates a dedicated worker service from the same artifact. No separate toggle or add-on is required.
|
|
67
|
+
|
|
68
|
+
Removing `backgroundTasks` or setting `enabled: false` in a later deploy removes the manifest and spins down the existing worker service. Values that can't be determined statically are omitted from the manifest display, but the worker process still reads the complete configuration from your bundled code.
|
|
69
|
+
|
|
66
70
|
3. Run `mastra deploy` again. Preflight passes, the build uploads, and the CLI streams build logs until the deploy is live. Expect the full build and deploy to take between 30 seconds and a few minutes. The success message prints only when the new version is serving traffic.
|
|
67
71
|
|
|
68
72
|
4. Verify your deployment at the URL printed by the CLI. Append `/api/agents` to confirm it returns a JSON list of your agents.
|
|
@@ -87,7 +91,7 @@ See [Environments](https://mastra.ai/docs/mastra-platform/environments) for the
|
|
|
87
91
|
|
|
88
92
|
## Choose a region
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
When a deploy creates an environment interactively, select the United States or Europe from the region prompt. To skip the prompt, pass `--region` with the `us` or `eu` shorthand:
|
|
91
95
|
|
|
92
96
|
```bash
|
|
93
97
|
mastra deploy --env production --region eu
|
|
@@ -97,7 +101,7 @@ The region is fixed when the environment is created. Databases attached to an en
|
|
|
97
101
|
|
|
98
102
|
## Preflight checks
|
|
99
103
|
|
|
100
|
-
Preflight validates the built output before
|
|
104
|
+
Preflight validates the built output before the deploy uploads and only flags issues in your own code:
|
|
101
105
|
|
|
102
106
|
- **Local storage paths**: A hard block. File-backed storage (for example `file:./mastra.db`) is lost on every deploy. Preflight passes when the path is guarded by an environment variable that's set locally or stored on the platform, including values provided by a managed database:
|
|
103
107
|
|
|
@@ -23,6 +23,7 @@ Choose the path that matches what you want to do:
|
|
|
23
23
|
- **Add hosted observability**: Use [Observability](https://mastra.ai/docs/mastra-platform/observability) to collect searchable traces, logs, and metrics across projects and deploys. Start here if you want monitoring without deploying Studio or Server first.
|
|
24
24
|
- **Deploy Studio**: Use [Studio](https://mastra.ai/docs/mastra-platform/studio) to host the visual development environment for your team. Start here if you want a shared UI for testing agents and running workflows, as well as inspecting traces.
|
|
25
25
|
- **Deploy Server**: Use [Server](https://mastra.ai/docs/mastra-platform/server) to run your Mastra application as a production API server. Start here when you’re ready to serve agents, tools, and workflows from the cloud.
|
|
26
|
+
- **Build a software factory:** Deploy [Mastra Factory](https://factory.mastra.ai) to Mastra platform and connect your repository to turn issues into plans, implementations, and reviewed pull requests.
|
|
26
27
|
|
|
27
28
|
## Key concepts
|
|
28
29
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
A sandbox gives your agent an isolated environment where it can run commands, execute code, install dependencies, and manage processes. This lets agents perform work that would be risky, resource-intensive, or impractical to run directly inside your application.
|
|
8
8
|
|
|
9
|
-
Sandboxes are often temporary, so files created inside them may disappear when the environment stops. A [filesystem](https://mastra.ai/docs/sandbox/filesystem) gives the agent a place to read, write, and [search](https://mastra.ai/docs/sandbox/search) files that can outlive the sandbox. You can use one to keep outputs between runs, seed a new sandbox with existing files, or give the agent documents it can search while working. Filesystems also work without a sandbox, for example when an agent only needs a knowledge base or access to files in a service such as Google Drive.
|
|
9
|
+
Sandboxes are often temporary, so files created inside them may disappear when the environment stops. A [filesystem](https://mastra.ai/docs/sandbox/filesystem) gives the agent a place to read, write, and [search](https://mastra.ai/docs/sandbox/search) files that can outlive the sandbox. You can use one to keep outputs between runs, seed a new sandbox with existing files, or give the agent documents it can search while working. Filesystems also work without a sandbox, for example when an agent only needs a knowledge base or access to files in a service such as Google Drive. A real-world example is [Mastra Factory](https://factory.mastra.ai/) which uses sandboxes to give coding-agent sessions an environment for repository checkouts, dependencies, and commands.
|
|
10
10
|
|
|
11
11
|
## When to use sandboxes
|
|
12
12
|
|
|
@@ -344,4 +344,5 @@ await sandbox.executeCommand('node', ['scripts/download-reports.js'], {
|
|
|
344
344
|
|
|
345
345
|
- [`SandboxProcessManager` reference](https://mastra.ai/reference/workspace/process-manager)
|
|
346
346
|
- [Sandbox provider interface](https://mastra.ai/reference/workspace/sandbox)
|
|
347
|
-
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
347
|
+
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
348
|
+
- [Mastra Factory](https://factory.mastra.ai)
|
|
@@ -10,7 +10,7 @@ Mastra v1 was released in January 2026. We recommend starting any new projects w
|
|
|
10
10
|
|
|
11
11
|
This guide covers the breaking changes when upgrading from Mastra 0.x to v1.0. The migration is organized by package and feature area to help you systematically update your codebase.
|
|
12
12
|
|
|
13
|
-
> **Need help?:** Need help with the migration? Join our [Discord community](https://discord.gg/
|
|
13
|
+
> **Need help?:** Need help with the migration? Join our [Discord community](https://discord.gg/mastra-ai) to ask questions.
|
|
14
14
|
|
|
15
15
|
> **Coming from Mastra Cloud?:** The legacy Mastra Cloud product has been replaced by the [Mastra platform](https://mastra.ai/docs/mastra-platform/overview), which splits hosting into two separate products: **Studio** (visual environment, observability) and **Server** (production API). Because old Mastra Cloud access tokens don't work with Mastra platform, create new ones with `mastra auth tokens create`.
|
|
16
16
|
>
|
|
@@ -111,6 +111,9 @@ Hono and Fastify enforce the request-body limit before JSON parsing. Express and
|
|
|
111
111
|
| Score | `scorerId`, `scorerVersion`, `scoreSource`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
112
112
|
| Score | `score`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
|
|
113
113
|
| Score | `spanId` | `exists`, `notExists` |
|
|
114
|
+
| Feedback | `feedbackType`, `feedbackSource`, `feedbackUserId`, `sourceId`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
115
|
+
| Feedback | `value`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
|
|
116
|
+
| Feedback | `comment` | `exists`, `notExists` |
|
|
114
117
|
|
|
115
118
|
Compose predicates with `{ op: 'and', args: [...] }`, `{ op: 'or', args: [...] }`, and `{ op: 'not', arg: ... }`. Comparison predicates place a field reference on the left and a literal on the right. Membership predicates use a field reference in `value` and a homogeneous literal array in `set`.
|
|
116
119
|
|
|
@@ -270,6 +273,45 @@ The key must name one top-level property. Empty keys and nested paths are reject
|
|
|
270
273
|
|
|
271
274
|
Metadata fields aren't available for grouping or field discovery.
|
|
272
275
|
|
|
276
|
+
### Filter by feedback
|
|
277
|
+
|
|
278
|
+
Every condition inside one `feedback.some` or `feedback.none` clause applies to the same current feedback record. `feedbackType` and `feedbackSource` are exact application-defined strings rather than built-in enums. This query finds traces with a numeric patient rating below zero:
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
const negativePatientRating = {
|
|
282
|
+
feedback: {
|
|
283
|
+
some: {
|
|
284
|
+
op: 'and',
|
|
285
|
+
args: [
|
|
286
|
+
{ op: 'eq', left: { path: 'feedbackType' }, right: { literal: 'rating' } },
|
|
287
|
+
{ op: 'eq', left: { path: 'feedbackSource' }, right: { literal: 'patient' } },
|
|
288
|
+
{ op: 'lt', left: { path: 'value' }, right: { literal: 0 } },
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Strict stored-value types are the portable contract for feedback predicates. PostgreSQL and ClickHouse distinguish numeric `3` from textual `'3'` for equality and ordered comparisons. DuckDB currently persists feedback values as `VARCHAR`, so numeric-looking strings may be coerced for equality and ordered numeric predicates. OBS-306 will remove this DuckDB exception through typed persistence. Ordered operators require a finite numeric literal. `eq` and `ne` accept one string or number, while `in` and `notIn` require a non-empty set containing only strings or only numbers. `exists` and `notExists` test for either value type.
|
|
296
|
+
|
|
297
|
+
Use `none` to select traces without a matching record. Traces with no feedback also match:
|
|
298
|
+
|
|
299
|
+
```typescript
|
|
300
|
+
const missingClinicianReview = {
|
|
301
|
+
feedback: {
|
|
302
|
+
none: {
|
|
303
|
+
op: 'and',
|
|
304
|
+
args: [
|
|
305
|
+
{ op: 'eq', left: { path: 'feedbackType' }, right: { literal: 'clinical-review' } },
|
|
306
|
+
{ op: 'eq', left: { path: 'feedbackSource' }, right: { literal: 'clinician' } },
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Feedback `timestamp` predicates are independent of the root `timeRange`. Use `comment` only with `exists` or `notExists`. Comment contents aren't searchable. The deprecated feedback fields `source` and `userId` aren't available. Use `feedbackSource` and `feedbackUserId`.
|
|
314
|
+
|
|
273
315
|
## Responses
|
|
274
316
|
|
|
275
317
|
An ungrouped query returns only lightweight completed traces:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.25-alpha.
|
|
3
|
+
"version": "1.2.25-alpha.8",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"jsdom": "^26.1.0",
|
|
28
28
|
"local-pkg": "^1.1.2",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@mastra/core": "1.66.0-alpha.
|
|
30
|
+
"@mastra/core": "1.66.0-alpha.4",
|
|
31
31
|
"@mastra/mcp": "^1.17.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"tsx": "^4.23.1",
|
|
45
45
|
"typescript": "^7.0.2",
|
|
46
46
|
"vitest": "4.1.10",
|
|
47
|
-
"@internal/types-builder": "0.0.106",
|
|
48
47
|
"@internal/lint": "0.0.131",
|
|
49
|
-
"@
|
|
48
|
+
"@internal/types-builder": "0.0.106",
|
|
49
|
+
"@mastra/core": "1.66.0-alpha.4"
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://mastra.ai",
|
|
52
52
|
"repository": {
|