@mastra/upstash 0.14.0-alpha.1 → 0.14.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @mastra/upstash@0.14.0-alpha.1 build /home/runner/work/mastra/mastra/stores/upstash
2
+ > @mastra/upstash@0.14.1-alpha.0 build /home/runner/work/mastra/mastra/stores/upstash
3
3
  > tsup --silent --config tsup.config.ts
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 03997ae: Update peerdeps
8
+ - Updated dependencies [227c7e6]
9
+ - Updated dependencies [12cae67]
10
+ - Updated dependencies [fd3a3eb]
11
+ - Updated dependencies [6faaee5]
12
+ - Updated dependencies [4232b14]
13
+ - Updated dependencies [a89de7e]
14
+ - Updated dependencies [5a37d0c]
15
+ - Updated dependencies [4bde0cb]
16
+ - Updated dependencies [cf4f357]
17
+ - Updated dependencies [ad888a2]
18
+ - Updated dependencies [481751d]
19
+ - Updated dependencies [2454423]
20
+ - Updated dependencies [194e395]
21
+ - Updated dependencies [a722c0b]
22
+ - Updated dependencies [c30bca8]
23
+ - Updated dependencies [3b5fec7]
24
+ - Updated dependencies [a8f129d]
25
+ - @mastra/core@0.14.0
26
+
27
+ ## 0.14.1-alpha.0
28
+
29
+ ### Patch Changes
30
+
31
+ - 03997ae: Update peerdeps
32
+ - @mastra/core@0.14.0-alpha.7
33
+
34
+ ## 0.14.0
35
+
36
+ ### Minor Changes
37
+
38
+ - ea0c5f2: Add store support to new score api
39
+
40
+ ### Patch Changes
41
+
42
+ - e1a2ef1: dependencies updates:
43
+ - Updated dependency [`@upstash/redis@^1.35.3` ↗︎](https://www.npmjs.com/package/@upstash/redis/v/1.35.3) (from `^1.35.1`, in `dependencies`)
44
+ - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
45
+ - 50f80dd: Fix dynamic require of crypto in upstash store
46
+ - Updated dependencies [cb36de0]
47
+ - Updated dependencies [d0496e6]
48
+ - Updated dependencies [a82b851]
49
+ - Updated dependencies [ea0c5f2]
50
+ - Updated dependencies [41a0a0e]
51
+ - Updated dependencies [2871020]
52
+ - Updated dependencies [94f4812]
53
+ - Updated dependencies [e202b82]
54
+ - Updated dependencies [e00f6a0]
55
+ - Updated dependencies [4a406ec]
56
+ - Updated dependencies [b0e43c1]
57
+ - Updated dependencies [5d377e5]
58
+ - Updated dependencies [1fb812e]
59
+ - Updated dependencies [35c5798]
60
+ - @mastra/core@0.13.0
61
+
3
62
  ## 0.14.0-alpha.1
4
63
 
5
64
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -253,6 +253,8 @@ function processRecord(tableName, record) {
253
253
  });
254
254
  } else if (tableName === storage.TABLE_EVALS) {
255
255
  key = getKey(tableName, { id: record.run_id });
256
+ } else if (tableName === storage.TABLE_SCORERS) {
257
+ key = getKey(tableName, { runId: record.runId });
256
258
  } else {
257
259
  key = getKey(tableName, { id: record.id });
258
260
  }
@@ -1201,6 +1203,9 @@ var ScoresUpstash = class extends storage.ScoresStorage {
1201
1203
  }
1202
1204
  async getScoresByScorerId({
1203
1205
  scorerId,
1206
+ entityId,
1207
+ entityType,
1208
+ source,
1204
1209
  pagination = { page: 0, perPage: 20 }
1205
1210
  }) {
1206
1211
  const pattern = `${storage.TABLE_SCORERS}:*`;
@@ -1214,7 +1219,14 @@ var ScoresUpstash = class extends storage.ScoresStorage {
1214
1219
  const pipeline = this.client.pipeline();
1215
1220
  keys.forEach((key) => pipeline.get(key));
1216
1221
  const results = await pipeline.exec();
1217
- const filtered = results.map((row) => row).filter((row) => !!row && typeof row === "object" && row.scorerId === scorerId);
1222
+ const filtered = results.map((row) => row).filter((row) => {
1223
+ if (!row || typeof row !== "object") return false;
1224
+ if (row.scorerId !== scorerId) return false;
1225
+ if (entityId && row.entityId !== entityId) return false;
1226
+ if (entityType && row.entityType !== entityType) return false;
1227
+ if (source && row.source !== source) return false;
1228
+ return true;
1229
+ });
1218
1230
  const total = filtered.length;
1219
1231
  const { page, perPage } = pagination;
1220
1232
  const start = page * perPage;
@@ -1838,9 +1850,12 @@ var UpstashStore = class extends storage.MastraStorage {
1838
1850
  }
1839
1851
  async getScoresByScorerId({
1840
1852
  scorerId,
1841
- pagination
1853
+ pagination,
1854
+ entityId,
1855
+ entityType,
1856
+ source
1842
1857
  }) {
1843
- return this.stores.scores.getScoresByScorerId({ scorerId, pagination });
1858
+ return this.stores.scores.getScoresByScorerId({ scorerId, pagination, entityId, entityType, source });
1844
1859
  }
1845
1860
  };
1846
1861
  var UpstashFilterTranslator = class extends filter.BaseFilterTranslator {