slashvibe-mcp 0.5.3 → 0.5.4
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/package.json +1 -1
- package/tools/init.js +37 -14
- package/version.json +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slashvibe-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
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/init.js
CHANGED
|
@@ -22,24 +22,43 @@ const CALLBACK_PORT = 9876;
|
|
|
22
22
|
const API_BASE = 'https://www.slashvibe.dev';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Fetch
|
|
25
|
+
* Fetch presence from the API, split into humans vs agents.
|
|
26
|
+
* The green dot should mean something — so we count real builders
|
|
27
|
+
* separately from agents and let callers frame each honestly.
|
|
26
28
|
*/
|
|
27
|
-
async function
|
|
29
|
+
async function getPresenceCounts() {
|
|
28
30
|
try {
|
|
29
31
|
const response = await fetch(`${API_BASE}/api/presence`);
|
|
30
|
-
if (!response.ok) return 0;
|
|
32
|
+
if (!response.ok) return { online: 0, humans: 0, agents: 0 };
|
|
31
33
|
const data = await response.json();
|
|
32
|
-
|
|
34
|
+
const everyone = [...(data.active || []), ...(data.away || [])];
|
|
35
|
+
const humans = everyone.filter(u => !u.isAgent).length;
|
|
36
|
+
const agents = everyone.filter(u => u.isAgent).length;
|
|
37
|
+
return { online: everyone.length, humans, agents };
|
|
33
38
|
} catch (e) {
|
|
34
|
-
return 0;
|
|
39
|
+
return { online: 0, humans: 0, agents: 0 };
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Short presence label that distinguishes humans from agents, e.g.
|
|
45
|
+
* "2 builders · 7 agents", "3 builders online", "8 agents online".
|
|
46
|
+
* Returns null when nobody is around (callers pick their own empty copy).
|
|
47
|
+
*/
|
|
48
|
+
function formatPresenceLabel({ humans = 0, agents = 0 } = {}) {
|
|
49
|
+
const plural = (n, w) => `${n} ${w}${n === 1 ? '' : 's'}`;
|
|
50
|
+
if (humans > 0 && agents > 0) return `${plural(humans, 'builder')} · ${plural(agents, 'agent')}`;
|
|
51
|
+
if (humans > 0) return `${plural(humans, 'builder')} online`;
|
|
52
|
+
if (agents > 0) return `${plural(agents, 'agent')} online`;
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
38
56
|
/**
|
|
39
57
|
* Generate welcome banner for new users (pre-auth, no handle yet)
|
|
40
58
|
*/
|
|
41
|
-
function generatePreAuthBanner(
|
|
42
|
-
const
|
|
59
|
+
function generatePreAuthBanner(presence) {
|
|
60
|
+
const label = formatPresenceLabel(presence);
|
|
61
|
+
const onlineText = label ? `🟢 ${label}` : '🟢 join the crew';
|
|
43
62
|
return `
|
|
44
63
|
█░█ █ █▄▄ █▀▀ 🚀 ship together
|
|
45
64
|
▀▄▀ █ █▄█ ██▄ ${onlineText}
|
|
@@ -50,14 +69,15 @@ function generatePreAuthBanner(onlineCount) {
|
|
|
50
69
|
/**
|
|
51
70
|
* Generate welcome banner for authenticated users (with handle + unread)
|
|
52
71
|
*/
|
|
53
|
-
function generateAuthBanner(handle, unreadCount,
|
|
72
|
+
function generateAuthBanner(handle, unreadCount, presence) {
|
|
54
73
|
// Format: logo | handle + unread | tagline + online
|
|
55
74
|
// Keep alignment consistent with original banner
|
|
56
75
|
const handleCol = `@${handle}`.padEnd(16);
|
|
57
76
|
const unreadCol = unreadCount > 0 ? `📬 ${unreadCount} unread`.padEnd(14) : `📬 0 messages`.padEnd(14);
|
|
77
|
+
const onlineText = formatPresenceLabel(presence) || 'just you so far';
|
|
58
78
|
|
|
59
79
|
return ` █░█ █ █▄▄ █▀▀ ${handleCol} 🚀 ship together
|
|
60
|
-
▀▄▀ █ █▄█ ██▄ ${unreadCol} 🟢 ${
|
|
80
|
+
▀▄▀ █ █▄█ ██▄ ${unreadCol} 🟢 ${onlineText}
|
|
61
81
|
──────────────────────────────────────────────────`;
|
|
62
82
|
}
|
|
63
83
|
|
|
@@ -609,8 +629,8 @@ To check messages: \`vibe inbox\``
|
|
|
609
629
|
// ===========================================
|
|
610
630
|
// Show welcome banner (pre-auth)
|
|
611
631
|
// ===========================================
|
|
612
|
-
const
|
|
613
|
-
const welcomeBanner = generatePreAuthBanner(
|
|
632
|
+
const presence = await getPresenceCounts();
|
|
633
|
+
const welcomeBanner = generatePreAuthBanner(presence);
|
|
614
634
|
|
|
615
635
|
// ===========================================
|
|
616
636
|
// BROWSER AUTH (Default): GitHub OAuth
|
|
@@ -664,7 +684,7 @@ To check messages: \`vibe inbox\``
|
|
|
664
684
|
} catch (e) {}
|
|
665
685
|
|
|
666
686
|
// Generate authenticated banner with handle + unread (3 lines only - won't collapse)
|
|
667
|
-
const authBanner = generateAuthBanner(result.handle, unreadCount,
|
|
687
|
+
const authBanner = generateAuthBanner(result.handle, unreadCount, presence);
|
|
668
688
|
|
|
669
689
|
// Build friends section if we have data
|
|
670
690
|
let friendsSection = '';
|
|
@@ -687,8 +707,11 @@ To check messages: \`vibe inbox\``
|
|
|
687
707
|
// landing in someone else's terminal. Only commands that exist (who /
|
|
688
708
|
// @handle / ship). Avoid pointing the reply at a specific founder handle
|
|
689
709
|
// here — it can misroute; reading the inbox is the safe path to reply.
|
|
690
|
-
|
|
691
|
-
|
|
710
|
+
// Only promise a crowd of *humans* when there's actually one to meet —
|
|
711
|
+
// presence skews agent-heavy, and overselling an empty room is how the
|
|
712
|
+
// green dot stops meaning anything. Agents still show in `vibe who`.
|
|
713
|
+
const whoNudge = presence.humans > 1
|
|
714
|
+
? `**"vibe who"** — see the ${presence.humans} builders online right now`
|
|
692
715
|
: `**"vibe who"** — see who's building right now`;
|
|
693
716
|
const nextSteps = `\n\n---\n**Your first 60 seconds**\n`
|
|
694
717
|
+ `1. ${whoNudge}\n`
|
package/version.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.5.
|
|
2
|
+
"version": "0.5.4",
|
|
3
3
|
"updated": "2026-06-29",
|
|
4
|
-
"changelog": "
|
|
4
|
+
"changelog": "Presence now tells the truth: builders and agents are counted separately, so the green dot means something. Onboarding only promises a room full of people when real humans are actually online.",
|
|
5
5
|
"features": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"Presence banner shows the human/agent split (e.g. '2 builders · 7 agents') instead of one blended count",
|
|
7
|
+
"First-60s 'vibe who' nudge promises a crowd only when 2+ humans are online; agents still appear in vibe who",
|
|
8
|
+
"Honest empty-room copy when you're the first one in"
|
|
9
9
|
],
|
|
10
10
|
"deprecated": [
|
|
11
11
|
"vibe_pair — use Matrix room invites",
|