@mastra/client-js 1.60.0-alpha.8 → 1.60.0-alpha.9
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 +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-harness-schedules.md +1 -1
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +2 -1
- package/dist/route-types.generated.d.ts +17 -5
- package/dist/route-types.generated.d.ts.map +1 -1
- package/package.json +3 -3
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.60.0-alpha.
|
|
6
|
+
version: "1.60.0-alpha.9"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -42,7 +42,7 @@ await mastra.schedules.create({
|
|
|
42
42
|
})
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Mastra starts
|
|
45
|
+
Schedules fire only in a process where Mastra's background [workers](https://mastra.ai/docs/deployment/workers) are running. The server that `mastra dev` and `mastra build` generate starts them for you. With a [server adapter](https://mastra.ai/docs/server/server-adapters) or your own script, call `mastra.startWorkers()` yourself, otherwise schedules are saved but never fire. See [Start background workers](https://mastra.ai/docs/server/server-adapters).
|
|
46
46
|
|
|
47
47
|
## Cadence
|
|
48
48
|
|
|
@@ -35,6 +35,7 @@ The configured observability store must support each API. Call `getObservability
|
|
|
35
35
|
| -------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
36
|
| `traceQuery` | `trace-query` | `queryTraces()` |
|
|
37
37
|
| `spanQuery` | `span-query` | `querySpans()` |
|
|
38
|
+
| `spanQueryDurationSort` | `span-query-duration-sort` | `orderBy` on `durationMs` in `querySpans()` |
|
|
38
39
|
| `spanQueryContextFields` | `span-query-context-fields` | Additional identity, context, and parent/root entity predicates in span queries and aggregates |
|
|
39
40
|
| `spanQueryModelFields` | `span-query-model-fields` | `model` and `provider` predicates in span queries and aggregates |
|
|
40
41
|
| `traceAggregate` | `trace-aggregate` | `aggregateTraces()` |
|
|
@@ -672,7 +673,7 @@ const result = await mastraClient.querySpans({
|
|
|
672
673
|
console.log(result.spans)
|
|
673
674
|
```
|
|
674
675
|
|
|
675
|
-
Pages default to 100 rows and allow at most 1,000. The response is `{ spans, page: { next } }`, without a total count. Ordering accepts exactly one of `startedAt`, `endedAt`, `timeToFirstChunkMs`, or `timeToFirstTokenMs`, ascending or descending, and defaults to descending start time. Spans without a value for the `timeToFirstChunkMs` or `timeToFirstTokenMs` sort field sort last in both directions.
|
|
676
|
+
Pages default to 100 rows and allow at most 1,000. The response is `{ spans, page: { next } }`, without a total count. Ordering accepts exactly one of `startedAt`, `endedAt`, `durationMs`, `timeToFirstChunkMs`, or `timeToFirstTokenMs`, ascending or descending, and defaults to descending start time. Spans without a value for the `timeToFirstChunkMs` or `timeToFirstTokenMs` sort field sort last in both directions.
|
|
676
677
|
|
|
677
678
|
| Fields | Operators |
|
|
678
679
|
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
@@ -2931,6 +2931,8 @@ type Shared_Type_69 = {
|
|
|
2931
2931
|
threadQueryRows: boolean;
|
|
2932
2932
|
/** Span queries (POST /observability/spans/query) */
|
|
2933
2933
|
spanQuery: boolean;
|
|
2934
|
+
/** Whether completed spans can be sorted by duration */
|
|
2935
|
+
spanQueryDurationSort: boolean;
|
|
2934
2936
|
/** Additional identity, context and parent/root entity predicates in span queries. Treat a missing value as unavailable. */
|
|
2935
2937
|
spanQueryContextFields: boolean;
|
|
2936
2938
|
/** `model` and `provider` predicates in span queries and span aggregates. Treat a missing value as unavailable. */
|
|
@@ -3707,7 +3709,9 @@ type Shared_Type_105 = {
|
|
|
3707
3709
|
threadId?: string | undefined;
|
|
3708
3710
|
resourceId?: string | undefined;
|
|
3709
3711
|
prompt: string;
|
|
3710
|
-
cron
|
|
3712
|
+
cron?: string | undefined;
|
|
3713
|
+
runAt?: number | undefined;
|
|
3714
|
+
endAt?: number | undefined;
|
|
3711
3715
|
timezone?: string | undefined;
|
|
3712
3716
|
status: 'active' | 'paused' | 'completed';
|
|
3713
3717
|
nextFireAt: number;
|
|
@@ -3740,7 +3744,9 @@ type Shared_Type_107 = {
|
|
|
3740
3744
|
id: string;
|
|
3741
3745
|
workflowId: string;
|
|
3742
3746
|
agentId?: undefined | undefined;
|
|
3743
|
-
cron
|
|
3747
|
+
cron?: string | undefined;
|
|
3748
|
+
runAt?: number | undefined;
|
|
3749
|
+
endAt?: number | undefined;
|
|
3744
3750
|
timezone?: string | undefined;
|
|
3745
3751
|
status: 'active' | 'paused' | 'completed';
|
|
3746
3752
|
nextFireAt: number;
|
|
@@ -8534,7 +8540,7 @@ export type PostObservabilitySpansQuery_Body = {
|
|
|
8534
8540
|
where?: InputShared_Auxiliary_231 | undefined;
|
|
8535
8541
|
textSearch?: string | undefined;
|
|
8536
8542
|
orderBy?: {
|
|
8537
|
-
field: 'startedAt' | 'endedAt' | 'timeToFirstChunkMs' | 'timeToFirstTokenMs';
|
|
8543
|
+
field: 'startedAt' | 'endedAt' | 'timeToFirstChunkMs' | 'timeToFirstTokenMs' | 'durationMs';
|
|
8538
8544
|
direction: 'asc' | 'desc';
|
|
8539
8545
|
}[];
|
|
8540
8546
|
page?: {
|
|
@@ -18430,7 +18436,9 @@ export interface GetSchedulesScheduleId_RouteContract {
|
|
|
18430
18436
|
export type PostSchedules_Body = {
|
|
18431
18437
|
id?: string | undefined;
|
|
18432
18438
|
agentId: string;
|
|
18433
|
-
cron
|
|
18439
|
+
cron?: string | undefined;
|
|
18440
|
+
runAt?: number | undefined;
|
|
18441
|
+
endAt?: number | undefined;
|
|
18434
18442
|
timezone?: string | undefined;
|
|
18435
18443
|
prompt: string;
|
|
18436
18444
|
name?: string | undefined;
|
|
@@ -18452,7 +18460,9 @@ export type PostSchedules_Body = {
|
|
|
18452
18460
|
} | {
|
|
18453
18461
|
id?: string | undefined;
|
|
18454
18462
|
workflowId: string;
|
|
18455
|
-
cron
|
|
18463
|
+
cron?: string | undefined;
|
|
18464
|
+
runAt?: number | undefined;
|
|
18465
|
+
endAt?: number | undefined;
|
|
18456
18466
|
timezone?: string | undefined;
|
|
18457
18467
|
inputData?: unknown | undefined;
|
|
18458
18468
|
initialState?: unknown | undefined;
|
|
@@ -18487,6 +18497,8 @@ export interface PostSchedules_RouteContract {
|
|
|
18487
18497
|
export type PatchSchedulesScheduleId_PathParams = GetSchedulesScheduleId_PathParams;
|
|
18488
18498
|
export type PatchSchedulesScheduleId_Body = {
|
|
18489
18499
|
cron?: string | undefined;
|
|
18500
|
+
runAt?: number | undefined;
|
|
18501
|
+
endAt?: (number | null) | undefined;
|
|
18490
18502
|
timezone?: string | undefined;
|
|
18491
18503
|
status?: ('active' | 'paused') | undefined;
|
|
18492
18504
|
metadata?: {
|