@mastra/libsql 1.7.3-alpha.2 → 1.7.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @mastra/libsql
2
2
 
3
+ ## 1.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - The internal architecture of observational memory has been refactored. The public API and behavior remain unchanged. ([#14453](https://github.com/mastra-ai/mastra/pull/14453))
8
+
9
+ - Add `getReviewSummary()` to experiments storage for aggregating review status counts ([#14649](https://github.com/mastra-ai/mastra/pull/14649))
10
+
11
+ Query experiment results grouped by experiment ID, returning counts of `needs-review`, `reviewed`, and `complete` items in a single query instead of fetching all results client-side.
12
+
13
+ ```ts
14
+ const summary = await storage.experiments.getReviewSummary();
15
+ // [{ experimentId: 'exp-1', needsReview: 3, reviewed: 5, complete: 2, total: 10 }, ...]
16
+ ```
17
+
18
+ - Added `scorerIds` persistence for datasets. The `scorerIds` field is now stored and retrieved correctly when creating or updating datasets. ([#14783](https://github.com/mastra-ai/mastra/pull/14783))
19
+
20
+ - Updated dependencies [[`dc514a8`](https://github.com/mastra-ai/mastra/commit/dc514a83dba5f719172dddfd2c7b858e4943d067), [`e333b77`](https://github.com/mastra-ai/mastra/commit/e333b77e2d76ba57ccec1818e08cebc1993469ff), [`dc9fc19`](https://github.com/mastra-ai/mastra/commit/dc9fc19da4437f6b508cc355f346a8856746a76b), [`60a224d`](https://github.com/mastra-ai/mastra/commit/60a224dd497240e83698cfa5bfd02e3d1d854844), [`fbf22a7`](https://github.com/mastra-ai/mastra/commit/fbf22a7ad86bcb50dcf30459f0d075e51ddeb468), [`f16d92c`](https://github.com/mastra-ai/mastra/commit/f16d92c677a119a135cebcf7e2b9f51ada7a9df4), [`949b7bf`](https://github.com/mastra-ai/mastra/commit/949b7bfd4e40f2b2cba7fef5eb3f108a02cfe938), [`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`12c647c`](https://github.com/mastra-ai/mastra/commit/12c647cf3a26826eb72d40b42e3c8356ceae16ed), [`d084b66`](https://github.com/mastra-ai/mastra/commit/d084b6692396057e83c086b954c1857d20b58a14), [`79c699a`](https://github.com/mastra-ai/mastra/commit/79c699acf3cd8a77e11c55530431f48eb48456e9), [`62757b6`](https://github.com/mastra-ai/mastra/commit/62757b6db6e8bb86569d23ad0b514178f57053f8), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`819f03c`](https://github.com/mastra-ai/mastra/commit/819f03c25823373b32476413bd76be28a5d8705a), [`04160ee`](https://github.com/mastra-ai/mastra/commit/04160eedf3130003cf842ad08428c8ff69af4cc1), [`2c27503`](https://github.com/mastra-ai/mastra/commit/2c275032510d131d2cde47f99953abf0fe02c081), [`424a1df`](https://github.com/mastra-ai/mastra/commit/424a1df7bee59abb5c83717a54807fdd674a6224), [`3d70b0b`](https://github.com/mastra-ai/mastra/commit/3d70b0b3524d817173ad870768f259c06d61bd23), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`260fe12`](https://github.com/mastra-ai/mastra/commit/260fe1295fe7354e39d6def2775e0797a7a277f0), [`12c88a6`](https://github.com/mastra-ai/mastra/commit/12c88a6e32bf982c2fe0c6af62e65a3414519a75), [`43595bf`](https://github.com/mastra-ai/mastra/commit/43595bf7b8df1a6edce7a23b445b5124d2a0b473), [`78670e9`](https://github.com/mastra-ai/mastra/commit/78670e97e76d7422cf7025faf371b2aeafed860d), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778), [`3b45a13`](https://github.com/mastra-ai/mastra/commit/3b45a138d09d040779c0aba1edbbfc1b57442d23), [`d400e7c`](https://github.com/mastra-ai/mastra/commit/d400e7c8b8d7afa6ba2c71769eace4048e3cef8e), [`f58d1a7`](https://github.com/mastra-ai/mastra/commit/f58d1a7a457588a996c3ecb53201a68f3d28c432), [`a49a929`](https://github.com/mastra-ai/mastra/commit/a49a92904968b4fc67e01effee8c7c8d0464ba85), [`8127d96`](https://github.com/mastra-ai/mastra/commit/8127d96280492e335d49b244501088dfdd59a8f1)]:
21
+ - @mastra/core@1.18.0
22
+
23
+ ## 1.7.3-alpha.3
24
+
25
+ ### Patch Changes
26
+
27
+ - Added `scorerIds` persistence for datasets. The `scorerIds` field is now stored and retrieved correctly when creating or updating datasets. ([#14783](https://github.com/mastra-ai/mastra/pull/14783))
28
+
29
+ - Updated dependencies [[`fbf22a7`](https://github.com/mastra-ai/mastra/commit/fbf22a7ad86bcb50dcf30459f0d075e51ddeb468), [`04160ee`](https://github.com/mastra-ai/mastra/commit/04160eedf3130003cf842ad08428c8ff69af4cc1), [`2c27503`](https://github.com/mastra-ai/mastra/commit/2c275032510d131d2cde47f99953abf0fe02c081), [`424a1df`](https://github.com/mastra-ai/mastra/commit/424a1df7bee59abb5c83717a54807fdd674a6224), [`12c88a6`](https://github.com/mastra-ai/mastra/commit/12c88a6e32bf982c2fe0c6af62e65a3414519a75), [`43595bf`](https://github.com/mastra-ai/mastra/commit/43595bf7b8df1a6edce7a23b445b5124d2a0b473), [`78670e9`](https://github.com/mastra-ai/mastra/commit/78670e97e76d7422cf7025faf371b2aeafed860d), [`d400e7c`](https://github.com/mastra-ai/mastra/commit/d400e7c8b8d7afa6ba2c71769eace4048e3cef8e), [`f58d1a7`](https://github.com/mastra-ai/mastra/commit/f58d1a7a457588a996c3ecb53201a68f3d28c432), [`a49a929`](https://github.com/mastra-ai/mastra/commit/a49a92904968b4fc67e01effee8c7c8d0464ba85)]:
30
+ - @mastra/core@1.18.0-alpha.4
31
+
3
32
  ## 1.7.3-alpha.2
4
33
 
5
34
  ### Patch Changes
@@ -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.7.3-alpha.2"
6
+ version: "1.7.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.3-alpha.2",
2
+ "version": "1.7.3",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -2990,6 +2990,7 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
2990
2990
  await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "tags", "TEXT");
2991
2991
  await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "targetType", "TEXT");
2992
2992
  await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "targetIds", "TEXT");
2993
+ await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "scorerIds", "TEXT");
2993
2994
  await this.#addColumnIfNotExists(storage.TABLE_DATASET_ITEMS, "requestContext", "TEXT");
2994
2995
  await this.#addColumnIfNotExists(storage.TABLE_DATASET_ITEMS, "source", "TEXT");
2995
2996
  await this.#client.execute({
@@ -3037,6 +3038,7 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
3037
3038
  tags: row.tags ? storage.safelyParseJSON(row.tags) : void 0,
3038
3039
  targetType: row.targetType || void 0,
3039
3040
  targetIds: row.targetIds ? storage.safelyParseJSON(row.targetIds) : void 0,
3041
+ scorerIds: row.scorerIds ? storage.safelyParseJSON(row.scorerIds) : void 0,
3040
3042
  version: row.version,
3041
3043
  createdAt: storage.ensureDate(row.createdAt),
3042
3044
  updatedAt: storage.ensureDate(row.updatedAt)
@@ -3098,6 +3100,7 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
3098
3100
  requestContextSchema: input.requestContextSchema ?? null,
3099
3101
  targetType: input.targetType ?? null,
3100
3102
  targetIds: input.targetIds ? JSON.stringify(input.targetIds) : null,
3103
+ scorerIds: input.scorerIds ? JSON.stringify(input.scorerIds) : null,
3101
3104
  version: 0,
3102
3105
  createdAt: nowIso,
3103
3106
  updatedAt: nowIso
@@ -3113,6 +3116,7 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
3113
3116
  requestContextSchema: input.requestContextSchema ?? void 0,
3114
3117
  targetType: input.targetType ?? void 0,
3115
3118
  targetIds: input.targetIds ?? void 0,
3119
+ scorerIds: input.scorerIds ?? void 0,
3116
3120
  version: 0,
3117
3121
  createdAt: now,
3118
3122
  updatedAt: now
@@ -3196,6 +3200,10 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
3196
3200
  updates.push("targetIds = ?");
3197
3201
  values.push(args.targetIds === null ? null : JSON.stringify(args.targetIds));
3198
3202
  }
3203
+ if (args.scorerIds !== void 0) {
3204
+ updates.push("scorerIds = ?");
3205
+ values.push(args.scorerIds === null ? null : JSON.stringify(args.scorerIds));
3206
+ }
3199
3207
  values.push(args.id);
3200
3208
  await this.#client.execute({
3201
3209
  sql: `UPDATE ${storage.TABLE_DATASETS} SET ${updates.join(", ")} WHERE id = ?`,
@@ -3212,6 +3220,7 @@ var DatasetsLibSQL = class extends storage.DatasetsStorage {
3212
3220
  tags: (args.tags !== void 0 ? args.tags : existing.tags) ?? void 0,
3213
3221
  targetType: (args.targetType !== void 0 ? args.targetType : existing.targetType) ?? void 0,
3214
3222
  targetIds: (args.targetIds !== void 0 ? args.targetIds : existing.targetIds) ?? void 0,
3223
+ scorerIds: (args.scorerIds !== void 0 ? args.scorerIds : existing.scorerIds) ?? void 0,
3215
3224
  updatedAt: new Date(now)
3216
3225
  };
3217
3226
  } catch (error$1) {