@mastra/libsql 1.22.5-alpha.0 → 1.22.5

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.
@@ -3,7 +3,7 @@ name: mastra-libsql
3
3
  description: Documentation for @mastra/libsql. Use when working with @mastra/libsql APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/libsql"
6
- version: "1.22.5-alpha.0"
6
+ version: "1.22.5"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.5-alpha.0",
2
+ "version": "1.22.5",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -4782,6 +4782,7 @@ var DatasetsLibSQL = class extends _mastra_core_storage.DatasetsStorage {
4782
4782
  //#endregion
4783
4783
  //#region src/storage/domains/experiments/index.ts
4784
4784
  const DEFAULT_PRUNE_BATCH_SIZE = 1e3;
4785
+ const TAGS_IS_JSON = `CASE typeof(tags) WHEN 'blob' THEN 1 WHEN 'text' THEN json_valid(tags) ELSE 0 END`;
4785
4786
  var ExperimentsLibSQL = class extends _mastra_core_storage.ExperimentsStorage {
4786
4787
  /**
4787
4788
  * An experiment is pruned as a whole unit: when `experiments.completedAt` is
@@ -5517,6 +5518,10 @@ var ExperimentsLibSQL = class extends _mastra_core_storage.ExperimentsStorage {
5517
5518
  conditions.push("status = ?");
5518
5519
  queryParams.push(args.status);
5519
5520
  }
5521
+ for (const tag of args.tags ?? []) {
5522
+ conditions.push(`CASE WHEN ${TAGS_IS_JSON} THEN EXISTS (SELECT 1 FROM json_each(tags) WHERE value = ?) ELSE 0 END`);
5523
+ queryParams.push(tag);
5524
+ }
5520
5525
  if (args.filters) {
5521
5526
  const { organizationId, projectId } = args.filters;
5522
5527
  if (organizationId !== void 0) {