@mastra/libsql 1.8.1-alpha.0 → 1.8.1

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
@@ -4132,6 +4132,22 @@ var ExperimentsLibSQL = class extends ExperimentsStorage {
4132
4132
  conditions.push("datasetId = ?");
4133
4133
  queryParams.push(args.datasetId);
4134
4134
  }
4135
+ if (args.targetType) {
4136
+ conditions.push("targetType = ?");
4137
+ queryParams.push(args.targetType);
4138
+ }
4139
+ if (args.targetId) {
4140
+ conditions.push("targetId = ?");
4141
+ queryParams.push(args.targetId);
4142
+ }
4143
+ if (args.agentVersion) {
4144
+ conditions.push("agentVersion = ?");
4145
+ queryParams.push(args.agentVersion);
4146
+ }
4147
+ if (args.status) {
4148
+ conditions.push("status = ?");
4149
+ queryParams.push(args.status);
4150
+ }
4135
4151
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
4136
4152
  const countResult = await this.#client.execute({
4137
4153
  sql: `SELECT COUNT(*) as count FROM ${TABLE_EXPERIMENTS} ${whereClause}`,
@@ -4334,6 +4350,14 @@ var ExperimentsLibSQL = class extends ExperimentsStorage {
4334
4350
  const { page, perPage: perPageInput } = args.pagination;
4335
4351
  const conditions = ["experimentId = ?"];
4336
4352
  const queryParams = [args.experimentId];
4353
+ if (args.traceId) {
4354
+ conditions.push("traceId = ?");
4355
+ queryParams.push(args.traceId);
4356
+ }
4357
+ if (args.status) {
4358
+ conditions.push("status = ?");
4359
+ queryParams.push(args.status);
4360
+ }
4337
4361
  const whereClause = `WHERE ${conditions.join(" AND ")}`;
4338
4362
  const countResult = await this.#client.execute({
4339
4363
  sql: `SELECT COUNT(*) as count FROM ${TABLE_EXPERIMENT_RESULTS} ${whereClause}`,