@mastra/redis 1.4.10 → 1.4.11

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.
@@ -3,7 +3,7 @@ name: mastra-redis
3
3
  description: Documentation for @mastra/redis. Use when working with @mastra/redis APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/redis"
6
- version: "1.4.10"
6
+ version: "1.4.11"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.10",
2
+ "version": "1.4.11",
3
3
  "package": "@mastra/redis",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -139,7 +139,7 @@ var RedisDB = class {
139
139
  * generation comes from the clock, so it still outranks every fence the expired
140
140
  * record issued, and a write checked against a missing record is rejected.
141
141
  */
142
- const RUN_CLAIM_RETENTION_MS = 10080 * 60 * 1e3;
142
+ const RUN_CLAIM_RETENTION_MS = 6048e5;
143
143
  function runClaimKey(claims, runId) {
144
144
  return `${claims}:run_id:${runId}`;
145
145
  }
@@ -1362,12 +1362,13 @@ var ScoresRedis = class extends _mastra_core_storage.ScoresStorage {
1362
1362
  }
1363
1363
  const now = /* @__PURE__ */ new Date();
1364
1364
  const id = crypto.randomUUID();
1365
- const { key, processedRecord } = processRecord(_mastra_core_storage.TABLE_SCORERS, {
1365
+ const scoreWithId = {
1366
1366
  ...validatedScore,
1367
1367
  id,
1368
1368
  createdAt: now,
1369
1369
  updatedAt: now
1370
- });
1370
+ };
1371
+ const { key, processedRecord } = processRecord(_mastra_core_storage.TABLE_SCORERS, scoreWithId);
1371
1372
  try {
1372
1373
  await this.client.set(key, JSON.stringify(processedRecord));
1373
1374
  return { score: {
@@ -1915,12 +1916,13 @@ var RedisStore = class extends _mastra_core_storage.MastraStorage {
1915
1916
  };
1916
1917
  }
1917
1918
  if (!config.host?.trim()) throw new Error("RedisStore: host is required and cannot be empty.");
1919
+ const url = this.createClientUrl({
1920
+ ...config,
1921
+ db: config.db ?? 0,
1922
+ port: config.port ?? 6379
1923
+ });
1918
1924
  return {
1919
- client: (0, redis.createClient)({ url: this.createClientUrl({
1920
- ...config,
1921
- db: config.db ?? 0,
1922
- port: config.port ?? 6379
1923
- }) }),
1925
+ client: (0, redis.createClient)({ url }),
1924
1926
  shouldManageConnection: true
1925
1927
  };
1926
1928
  }