@mastra/mongodb 0.0.0-working-memory-per-user-20250620161509 → 0.0.0-zod-v4-compat-part-2-20250820135355

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +251 -2
  2. package/LICENSE.md +11 -42
  3. package/dist/index.cjs +1846 -505
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +5 -7
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +1815 -474
  8. package/dist/index.js.map +1 -0
  9. package/dist/storage/MongoDBConnector.d.ts +23 -0
  10. package/dist/storage/MongoDBConnector.d.ts.map +1 -0
  11. package/dist/storage/connectors/MongoDBConnector.d.ts +23 -0
  12. package/dist/storage/connectors/MongoDBConnector.d.ts.map +1 -0
  13. package/dist/storage/connectors/base.d.ts +6 -0
  14. package/dist/storage/connectors/base.d.ts.map +1 -0
  15. package/dist/storage/domains/legacy-evals/index.d.ts +18 -0
  16. package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
  17. package/dist/storage/domains/memory/index.d.ts +80 -0
  18. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  19. package/dist/storage/domains/operations/index.d.ts +38 -0
  20. package/dist/storage/domains/operations/index.d.ts.map +1 -0
  21. package/dist/storage/domains/scores/index.d.ts +41 -0
  22. package/dist/storage/domains/scores/index.d.ts.map +1 -0
  23. package/dist/storage/domains/traces/index.d.ts +18 -0
  24. package/dist/storage/domains/traces/index.d.ts.map +1 -0
  25. package/dist/storage/domains/utils.d.ts +8 -0
  26. package/dist/storage/domains/utils.d.ts.map +1 -0
  27. package/dist/storage/domains/workflows/index.d.ts +33 -0
  28. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  29. package/dist/storage/index.d.ts +178 -0
  30. package/dist/storage/index.d.ts.map +1 -0
  31. package/dist/storage/types.d.ts +11 -0
  32. package/dist/storage/types.d.ts.map +1 -0
  33. package/dist/vector/filter.d.ts +21 -0
  34. package/dist/vector/filter.d.ts.map +1 -0
  35. package/dist/vector/index.d.ts +78 -0
  36. package/dist/vector/index.d.ts.map +1 -0
  37. package/dist/vector/prompt.d.ts +6 -0
  38. package/dist/vector/prompt.d.ts.map +1 -0
  39. package/docker-compose.yaml +1 -1
  40. package/package.json +10 -10
  41. package/src/index.ts +1 -0
  42. package/src/storage/MongoDBConnector.ts +93 -0
  43. package/src/storage/connectors/MongoDBConnector.ts +93 -0
  44. package/src/storage/connectors/base.ts +7 -0
  45. package/src/storage/domains/legacy-evals/index.ts +193 -0
  46. package/src/storage/domains/memory/index.ts +741 -0
  47. package/src/storage/domains/operations/index.ts +155 -0
  48. package/src/storage/domains/scores/index.ts +379 -0
  49. package/src/storage/domains/traces/index.ts +142 -0
  50. package/src/storage/domains/utils.ts +43 -0
  51. package/src/storage/domains/workflows/index.ts +196 -0
  52. package/src/storage/index.test.ts +27 -989
  53. package/src/storage/index.ts +241 -605
  54. package/src/storage/types.ts +14 -0
  55. package/src/vector/filter.test.ts +40 -30
  56. package/src/vector/filter.ts +25 -4
  57. package/src/vector/index.test.ts +48 -3
  58. package/src/vector/index.ts +301 -131
  59. package/tsconfig.build.json +9 -0
  60. package/tsconfig.json +1 -1
  61. package/tsup.config.ts +22 -0
  62. package/dist/_tsup-dts-rollup.d.cts +0 -274
  63. package/dist/_tsup-dts-rollup.d.ts +0 -274
  64. package/dist/index.d.cts +0 -7
package/CHANGELOG.md CHANGED
@@ -1,16 +1,265 @@
1
1
  # @mastra/mongodb
2
2
 
3
- ## 0.0.0-working-memory-per-user-20250620161509
3
+ ## 0.0.0-zod-v4-compat-part-2-20250820135355
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Updated dependencies [94f4812]
8
+ - Updated dependencies [e202b82]
9
+ - Updated dependencies [e00f6a0]
10
+ - Updated dependencies [35c5798]
11
+ - @mastra/core@0.0.0-zod-v4-compat-part-2-20250820135355
12
+
13
+ ## 0.12.4
14
+
15
+ ### Patch Changes
16
+
17
+ - 2c5eab4: Fix mongodb edge case when fromConnectionHandler is used
18
+ - Updated dependencies [33dcb07]
19
+ - Updated dependencies [d0d9500]
20
+ - Updated dependencies [d30b1a0]
21
+ - Updated dependencies [bff87f7]
22
+ - Updated dependencies [b4a8df0]
23
+ - @mastra/core@0.12.1
24
+
25
+ ## 0.12.4-alpha.0
26
+
27
+ ### Patch Changes
28
+
29
+ - 2c5eab4: Fix mongodb edge case when fromConnectionHandler is used
30
+ - Updated dependencies [33dcb07]
31
+ - Updated dependencies [d30b1a0]
32
+ - Updated dependencies [bff87f7]
33
+ - Updated dependencies [b4a8df0]
34
+ - @mastra/core@0.12.1-alpha.0
35
+
36
+ ## 0.12.3
37
+
38
+ ### Patch Changes
39
+
40
+ - 9881232: dependencies updates:
41
+ - Updated dependency [`cloudflare@^4.5.0` ↗︎](https://www.npmjs.com/package/cloudflare/v/4.5.0) (from `^4.4.1`, in `dependencies`)
42
+ - eba48c8: Sort getThreads by updatedAt.
43
+ - 25f2987: fix: filter.\_id.\$in cannot be empty
44
+ - 14456f3: fix: [MongoDB] batchInsert with process json
45
+ - b0f1e2f: fix: mongodb save scores as an object
46
+ - f42c4c2: update peer deps for packages to latest core range
47
+ - Updated dependencies [510e2c8]
48
+ - Updated dependencies [2f72fb2]
49
+ - Updated dependencies [27cc97a]
50
+ - Updated dependencies [3f89307]
51
+ - Updated dependencies [9eda7d4]
52
+ - Updated dependencies [9d49408]
53
+ - Updated dependencies [41daa63]
54
+ - Updated dependencies [ad0a58b]
55
+ - Updated dependencies [254a36b]
56
+ - Updated dependencies [2ecf658]
57
+ - Updated dependencies [7a7754f]
58
+ - Updated dependencies [fc92d80]
59
+ - Updated dependencies [e0f73c6]
60
+ - Updated dependencies [0b89602]
61
+ - Updated dependencies [4d37822]
62
+ - Updated dependencies [23a6a7c]
63
+ - Updated dependencies [cda801d]
64
+ - Updated dependencies [a77c823]
65
+ - Updated dependencies [ff9c125]
66
+ - Updated dependencies [09bca64]
67
+ - Updated dependencies [b8efbb9]
68
+ - Updated dependencies [71466e7]
69
+ - Updated dependencies [0c99fbe]
70
+ - @mastra/core@0.12.0
71
+
72
+ ## 0.12.3-alpha.2
73
+
74
+ ### Patch Changes
75
+
76
+ - f42c4c2: update peer deps for packages to latest core range
77
+ - @mastra/core@0.12.0-alpha.5
78
+
79
+ ## 0.12.3-alpha.1
80
+
81
+ ### Patch Changes
82
+
83
+ - 9881232: dependencies updates:
84
+ - Updated dependency [`cloudflare@^4.5.0` ↗︎](https://www.npmjs.com/package/cloudflare/v/4.5.0) (from `^4.4.1`, in `dependencies`)
85
+ - eba48c8: Sort getThreads by updatedAt.
86
+ - 14456f3: fix: [MongoDB] batchInsert with process json
87
+ - Updated dependencies [27cc97a]
88
+ - Updated dependencies [41daa63]
89
+ - Updated dependencies [254a36b]
90
+ - Updated dependencies [0b89602]
91
+ - Updated dependencies [4d37822]
92
+ - Updated dependencies [ff9c125]
93
+ - Updated dependencies [b8efbb9]
94
+ - Updated dependencies [71466e7]
95
+ - Updated dependencies [0c99fbe]
96
+ - @mastra/core@0.12.0-alpha.2
97
+
98
+ ## 0.12.3-alpha.0
99
+
100
+ ### Patch Changes
101
+
102
+ - 25f2987: fix: filter.\_id.\$in cannot be empty
103
+ - b0f1e2f: fix: mongodb save scores as an object
104
+ - Updated dependencies [510e2c8]
105
+ - Updated dependencies [2f72fb2]
106
+ - Updated dependencies [3f89307]
107
+ - Updated dependencies [9eda7d4]
108
+ - Updated dependencies [9d49408]
109
+ - Updated dependencies [2ecf658]
110
+ - Updated dependencies [7a7754f]
111
+ - Updated dependencies [fc92d80]
112
+ - Updated dependencies [23a6a7c]
113
+ - Updated dependencies [09bca64]
114
+ - @mastra/core@0.12.0-alpha.0
115
+
116
+ ## 0.12.2
117
+
118
+ ### Patch Changes
119
+
120
+ - ce088f5: Update all peerdeps to latest core
121
+ - @mastra/core@0.11.1
122
+
123
+ ## 0.12.1
124
+
125
+ ### Patch Changes
126
+
127
+ - 728b203: feat(mongodb): implement ConnectorHandler interface and MongoDBConnector
128
+ - 7ba91fa: Throw mastra errors methods not implemented yet
129
+ - 65ab763: Pre-filter on properties when running `MongoDBVector` queries
130
+ - Updated dependencies [f248d53]
131
+ - Updated dependencies [2affc57]
132
+ - Updated dependencies [66e13e3]
133
+ - Updated dependencies [edd9482]
134
+ - Updated dependencies [18344d7]
135
+ - Updated dependencies [9d372c2]
136
+ - Updated dependencies [40c2525]
137
+ - Updated dependencies [e473f27]
138
+ - Updated dependencies [032cb66]
139
+ - Updated dependencies [703ac71]
140
+ - Updated dependencies [a723d69]
141
+ - Updated dependencies [7827943]
142
+ - Updated dependencies [5889a31]
143
+ - Updated dependencies [bf1e7e7]
144
+ - Updated dependencies [65e3395]
145
+ - Updated dependencies [4933192]
146
+ - Updated dependencies [d1c77a4]
147
+ - Updated dependencies [bea9dd1]
148
+ - Updated dependencies [dcd4802]
149
+ - Updated dependencies [cbddd18]
150
+ - Updated dependencies [7ba91fa]
151
+ - @mastra/core@0.11.0
152
+
153
+ ## 0.12.1-alpha.0
154
+
155
+ ### Patch Changes
156
+
157
+ - 728b203: feat(mongodb): implement ConnectorHandler interface and MongoDBConnector
158
+ - 7ba91fa: Throw mastra errors methods not implemented yet
159
+ - 65ab763: Pre-filter on properties when running `MongoDBVector` queries
160
+ - Updated dependencies [f248d53]
161
+ - Updated dependencies [2affc57]
162
+ - Updated dependencies [66e13e3]
163
+ - Updated dependencies [edd9482]
164
+ - Updated dependencies [18344d7]
165
+ - Updated dependencies [9d372c2]
166
+ - Updated dependencies [40c2525]
167
+ - Updated dependencies [e473f27]
168
+ - Updated dependencies [032cb66]
169
+ - Updated dependencies [703ac71]
170
+ - Updated dependencies [a723d69]
171
+ - Updated dependencies [5889a31]
172
+ - Updated dependencies [65e3395]
173
+ - Updated dependencies [4933192]
174
+ - Updated dependencies [d1c77a4]
175
+ - Updated dependencies [bea9dd1]
176
+ - Updated dependencies [dcd4802]
177
+ - Updated dependencies [7ba91fa]
178
+ - @mastra/core@0.11.0-alpha.2
179
+
180
+ ## 0.12.0
181
+
182
+ ### Minor Changes
183
+
184
+ - 8a3bfd2: Update peerdeps to latest core
185
+
186
+ ### Patch Changes
187
+
188
+ - 8e6b8e5: dependencies updates:
189
+ - Updated dependency [`cloudflare@^4.4.1` ↗︎](https://www.npmjs.com/package/cloudflare/v/4.4.1) (from `^4.3.0`, in `dependencies`)
190
+ - a2eceb2: fix: mongo storage trace query
7
191
  - d8f2d19: Add updateMessages API to storage classes (only support for PG and LibSQL for now) and to memory class. Additionally allow for metadata to be saved in the content field of a message.
192
+ - 0fb9d64: [MASTRA-4018] Update saveMessages in storage adapters to upsert messages
8
193
  - 2097952: [MASTRA-4021] Fix PG getMessages and update messageLimit for all storage adapters
194
+ - 870f156: Parse eval result
195
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
196
+ - 0e17048: Throw mastra errors in storage packages
197
+ - Updated dependencies [15e9d26]
198
+ - Updated dependencies [d1baedb]
9
199
  - Updated dependencies [d8f2d19]
200
+ - Updated dependencies [4d21bf2]
201
+ - Updated dependencies [07d6d88]
10
202
  - Updated dependencies [9d52b17]
11
203
  - Updated dependencies [2097952]
204
+ - Updated dependencies [792c4c0]
205
+ - Updated dependencies [5d74aab]
206
+ - Updated dependencies [a8b194f]
207
+ - Updated dependencies [4fb0cc2]
208
+ - Updated dependencies [d2a7a31]
209
+ - Updated dependencies [502fe05]
210
+ - Updated dependencies [144eb0b]
12
211
  - Updated dependencies [8ba1b51]
13
- - @mastra/core@0.0.0-working-memory-per-user-20250620161509
212
+ - Updated dependencies [4efcfa0]
213
+ - Updated dependencies [0e17048]
214
+ - @mastra/core@0.10.7
215
+
216
+ ## 0.12.0-alpha.4
217
+
218
+ ### Patch Changes
219
+
220
+ - 8e6b8e5: dependencies updates:
221
+ - Updated dependency [`cloudflare@^4.4.1` ↗︎](https://www.npmjs.com/package/cloudflare/v/4.4.1) (from `^4.3.0`, in `dependencies`)
222
+
223
+ ## 0.12.0-alpha.3
224
+
225
+ ### Minor Changes
226
+
227
+ - 8a3bfd2: Update peerdeps to latest core
228
+
229
+ ### Patch Changes
230
+
231
+ - Updated dependencies [792c4c0]
232
+ - Updated dependencies [502fe05]
233
+ - Updated dependencies [4efcfa0]
234
+ - @mastra/core@0.10.7-alpha.3
235
+
236
+ ## 0.11.1-alpha.2
237
+
238
+ ### Patch Changes
239
+
240
+ - a2eceb2: fix: mongo storage trace query
241
+ - 0fb9d64: [MASTRA-4018] Update saveMessages in storage adapters to upsert messages
242
+ - 870f156: Parse eval result
243
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
244
+ - Updated dependencies [15e9d26]
245
+ - Updated dependencies [07d6d88]
246
+ - Updated dependencies [5d74aab]
247
+ - Updated dependencies [144eb0b]
248
+ - @mastra/core@0.10.7-alpha.2
249
+
250
+ ## 0.11.1-alpha.1
251
+
252
+ ### Patch Changes
253
+
254
+ - 2097952: [MASTRA-4021] Fix PG getMessages and update messageLimit for all storage adapters
255
+ - 0e17048: Throw mastra errors in storage packages
256
+ - Updated dependencies [d1baedb]
257
+ - Updated dependencies [4d21bf2]
258
+ - Updated dependencies [2097952]
259
+ - Updated dependencies [4fb0cc2]
260
+ - Updated dependencies [d2a7a31]
261
+ - Updated dependencies [0e17048]
262
+ - @mastra/core@0.10.7-alpha.1
14
263
 
15
264
  ## 0.11.1-alpha.0
16
265
 
package/LICENSE.md CHANGED
@@ -1,46 +1,15 @@
1
- # Elastic License 2.0 (ELv2)
1
+ # Apache License 2.0
2
2
 
3
- Copyright (c) 2025 Mastra AI, Inc.
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- **Acceptance**
6
- By using the software, you agree to all of the terms and conditions below.
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
7
8
 
8
- **Copyright License**
9
- 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
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
10
 
11
- **Limitations**
12
- 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.
13
-
14
- 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.
15
-
16
- 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.
17
-
18
- **Patents**
19
- 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.
20
-
21
- **Notices**
22
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
23
-
24
- If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
25
-
26
- **No Other Rights**
27
- These terms do not imply any licenses other than those expressly granted in these terms.
28
-
29
- **Termination**
30
- 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.
31
-
32
- **No Liability**
33
- 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.
34
-
35
- **Definitions**
36
- 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.
37
-
38
- _you_ refers to the individual or entity agreeing to these terms.
39
-
40
- _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.
41
-
42
- _your licenses_ are all the licenses granted to you for the software under these terms.
43
-
44
- _use_ means anything you do with the software requiring one of your licenses.
45
-
46
- _trademark_ means trademarks, service marks, and similar rights.
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.