@mastra/client-js 1.57.0-alpha.4 → 1.57.0-alpha.6

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/index.js CHANGED
@@ -1641,13 +1641,14 @@ var Agent = class extends BaseResource {
1641
1641
  return this.requestSignalRoute(`/agents/${this.agentId}/queue-signal`, params);
1642
1642
  }
1643
1643
  async subscribeToThread(params) {
1644
- const { resourceId, threadId, withInitialHistory } = params;
1644
+ const { resourceId, threadId, withInitialHistory, withRunStatus } = params;
1645
1645
  const requestSubscription = () => this.request(`/agents/${this.agentId}/threads/subscribe`, {
1646
1646
  method: "POST",
1647
1647
  body: {
1648
1648
  resourceId,
1649
1649
  threadId,
1650
- ...withInitialHistory ? { withInitialHistory } : {}
1650
+ ...withInitialHistory ? { withInitialHistory } : {},
1651
+ ...withRunStatus ? { withRunStatus } : {}
1651
1652
  },
1652
1653
  stream: true
1653
1654
  });
@@ -5340,10 +5341,11 @@ var Observability = class extends BaseResource {
5340
5341
  * Groups and measures the traces selected by a time range and optional trace-query predicate.
5341
5342
  * Check `capabilities.traceAggregate` from `getObservabilityCapabilities()` first; servers without it return 404 or 501.
5342
5343
  */
5343
- aggregateTraces(params) {
5344
+ aggregateTraces(params, options) {
5344
5345
  return this.request("/observability/traces/aggregate", {
5345
5346
  method: "POST",
5346
- body: params
5347
+ body: params,
5348
+ signal: options?.signal
5347
5349
  });
5348
5350
  }
5349
5351
  /**
@@ -7041,7 +7043,7 @@ var AgentControllerSession = class extends BaseResource {
7041
7043
  const abort = new AbortController();
7042
7044
  currentAbort = abort;
7043
7045
  let openTimer;
7044
- const request = this.request(`${this.base()}/stream`, {
7046
+ const request = this.request(`${this.base()}/stream${options.displayState === false ? "?displayState=false" : ""}`, {
7045
7047
  stream: true,
7046
7048
  signal: abort.signal
7047
7049
  });
@@ -8205,8 +8207,8 @@ var MastraClient = class extends BaseResource {
8205
8207
  * Groups and measures the traces selected by a time range and optional trace-query predicate.
8206
8208
  * Check `capabilities.traceAggregate` from `getObservabilityCapabilities()` first; servers without it return 404 or 501.
8207
8209
  */
8208
- aggregateTraces(params) {
8209
- return this.observability.aggregateTraces(params);
8210
+ aggregateTraces(params, options) {
8211
+ return this.observability.aggregateTraces(params, options);
8210
8212
  }
8211
8213
  /**
8212
8214
  * Groups and measures individual completed spans selected by a time range and optional span-query predicate.