@mastra/server 1.78.0-alpha.2 → 1.78.0-alpha.3

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.
@@ -3,7 +3,7 @@ name: mastra-server
3
3
  description: Documentation for @mastra/server. Use when working with @mastra/server APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/server"
6
- version: "1.78.0-alpha.2"
6
+ version: "1.78.0-alpha.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.78.0-alpha.2",
2
+ "version": "1.78.0-alpha.3",
3
3
  "package": "@mastra/server",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -8,7 +8,7 @@ Use `queryTraces()`, `mastra api trace query`, or `POST /api/observability/trace
8
8
 
9
9
  For example, find traces with a failed tool call or a duration above a threshold. Each result represents a trace. Use its `traceId` to [retrieve the full trace](https://mastra.ai/reference/client-js/observability).
10
10
 
11
- The endpoint uses the same authentication as other observability routes and requires the `observability:read` permission. The configured observability store must support trace queries. Every query requires a time range of at most 31 days.
11
+ The endpoint uses the same authentication as other observability routes and requires the `observability:read` permission. The configured observability store must support trace queries. Every query requires a time range.
12
12
 
13
13
  For hosted traces, see [Query observability data on Mastra Platform](https://mastra.ai/docs/mastra-platform/observability) for project credentials and regional endpoints.
14
14
 
@@ -74,14 +74,19 @@ mastra api --url http://localhost:4111 trace query '{
74
74
 
75
75
  The explicit `--url` targets a local Mastra server. Without it, observability commands default to `https://observability.mastra.ai`, even when a local server is running. See [CLI target resolution](https://mastra.ai/reference/cli/mastra) for authentication and regional endpoints. The target server and configured store must support the requested query capabilities.
76
76
 
77
- Inspect the command and the target server's request and response schemas with:
77
+ Inspect the command with:
78
78
 
79
79
  ```bash
80
80
  mastra api trace query --help
81
+ ```
82
+
83
+ For a local Mastra server, inspect its request and response schemas with:
84
+
85
+ ```bash
81
86
  mastra api --url http://localhost:4111 trace query --schema
82
87
  ```
83
88
 
84
- `--schema` describes the request structure. Use [Fields and operators](#fields-and-operators) for the supported predicate paths and operators.
89
+ Mastra Platform doesn't currently expose the schema endpoint used by `--schema`. Use [Request fields](#request-fields) and [Fields and operators](#fields-and-operators) to construct queries for either target. To find fields and values recorded in your project, use [field and value discovery](#discover-fields-and-values).
85
90
 
86
91
  ## Send an HTTP request
87
92
 
@@ -115,16 +120,16 @@ curl --request POST \
115
120
 
116
121
  ## Request fields
117
122
 
118
- | Field | Required | Description |
119
- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
- | `timeRange` | Yes | Trace start-time boundary. `from` is inclusive and `to` is exclusive. Both values must be ISO timestamps, `from` must be earlier than `to`, and the range can't exceed 31 days. |
121
- | `where` | No | Recursive trace predicate. Supports scalar conditions and `spans.some` or `spans.none` clauses. |
122
- | `orderBy` | No | One item ordering results by `startedAt` or `endedAt`, in `asc` or `desc` order. Defaults to `startedAt desc`. Not accepted in delta mode. |
123
- | `page` | No | `{ limit, after }`. `limit` defaults to 100 and has a maximum of 1000. Pass the opaque `page.next` value as `after`. |
124
- | `pagination` | No | Numbered pages: `{ page, perPage }`. Defaults to page 0 and 10 results. `perPage` has a maximum of 100. |
125
- | `mode` | No | Set to `'delta'` to poll using a delta cursor instead of `page` or `pagination`. |
126
- | `after` | No | Delta mode only. Opaque `deltaCursor` from a numbered page or previous poll. Omit to establish the current watermark. |
127
- | `limit` | No | Delta mode only. Maximum results per batch. Defaults to 10 and has a maximum of 100. |
123
+ | Field | Required | Description |
124
+ | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
125
+ | `timeRange` | Yes | Trace start-time boundary. `from` is inclusive and `to` is exclusive. Both values must be ISO timestamps, and `from` must be earlier than `to`. |
126
+ | `where` | No | Recursive trace predicate. Supports scalar conditions and `spans.some` or `spans.none` clauses. |
127
+ | `orderBy` | No | One item ordering results by `startedAt` or `endedAt`, in `asc` or `desc` order. Defaults to `startedAt desc`. Not accepted in delta mode. |
128
+ | `page` | No | `{ limit, after }`. `limit` defaults to 100 and has a maximum of 1000. Pass the opaque `page.next` value as `after`. |
129
+ | `pagination` | No | Numbered pages: `{ page, perPage }`. Defaults to page 0 and 10 results. `perPage` has a maximum of 100. |
130
+ | `mode` | No | Set to `'delta'` to poll using a delta cursor instead of `page` or `pagination`. |
131
+ | `after` | No | Delta mode only. Opaque `deltaCursor` from a numbered page or previous poll. Omit to establish the current watermark. |
132
+ | `limit` | No | Delta mode only. Maximum results per batch. Defaults to 10 and has a maximum of 100. |
128
133
 
129
134
  Unknown fields are rejected. Requests can't select a projection, declare joins, request counts or measures, or control authorization. Request bodies are limited to 256 KiB.
130
135
 
@@ -134,7 +139,6 @@ The planner rejects a query before storage execution when it exceeds any of thes
134
139
 
135
140
  | Input | Maximum |
136
141
  | ----------------------------------------- | ----------------- |
137
- | Trace selection `timeRange` | 31 days |
138
142
  | Predicate nesting depth | 12 levels |
139
143
  | Predicate nodes | 100 |
140
144
  | Related `spans` clauses | 8 total |
@@ -594,7 +598,7 @@ Value suggestions are available for these canonical fields:
594
598
 
595
599
  Each executable top-level string `metadata.<key>` field also supports value suggestions in the `trace` scope. Identifiers, timestamps, durations, errors, and version IDs don't. The fields response still includes canonical fields with `valueSuggestions: false`. The values endpoint rejects those paths with `422 TRACE_QUERY_INVALID`.
596
600
 
597
- Both discovery requests require a half-open time range of at most 31 days. They use the same current-record semantics as `queryTraces()`: qualifying completed roots satisfy `from <= startedAt < to`, and related values come only from current records joined to those roots by `traceId`. Discovery doesn't accept or apply a draft `where` predicate.
601
+ Both discovery requests require a half-open time range. They use the same current-record semantics as `queryTraces()`: qualifying completed roots satisfy `from <= startedAt < to`, and related values come only from current records joined to those roots by `traceId`. Discovery doesn't accept or apply a draft `where` predicate.
598
602
 
599
603
  `search` defaults to the empty string, is trimmed, and matches case-insensitive literal substrings. Characters such as `%` and `_` have no wildcard meaning. An empty search returns the most frequent results. `limit` defaults to 25 and has a maximum of 100. Both endpoints fetch one extra result to set their truncation flag, but don't provide a cursor. When a flag is `true`, refine `search`. It doesn't imply that a next page is available. No matches return an empty array and `false` truncation.
600
604