@mastra/client-js 1.49.0-alpha.1 → 1.49.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.
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-client-js
|
|
|
3
3
|
description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/client-js"
|
|
6
|
-
version: "1.49.0-alpha.
|
|
6
|
+
version: "1.49.0-alpha.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -287,7 +287,7 @@ Hono and Fastify enforce the request-body limit before JSON parsing. Express and
|
|
|
287
287
|
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
|
|
288
288
|
| Trace | `traceId`, `threadId`, `resourceId`, `entityName`, `entityType`, `environment`, `status` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
289
289
|
| Trace metadata | `metadata.<key>` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
290
|
-
| Trace | `startedAt`, `endedAt`
|
|
290
|
+
| Trace | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
|
|
291
291
|
| Trace | `tags` | `includes`, `notIncludes`, `exists`, `notExists` |
|
|
292
292
|
| Span | `name`, `spanType`, `model`, `provider`, `status`, `entityType`, `entityId`, `entityName`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
293
293
|
| Span | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
|
|
@@ -303,6 +303,22 @@ Compose predicates with `{ op: 'and', args: [...] }`, `{ op: 'or', args: [...] }
|
|
|
303
303
|
|
|
304
304
|
String comparisons are case-sensitive, and literals are never coerced. Canonical string fields compare exact stored values. Metadata string values are trimmed before comparison, as described below. Numeric predicates, including `score` and `durationMs`, require numbers, while timestamp predicates require ISO timestamp strings. A missing value satisfies neither positive nor ordered predicates, although it does satisfy the negative operators `ne` and `notIn`. Combine a negative predicate with `exists` when the field must also be present.
|
|
305
305
|
|
|
306
|
+
### Filter by root duration
|
|
307
|
+
|
|
308
|
+
At trace scope, `durationMs` is the current completed root span's elapsed time in milliseconds. The value is derived from `endedAt - startedAt` when the query runs:
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
const slowRootTraces = {
|
|
312
|
+
op: 'gt',
|
|
313
|
+
left: { path: 'durationMs' },
|
|
314
|
+
right: { literal: 5000 },
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
This top-level predicate doesn't inspect child spans. In contrast, `spans.some` with a `durationMs` predicate examines the current root span and current child spans, so a long child can satisfy that clause even when its root is shorter.
|
|
319
|
+
|
|
320
|
+
Trace queries exclude incomplete roots before evaluating predicates. As a result, `{ op: 'notExists', path: 'durationMs' }` doesn't find running traces or malformed roots without a usable `endedAt`.
|
|
321
|
+
|
|
306
322
|
### Filter by span properties
|
|
307
323
|
|
|
308
324
|
Every condition inside one `spans.some` or `spans.none` clause applies to the same current span. For example, this predicate finds a failed tool span whose name is `medication_lookup`; a matching name on one span and an error on another don't satisfy it:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "1.49.0-alpha.
|
|
3
|
+
"version": "1.49.0-alpha.3",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"jose": "^6.2.11",
|
|
40
40
|
"json-schema": "^0.4.0",
|
|
41
41
|
"@mastra/schema-compat": "1.3.11",
|
|
42
|
-
"@mastra/core": "1.70.0-alpha.
|
|
42
|
+
"@mastra/core": "1.70.0-alpha.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"zod": "^3.25.0 || ^4.0.0"
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"typescript": "^7.0.2",
|
|
56
56
|
"vitest": "4.1.11",
|
|
57
57
|
"zod": "^4.6.4",
|
|
58
|
-
"@internal/ai-sdk-v5": "0.0.82",
|
|
59
58
|
"@internal/ai-sdk-v4": "0.0.82",
|
|
59
|
+
"@internal/ai-sdk-v5": "0.0.82",
|
|
60
60
|
"@internal/lint": "0.0.135",
|
|
61
61
|
"@internal/types-builder": "0.0.110"
|
|
62
62
|
},
|