@mastra/redis 1.4.11-alpha.0 → 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/index.js
CHANGED
|
@@ -138,7 +138,7 @@ var RedisDB = class {
|
|
|
138
138
|
* generation comes from the clock, so it still outranks every fence the expired
|
|
139
139
|
* record issued, and a write checked against a missing record is rejected.
|
|
140
140
|
*/
|
|
141
|
-
const RUN_CLAIM_RETENTION_MS =
|
|
141
|
+
const RUN_CLAIM_RETENTION_MS = 6048e5;
|
|
142
142
|
function runClaimKey(claims, runId) {
|
|
143
143
|
return `${claims}:run_id:${runId}`;
|
|
144
144
|
}
|
|
@@ -1361,12 +1361,13 @@ var ScoresRedis = class extends ScoresStorage {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
const now = /* @__PURE__ */ new Date();
|
|
1363
1363
|
const id = crypto.randomUUID();
|
|
1364
|
-
const
|
|
1364
|
+
const scoreWithId = {
|
|
1365
1365
|
...validatedScore,
|
|
1366
1366
|
id,
|
|
1367
1367
|
createdAt: now,
|
|
1368
1368
|
updatedAt: now
|
|
1369
|
-
}
|
|
1369
|
+
};
|
|
1370
|
+
const { key, processedRecord } = processRecord(TABLE_SCORERS, scoreWithId);
|
|
1370
1371
|
try {
|
|
1371
1372
|
await this.client.set(key, JSON.stringify(processedRecord));
|
|
1372
1373
|
return { score: {
|
|
@@ -1914,12 +1915,13 @@ var RedisStore = class extends MastraStorage {
|
|
|
1914
1915
|
};
|
|
1915
1916
|
}
|
|
1916
1917
|
if (!config.host?.trim()) throw new Error("RedisStore: host is required and cannot be empty.");
|
|
1918
|
+
const url = this.createClientUrl({
|
|
1919
|
+
...config,
|
|
1920
|
+
db: config.db ?? 0,
|
|
1921
|
+
port: config.port ?? 6379
|
|
1922
|
+
});
|
|
1917
1923
|
return {
|
|
1918
|
-
client: createClient({ url
|
|
1919
|
-
...config,
|
|
1920
|
-
db: config.db ?? 0,
|
|
1921
|
-
port: config.port ?? 6379
|
|
1922
|
-
}) }),
|
|
1924
|
+
client: createClient({ url }),
|
|
1923
1925
|
shouldManageConnection: true
|
|
1924
1926
|
};
|
|
1925
1927
|
}
|