@mastra/qdrant 0.1.0-alpha.28

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,263 @@
1
+ # @mastra/qdrant
2
+
3
+ ## 0.1.0-alpha.28
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [5285356]
8
+ - @mastra/core@0.2.0-alpha.93
9
+
10
+ ## 0.1.0-alpha.27
11
+
12
+ ### Minor Changes
13
+
14
+ - c87eb4e: Move Qdrant package from `@mastra/vector-qdrant` to `@mastra/qdrant`.
15
+
16
+ - Move package to `stores/qdrant`
17
+ - Reorganize source files into `src/vector`
18
+ - Add deprecation notice to old package
19
+ - Update documentation and examples
20
+ - No breaking changes in functionality
21
+
22
+ ## Migration Notice
23
+
24
+ This package is the successor to `@mastra/vector-qdrant`. All functionality has been preserved while improving the package structure.
25
+
26
+ ### Key Features
27
+
28
+ - Qdrant vector store implementation
29
+ - Telemetry support via @mastra/core
30
+ - Full filter support with type safety
31
+ - Automatic batching for large upserts
32
+
33
+ ### Migration from @mastra/vector-qdrant
34
+
35
+ 1. Update your dependencies:
36
+ ```bash
37
+ pnpm remove @mastra/vector-qdrant
38
+ pnpm add @mastra/qdrant
39
+ ```
40
+ 2. Update your imports:
41
+ ```typescript
42
+ // Old import
43
+ import { QdrantVector } from '@mastra/vector-qdrant';
44
+ // New import
45
+ import { QdrantVector } from '@mastra/qdrant';
46
+ ```
47
+
48
+ ## Change History
49
+
50
+ ### Previous Changes (from @mastra/vector-qdrant)
51
+
52
+ ## 0.1.0-alpha.26
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [4d4f6b6]
57
+ - @mastra/core@0.2.0-alpha.92
58
+
59
+ ## 0.1.0-alpha.25
60
+
61
+ ### Patch Changes
62
+
63
+ - a10b7a3: Implemented new filtering for vectorQueryTool and updated docs
64
+ - Updated dependencies [d7d465a]
65
+ - Updated dependencies [d7d465a]
66
+ - Updated dependencies [2017553]
67
+ - Updated dependencies [a10b7a3]
68
+ - Updated dependencies [16e5b04]
69
+ - @mastra/core@0.2.0-alpha.91
70
+
71
+ ## 0.1.0-alpha.24
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [8151f44]
76
+ - Updated dependencies [e897f1c]
77
+ - Updated dependencies [3700be1]
78
+ - @mastra/core@0.2.0-alpha.90
79
+
80
+ ## 0.1.0-alpha.23
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [27275c9]
85
+ - @mastra/core@0.2.0-alpha.89
86
+
87
+ ## 0.1.0-alpha.22
88
+
89
+ ### Patch Changes
90
+
91
+ - ccbc581: Updated operator validation and handling for all vector stores
92
+ - Updated dependencies [ccbc581]
93
+ - @mastra/core@0.2.0-alpha.88
94
+
95
+ ## 0.1.0-alpha.21
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [7365b6c]
100
+ - @mastra/core@0.2.0-alpha.87
101
+
102
+ ## 0.1.0-alpha.20
103
+
104
+ ### Minor Changes
105
+
106
+ - 5916f9d: Update deps from fixed to ^
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [6fa4bd2]
111
+ - Updated dependencies [e2e76de]
112
+ - Updated dependencies [7f24c29]
113
+ - Updated dependencies [67637ba]
114
+ - Updated dependencies [04f3171]
115
+ - @mastra/core@0.2.0-alpha.86
116
+
117
+ ## 0.0.1-alpha.19
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies [e9d1b47]
122
+ - @mastra/core@0.2.0-alpha.85
123
+
124
+ ## 0.0.1-alpha.18
125
+
126
+ ### Patch Changes
127
+
128
+ - 2f17a5f: Added filter translator and tests for Qdrant
129
+ - Updated dependencies [2f17a5f]
130
+ - Updated dependencies [cb290ee]
131
+ - Updated dependencies [b4d7416]
132
+ - Updated dependencies [38b7f66]
133
+ - @mastra/core@0.2.0-alpha.84
134
+
135
+ ## 0.0.1-alpha.17
136
+
137
+ ### Patch Changes
138
+
139
+ - 9625602: Use mastra core splitted bundles in other packages
140
+ - Updated dependencies [30322ce]
141
+ - Updated dependencies [78eec7c]
142
+ - Updated dependencies [9625602]
143
+ - Updated dependencies [8769a62]
144
+ - @mastra/core@0.2.0-alpha.83
145
+
146
+ ## 0.0.1-alpha.16
147
+
148
+ ### Patch Changes
149
+
150
+ - Updated dependencies [73d112c]
151
+ - @mastra/core@0.1.27-alpha.82
152
+
153
+ ## 0.0.1-alpha.15
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [9fb3039]
158
+ - @mastra/core@0.1.27-alpha.81
159
+
160
+ ## 0.0.1-alpha.14
161
+
162
+ ### Patch Changes
163
+
164
+ - b422ed3: Bundle vector provider packages with tsup
165
+
166
+ ## 0.0.1-alpha.13
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [327ece7]
171
+ - @mastra/core@0.1.27-alpha.80
172
+
173
+ ## 0.0.1-alpha.12
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [21fe536]
178
+ - @mastra/core@0.1.27-alpha.79
179
+
180
+ ## 0.0.1-alpha.11
181
+
182
+ ### Patch Changes
183
+
184
+ - Updated dependencies [685108a]
185
+ - Updated dependencies [685108a]
186
+ - @mastra/core@0.1.27-alpha.78
187
+
188
+ ## 0.0.1-alpha.10
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies [8105fae]
193
+ - @mastra/core@0.1.27-alpha.77
194
+
195
+ ## 0.0.1-alpha.9
196
+
197
+ ### Patch Changes
198
+
199
+ - 7a469e7: Bump vectors
200
+
201
+ ## 0.0.1-alpha.8
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [ae7bf94]
206
+ - Updated dependencies [ae7bf94]
207
+ - @mastra/core@0.1.27-alpha.76
208
+
209
+ ## 0.0.1-alpha.7
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [23dcb23]
214
+ - @mastra/core@0.1.27-alpha.75
215
+
216
+ ## 0.0.1-alpha.6
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [7b87567]
221
+ - @mastra/core@0.1.27-alpha.74
222
+
223
+ ## 0.0.1-alpha.5
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [3427b95]
228
+ - @mastra/core@0.1.27-alpha.73
229
+
230
+ ## 0.0.1-alpha.4
231
+
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [e4d4ede]
235
+ - Updated dependencies [06b2c0a]
236
+ - @mastra/core@0.1.27-alpha.72
237
+
238
+ ## 0.0.1-alpha.3
239
+
240
+ ### Patch Changes
241
+
242
+ - Updated dependencies [d9c8dd0]
243
+ - @mastra/core@0.1.27-alpha.71
244
+
245
+ ## 0.0.1-alpha.2
246
+
247
+ ### Patch Changes
248
+
249
+ - bdaf834: publish packages
250
+
251
+ ## 0.0.1-alpha.1
252
+
253
+ ### Patch Changes
254
+
255
+ - Updated dependencies [dd6d87f]
256
+ - Updated dependencies [04434b6]
257
+ - @mastra/core@0.1.27-alpha.70
258
+
259
+ ## 0.0.1-alpha.0
260
+
261
+ ### Patch Changes
262
+
263
+ - 0d5a03d: Vector store modules
package/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ Elastic License 2.0 (ELv2)
2
+
3
+ **Acceptance**
4
+ By using the software, you agree to all of the terms and conditions below.
5
+
6
+ **Copyright License**
7
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
8
+
9
+ **Limitations**
10
+ You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
11
+
12
+ You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
13
+
14
+ You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
15
+
16
+ **Patents**
17
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
18
+
19
+ **Notices**
20
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
21
+
22
+ If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
23
+
24
+ **No Other Rights**
25
+ These terms do not imply any licenses other than those expressly granted in these terms.
26
+
27
+ **Termination**
28
+ If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
29
+
30
+ **No Liability**
31
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
32
+
33
+ **Definitions**
34
+ The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
35
+
36
+ _you_ refers to the individual or entity agreeing to these terms.
37
+
38
+ _your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
39
+
40
+ _your licenses_ are all the licenses granted to you for the software under these terms.
41
+
42
+ _use_ means anything you do with the software requiring one of your licenses.
43
+
44
+ _trademark_ means trademarks, service marks, and similar rights.
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @mastra/qdrant
2
+
3
+ Vector store implementation for Qdrant using the official @qdrant/js-client-rest SDK with added telemetry support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @mastra/qdrant
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { QdrantVector } from '@mastra/qdrant';
15
+
16
+ const vectorStore = new QdrantVector(
17
+ 'http://localhost:6333', // url
18
+ 'optional-api-key', // optional
19
+ false // https (optional)
20
+ );
21
+
22
+ // Create a new collection
23
+ await vectorStore.createIndex('my-collection', 1536, 'cosine');
24
+
25
+ // Add vectors
26
+ const vectors = [[0.1, 0.2, ...], [0.3, 0.4, ...]];
27
+ const metadata = [{ text: 'doc1' }, { text: 'doc2' }];
28
+ const ids = await vectorStore.upsert('my-collection', vectors, metadata);
29
+
30
+ // Query vectors
31
+ const results = await vectorStore.query(
32
+ 'my-collection',
33
+ [0.1, 0.2, ...],
34
+ 10, // topK
35
+ { text: { $eq: 'doc1' } }, // optional filter
36
+ false // includeVector
37
+ );
38
+ ```
39
+
40
+ ## Configuration
41
+
42
+ Required:
43
+
44
+ - `url`: URL of your Qdrant instance
45
+
46
+ Optional:
47
+
48
+ - `apiKey`: API key for authentication
49
+ - `https`: Whether to use HTTPS (default: false)
50
+
51
+ ## Features
52
+
53
+ - Vector similarity search with Cosine, Euclidean, and Dot Product metrics
54
+ - Automatic batching for large upserts (256 vectors per batch)
55
+ - Built-in telemetry support
56
+ - Metadata filtering
57
+ - Optional vector inclusion in query results
58
+ - Automatic UUID generation for vectors
59
+ - Support for both local and cloud deployments
60
+ - Built on top of @qdrant/js-client-rest SDK
61
+
62
+ ## Distance Metrics
63
+
64
+ The following distance metrics are supported:
65
+
66
+ - `cosine` → Cosine distance
67
+ - `euclidean` → Euclidean distance
68
+ - `dotproduct` → Dot product
69
+
70
+ ## Methods
71
+
72
+ - `createIndex(indexName, dimension, metric?)`: Create a new collection
73
+ - `upsert(indexName, vectors, metadata?, ids?)`: Add or update vectors
74
+ - `query(indexName, queryVector, topK?, filter?, includeVector?)`: Search for similar vectors
75
+ - `listIndexes()`: List all collections
76
+ - `describeIndex(indexName)`: Get collection statistics
77
+ - `deleteIndex(indexName)`: Delete a collection
78
+
79
+ ## Related Links
80
+
81
+ - [Qdrant Documentation](https://qdrant.tech/documentation/)
82
+ - [Qdrant REST API Reference](https://qdrant.github.io/qdrant/redoc/index.html)
@@ -0,0 +1,16 @@
1
+ import { Filter } from '@mastra/core/filter';
2
+ import { MastraVector, QueryResult, IndexStats } from '@mastra/core/vector';
3
+
4
+ declare class QdrantVector extends MastraVector {
5
+ private client;
6
+ constructor(url: string, apiKey?: string, https?: boolean);
7
+ upsert(indexName: string, vectors: number[][], metadata?: Record<string, any>[], ids?: string[]): Promise<string[]>;
8
+ createIndex(indexName: string, dimension: number, metric?: 'cosine' | 'euclidean' | 'dotproduct'): Promise<void>;
9
+ transformFilter(filter?: Filter): Filter | undefined;
10
+ query(indexName: string, queryVector: number[], topK?: number, filter?: Filter, includeVector?: boolean): Promise<QueryResult[]>;
11
+ listIndexes(): Promise<string[]>;
12
+ describeIndex(indexName: string): Promise<IndexStats>;
13
+ deleteIndex(indexName: string): Promise<void>;
14
+ }
15
+
16
+ export { QdrantVector };