vplex-memory 2.3.2 → 2.4.0
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/README.md +5 -5
- package/package.json +1 -1
- package/vplex-mcp-server.mjs +51 -3
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Works with Claude Code, Cursor, VS Code Copilot, Windsurf, Codex, and any MCP-co
|
|
|
11
11
|
"mcpServers": {
|
|
12
12
|
"vplex-memory": {
|
|
13
13
|
"command": "npx",
|
|
14
|
-
"args": ["-y", "vplex-memory@2.3.
|
|
14
|
+
"args": ["-y", "vplex-memory@2.3.3"]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -30,7 +30,7 @@ Add to `.mcp.json` in your project root or `~/.claude/settings.json` globally:
|
|
|
30
30
|
"mcpServers": {
|
|
31
31
|
"vplex-memory": {
|
|
32
32
|
"command": "npx",
|
|
33
|
-
"args": ["-y", "vplex-memory@2.3.
|
|
33
|
+
"args": ["-y", "vplex-memory@2.3.3"]
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -46,7 +46,7 @@ Add to `.cursor/mcp.json`:
|
|
|
46
46
|
"vplex-memory": {
|
|
47
47
|
"type": "stdio",
|
|
48
48
|
"command": "npx",
|
|
49
|
-
"args": ["-y", "vplex-memory@2.3.
|
|
49
|
+
"args": ["-y", "vplex-memory@2.3.3"]
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -62,7 +62,7 @@ Add to `.vscode/mcp.json`:
|
|
|
62
62
|
"vplex-memory": {
|
|
63
63
|
"type": "stdio",
|
|
64
64
|
"command": "npx",
|
|
65
|
-
"args": ["-y", "vplex-memory@2.3.
|
|
65
|
+
"args": ["-y", "vplex-memory@2.3.3"]
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -78,7 +78,7 @@ Add to `~/.windsurf/mcp.json`:
|
|
|
78
78
|
"vplex-memory": {
|
|
79
79
|
"type": "stdio",
|
|
80
80
|
"command": "npx",
|
|
81
|
-
"args": ["-y", "vplex-memory@2.3.
|
|
81
|
+
"args": ["-y", "vplex-memory@2.3.3"]
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
package/package.json
CHANGED
package/vplex-mcp-server.mjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* v2.1 — Security hardened
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { readFileSync, writeFileSync, statSync, mkdirSync, realpathSync } from "fs";
|
|
20
|
+
import { readFileSync, writeFileSync, statSync, mkdirSync, realpathSync, unlinkSync } from "fs";
|
|
21
21
|
import { homedir, platform } from "os";
|
|
22
22
|
import { join, resolve, relative } from "path";
|
|
23
23
|
import { createInterface } from "readline";
|
|
@@ -652,6 +652,16 @@ const TOOLS = [
|
|
|
652
652
|
required: ["file_path"],
|
|
653
653
|
},
|
|
654
654
|
},
|
|
655
|
+
{
|
|
656
|
+
name: "memory_auth_status",
|
|
657
|
+
description: "Check authentication status: whether logged in, token expiry, and user info.",
|
|
658
|
+
inputSchema: { type: "object", properties: {} },
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
name: "memory_logout",
|
|
662
|
+
description: "Log out by deleting the cached session. Next tool call will require re-authentication.",
|
|
663
|
+
inputSchema: { type: "object", properties: {} },
|
|
664
|
+
},
|
|
655
665
|
];
|
|
656
666
|
|
|
657
667
|
// ── Plan Verification (cached) ──────────────────────────────────────
|
|
@@ -747,7 +757,7 @@ async function handleToolCall(name, args) {
|
|
|
747
757
|
const memory_type = args.memory_type ? validateMemoryType(args.memory_type) : undefined;
|
|
748
758
|
const file_path = args.file_path ? validateString(args.file_path, "file_path", MAX_FILE_PATH_LENGTH) : undefined;
|
|
749
759
|
|
|
750
|
-
const
|
|
760
|
+
const raw = await apiFetch("/memory/search", {
|
|
751
761
|
method: "POST",
|
|
752
762
|
body: JSON.stringify({
|
|
753
763
|
query, limit, projectHash,
|
|
@@ -756,6 +766,7 @@ async function handleToolCall(name, args) {
|
|
|
756
766
|
searchMode: args.search_mode === "keyword" ? "keyword" : args.search_mode === "fulltext" ? "fulltext" : "hybrid",
|
|
757
767
|
}),
|
|
758
768
|
});
|
|
769
|
+
const memories = Array.isArray(raw) ? raw : (raw.memories || raw.results || raw.data || []);
|
|
759
770
|
|
|
760
771
|
if (memories.length === 0) {
|
|
761
772
|
return { content: [{ type: "text", text: `No memories found for: "${query}"` }] };
|
|
@@ -773,7 +784,8 @@ async function handleToolCall(name, args) {
|
|
|
773
784
|
}
|
|
774
785
|
|
|
775
786
|
case "memory_list": {
|
|
776
|
-
const
|
|
787
|
+
const raw = await apiFetch(`/memory/project/${projectHash}`);
|
|
788
|
+
const memories = Array.isArray(raw) ? raw : (raw.memories || raw.data || []);
|
|
777
789
|
if (memories.length === 0) {
|
|
778
790
|
return { content: [{ type: "text", text: "No memories for this project." }] };
|
|
779
791
|
}
|
|
@@ -1110,6 +1122,42 @@ async function handleToolCall(name, args) {
|
|
|
1110
1122
|
};
|
|
1111
1123
|
}
|
|
1112
1124
|
|
|
1125
|
+
case "memory_auth_status": {
|
|
1126
|
+
const session = readSession();
|
|
1127
|
+
if (!session?.token) {
|
|
1128
|
+
return { content: [{ type: "text", text: "Not authenticated. Call any memory tool to start the login flow." }] };
|
|
1129
|
+
}
|
|
1130
|
+
const exp = getTokenExpiry(session.token);
|
|
1131
|
+
const now = Math.floor(Date.now() / 1000);
|
|
1132
|
+
const remaining = exp > 0 ? exp - now : 0;
|
|
1133
|
+
const expiresIn = remaining > 0
|
|
1134
|
+
? `${Math.floor(remaining / 3600)}h ${Math.floor((remaining % 3600) / 60)}m`
|
|
1135
|
+
: "expired";
|
|
1136
|
+
const user = session.user?.email || session.user?.name || "unknown";
|
|
1137
|
+
const hasRefresh = !!session.refresh_token;
|
|
1138
|
+
return {
|
|
1139
|
+
content: [{
|
|
1140
|
+
type: "text",
|
|
1141
|
+
text: `Authenticated as: ${user}\nToken expires in: ${expiresIn}${hasRefresh ? " (auto-refresh enabled)" : ""}\nSession file: ${getSessionPath()}`,
|
|
1142
|
+
}],
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
case "memory_logout": {
|
|
1147
|
+
const sessionPath = getSessionPath();
|
|
1148
|
+
try {
|
|
1149
|
+
unlinkSync(sessionPath);
|
|
1150
|
+
cachedToken = null;
|
|
1151
|
+
tokenReadAt = 0;
|
|
1152
|
+
return { content: [{ type: "text", text: `Logged out. Session deleted: ${sessionPath}\nNext memory tool call will require re-authentication.` }] };
|
|
1153
|
+
} catch (e) {
|
|
1154
|
+
if (e.code === "ENOENT") {
|
|
1155
|
+
return { content: [{ type: "text", text: "Already logged out (no session file found)." }] };
|
|
1156
|
+
}
|
|
1157
|
+
return { content: [{ type: "text", text: `Logout failed: ${e.message}` }], isError: true };
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1113
1161
|
default:
|
|
1114
1162
|
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
|
|
1115
1163
|
}
|