@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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
package/dist/docs/SKILL.md
CHANGED
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 =
|
|
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
|
|
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
|
|
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
|
}
|