@mastra/libsql 0.0.0-agui-20250501182100

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 ADDED
@@ -0,0 +1,127 @@
1
+ # @mastra/libsql
2
+
3
+ ## 0.0.0-agui-20250501182100
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [967b41c]
8
+ - Updated dependencies [26738f4]
9
+ - Updated dependencies [b804723]
10
+ - Updated dependencies [0097d50]
11
+ - @mastra/core@0.0.0-agui-20250501182100
12
+
13
+ ## 0.0.2-alpha.2
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [26738f4]
18
+ - @mastra/core@0.9.2-alpha.2
19
+
20
+ ## 0.0.2-alpha.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [b804723]
25
+ - @mastra/core@0.9.2-alpha.1
26
+
27
+ ## 0.0.2-alpha.0
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [0097d50]
32
+ - @mastra/core@0.9.2-alpha.0
33
+
34
+ ## 0.0.1
35
+
36
+ ### Patch Changes
37
+
38
+ - 479f490: [MASTRA-3131] Add getWorkflowRunByID and add resourceId as filter for getWorkflowRuns
39
+ - 5f826d9: Moved vector store specific prompts from @mastra/rag to be exported from the store that the prompt belongs to, ie @mastra/pg
40
+ - 2d4001d: Add new @msstra/libsql package and use it in create-mastra
41
+ - Updated dependencies [405b63d]
42
+ - Updated dependencies [81fb7f6]
43
+ - Updated dependencies [20275d4]
44
+ - Updated dependencies [7d1892c]
45
+ - Updated dependencies [a90a082]
46
+ - Updated dependencies [2d17c73]
47
+ - Updated dependencies [61e92f5]
48
+ - Updated dependencies [35955b0]
49
+ - Updated dependencies [6262bd5]
50
+ - Updated dependencies [c1409ef]
51
+ - Updated dependencies [3e7b69d]
52
+ - Updated dependencies [e4943b8]
53
+ - Updated dependencies [11d4485]
54
+ - Updated dependencies [479f490]
55
+ - Updated dependencies [c23a81c]
56
+ - Updated dependencies [2d4001d]
57
+ - Updated dependencies [c71013a]
58
+ - Updated dependencies [1d3b1cd]
59
+ - @mastra/core@0.9.1
60
+
61
+ ## 0.0.1-alpha.8
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [2d17c73]
66
+ - @mastra/core@0.9.1-alpha.8
67
+
68
+ ## 0.0.1-alpha.7
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [1d3b1cd]
73
+ - @mastra/core@0.9.1-alpha.7
74
+
75
+ ## 0.0.1-alpha.6
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [c23a81c]
80
+ - @mastra/core@0.9.1-alpha.6
81
+
82
+ ## 0.0.1-alpha.5
83
+
84
+ ### Patch Changes
85
+
86
+ - 5f826d9: Moved vector store specific prompts from @mastra/rag to be exported from the store that the prompt belongs to, ie @mastra/pg
87
+ - Updated dependencies [3e7b69d]
88
+ - @mastra/core@0.9.1-alpha.5
89
+
90
+ ## 0.0.1-alpha.4
91
+
92
+ ### Patch Changes
93
+
94
+ - 479f490: [MASTRA-3131] Add getWorkflowRunByID and add resourceId as filter for getWorkflowRuns
95
+ - Updated dependencies [e4943b8]
96
+ - Updated dependencies [479f490]
97
+ - @mastra/core@0.9.1-alpha.4
98
+
99
+ ## 0.0.1-alpha.3
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies [6262bd5]
104
+ - @mastra/core@0.9.1-alpha.3
105
+
106
+ ## 0.0.1-alpha.2
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [405b63d]
111
+ - Updated dependencies [61e92f5]
112
+ - Updated dependencies [c71013a]
113
+ - @mastra/core@0.9.1-alpha.2
114
+
115
+ ## 0.0.1-alpha.1
116
+
117
+ ### Patch Changes
118
+
119
+ - 2d4001d: Add new @msstra/libsql package and use it in create-mastra
120
+ - Updated dependencies [20275d4]
121
+ - Updated dependencies [7d1892c]
122
+ - Updated dependencies [a90a082]
123
+ - Updated dependencies [35955b0]
124
+ - Updated dependencies [c1409ef]
125
+ - Updated dependencies [11d4485]
126
+ - Updated dependencies [2d4001d]
127
+ - @mastra/core@0.9.1-alpha.1
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Mastra AI, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,144 @@
1
+ # @mastra/pg
2
+
3
+ SQLite implementation for Mastra, providing both vector similarity search and general storage capabilities with connection pooling and transaction support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @mastra/libsql
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Vector Store
14
+
15
+ ```typescript
16
+ import { LibSQLVector } from '@mastra/libsql';
17
+
18
+ const vectorStore = new LibSQLVector({
19
+ url: 'file:./my-db.db'
20
+ });
21
+
22
+ // Create a new table with vector support
23
+ await vectorStore.createIndex({
24
+ indexName: 'my_vectors',
25
+ dimension: 1536,
26
+ metric: 'cosine',
27
+ });
28
+
29
+ // Add vectors
30
+ const ids = await vectorStore.upsert({
31
+ indexName: 'my_vectors',
32
+ vectors: [[0.1, 0.2, ...], [0.3, 0.4, ...]],
33
+ metadata: [{ text: 'doc1' }, { text: 'doc2' }],
34
+ });
35
+
36
+ // Query vectors
37
+ const results = await vectorStore.query({
38
+ indexName: 'my_vectors',
39
+ queryVector: [0.1, 0.2, ...],
40
+ topK: 10, // topK
41
+ filter: { text: 'doc1' }, // filter
42
+ includeVector: false, // includeVector
43
+ minScore: 0.5, // minScore
44
+ });
45
+ ```
46
+
47
+ ### Storage
48
+
49
+ ```typescript
50
+ import { LibSQLStore } from '@mastra/pg';
51
+
52
+ const store = new LibSQLStore({
53
+ url: 'file:./my-db.db',
54
+ });
55
+
56
+ // Create a thread
57
+ await store.saveThread({
58
+ id: 'thread-123',
59
+ resourceId: 'resource-456',
60
+ title: 'My Thread',
61
+ metadata: { key: 'value' },
62
+ });
63
+
64
+ // Add messages to thread
65
+ await store.saveMessages([
66
+ {
67
+ id: 'msg-789',
68
+ threadId: 'thread-123',
69
+ role: 'user',
70
+ type: 'text',
71
+ content: [{ type: 'text', text: 'Hello' }],
72
+ },
73
+ ]);
74
+
75
+ // Query threads and messages
76
+ const savedThread = await store.getThread('thread-123');
77
+ const messages = await store.getMessages('thread-123');
78
+ ```
79
+
80
+ ## Configuration
81
+
82
+ The LibSQLStore store can be initialized with:
83
+
84
+ - Configuration object with url and auth. Auth is only necessary when using a provider like [Turso](https://turso.tech/)
85
+
86
+ ## Features
87
+
88
+ ### Vector Store Features
89
+
90
+ - Vector similarity search with cosine, euclidean, and dot product metrics
91
+ - Advanced metadata filtering with MongoDB-like query syntax
92
+ - Minimum score threshold for queries
93
+ - Automatic UUID generation for vectors
94
+ - Table management (create, list, describe, delete, truncate)
95
+
96
+ ### Storage Features
97
+
98
+ - Thread and message storage with JSON support
99
+ - Atomic transactions for data consistency
100
+ - Efficient batch operations
101
+ - Rich metadata support
102
+ - Timestamp tracking
103
+ - Cascading deletes
104
+
105
+ ## Supported Filter Operators
106
+
107
+ The following filter operators are supported for metadata queries:
108
+
109
+ - Comparison: `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`
110
+ - Logical: `$and`, `$or`
111
+ - Array: `$in`, `$nin`
112
+ - Text: `$regex`, `$like`
113
+
114
+ Example filter:
115
+
116
+ ```typescript
117
+ {
118
+ $and: [{ age: { $gt: 25 } }, { tags: { $in: ['tag1', 'tag2'] } }];
119
+ }
120
+ ```
121
+
122
+ ## Vector Store Methods
123
+
124
+ - `createIndex({indexName, dimension, metric?, indexConfig?, defineIndex?})`: Create a new table with vector support
125
+ - `upsert({indexName, vectors, metadata?, ids?})`: Add or update vectors
126
+ - `query({indexName, queryVector, topK?, filter?, includeVector?, minScore?})`: Search for similar vectors
127
+ - `defineIndex({indexName, metric?, indexConfig?})`: Define an index
128
+ - `listIndexes()`: List all vector-enabled tables
129
+ - `describeIndex(indexName)`: Get table statistics
130
+ - `deleteIndex(indexName)`: Delete a table
131
+ - `truncateIndex(indexName)`: Remove all data from a table
132
+
133
+ ## Storage Methods
134
+
135
+ - `saveThread(thread)`: Create or update a thread
136
+ - `getThread(threadId)`: Get a thread by ID
137
+ - `deleteThread(threadId)`: Delete a thread and its messages
138
+ - `saveMessages(messages)`: Save multiple messages in a transaction
139
+ - `getMessages(threadId)`: Get all messages for a thread
140
+ - `deleteMessages(messageIds)`: Delete specific messages
141
+
142
+ ## Related Links
143
+
144
+ - [LibSQL Documentation](https://docs.turso.tech/sdk/introductionh)
@@ -0,0 +1,199 @@
1
+ import type { ArrayOperator } from '@mastra/core/vector/filter';
2
+ import { BaseFilterTranslator } from '@mastra/core/vector/filter';
3
+ import type { BasicOperator } from '@mastra/core/vector/filter';
4
+ import type { CreateIndexParams } from '@mastra/core/vector';
5
+ import type { ElementOperator } from '@mastra/core/vector/filter';
6
+ import type { EvalRow } from '@mastra/core/storage';
7
+ import type { IndexStats } from '@mastra/core/vector';
8
+ import type { InValue } from '@libsql/client';
9
+ import type { LogicalOperator } from '@mastra/core/vector/filter';
10
+ import { MastraStorage } from '@mastra/core/storage';
11
+ import { MastraVector } from '@mastra/core/vector';
12
+ import type { MessageType } from '@mastra/core/memory';
13
+ import type { NumericOperator } from '@mastra/core/vector/filter';
14
+ import type { OperatorSupport } from '@mastra/core/vector/filter';
15
+ import type { ParamsToArgs } from '@mastra/core/vector';
16
+ import type { QueryResult } from '@mastra/core/vector';
17
+ import type { QueryVectorArgs } from '@mastra/core/vector';
18
+ import type { QueryVectorParams } from '@mastra/core/vector';
19
+ import type { RegexOperator } from '@mastra/core/vector/filter';
20
+ import type { StorageColumn } from '@mastra/core/storage';
21
+ import type { StorageGetMessagesArg } from '@mastra/core/storage';
22
+ import type { StorageThreadType } from '@mastra/core/memory';
23
+ import type { TABLE_NAMES } from '@mastra/core/storage';
24
+ import type { UpsertVectorParams } from '@mastra/core/vector';
25
+ import type { VectorFilter } from '@mastra/core/vector/filter';
26
+ import type { WorkflowRun } from '@mastra/core/storage';
27
+ import type { WorkflowRuns } from '@mastra/core/storage';
28
+
29
+ export declare function buildFilterQuery(filter: VectorFilter): FilterResult;
30
+
31
+ export declare const FILTER_OPERATORS: Record<string, OperatorFn>;
32
+
33
+ declare type FilterOperator = {
34
+ sql: string;
35
+ needsValue: boolean;
36
+ transformValue?: (value: any) => any;
37
+ };
38
+
39
+ export declare interface FilterResult {
40
+ sql: string;
41
+ values: InValue[];
42
+ }
43
+
44
+ export declare const handleKey: (key: string) => string;
45
+
46
+ /**
47
+ * Vector store specific prompt that details supported operators and examples.
48
+ * This prompt helps users construct valid filters for LibSQL Vector.
49
+ */
50
+ declare const LIBSQL_PROMPT = "When querying LibSQL Vector, you can ONLY use the operators listed below. Any other operators will be rejected.\nImportant: Don't explain how to construct the filter - use the specified operators and fields to search the content and return relevant results.\nIf a user tries to give an explicit operator that is not supported, reject the filter entirely and let them know that the operator is not supported.\n\nBasic Comparison Operators:\n- $eq: Exact match (default when using field: value)\n Example: { \"category\": \"electronics\" }\n- $ne: Not equal\n Example: { \"category\": { \"$ne\": \"electronics\" } }\n- $gt: Greater than\n Example: { \"price\": { \"$gt\": 100 } }\n- $gte: Greater than or equal\n Example: { \"price\": { \"$gte\": 100 } }\n- $lt: Less than\n Example: { \"price\": { \"$lt\": 100 } }\n- $lte: Less than or equal\n Example: { \"price\": { \"$lte\": 100 } }\n\nArray Operators:\n- $in: Match any value in array\n Example: { \"category\": { \"$in\": [\"electronics\", \"books\"] } }\n- $nin: Does not match any value in array\n Example: { \"category\": { \"$nin\": [\"electronics\", \"books\"] } }\n- $all: Match all values in array\n Example: { \"tags\": { \"$all\": [\"premium\", \"sale\"] } }\n- $elemMatch: Match array elements that meet all specified conditions\n Example: { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 100 } } } }\n- $contains: Check if array contains value\n Example: { \"tags\": { \"$contains\": \"premium\" } }\n\nLogical Operators:\n- $and: Logical AND (implicit when using multiple conditions)\n Example: { \"$and\": [{ \"price\": { \"$gt\": 100 } }, { \"category\": \"electronics\" }] }\n- $or: Logical OR\n Example: { \"$or\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n- $not: Logical NOT\n Example: { \"$not\": { \"category\": \"electronics\" } }\n- $nor: Logical NOR\n Example: { \"$nor\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n\nElement Operators:\n- $exists: Check if field exists\n Example: { \"rating\": { \"$exists\": true } }\n\nSpecial Operators:\n- $size: Array length check\n Example: { \"tags\": { \"$size\": 2 } }\n\nRestrictions:\n- Regex patterns are not supported\n- Direct RegExp patterns will throw an error\n- Nested fields are supported using dot notation\n- Multiple conditions on the same field are supported with both implicit and explicit $and\n- Array operations work on array fields only\n- Basic operators handle array values as JSON strings\n- Empty arrays in conditions are handled gracefully\n- Only logical operators ($and, $or, $not, $nor) can be used at the top level\n- All other operators must be used within a field condition\n Valid: { \"field\": { \"$gt\": 100 } }\n Valid: { \"$and\": [...] }\n Invalid: { \"$gt\": 100 }\n Invalid: { \"$contains\": \"value\" }\n- Logical operators must contain field conditions, not direct operators\n Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n Invalid: { \"$and\": [{ \"$gt\": 100 }] }\n- $not operator:\n - Must be an object\n - Cannot be empty\n - Can be used at field level or top level\n - Valid: { \"$not\": { \"field\": \"value\" } }\n - Valid: { \"field\": { \"$not\": { \"$eq\": \"value\" } } }\n- Other logical operators ($and, $or, $nor):\n - Can only be used at top level or nested within other logical operators\n - Can not be used on a field level, or be nested inside a field\n - Can not be used inside an operator\n - Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n - Valid: { \"$or\": [{ \"$and\": [{ \"field\": { \"$gt\": 100 } }] }] }\n - Invalid: { \"field\": { \"$and\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$or\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$gt\": { \"$and\": [{...}] } } }\n- $elemMatch requires an object with conditions\n Valid: { \"array\": { \"$elemMatch\": { \"field\": \"value\" } } }\n Invalid: { \"array\": { \"$elemMatch\": \"value\" } }\n\nExample Complex Query:\n{\n \"$and\": [\n { \"category\": { \"$in\": [\"electronics\", \"computers\"] } },\n { \"price\": { \"$gte\": 100, \"$lte\": 1000 } },\n { \"tags\": { \"$all\": [\"premium\", \"sale\"] } },\n { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 50 }, \"inStock\": true } } },\n { \"$or\": [\n { \"stock\": { \"$gt\": 0 } },\n { \"preorder\": true }\n ]}\n ]\n}";
51
+ export { LIBSQL_PROMPT }
52
+ export { LIBSQL_PROMPT as LIBSQL_PROMPT_alias_1 }
53
+
54
+ declare interface LibSQLConfig {
55
+ url: string;
56
+ authToken?: string;
57
+ }
58
+ export { LibSQLConfig }
59
+ export { LibSQLConfig as LibSQLConfig_alias_1 }
60
+
61
+ /**
62
+ * Translates MongoDB-style filters to LibSQL compatible filters.
63
+ *
64
+ * Key differences from MongoDB:
65
+ *
66
+ * Logical Operators ($and, $or, $nor):
67
+ * - Can be used at the top level or nested within fields
68
+ * - Can take either a single condition or an array of conditions
69
+ *
70
+ */
71
+ export declare class LibSQLFilterTranslator extends BaseFilterTranslator {
72
+ protected getSupportedOperators(): OperatorSupport;
73
+ translate(filter?: VectorFilter): VectorFilter;
74
+ private translateNode;
75
+ }
76
+
77
+ declare type LibSQLQueryArgs = [...QueryVectorArgs, number?];
78
+
79
+ declare interface LibSQLQueryParams extends QueryVectorParams {
80
+ minScore?: number;
81
+ }
82
+
83
+ declare class LibSQLStore extends MastraStorage {
84
+ private client;
85
+ constructor(config: LibSQLConfig);
86
+ private getCreateTableSQL;
87
+ createTable({ tableName, schema, }: {
88
+ tableName: TABLE_NAMES;
89
+ schema: Record<string, StorageColumn>;
90
+ }): Promise<void>;
91
+ clearTable({ tableName }: {
92
+ tableName: TABLE_NAMES;
93
+ }): Promise<void>;
94
+ private prepareStatement;
95
+ insert({ tableName, record }: {
96
+ tableName: TABLE_NAMES;
97
+ record: Record<string, any>;
98
+ }): Promise<void>;
99
+ batchInsert({ tableName, records }: {
100
+ tableName: TABLE_NAMES;
101
+ records: Record<string, any>[];
102
+ }): Promise<void>;
103
+ load<R>({ tableName, keys }: {
104
+ tableName: TABLE_NAMES;
105
+ keys: Record<string, string>;
106
+ }): Promise<R | null>;
107
+ getThreadById({ threadId }: {
108
+ threadId: string;
109
+ }): Promise<StorageThreadType | null>;
110
+ getThreadsByResourceId({ resourceId }: {
111
+ resourceId: string;
112
+ }): Promise<StorageThreadType[]>;
113
+ saveThread({ thread }: {
114
+ thread: StorageThreadType;
115
+ }): Promise<StorageThreadType>;
116
+ updateThread({ id, title, metadata, }: {
117
+ id: string;
118
+ title: string;
119
+ metadata: Record<string, unknown>;
120
+ }): Promise<StorageThreadType>;
121
+ deleteThread({ threadId }: {
122
+ threadId: string;
123
+ }): Promise<void>;
124
+ private parseRow;
125
+ getMessages<T extends MessageType[]>({ threadId, selectBy }: StorageGetMessagesArg): Promise<T>;
126
+ saveMessages({ messages }: {
127
+ messages: MessageType[];
128
+ }): Promise<MessageType[]>;
129
+ private transformEvalRow;
130
+ getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
131
+ getTraces({ name, scope, page, perPage, attributes, filters, }?: {
132
+ name?: string;
133
+ scope?: string;
134
+ page: number;
135
+ perPage: number;
136
+ attributes?: Record<string, string>;
137
+ filters?: Record<string, any>;
138
+ }): Promise<any[]>;
139
+ getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
140
+ workflowName?: string;
141
+ fromDate?: Date;
142
+ toDate?: Date;
143
+ limit?: number;
144
+ offset?: number;
145
+ resourceId?: string;
146
+ }): Promise<WorkflowRuns>;
147
+ getWorkflowRunById({ runId, workflowName, }: {
148
+ runId: string;
149
+ workflowName?: string;
150
+ }): Promise<WorkflowRun | null>;
151
+ private hasColumn;
152
+ private parseWorkflowRun;
153
+ }
154
+ export { LibSQLStore as DefaultStorage }
155
+ export { LibSQLStore as DefaultStorage_alias_1 }
156
+ export { LibSQLStore }
157
+ export { LibSQLStore as LibSQLStore_alias_1 }
158
+
159
+ declare class LibSQLVector extends MastraVector {
160
+ private turso;
161
+ constructor({ connectionUrl, authToken, syncUrl, syncInterval, }: {
162
+ connectionUrl: string;
163
+ authToken?: string;
164
+ syncUrl?: string;
165
+ syncInterval?: number;
166
+ });
167
+ transformFilter(filter?: VectorFilter): VectorFilter;
168
+ query(...args: ParamsToArgs<LibSQLQueryParams> | LibSQLQueryArgs): Promise<QueryResult[]>;
169
+ upsert(...args: ParamsToArgs<UpsertVectorParams>): Promise<string[]>;
170
+ createIndex(...args: ParamsToArgs<CreateIndexParams>): Promise<void>;
171
+ deleteIndex(indexName: string): Promise<void>;
172
+ listIndexes(): Promise<string[]>;
173
+ describeIndex(indexName: string): Promise<IndexStats>;
174
+ /**
175
+ * Updates an index entry by its ID with the provided vector and/or metadata.
176
+ *
177
+ * @param indexName - The name of the index to update.
178
+ * @param id - The ID of the index entry to update.
179
+ * @param update - An object containing the vector and/or metadata to update.
180
+ * @param update.vector - An optional array of numbers representing the new vector.
181
+ * @param update.metadata - An optional record containing the new metadata.
182
+ * @returns A promise that resolves when the update is complete.
183
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
184
+ */
185
+ updateIndexById(indexName: string, id: string, update: {
186
+ vector?: number[];
187
+ metadata?: Record<string, any>;
188
+ }): Promise<void>;
189
+ deleteIndexById(indexName: string, id: string): Promise<void>;
190
+ truncateIndex(indexName: string): Promise<void>;
191
+ }
192
+ export { LibSQLVector }
193
+ export { LibSQLVector as LibSQLVector_alias_1 }
194
+
195
+ declare type OperatorFn = (key: string, value?: any) => FilterOperator;
196
+
197
+ export declare type OperatorType = BasicOperator | NumericOperator | ArrayOperator | ElementOperator | LogicalOperator | '$contains' | Exclude<RegexOperator, '$options'>;
198
+
199
+ export { }