mcp-agents-memory 0.9.25 → 0.9.26
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/build/index.js +13 -9
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -56551,15 +56551,19 @@ async function runDtagPromotion(opts = {}) {
|
|
|
56551
56551
|
const summary = { suggested: [], refreshed: 0, blocked: 0, deferred: 0, superseded: 0, retrotagged: 0 };
|
|
56552
56552
|
if (!dryRun) summary.superseded = await supersedeExisting(userId);
|
|
56553
56553
|
const freqResult = await db.query(
|
|
56554
|
-
`SELECT
|
|
56555
|
-
FROM
|
|
56556
|
-
|
|
56557
|
-
|
|
56558
|
-
|
|
56559
|
-
|
|
56560
|
-
|
|
56561
|
-
|
|
56562
|
-
|
|
56554
|
+
`SELECT f.tag, f.cnt
|
|
56555
|
+
FROM (SELECT unnest(d_tag) AS tag, COUNT(*)::int AS cnt
|
|
56556
|
+
FROM memory
|
|
56557
|
+
WHERE user_id = $1
|
|
56558
|
+
AND tag_processed = TRUE
|
|
56559
|
+
AND is_active = TRUE
|
|
56560
|
+
AND created_at >= NOW() - ($2 || ' days')::INTERVAL
|
|
56561
|
+
GROUP BY tag
|
|
56562
|
+
HAVING COUNT(*) >= 2) f
|
|
56563
|
+
WHERE NOT EXISTS (
|
|
56564
|
+
SELECT 1 FROM project_tag_new_suggestions s
|
|
56565
|
+
WHERE s.user_id = $1 AND s.status = 'rejected' AND s.name = lower(btrim(f.tag)))
|
|
56566
|
+
ORDER BY f.cnt DESC
|
|
56563
56567
|
LIMIT 50`,
|
|
56564
56568
|
[userId, String(windowDays)]
|
|
56565
56569
|
);
|