@vespermcp/mcp-server 1.2.25 → 1.2.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/web/fusion-engine.js +32 -1
- package/package.json +1 -1
|
@@ -48,14 +48,45 @@ function titleTokens(doc) {
|
|
|
48
48
|
const raw = typeof mj.title === "string" ? mj.title : "";
|
|
49
49
|
return tokenize(raw);
|
|
50
50
|
}
|
|
51
|
+
function semanticHintTokens(doc) {
|
|
52
|
+
const mj = doc.metadata_json || {};
|
|
53
|
+
const fields = [];
|
|
54
|
+
if (typeof mj.title === "string")
|
|
55
|
+
fields.push(mj.title);
|
|
56
|
+
if (typeof mj.name === "string")
|
|
57
|
+
fields.push(mj.name);
|
|
58
|
+
if (typeof mj.description === "string")
|
|
59
|
+
fields.push(mj.description);
|
|
60
|
+
if (typeof mj.abstract === "string")
|
|
61
|
+
fields.push(mj.abstract);
|
|
62
|
+
if (Array.isArray(mj.tags))
|
|
63
|
+
fields.push(mj.tags.join(" "));
|
|
64
|
+
if (Array.isArray(mj.topics))
|
|
65
|
+
fields.push(mj.topics.join(" "));
|
|
66
|
+
fields.push(doc.source_url || "");
|
|
67
|
+
return tokenize(fields.join(" "));
|
|
68
|
+
}
|
|
51
69
|
function isSuspiciousPair(a, b) {
|
|
52
70
|
// semantic fallback should be selective; do cheap prefilter first
|
|
71
|
+
// Metadata/topic overlap can indicate same object even with very different body lengths.
|
|
72
|
+
const aHints = semanticHintTokens(a);
|
|
73
|
+
const bHints = semanticHintTokens(b);
|
|
74
|
+
if (aHints.size > 0 && bHints.size > 0) {
|
|
75
|
+
let hInter = 0;
|
|
76
|
+
for (const t of aHints)
|
|
77
|
+
if (bHints.has(t))
|
|
78
|
+
hInter++;
|
|
79
|
+
const hUnion = aHints.size + bHints.size - hInter;
|
|
80
|
+
const hJaccard = hUnion > 0 ? hInter / hUnion : 0;
|
|
81
|
+
if (hJaccard >= 0.2)
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
53
84
|
const aLen = a.content.length;
|
|
54
85
|
const bLen = b.content.length;
|
|
55
86
|
const maxLen = Math.max(aLen, bLen, 1);
|
|
56
87
|
const lenRatio = Math.abs(aLen - bLen) / maxLen;
|
|
57
88
|
// Loosened again to allow abstract-vs-summary style comparisons.
|
|
58
|
-
if (lenRatio > 0.
|
|
89
|
+
if (lenRatio > 0.9)
|
|
59
90
|
return false;
|
|
60
91
|
// Fast path: same normalized title-like prefix often indicates same research object.
|
|
61
92
|
const aPrefix = a.content.slice(0, 140).toLowerCase().replace(/[^a-z0-9\s]/g, " ").trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vespermcp/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"description": "AI-powered dataset discovery, quality analysis, and preparation MCP server with multimodal support (text, image, audio, video)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|