vplex-memory 2.3.3 → 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 +47 -1
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) ──────────────────────────────────────
|
|
@@ -1112,6 +1122,42 @@ async function handleToolCall(name, args) {
|
|
|
1112
1122
|
};
|
|
1113
1123
|
}
|
|
1114
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
|
+
|
|
1115
1161
|
default:
|
|
1116
1162
|
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
|
|
1117
1163
|
}
|