@mastra/chroma 0.0.0-trigger-playground-ui-package-20250506151043 → 0.0.0-tsconfig-compile-20250703214351

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,6 +1,340 @@
1
1
  # @mastra/chroma
2
2
 
3
- ## 0.0.0-trigger-playground-ui-package-20250506151043
3
+ ## 0.0.0-tsconfig-compile-20250703214351
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b790fd1]
8
+ - Updated dependencies [f36e4f1]
9
+ - @mastra/core@0.0.0-tsconfig-compile-20250703214351
10
+
11
+ ## 0.11.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 8a3bfd2: Update peerdeps to latest core
16
+
17
+ ### Patch Changes
18
+
19
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
20
+ - 0e17048: Throw mastra errors in storage packages
21
+ - Updated dependencies [15e9d26]
22
+ - Updated dependencies [d1baedb]
23
+ - Updated dependencies [d8f2d19]
24
+ - Updated dependencies [4d21bf2]
25
+ - Updated dependencies [07d6d88]
26
+ - Updated dependencies [9d52b17]
27
+ - Updated dependencies [2097952]
28
+ - Updated dependencies [792c4c0]
29
+ - Updated dependencies [5d74aab]
30
+ - Updated dependencies [a8b194f]
31
+ - Updated dependencies [4fb0cc2]
32
+ - Updated dependencies [d2a7a31]
33
+ - Updated dependencies [502fe05]
34
+ - Updated dependencies [144eb0b]
35
+ - Updated dependencies [8ba1b51]
36
+ - Updated dependencies [4efcfa0]
37
+ - Updated dependencies [0e17048]
38
+ - @mastra/core@0.10.7
39
+
40
+ ## 0.11.0-alpha.2
41
+
42
+ ### Minor Changes
43
+
44
+ - 8a3bfd2: Update peerdeps to latest core
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [792c4c0]
49
+ - Updated dependencies [502fe05]
50
+ - Updated dependencies [4efcfa0]
51
+ - @mastra/core@0.10.7-alpha.3
52
+
53
+ ## 0.10.4-alpha.1
54
+
55
+ ### Patch Changes
56
+
57
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
58
+ - Updated dependencies [15e9d26]
59
+ - Updated dependencies [07d6d88]
60
+ - Updated dependencies [5d74aab]
61
+ - Updated dependencies [144eb0b]
62
+ - @mastra/core@0.10.7-alpha.2
63
+
64
+ ## 0.10.4-alpha.0
65
+
66
+ ### Patch Changes
67
+
68
+ - 0e17048: Throw mastra errors in storage packages
69
+ - Updated dependencies [d1baedb]
70
+ - Updated dependencies [4d21bf2]
71
+ - Updated dependencies [2097952]
72
+ - Updated dependencies [4fb0cc2]
73
+ - Updated dependencies [d2a7a31]
74
+ - Updated dependencies [0e17048]
75
+ - @mastra/core@0.10.7-alpha.1
76
+
77
+ ## 0.10.3
78
+
79
+ ### Patch Changes
80
+
81
+ - 63f6b7d: dependencies updates:
82
+ - Updated dependency [`chromadb@^2.4.6` ↗︎](https://www.npmjs.com/package/chromadb/v/2.4.6) (from `^2.2.0`, in `dependencies`)
83
+ - Updated dependencies [63f6b7d]
84
+ - Updated dependencies [12a95fc]
85
+ - Updated dependencies [4b0f8a6]
86
+ - Updated dependencies [51264a5]
87
+ - Updated dependencies [8e6f677]
88
+ - Updated dependencies [d70c420]
89
+ - Updated dependencies [ee9af57]
90
+ - Updated dependencies [36f1c36]
91
+ - Updated dependencies [2a16996]
92
+ - Updated dependencies [10d352e]
93
+ - Updated dependencies [9589624]
94
+ - Updated dependencies [53d3c37]
95
+ - Updated dependencies [751c894]
96
+ - Updated dependencies [577ce3a]
97
+ - Updated dependencies [9260b3a]
98
+ - @mastra/core@0.10.6
99
+
100
+ ## 0.10.3-alpha.0
101
+
102
+ ### Patch Changes
103
+
104
+ - 63f6b7d: dependencies updates:
105
+ - Updated dependency [`chromadb@^2.4.6` ↗︎](https://www.npmjs.com/package/chromadb/v/2.4.6) (from `^2.2.0`, in `dependencies`)
106
+ - Updated dependencies [63f6b7d]
107
+ - Updated dependencies [36f1c36]
108
+ - Updated dependencies [10d352e]
109
+ - Updated dependencies [53d3c37]
110
+ - @mastra/core@0.10.6-alpha.0
111
+
112
+ ## 0.10.2
113
+
114
+ ### Patch Changes
115
+
116
+ - 66f4424: Update peerdeps
117
+ - Updated dependencies [d1ed912]
118
+ - Updated dependencies [f6fd25f]
119
+ - Updated dependencies [dffb67b]
120
+ - Updated dependencies [f1f1f1b]
121
+ - Updated dependencies [925ab94]
122
+ - Updated dependencies [f9816ae]
123
+ - Updated dependencies [82090c1]
124
+ - Updated dependencies [1b443fd]
125
+ - Updated dependencies [ce97900]
126
+ - Updated dependencies [f1309d3]
127
+ - Updated dependencies [14a2566]
128
+ - Updated dependencies [f7f8293]
129
+ - Updated dependencies [48eddb9]
130
+ - @mastra/core@0.10.4
131
+
132
+ ## 0.10.2-alpha.0
133
+
134
+ ### Patch Changes
135
+
136
+ - 66f4424: Update peerdeps
137
+
138
+ ## 0.10.1
139
+
140
+ ### Patch Changes
141
+
142
+ - f0d559f: Fix peerdeps for alpha channel
143
+ - Updated dependencies [ee77e78]
144
+ - Updated dependencies [592a2db]
145
+ - Updated dependencies [e5dc18d]
146
+ - Updated dependencies [ab5adbe]
147
+ - Updated dependencies [1e8bb40]
148
+ - Updated dependencies [1b5fc55]
149
+ - Updated dependencies [195c428]
150
+ - Updated dependencies [f73e11b]
151
+ - Updated dependencies [37643b8]
152
+ - Updated dependencies [99fd6cf]
153
+ - Updated dependencies [c5bf1ce]
154
+ - Updated dependencies [add596e]
155
+ - Updated dependencies [8dc94d8]
156
+ - Updated dependencies [ecebbeb]
157
+ - Updated dependencies [79d5145]
158
+ - Updated dependencies [12b7002]
159
+ - Updated dependencies [2901125]
160
+ - @mastra/core@0.10.2
161
+
162
+ ## 0.10.1-alpha.0
163
+
164
+ ### Patch Changes
165
+
166
+ - f0d559f: Fix peerdeps for alpha channel
167
+ - Updated dependencies [1e8bb40]
168
+ - @mastra/core@0.10.2-alpha.2
169
+
170
+ ## 0.10.0
171
+
172
+ ### Minor Changes
173
+
174
+ - 83da932: Move @mastra/core to peerdeps
175
+
176
+ ### Patch Changes
177
+
178
+ - d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
179
+ - a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
180
+ - Updated dependencies [b3a3d63]
181
+ - Updated dependencies [344f453]
182
+ - Updated dependencies [0a3ae6d]
183
+ - Updated dependencies [95911be]
184
+ - Updated dependencies [f53a6ac]
185
+ - Updated dependencies [5eb5a99]
186
+ - Updated dependencies [7e632c5]
187
+ - Updated dependencies [1e9fbfa]
188
+ - Updated dependencies [eabdcd9]
189
+ - Updated dependencies [90be034]
190
+ - Updated dependencies [99f050a]
191
+ - Updated dependencies [d0ee3c6]
192
+ - Updated dependencies [b2ae5aa]
193
+ - Updated dependencies [23f258c]
194
+ - Updated dependencies [a7292b0]
195
+ - Updated dependencies [0dcb9f0]
196
+ - Updated dependencies [2672a05]
197
+ - @mastra/core@0.10.0
198
+
199
+ ## 0.3.0-alpha.1
200
+
201
+ ### Minor Changes
202
+
203
+ - 83da932: Move @mastra/core to peerdeps
204
+
205
+ ### Patch Changes
206
+
207
+ - a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
208
+ - Updated dependencies [b3a3d63]
209
+ - Updated dependencies [344f453]
210
+ - Updated dependencies [0a3ae6d]
211
+ - Updated dependencies [95911be]
212
+ - Updated dependencies [5eb5a99]
213
+ - Updated dependencies [7e632c5]
214
+ - Updated dependencies [1e9fbfa]
215
+ - Updated dependencies [b2ae5aa]
216
+ - Updated dependencies [a7292b0]
217
+ - Updated dependencies [0dcb9f0]
218
+ - @mastra/core@0.10.0-alpha.1
219
+
220
+ ## 0.2.16-alpha.0
221
+
222
+ ### Patch Changes
223
+
224
+ - d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
225
+ - Updated dependencies [f53a6ac]
226
+ - Updated dependencies [eabdcd9]
227
+ - Updated dependencies [90be034]
228
+ - Updated dependencies [99f050a]
229
+ - Updated dependencies [d0ee3c6]
230
+ - Updated dependencies [23f258c]
231
+ - Updated dependencies [2672a05]
232
+ - @mastra/core@0.9.5-alpha.0
233
+
234
+ ## 0.2.15
235
+
236
+ ### Patch Changes
237
+
238
+ - c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
239
+ - Updated dependencies [396be50]
240
+ - Updated dependencies [ab80e7e]
241
+ - Updated dependencies [c3bd795]
242
+ - Updated dependencies [da082f8]
243
+ - Updated dependencies [a5810ce]
244
+ - Updated dependencies [3e9c131]
245
+ - Updated dependencies [3171b5b]
246
+ - Updated dependencies [973e5ac]
247
+ - Updated dependencies [daf942f]
248
+ - Updated dependencies [0b8b868]
249
+ - Updated dependencies [9e1eff5]
250
+ - Updated dependencies [6fa1ad1]
251
+ - Updated dependencies [c28d7a0]
252
+ - Updated dependencies [edf1e88]
253
+ - @mastra/core@0.9.4
254
+
255
+ ## 0.2.15-alpha.4
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [3e9c131]
260
+ - @mastra/core@0.9.4-alpha.4
261
+
262
+ ## 0.2.15-alpha.3
263
+
264
+ ### Patch Changes
265
+
266
+ - c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
267
+ - Updated dependencies [396be50]
268
+ - Updated dependencies [c3bd795]
269
+ - Updated dependencies [da082f8]
270
+ - Updated dependencies [a5810ce]
271
+ - @mastra/core@0.9.4-alpha.3
272
+
273
+ ## 0.2.15-alpha.2
274
+
275
+ ### Patch Changes
276
+
277
+ - Updated dependencies [3171b5b]
278
+ - Updated dependencies [973e5ac]
279
+ - Updated dependencies [9e1eff5]
280
+ - @mastra/core@0.9.4-alpha.2
281
+
282
+ ## 0.2.15-alpha.1
283
+
284
+ ### Patch Changes
285
+
286
+ - Updated dependencies [ab80e7e]
287
+ - Updated dependencies [6fa1ad1]
288
+ - Updated dependencies [c28d7a0]
289
+ - Updated dependencies [edf1e88]
290
+ - @mastra/core@0.9.4-alpha.1
291
+
292
+ ## 0.2.15-alpha.0
293
+
294
+ ### Patch Changes
295
+
296
+ - Updated dependencies [daf942f]
297
+ - Updated dependencies [0b8b868]
298
+ - @mastra/core@0.9.4-alpha.0
299
+
300
+ ## 0.2.14
301
+
302
+ ### Patch Changes
303
+
304
+ - 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
305
+ - Updated dependencies [e450778]
306
+ - Updated dependencies [8902157]
307
+ - Updated dependencies [ca0dc88]
308
+ - Updated dependencies [526c570]
309
+ - Updated dependencies [d7a6a33]
310
+ - Updated dependencies [9cd1a46]
311
+ - Updated dependencies [b5d2de0]
312
+ - Updated dependencies [644f8ad]
313
+ - Updated dependencies [70dbf51]
314
+ - @mastra/core@0.9.3
315
+
316
+ ## 0.2.14-alpha.1
317
+
318
+ ### Patch Changes
319
+
320
+ - 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
321
+ - Updated dependencies [e450778]
322
+ - Updated dependencies [8902157]
323
+ - Updated dependencies [ca0dc88]
324
+ - Updated dependencies [9cd1a46]
325
+ - Updated dependencies [70dbf51]
326
+ - @mastra/core@0.9.3-alpha.1
327
+
328
+ ## 0.2.14-alpha.0
329
+
330
+ ### Patch Changes
331
+
332
+ - Updated dependencies [526c570]
333
+ - Updated dependencies [b5d2de0]
334
+ - Updated dependencies [644f8ad]
335
+ - @mastra/core@0.9.3-alpha.0
336
+
337
+ ## 0.2.13
4
338
 
5
339
  ### Patch Changes
6
340
 
@@ -18,8 +352,20 @@
18
352
  - Updated dependencies [17826a9]
19
353
  - Updated dependencies [7d8b7c7]
20
354
  - Updated dependencies [fba031f]
355
+ - Updated dependencies [3a5f1e1]
21
356
  - Updated dependencies [51e6923]
22
- - @mastra/core@0.0.0-trigger-playground-ui-package-20250506151043
357
+ - Updated dependencies [8398d89]
358
+ - @mastra/core@0.9.2
359
+
360
+ ## 0.2.13-alpha.6
361
+
362
+ ### Patch Changes
363
+
364
+ - Updated dependencies [6052aa6]
365
+ - Updated dependencies [7d8b7c7]
366
+ - Updated dependencies [3a5f1e1]
367
+ - Updated dependencies [8398d89]
368
+ - @mastra/core@0.9.2-alpha.6
23
369
 
24
370
  ## 0.2.13-alpha.5
25
371
 
@@ -1029,7 +1375,6 @@
1029
1375
  ### Minor Changes
1030
1376
 
1031
1377
  - 684d5d1: Move Chroma package from `@mastra/vector-chroma` to `@mastra/chroma`.
1032
-
1033
1378
  - Move package to `stores/chroma`
1034
1379
  - Reorganize source files into `src/vector`
1035
1380
  - Add deprecation notice to old package
@@ -1363,7 +1708,6 @@
1363
1708
  ### Minor Changes
1364
1709
 
1365
1710
  - 684d5d1: Move Chroma package from `@mastra/vector-chroma` to `@mastra/chroma`.
1366
-
1367
1711
  - Move package to `stores/chroma`
1368
1712
  - Reorganize source files into `src/vector`
1369
1713
  - Add deprecation notice to old package
@@ -1,13 +1,17 @@
1
1
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
2
3
  import type { CreateIndexParams } from '@mastra/core/vector';
4
+ import type { DeleteIndexParams } from '@mastra/core/vector';
5
+ import type { DeleteVectorParams } from '@mastra/core/vector';
6
+ import type { DescribeIndexParams } from '@mastra/core/vector';
3
7
  import type { IndexStats } from '@mastra/core/vector';
8
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
4
9
  import { MastraVector } from '@mastra/core/vector';
5
10
  import type { OperatorSupport } from '@mastra/core/vector/filter';
6
- import type { ParamsToArgs } from '@mastra/core/vector';
11
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
7
12
  import type { QueryResult } from '@mastra/core/vector';
8
- import type { QueryVectorArgs } from '@mastra/core/vector';
9
13
  import type { QueryVectorParams } from '@mastra/core/vector';
10
- import type { UpsertVectorArgs } from '@mastra/core/vector';
14
+ import type { UpdateVectorParams } from '@mastra/core/vector';
11
15
  import type { UpsertVectorParams } from '@mastra/core/vector';
12
16
  import type { VectorFilter } from '@mastra/core/vector/filter';
13
17
 
@@ -19,31 +23,37 @@ declare const CHROMA_PROMPT = "When querying Chroma, you can ONLY use the operat
19
23
  export { CHROMA_PROMPT }
20
24
  export { CHROMA_PROMPT as CHROMA_PROMPT_alias_1 }
21
25
 
26
+ declare type ChromaBlacklisted = BlacklistedRootOperators | '$nor' | '$not';
27
+
28
+ declare type ChromaDocumentBlacklisted = Exclude<ChromaBlacklisted, '$contains'>;
29
+
30
+ declare type ChromaDocumentOperatorValueMap = ChromaOperatorValueMap;
31
+
22
32
  /**
23
33
  * Translator for Chroma filter queries.
24
34
  * Maintains MongoDB-compatible syntax while ensuring proper validation
25
35
  * and normalization of values.
26
36
  */
27
- export declare class ChromaFilterTranslator extends BaseFilterTranslator {
37
+ export declare class ChromaFilterTranslator extends BaseFilterTranslator<ChromaVectorFilter> {
28
38
  protected getSupportedOperators(): OperatorSupport;
29
- translate(filter?: VectorFilter): VectorFilter;
39
+ translate(filter?: ChromaVectorFilter): ChromaVectorFilter;
30
40
  private translateNode;
31
41
  private translateOperator;
32
42
  }
33
43
 
34
- declare type ChromaQueryArgs = [...QueryVectorArgs, VectorFilter?];
44
+ declare type ChromaLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor' | '$not'>;
35
45
 
36
- declare interface ChromaQueryVectorParams extends QueryVectorParams {
37
- documentFilter?: VectorFilter;
38
- }
46
+ declare type ChromaOperatorValueMap = Omit<OperatorValueMap, '$exists' | '$elemMatch' | '$regex' | '$options'>;
39
47
 
40
- declare type ChromaUpsertArgs = [...UpsertVectorArgs, string[]?];
48
+ declare interface ChromaQueryVectorParams extends QueryVectorParams<ChromaVectorFilter> {
49
+ documentFilter?: ChromaVectorDocumentFilter;
50
+ }
41
51
 
42
52
  declare interface ChromaUpsertVectorParams extends UpsertVectorParams {
43
53
  documents?: string[];
44
54
  }
45
55
 
46
- declare class ChromaVector extends MastraVector {
56
+ declare class ChromaVector extends MastraVector<ChromaVectorFilter> {
47
57
  private client;
48
58
  private collections;
49
59
  constructor({ path, auth, }: {
@@ -55,21 +65,38 @@ declare class ChromaVector extends MastraVector {
55
65
  });
56
66
  getCollection(indexName: string, throwIfNotExists?: boolean): Promise<any>;
57
67
  private validateVectorDimensions;
58
- upsert(...args: ParamsToArgs<ChromaUpsertVectorParams> | ChromaUpsertArgs): Promise<string[]>;
68
+ upsert({ indexName, vectors, metadata, ids, documents }: ChromaUpsertVectorParams): Promise<string[]>;
59
69
  private HnswSpaceMap;
60
- createIndex(...args: ParamsToArgs<CreateIndexParams>): Promise<void>;
61
- transformFilter(filter?: VectorFilter): VectorFilter;
62
- query(...args: ParamsToArgs<ChromaQueryVectorParams> | ChromaQueryArgs): Promise<QueryResult[]>;
70
+ createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
71
+ transformFilter(filter?: ChromaVectorFilter): ChromaVectorFilter;
72
+ query({ indexName, queryVector, topK, filter, includeVector, documentFilter, }: ChromaQueryVectorParams): Promise<QueryResult[]>;
63
73
  listIndexes(): Promise<string[]>;
64
- describeIndex(indexName: string): Promise<IndexStats>;
65
- deleteIndex(indexName: string): Promise<void>;
66
- updateIndexById(indexName: string, id: string, update: {
67
- vector?: number[];
68
- metadata?: Record<string, any>;
69
- }): Promise<void>;
70
- deleteIndexById(indexName: string, id: string): Promise<void>;
74
+ /**
75
+ * Retrieves statistics about a vector index.
76
+ *
77
+ * @param {string} indexName - The name of the index to describe
78
+ * @returns A promise that resolves to the index statistics including dimension, count and metric
79
+ */
80
+ describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
81
+ deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
82
+ /**
83
+ * Updates a vector by its ID with the provided vector and/or metadata.
84
+ * @param indexName - The name of the index containing the vector.
85
+ * @param id - The ID of the vector to update.
86
+ * @param update - An object containing the vector and/or metadata to update.
87
+ * @param update.vector - An optional array of numbers representing the new vector.
88
+ * @param update.metadata - An optional record containing the new metadata.
89
+ * @returns A promise that resolves when the update is complete.
90
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
91
+ */
92
+ updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
93
+ deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
71
94
  }
72
95
  export { ChromaVector }
73
96
  export { ChromaVector as ChromaVector_alias_1 }
74
97
 
98
+ export declare type ChromaVectorDocumentFilter = VectorFilter<keyof ChromaDocumentOperatorValueMap, ChromaDocumentOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaDocumentBlacklisted>;
99
+
100
+ export declare type ChromaVectorFilter = VectorFilter<keyof ChromaOperatorValueMap, ChromaOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaBlacklisted>;
101
+
75
102
  export { }
@@ -1,13 +1,17 @@
1
1
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
2
3
  import type { CreateIndexParams } from '@mastra/core/vector';
4
+ import type { DeleteIndexParams } from '@mastra/core/vector';
5
+ import type { DeleteVectorParams } from '@mastra/core/vector';
6
+ import type { DescribeIndexParams } from '@mastra/core/vector';
3
7
  import type { IndexStats } from '@mastra/core/vector';
8
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
4
9
  import { MastraVector } from '@mastra/core/vector';
5
10
  import type { OperatorSupport } from '@mastra/core/vector/filter';
6
- import type { ParamsToArgs } from '@mastra/core/vector';
11
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
7
12
  import type { QueryResult } from '@mastra/core/vector';
8
- import type { QueryVectorArgs } from '@mastra/core/vector';
9
13
  import type { QueryVectorParams } from '@mastra/core/vector';
10
- import type { UpsertVectorArgs } from '@mastra/core/vector';
14
+ import type { UpdateVectorParams } from '@mastra/core/vector';
11
15
  import type { UpsertVectorParams } from '@mastra/core/vector';
12
16
  import type { VectorFilter } from '@mastra/core/vector/filter';
13
17
 
@@ -19,31 +23,37 @@ declare const CHROMA_PROMPT = "When querying Chroma, you can ONLY use the operat
19
23
  export { CHROMA_PROMPT }
20
24
  export { CHROMA_PROMPT as CHROMA_PROMPT_alias_1 }
21
25
 
26
+ declare type ChromaBlacklisted = BlacklistedRootOperators | '$nor' | '$not';
27
+
28
+ declare type ChromaDocumentBlacklisted = Exclude<ChromaBlacklisted, '$contains'>;
29
+
30
+ declare type ChromaDocumentOperatorValueMap = ChromaOperatorValueMap;
31
+
22
32
  /**
23
33
  * Translator for Chroma filter queries.
24
34
  * Maintains MongoDB-compatible syntax while ensuring proper validation
25
35
  * and normalization of values.
26
36
  */
27
- export declare class ChromaFilterTranslator extends BaseFilterTranslator {
37
+ export declare class ChromaFilterTranslator extends BaseFilterTranslator<ChromaVectorFilter> {
28
38
  protected getSupportedOperators(): OperatorSupport;
29
- translate(filter?: VectorFilter): VectorFilter;
39
+ translate(filter?: ChromaVectorFilter): ChromaVectorFilter;
30
40
  private translateNode;
31
41
  private translateOperator;
32
42
  }
33
43
 
34
- declare type ChromaQueryArgs = [...QueryVectorArgs, VectorFilter?];
44
+ declare type ChromaLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor' | '$not'>;
35
45
 
36
- declare interface ChromaQueryVectorParams extends QueryVectorParams {
37
- documentFilter?: VectorFilter;
38
- }
46
+ declare type ChromaOperatorValueMap = Omit<OperatorValueMap, '$exists' | '$elemMatch' | '$regex' | '$options'>;
39
47
 
40
- declare type ChromaUpsertArgs = [...UpsertVectorArgs, string[]?];
48
+ declare interface ChromaQueryVectorParams extends QueryVectorParams<ChromaVectorFilter> {
49
+ documentFilter?: ChromaVectorDocumentFilter;
50
+ }
41
51
 
42
52
  declare interface ChromaUpsertVectorParams extends UpsertVectorParams {
43
53
  documents?: string[];
44
54
  }
45
55
 
46
- declare class ChromaVector extends MastraVector {
56
+ declare class ChromaVector extends MastraVector<ChromaVectorFilter> {
47
57
  private client;
48
58
  private collections;
49
59
  constructor({ path, auth, }: {
@@ -55,21 +65,38 @@ declare class ChromaVector extends MastraVector {
55
65
  });
56
66
  getCollection(indexName: string, throwIfNotExists?: boolean): Promise<any>;
57
67
  private validateVectorDimensions;
58
- upsert(...args: ParamsToArgs<ChromaUpsertVectorParams> | ChromaUpsertArgs): Promise<string[]>;
68
+ upsert({ indexName, vectors, metadata, ids, documents }: ChromaUpsertVectorParams): Promise<string[]>;
59
69
  private HnswSpaceMap;
60
- createIndex(...args: ParamsToArgs<CreateIndexParams>): Promise<void>;
61
- transformFilter(filter?: VectorFilter): VectorFilter;
62
- query(...args: ParamsToArgs<ChromaQueryVectorParams> | ChromaQueryArgs): Promise<QueryResult[]>;
70
+ createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
71
+ transformFilter(filter?: ChromaVectorFilter): ChromaVectorFilter;
72
+ query({ indexName, queryVector, topK, filter, includeVector, documentFilter, }: ChromaQueryVectorParams): Promise<QueryResult[]>;
63
73
  listIndexes(): Promise<string[]>;
64
- describeIndex(indexName: string): Promise<IndexStats>;
65
- deleteIndex(indexName: string): Promise<void>;
66
- updateIndexById(indexName: string, id: string, update: {
67
- vector?: number[];
68
- metadata?: Record<string, any>;
69
- }): Promise<void>;
70
- deleteIndexById(indexName: string, id: string): Promise<void>;
74
+ /**
75
+ * Retrieves statistics about a vector index.
76
+ *
77
+ * @param {string} indexName - The name of the index to describe
78
+ * @returns A promise that resolves to the index statistics including dimension, count and metric
79
+ */
80
+ describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
81
+ deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
82
+ /**
83
+ * Updates a vector by its ID with the provided vector and/or metadata.
84
+ * @param indexName - The name of the index containing the vector.
85
+ * @param id - The ID of the vector to update.
86
+ * @param update - An object containing the vector and/or metadata to update.
87
+ * @param update.vector - An optional array of numbers representing the new vector.
88
+ * @param update.metadata - An optional record containing the new metadata.
89
+ * @returns A promise that resolves when the update is complete.
90
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
91
+ */
92
+ updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
93
+ deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
71
94
  }
72
95
  export { ChromaVector }
73
96
  export { ChromaVector as ChromaVector_alias_1 }
74
97
 
98
+ export declare type ChromaVectorDocumentFilter = VectorFilter<keyof ChromaDocumentOperatorValueMap, ChromaDocumentOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaDocumentBlacklisted>;
99
+
100
+ export declare type ChromaVectorFilter = VectorFilter<keyof ChromaOperatorValueMap, ChromaOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaBlacklisted>;
101
+
75
102
  export { }