@mastra/client-js 1.44.0-alpha.1 → 1.44.0-alpha.10

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
@@ -4304,6 +4304,18 @@ var Observability = class extends BaseResource {
4304
4304
  return this.request(`/observability/traces${queryString ? `?${queryString}` : ""}`);
4305
4305
  }
4306
4306
  /**
4307
+ * Queries completed logical traces using recursive trace and related-record predicates.
4308
+ *
4309
+ * @param params - Advanced trace query, including its required time range
4310
+ * @returns Matching lightweight traces or distinct thread groups
4311
+ */
4312
+ queryTraces(params) {
4313
+ return this.request("/observability/traces/query", {
4314
+ method: "POST",
4315
+ body: params
4316
+ });
4317
+ }
4318
+ /**
4307
4319
  * Retrieves paginated list of traces carrying only the fields a trace list renders.
4308
4320
  *
4309
4321
  * Same filtering, ordering and delta-polling contract as {@link listTraces}, but rows
@@ -4376,6 +4388,21 @@ var Observability = class extends BaseResource {
4376
4388
  });
4377
4389
  }
4378
4390
  /**
4391
+ * Deletes traces by ID, cascading to all associated data: spans, trace
4392
+ * roots/branches, and signal events (scores, feedback, metrics, logs) that
4393
+ * reference the deleted traces. Signals without a trace ID are untouched.
4394
+ * On ClickHouse-backed stores, reads may briefly return deleted rows until
4395
+ * the lightweight delete is fully applied.
4396
+ * @param params - IDs of the traces to delete
4397
+ * @returns Promise resolving to `{ success: true }` once the delete is issued
4398
+ */
4399
+ deleteTraces(params) {
4400
+ return this.request(`/observability/traces/delete`, {
4401
+ method: "POST",
4402
+ body: { traceIds: params.traceIds }
4403
+ });
4404
+ }
4405
+ /**
4379
4406
  * Retrieves a paginated list of logs with optional filtering and sorting.
4380
4407
  */
4381
4408
  listLogs(params = {}) {
@@ -6785,6 +6812,10 @@ var MastraClient = class extends BaseResource {
6785
6812
  listTraces(params = {}) {
6786
6813
  return this.observability.listTraces(params);
6787
6814
  }
6815
+ /** Queries completed logical traces using recursive trace and related-record predicates. */
6816
+ queryTraces(params) {
6817
+ return this.observability.queryTraces(params);
6818
+ }
6788
6819
  /**
6789
6820
  * Retrieves paginated list of traces carrying only the fields a trace list renders.
6790
6821
  * Same contract as {@link listTraces}, but rows omit the `attributes`/`input`/`output`
@@ -6815,6 +6846,15 @@ var MastraClient = class extends BaseResource {
6815
6846
  listScoresBySpan(params) {
6816
6847
  return this.observability.listScoresBySpan(params);
6817
6848
  }
6849
+ /**
6850
+ * Deletes traces by ID, cascading to all associated spans and trace-linked
6851
+ * signal events (scores, feedback, metrics, logs). Signals without a trace ID
6852
+ * are untouched. On ClickHouse-backed stores, reads may briefly return
6853
+ * deleted rows until the delete is fully applied.
6854
+ */
6855
+ deleteTraces(params) {
6856
+ return this.observability.deleteTraces(params);
6857
+ }
6818
6858
  /** Scores one or more traces using a specified scorer (fire-and-forget). */
6819
6859
  score(params) {
6820
6860
  return this.observability.score(params);