@mastra/libsql 1.7.3-alpha.0 → 1.7.3-alpha.2
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 +25 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +31 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/experiments/index.d.ts +2 -1
- package/dist/storage/domains/experiments/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.7.3-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add `getReviewSummary()` to experiments storage for aggregating review status counts ([#14649](https://github.com/mastra-ai/mastra/pull/14649))
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const summary = await storage.experiments.getReviewSummary();
|
|
13
|
+
// [{ experimentId: 'exp-1', needsReview: 3, reviewed: 5, complete: 2, total: 10 }, ...]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`dc9fc19`](https://github.com/mastra-ai/mastra/commit/dc9fc19da4437f6b508cc355f346a8856746a76b), [`260fe12`](https://github.com/mastra-ai/mastra/commit/260fe1295fe7354e39d6def2775e0797a7a277f0)]:
|
|
17
|
+
- @mastra/core@1.18.0-alpha.1
|
|
18
|
+
|
|
19
|
+
## 1.7.3-alpha.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 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))
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`dc514a8`](https://github.com/mastra-ai/mastra/commit/dc514a83dba5f719172dddfd2c7b858e4943d067), [`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778)]:
|
|
26
|
+
- @mastra/core@1.18.0-alpha.0
|
|
27
|
+
|
|
3
28
|
## 1.7.3-alpha.0
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -4364,6 +4364,37 @@ var ExperimentsLibSQL = class extends storage.ExperimentsStorage {
|
|
|
4364
4364
|
);
|
|
4365
4365
|
}
|
|
4366
4366
|
}
|
|
4367
|
+
async getReviewSummary() {
|
|
4368
|
+
try {
|
|
4369
|
+
const result = await this.#client.execute({
|
|
4370
|
+
sql: `SELECT
|
|
4371
|
+
"experimentId",
|
|
4372
|
+
COUNT(*) as total,
|
|
4373
|
+
SUM(CASE WHEN status = 'needs-review' THEN 1 ELSE 0 END) as "needsReview",
|
|
4374
|
+
SUM(CASE WHEN status = 'reviewed' THEN 1 ELSE 0 END) as reviewed,
|
|
4375
|
+
SUM(CASE WHEN status = 'complete' THEN 1 ELSE 0 END) as complete
|
|
4376
|
+
FROM ${storage.TABLE_EXPERIMENT_RESULTS}
|
|
4377
|
+
GROUP BY "experimentId"`,
|
|
4378
|
+
args: []
|
|
4379
|
+
});
|
|
4380
|
+
return (result.rows ?? []).map((row) => ({
|
|
4381
|
+
experimentId: row.experimentId,
|
|
4382
|
+
total: Number(row.total ?? 0),
|
|
4383
|
+
needsReview: Number(row.needsReview ?? 0),
|
|
4384
|
+
reviewed: Number(row.reviewed ?? 0),
|
|
4385
|
+
complete: Number(row.complete ?? 0)
|
|
4386
|
+
}));
|
|
4387
|
+
} catch (error$1) {
|
|
4388
|
+
throw new error.MastraError(
|
|
4389
|
+
{
|
|
4390
|
+
id: storage.createStorageErrorId("LIBSQL", "GET_REVIEW_SUMMARY", "FAILED"),
|
|
4391
|
+
domain: error.ErrorDomain.STORAGE,
|
|
4392
|
+
category: error.ErrorCategory.THIRD_PARTY
|
|
4393
|
+
},
|
|
4394
|
+
error$1
|
|
4395
|
+
);
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4367
4398
|
};
|
|
4368
4399
|
var MCPClientsLibSQL = class extends storage.MCPClientsStorage {
|
|
4369
4400
|
#db;
|