@mastra/longmemeval 0.1.14 → 0.1.15-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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @mastra/longmemeval
|
|
2
2
|
|
|
3
|
+
## 0.1.15-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
|
+
- @mastra/libsql@0.13.9-alpha.0
|
|
18
|
+
|
|
3
19
|
## 0.1.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/longmemeval",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15-alpha.0",
|
|
4
4
|
"description": "LongMemEval benchmark implementation for Mastra Memory",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ai-sdk/openai": "^1.3.23",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"openai": "^4.73.1",
|
|
18
18
|
"ora": "^8.1.1",
|
|
19
19
|
"zod": "^3.23.8",
|
|
20
|
-
"@mastra/core": "0.15.3",
|
|
21
20
|
"@mastra/fastembed": "0.10.5",
|
|
22
|
-
"@mastra/
|
|
21
|
+
"@mastra/core": "0.16.0-alpha.0",
|
|
22
|
+
"@mastra/libsql": "0.13.9-alpha.0",
|
|
23
23
|
"@mastra/memory": "0.14.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -257,4 +257,24 @@ describe('BenchmarkStore', () => {
|
|
|
257
257
|
expect(thread).toBeNull();
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
|
+
|
|
261
|
+
describe('getting messages', () => {
|
|
262
|
+
it('should throw when threadId is an empty string or whitespace only', async () => {
|
|
263
|
+
await expect(() => store.getMessages({ threadId: '' })).rejects.toThrowError(
|
|
264
|
+
'threadId must be a non-empty string',
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
await expect(() => store.getMessagesPaginated({ threadId: '' })).rejects.toThrowError(
|
|
268
|
+
'threadId must be a non-empty string',
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
await expect(() => store.getMessages({ threadId: ' ' })).rejects.toThrowError(
|
|
272
|
+
'threadId must be a non-empty string',
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
await expect(() => store.getMessagesPaginated({ threadId: ' ' })).rejects.toThrowError(
|
|
276
|
+
'threadId must be a non-empty string',
|
|
277
|
+
);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
260
280
|
});
|
|
@@ -183,6 +183,8 @@ export class BenchmarkStore extends MastraStorage {
|
|
|
183
183
|
args: StorageGetMessagesArg & { format?: 'v1' | 'v2' },
|
|
184
184
|
): Promise<MastraMessageV1[] | MastraMessageV2[]> {
|
|
185
185
|
const { threadId, resourceId, selectBy, format = 'v1' } = args;
|
|
186
|
+
if (!threadId.trim()) throw new Error('threadId must be a non-empty string');
|
|
187
|
+
|
|
186
188
|
let messages: any[] = [];
|
|
187
189
|
const includedMessageIds = new Set<string>();
|
|
188
190
|
|
|
@@ -452,6 +454,8 @@ export class BenchmarkStore extends MastraStorage {
|
|
|
452
454
|
args: StorageGetMessagesArg & { format?: 'v1' | 'v2' },
|
|
453
455
|
): Promise<PaginationInfo & { messages: MastraMessageV1[] | MastraMessageV2[] }> {
|
|
454
456
|
const { threadId, selectBy, format = 'v1' } = args;
|
|
457
|
+
if (!threadId.trim()) throw new Error('threadId must be a non-empty string');
|
|
458
|
+
|
|
455
459
|
const { page = 0, perPage = 40 } = selectBy?.pagination || {};
|
|
456
460
|
|
|
457
461
|
// Get all messages
|