@mastra/libsql 0.10.4-alpha.0 → 0.10.4-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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +28 -0
- package/dist/_tsup-dts-rollup.d.cts +33 -6
- package/dist/_tsup-dts-rollup.d.ts +33 -6
- package/dist/index.cjs +555 -155
- package/dist/index.js +545 -145
- package/package.json +4 -4
- package/src/storage/index.test.ts +1 -30
- package/src/storage/index.ts +453 -137
- package/src/vector/filter.test.ts +22 -84
- package/src/vector/filter.ts +19 -5
- package/src/vector/index.test.ts +1 -11
- package/src/vector/index.ts +130 -18
- package/src/vector/sql-builder.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/libsql",
|
|
3
|
-
"version": "0.10.4-alpha.
|
|
3
|
+
"version": "0.10.4-alpha.2",
|
|
4
4
|
"description": "Libsql provider for Mastra - includes both vector and db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@microsoft/api-extractor": "^7.52.8",
|
|
27
27
|
"@types/node": "^20.19.0",
|
|
28
|
-
"eslint": "^9.
|
|
28
|
+
"eslint": "^9.29.0",
|
|
29
29
|
"tsup": "^8.5.0",
|
|
30
30
|
"typescript": "^5.8.3",
|
|
31
31
|
"vitest": "^3.2.3",
|
|
32
|
-
"@internal/storage-test-utils": "0.0.9",
|
|
33
32
|
"@internal/lint": "0.0.13",
|
|
34
|
-
"@
|
|
33
|
+
"@internal/storage-test-utils": "0.0.9",
|
|
34
|
+
"@mastra/core": "0.10.7-alpha.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@mastra/core": ">=0.10.4-0 <0.11.0"
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
createTestSuite,
|
|
7
7
|
createSampleMessageV1,
|
|
8
8
|
resetRole,
|
|
9
|
+
createSampleMessageV2,
|
|
9
10
|
} from '@internal/storage-test-utils';
|
|
10
11
|
import type { MastraMessageV1, StorageThreadType } from '@mastra/core';
|
|
11
|
-
import type { MastraMessageV2, MastraMessageContentV2 } from '@mastra/core/agent';
|
|
12
12
|
import { Mastra } from '@mastra/core/mastra';
|
|
13
13
|
import { TABLE_EVALS, TABLE_TRACES, TABLE_MESSAGES, TABLE_THREADS } from '@mastra/core/storage';
|
|
14
14
|
import { describe, it, expect, beforeAll, beforeEach } from 'vitest';
|
|
@@ -368,35 +368,6 @@ describe('LibSQLStore updateMessages', () => {
|
|
|
368
368
|
let store: LibSQLStore;
|
|
369
369
|
let thread: StorageThreadType;
|
|
370
370
|
|
|
371
|
-
const createSampleMessageV2 = ({
|
|
372
|
-
threadId,
|
|
373
|
-
resourceId,
|
|
374
|
-
role = 'user',
|
|
375
|
-
content,
|
|
376
|
-
createdAt,
|
|
377
|
-
}: {
|
|
378
|
-
threadId: string;
|
|
379
|
-
resourceId?: string;
|
|
380
|
-
role?: 'user' | 'assistant';
|
|
381
|
-
content?: Partial<MastraMessageContentV2>;
|
|
382
|
-
createdAt?: Date;
|
|
383
|
-
}): MastraMessageV2 => {
|
|
384
|
-
return {
|
|
385
|
-
id: randomUUID(),
|
|
386
|
-
threadId,
|
|
387
|
-
resourceId: resourceId || thread.resourceId,
|
|
388
|
-
role,
|
|
389
|
-
createdAt: createdAt || new Date(),
|
|
390
|
-
content: {
|
|
391
|
-
format: 2,
|
|
392
|
-
parts: content?.parts || [],
|
|
393
|
-
content: content?.content || `Sample content ${randomUUID()}`,
|
|
394
|
-
...content,
|
|
395
|
-
},
|
|
396
|
-
type: 'v2',
|
|
397
|
-
};
|
|
398
|
-
};
|
|
399
|
-
|
|
400
371
|
beforeAll(async () => {
|
|
401
372
|
store = libsql;
|
|
402
373
|
});
|