@mastra/libsql 0.13.8 → 0.13.9-alpha.0
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 +15 -0
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 0.13.9-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6f5eb7a: Throw if an empty or whitespace-only threadId is passed when getting messages
|
|
8
|
+
- Updated dependencies [fd83526]
|
|
9
|
+
- Updated dependencies [d0b90ab]
|
|
10
|
+
- Updated dependencies [6f5eb7a]
|
|
11
|
+
- Updated dependencies [a01cf14]
|
|
12
|
+
- Updated dependencies [a9e50ee]
|
|
13
|
+
- Updated dependencies [5397eb4]
|
|
14
|
+
- Updated dependencies [c9f4e4a]
|
|
15
|
+
- Updated dependencies [0acbc80]
|
|
16
|
+
- @mastra/core@0.16.0-alpha.0
|
|
17
|
+
|
|
3
18
|
## 0.13.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1062,6 +1062,7 @@ var MemoryLibSQL = class extends storage.MemoryStorage {
|
|
|
1062
1062
|
threadId,
|
|
1063
1063
|
selectBy
|
|
1064
1064
|
}) {
|
|
1065
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1065
1066
|
const include = selectBy?.include;
|
|
1066
1067
|
if (!include) return null;
|
|
1067
1068
|
const unionQueries = [];
|
|
@@ -1107,10 +1108,12 @@ var MemoryLibSQL = class extends storage.MemoryStorage {
|
|
|
1107
1108
|
}
|
|
1108
1109
|
async getMessages({
|
|
1109
1110
|
threadId,
|
|
1111
|
+
resourceId,
|
|
1110
1112
|
selectBy,
|
|
1111
1113
|
format
|
|
1112
1114
|
}) {
|
|
1113
1115
|
try {
|
|
1116
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1114
1117
|
const messages = [];
|
|
1115
1118
|
const limit = storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: 40 });
|
|
1116
1119
|
if (selectBy?.include?.length) {
|
|
@@ -1150,7 +1153,7 @@ var MemoryLibSQL = class extends storage.MemoryStorage {
|
|
|
1150
1153
|
id: "LIBSQL_STORE_GET_MESSAGES_FAILED",
|
|
1151
1154
|
domain: error.ErrorDomain.STORAGE,
|
|
1152
1155
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1153
|
-
details: { threadId }
|
|
1156
|
+
details: { threadId, resourceId: resourceId ?? "" }
|
|
1154
1157
|
},
|
|
1155
1158
|
error$1
|
|
1156
1159
|
);
|
|
@@ -1218,6 +1221,7 @@ var MemoryLibSQL = class extends storage.MemoryStorage {
|
|
|
1218
1221
|
}
|
|
1219
1222
|
}
|
|
1220
1223
|
try {
|
|
1224
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1221
1225
|
const currentOffset = page * perPage;
|
|
1222
1226
|
const conditions = [`thread_id = ?`];
|
|
1223
1227
|
const queryParams = [threadId];
|