slashvibe-mcp 0.5.1 → 0.5.2
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/auto-update.js +34 -6
- package/package.json +1 -1
- package/tools/update.js +9 -7
- package/version.json +5 -5
package/auto-update.js
CHANGED
|
@@ -6,10 +6,25 @@
|
|
|
6
6
|
const { exec } = require('child_process');
|
|
7
7
|
const { promisify } = require('util');
|
|
8
8
|
const fs = require('fs').promises;
|
|
9
|
+
const fsSync = require('fs');
|
|
9
10
|
const path = require('path');
|
|
10
11
|
|
|
11
12
|
const execAsync = promisify(exec);
|
|
12
13
|
|
|
14
|
+
/**
|
|
15
|
+
* How was this copy of /vibe installed?
|
|
16
|
+
* - 'git' → a dev checkout / git-based install (the repo has a .git dir one level up)
|
|
17
|
+
* - 'npm' → installed via `npx` or a global `npm i -g` (the common case; no .git)
|
|
18
|
+
* The published npm package ships only the mcp-server/ directory, so the absence of
|
|
19
|
+
* a .git at the package root reliably means an npx/global install.
|
|
20
|
+
*/
|
|
21
|
+
function detectInstallType() {
|
|
22
|
+
try {
|
|
23
|
+
if (fsSync.existsSync(path.join(__dirname, '..', '.git'))) return 'git';
|
|
24
|
+
} catch {}
|
|
25
|
+
return 'npm';
|
|
26
|
+
}
|
|
27
|
+
|
|
13
28
|
async function checkForUpdates() {
|
|
14
29
|
try {
|
|
15
30
|
// Read local version
|
|
@@ -112,11 +127,23 @@ function formatUpdateNotification(update) {
|
|
|
112
127
|
message += `\n`;
|
|
113
128
|
}
|
|
114
129
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
130
|
+
// Install-type-aware guidance. The npx/global path is the one that bites people:
|
|
131
|
+
// `npx slashvibe-mcp` silently prefers an existing GLOBAL install over fetching
|
|
132
|
+
// the latest, so a stale global keeps running old (sometimes broken) code. The fix
|
|
133
|
+
// is to remove the global so npx resolves fresh — NOT a git pull.
|
|
134
|
+
if (detectInstallType() === 'git') {
|
|
135
|
+
message += `Update now:\n`;
|
|
136
|
+
message += ` vibe update\n`;
|
|
137
|
+
message += `\n`;
|
|
138
|
+
message += `Or manually:\n`;
|
|
139
|
+
message += ` cd ~/.vibe/vibe-repo && git pull origin main\n`;
|
|
140
|
+
} else {
|
|
141
|
+
message += `You're on an npx/global install. To get the latest:\n\n`;
|
|
142
|
+
message += ` npm rm -g slashvibe-mcp # clear any stale global that shadows npx\n`;
|
|
143
|
+
message += ` # then restart Claude Code (npx will fetch the latest automatically)\n\n`;
|
|
144
|
+
message += `Heads up: \`npx slashvibe-mcp\` reuses an existing global if present,\n`;
|
|
145
|
+
message += `so removing the global is what actually pulls the new version.\n`;
|
|
146
|
+
}
|
|
120
147
|
message += `${'='.repeat(60)}\n`;
|
|
121
148
|
|
|
122
149
|
return message;
|
|
@@ -126,5 +153,6 @@ module.exports = {
|
|
|
126
153
|
checkForUpdates,
|
|
127
154
|
performUpdate,
|
|
128
155
|
compareVersions,
|
|
129
|
-
formatUpdateNotification
|
|
156
|
+
formatUpdateNotification,
|
|
157
|
+
detectInstallType
|
|
130
158
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slashvibe-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"mcpName": "io.github.vibecodinginc/vibe",
|
|
5
5
|
"description": "Social layer for Claude Code - DMs, presence, Matrix multiplayer rooms, and connection between AI-assisted developers",
|
|
6
6
|
"main": "index.js",
|
package/tools/update.js
CHANGED
|
@@ -44,14 +44,16 @@ async function handler(args) {
|
|
|
44
44
|
const isGitInstall = fs.existsSync(gitDir);
|
|
45
45
|
|
|
46
46
|
if (!isGitInstall) {
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
display += `
|
|
50
|
-
display += `To
|
|
47
|
+
// npx / global install (the common case). npx prefers a stale global over
|
|
48
|
+
// fetching latest, so removing the global is what actually pulls the update.
|
|
49
|
+
display += `You're on an **npx/global install**.\n\n`;
|
|
50
|
+
display += `To get the latest:\n`;
|
|
51
51
|
display += `\`\`\`\n`;
|
|
52
|
-
display += `
|
|
53
|
-
display += `\`\`\`\n
|
|
54
|
-
display += `
|
|
52
|
+
display += `npm rm -g slashvibe-mcp\n`;
|
|
53
|
+
display += `\`\`\`\n`;
|
|
54
|
+
display += `Then **restart Claude Code** — npx will fetch the latest automatically.\n\n`;
|
|
55
|
+
display += `> Heads up: \`npx slashvibe-mcp\` reuses an existing global if one is\n`;
|
|
56
|
+
display += `> installed, so clearing the global is what pulls the new version.\n\n`;
|
|
55
57
|
display += `---\n`;
|
|
56
58
|
display += `⚠️ **After updating: restart Claude Code**`;
|
|
57
59
|
return { display };
|
package/version.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.5.
|
|
2
|
+
"version": "0.5.2",
|
|
3
3
|
"updated": "2026-06-27",
|
|
4
|
-
"changelog": "
|
|
4
|
+
"changelog": "Boot-time version guard with install-aware update guidance. If you're stuck on an old version: npx prefers a stale GLOBAL install over fetching latest — run `npm rm -g slashvibe-mcp`, then restart Claude Code.",
|
|
5
5
|
"features": [
|
|
6
|
+
"Update notice now detects npx/global vs git installs and prints the correct fix",
|
|
7
|
+
"npx/global users told to `npm rm -g slashvibe-mcp` + restart (the real footgun fix)",
|
|
6
8
|
"First-contact DM 401 distinguishes never-signed-in from expired session",
|
|
7
9
|
"Matrix multiplayer rooms",
|
|
8
10
|
"Matrix tools promoted: vibe_matrix_rooms, vibe_matrix_read, vibe_matrix_send",
|
|
9
|
-
"
|
|
10
|
-
"PostToolUse hook polls Matrix bot for ambient message injection",
|
|
11
|
-
"Multi-agent collaboration: Claude + Codex + any model in shared rooms"
|
|
11
|
+
"PostToolUse hook polls Matrix bot for ambient message injection"
|
|
12
12
|
],
|
|
13
13
|
"deprecated": [
|
|
14
14
|
"vibe_pair — use Matrix room invites",
|