slashvibe-mcp 0.4.8 → 0.4.10
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/LICENSE +21 -0
- package/README.md +80 -55
- package/analytics.js +25 -1
- package/auto-update.js +10 -15
- package/config.js +44 -70
- package/crypto.js +1 -6
- package/debug.js +12 -0
- package/index.js +122 -324
- package/intelligence/index.js +1 -23
- package/intelligence/infer.js +10 -16
- package/intelligence/serendipity.js +57 -20
- package/notification-emitter.js +2 -2
- package/notify.js +39 -76
- package/package.json +55 -30
- package/presence.js +39 -50
- package/prompts.js +5 -9
- package/scripts/install-editors.js +258 -0
- package/scripts/sync-version.js +39 -0
- package/store/api.js +401 -528
- package/store/index.js +0 -0
- package/store/local.js +9 -10
- package/store/sessions.js +280 -0
- package/store/sqlite.js +360 -0
- package/tools/_actions.js +13 -749
- package/tools/_shared/index.js +41 -64
- package/tools/discover.js +47 -643
- package/tools/dm.js +11 -185
- package/tools/help.js +23 -253
- package/tools/inbox.js +10 -384
- package/tools/init.js +60 -435
- package/tools/ship.js +12 -87
- package/tools/start.js +50 -429
- package/tools/status.js +6 -93
- package/tools/who.js +71 -270
- package/version.json +4 -9
- package/auth-store.js +0 -158
- package/bridges/bridge-monitor.js +0 -388
- package/bridges/discord-bot.js +0 -431
- package/bridges/farcaster.js +0 -299
- package/bridges/telegram.js +0 -261
- package/bridges/webhook-health.js +0 -420
- package/bridges/webhook-server.js +0 -437
- package/bridges/whatsapp.js +0 -441
- package/bridges/x-webhook.js +0 -423
- package/cli.js +0 -38
- package/discord.js +0 -170
- package/games/arcade.js +0 -406
- package/games/chess.js +0 -451
- package/games/colorguess.js +0 -343
- package/games/crossword-words.js +0 -171
- package/games/crossword.js +0 -461
- package/games/drawing.js +0 -347
- package/games/gameroulette.js +0 -300
- package/games/gamerouter.js +0 -336
- package/games/gamestatus.js +0 -337
- package/games/guessnumber.js +0 -209
- package/games/hangman.js +0 -279
- package/games/memory.js +0 -338
- package/games/multiplayer-tictactoe.js +0 -389
- package/games/pixelart.js +0 -399
- package/games/quickduel.js +0 -354
- package/games/riddle.js +0 -371
- package/games/rockpaperscissors.js +0 -291
- package/games/snake.js +0 -406
- package/games/storybuilder.js +0 -343
- package/games/tictactoe.js +0 -345
- package/games/twentyquestions.js +0 -286
- package/games/twotruths.js +0 -207
- package/games/werewolf.js +0 -508
- package/games/wordassociation.js +0 -247
- package/games/wordchain.js +0 -135
- package/intelligence/interests.js +0 -369
- package/intelligence/patterns.js +0 -651
- package/intelligence/proactive.js +0 -358
- package/memory.js +0 -166
- package/protocol/index.js +0 -500
- package/protocol/telegram-commands.js +0 -199
- package/setup.js +0 -474
- package/smart-inbox.js +0 -276
- package/store/profiles.js +0 -435
- package/store/reservations.js +0 -321
- package/store/skills.js +0 -378
- package/tools/_connection-queue.js +0 -257
- package/tools/_deprecated/auto-suggest-connections.js +0 -304
- package/tools/_deprecated/away.js +0 -68
- package/tools/_deprecated/back.js +0 -51
- package/tools/_deprecated/bootstrap-skills.js +0 -231
- package/tools/_deprecated/bridge-dashboard.js +0 -342
- package/tools/_deprecated/bridge-health.js +0 -400
- package/tools/_deprecated/bridge-live.js +0 -384
- package/tools/_deprecated/bridges.js +0 -383
- package/tools/_deprecated/colorguess.js +0 -281
- package/tools/_deprecated/discover-insights.js +0 -379
- package/tools/_deprecated/discover-momentum.js +0 -256
- package/tools/_deprecated/discovery-analytics.js +0 -345
- package/tools/_deprecated/discovery-auto-suggest.js +0 -275
- package/tools/_deprecated/discovery-bootstrap.js +0 -267
- package/tools/_deprecated/discovery-daily.js +0 -375
- package/tools/_deprecated/discovery-dashboard.js +0 -385
- package/tools/_deprecated/discovery-digest.js +0 -314
- package/tools/_deprecated/discovery-hub.js +0 -357
- package/tools/_deprecated/discovery-insights.js +0 -384
- package/tools/_deprecated/discovery-momentum.js +0 -281
- package/tools/_deprecated/discovery-monitor.js +0 -319
- package/tools/_deprecated/discovery-proactive.js +0 -300
- package/tools/_deprecated/draw.js +0 -317
- package/tools/_deprecated/farcaster.js +0 -307
- package/tools/_deprecated/forget.js +0 -119
- package/tools/_deprecated/games-catalog.js +0 -376
- package/tools/_deprecated/games.js +0 -313
- package/tools/_deprecated/guessnumber.js +0 -194
- package/tools/_deprecated/hangman.js +0 -129
- package/tools/_deprecated/multiplayer-tictactoe.js +0 -303
- package/tools/_deprecated/mute.js +0 -97
- package/tools/_deprecated/recall.js +0 -147
- package/tools/_deprecated/remember.js +0 -86
- package/tools/_deprecated/riddle.js +0 -240
- package/tools/_deprecated/run-bootstrap.js +0 -69
- package/tools/_deprecated/skills-analytics.js +0 -349
- package/tools/_deprecated/skills-bootstrap.js +0 -301
- package/tools/_deprecated/skills-dashboard.js +0 -268
- package/tools/_deprecated/skills-exchange.js +0 -342
- package/tools/_deprecated/skills.js +0 -380
- package/tools/_deprecated/smart-intro.js +0 -353
- package/tools/_deprecated/storybuilder.js +0 -331
- package/tools/_deprecated/telegram-bot.js +0 -183
- package/tools/_deprecated/telegram-setup.js +0 -214
- package/tools/_deprecated/tictactoe.js +0 -155
- package/tools/_deprecated/twentyquestions.js +0 -143
- package/tools/_deprecated/wordassociation.js +0 -247
- package/tools/_discovery-enhanced.js +0 -290
- package/tools/_discovery.js +0 -439
- package/tools/_proactive-discovery.js +0 -301
- package/tools/_shared.js +0 -234
- package/tools/_work-context.js +0 -338
- package/tools/_work-context.manual-test.js +0 -199
- package/tools/_work-context.test.js +0 -260
- package/tools/activity.js +0 -220
- package/tools/admin-inbox.js +0 -218
- package/tools/agent-treasury.js +0 -288
- package/tools/agents.js +0 -122
- package/tools/analytics.js +0 -191
- package/tools/approve.js +0 -197
- package/tools/arcade.js +0 -173
- package/tools/artifact-create.js +0 -247
- package/tools/artifact-view.js +0 -174
- package/tools/artifacts-price.js +0 -107
- package/tools/ask-expert.js +0 -160
- package/tools/available.js +0 -120
- package/tools/become-expert.js +0 -150
- package/tools/broadcast.js +0 -325
- package/tools/bye.js +0 -52
- package/tools/call.js +0 -144
- package/tools/cc-insights.js +0 -320
- package/tools/chat.js +0 -202
- package/tools/collaborative-drawing.js +0 -286
- package/tools/connection-status.js +0 -178
- package/tools/consent.js +0 -114
- package/tools/context.js +0 -132
- package/tools/crossword.js +0 -369
- package/tools/doctor.js +0 -481
- package/tools/drawing.js +0 -310
- package/tools/earnings.js +0 -126
- package/tools/echo.js +0 -218
- package/tools/feed.js +0 -227
- package/tools/follow.js +0 -224
- package/tools/forked.js +0 -301
- package/tools/friends.js +0 -207
- package/tools/game.js +0 -359
- package/tools/genesis.js +0 -233
- package/tools/gig-browse.js +0 -206
- package/tools/gig-complete.js +0 -144
- package/tools/guest-session.js +0 -118
- package/tools/handoff.js +0 -239
- package/tools/health.js +0 -87
- package/tools/idea.js +0 -217
- package/tools/insights.js +0 -123
- package/tools/invite.js +0 -228
- package/tools/l2-bridge.js +0 -272
- package/tools/l2-status.js +0 -217
- package/tools/l2.js +0 -206
- package/tools/leaderboard.js +0 -117
- package/tools/lib/git-apply.js +0 -206
- package/tools/lib/git-bundle.js +0 -407
- package/tools/migrate.js +0 -156
- package/tools/mint.js +0 -377
- package/tools/multiplayer-game.js +0 -275
- package/tools/notifications.js +0 -415
- package/tools/observe.js +0 -200
- package/tools/onboarding.js +0 -147
- package/tools/open.js +0 -258
- package/tools/pair.js +0 -124
- package/tools/party-game.js +0 -314
- package/tools/patterns.js +0 -79
- package/tools/ping.js +0 -51
- package/tools/plan.js +0 -225
- package/tools/presence-agent.js +0 -167
- package/tools/profile.js +0 -219
- package/tools/proof-of-work.js +0 -144
- package/tools/pulse.js +0 -218
- package/tools/react.js +0 -115
- package/tools/release.js +0 -83
- package/tools/reply.js +0 -166
- package/tools/report.js +0 -109
- package/tools/reputation.js +0 -175
- package/tools/request.js +0 -231
- package/tools/reservations.js +0 -116
- package/tools/reserve.js +0 -111
- package/tools/schedule.js +0 -367
- package/tools/search-messages.js +0 -123
- package/tools/session.js +0 -654
- package/tools/session_price.js +0 -128
- package/tools/settings.js +0 -200
- package/tools/shipback.js +0 -326
- package/tools/smart-check.js +0 -201
- package/tools/social-inbox.js +0 -437
- package/tools/social-post.js +0 -326
- package/tools/social-processor.js +0 -445
- package/tools/solo-game.js +0 -390
- package/tools/streak.js +0 -147
- package/tools/stuck.js +0 -297
- package/tools/submit.js +0 -98
- package/tools/subscribe.js +0 -148
- package/tools/subscriptions.js +0 -134
- package/tools/suggest-tags.js +0 -184
- package/tools/summarize.js +0 -195
- package/tools/tag-suggestions.js +0 -257
- package/tools/test.js +0 -182
- package/tools/tip.js +0 -193
- package/tools/token.js +0 -103
- package/tools/update.js +0 -105
- package/tools/wallet.js +0 -269
- package/tools/watch.js +0 -177
- package/tools/webhook-test.js +0 -388
- package/tools/withdraw.js +0 -145
- package/tools/work-summary.js +0 -96
- package/tools/workshop-buddy.js +0 -394
- package/tools/workshop.js +0 -327
- package/tools/x-mentions.js +0 -84
- package/tools/x-reply.js +0 -82
- package/twitter.js +0 -209
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Slash Vibe, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,83 +1,108 @@
|
|
|
1
|
-
# vibe
|
|
1
|
+
# /vibe MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/slashvibe-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/slashvibe-mcp)
|
|
5
|
+
[](https://github.com/VibeCodingInc/vibe-mcp/actions/workflows/ci.yml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
[](https://modelcontextprotocol.io)
|
|
9
|
+
[](https://smithery.ai/server/slashvibe-mcp)
|
|
4
10
|
|
|
5
|
-
|
|
11
|
+
Social MCP server — DMs, presence, and discovery for AI-assisted developers. See who's building, message them, share what you shipped. Works with Claude Code, Cursor, VS Code, Windsurf, and any MCP client.
|
|
6
12
|
|
|
7
|
-
##
|
|
13
|
+
## Install
|
|
8
14
|
|
|
9
|
-
**Claude Code:**
|
|
10
15
|
```bash
|
|
11
|
-
npx slashvibe-mcp
|
|
16
|
+
claude mcp add vibe -- npx -y slashvibe-mcp
|
|
12
17
|
```
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
<details>
|
|
20
|
+
<summary><strong>Other editors</strong></summary>
|
|
15
21
|
|
|
16
|
-
**
|
|
22
|
+
**Cursor** — add to `~/.cursor/mcp.json`:
|
|
23
|
+
```json
|
|
24
|
+
{ "mcpServers": { "vibe": { "command": "npx", "args": ["-y", "slashvibe-mcp"] } } }
|
|
25
|
+
```
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
**VS Code** — add to `.vscode/mcp.json`:
|
|
28
|
+
```json
|
|
29
|
+
{ "servers": { "vibe": { "command": "npx", "args": ["-y", "slashvibe-mcp"] } } }
|
|
30
|
+
```
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
**Windsurf** — add to `~/.codeium/windsurf/mcp_config.json`:
|
|
33
|
+
```json
|
|
34
|
+
{ "mcpServers": { "vibe": { "command": "npx", "args": ["-y", "slashvibe-mcp"] } } }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Cline** — MCP Servers > Configure > Edit JSON, add `vibe` server as above.
|
|
23
38
|
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
**Continue.dev** — create `.continue/mcpServers/vibe.json`:
|
|
40
|
+
```json
|
|
41
|
+
{ "command": "npx", "args": ["-y", "slashvibe-mcp"] }
|
|
26
42
|
```
|
|
27
43
|
|
|
28
|
-
|
|
44
|
+
**JetBrains** — Settings > Tools > AI Assistant > MCP, command `npx`, args `-y slashvibe-mcp`.
|
|
45
|
+
</details>
|
|
29
46
|
|
|
30
|
-
|
|
47
|
+
## Getting Started
|
|
31
48
|
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
"mcpServers": {
|
|
35
|
-
"vibe": {
|
|
36
|
-
"command": "npx",
|
|
37
|
-
"args": ["-y", "slashvibe-mcp@latest"],
|
|
38
|
-
"env": {
|
|
39
|
-
"VIBE_API_URL": "https://www.slashvibe.dev"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
49
|
+
```
|
|
50
|
+
"let's vibe"
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
That's it. Authenticates via GitHub, shows who's online, checks your inbox.
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
- **DMs** - Direct messages between developers
|
|
50
|
-
- **Memory** - Remember context about connections
|
|
51
|
-
- **Status** - Share what you're working on
|
|
52
|
-
- **Games** - Play tic-tac-toe while coding
|
|
55
|
+
## Tools
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
| Tool | What it does |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `vibe_start` | Entry point — authenticates, shows presence, checks inbox |
|
|
60
|
+
| `vibe_init` | Set up your identity (GitHub OAuth) |
|
|
61
|
+
| `vibe_who` | See who's online and what they're building |
|
|
62
|
+
| `vibe_dm` | Send a direct message |
|
|
63
|
+
| `vibe_inbox` | Check your unread messages |
|
|
64
|
+
| `vibe_status` | Set your mood (shipping, thinking, debugging, etc.) |
|
|
65
|
+
| `vibe_ship` | Share what you shipped |
|
|
66
|
+
| `vibe_discover` | Find people building similar things |
|
|
67
|
+
| `vibe_help` | Show available commands |
|
|
55
68
|
|
|
56
|
-
|
|
69
|
+
## How It Works
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
```
|
|
72
|
+
Your Editor <-> /vibe MCP (stdio) <-> slashvibe.dev API <-> Other users
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- **Presence** broadcasts via heartbeat — others see you in real time
|
|
76
|
+
- **Messages** are delivered through the slashvibe.dev API
|
|
77
|
+
- **Identity** persists via GitHub OAuth — your handle follows you across editors
|
|
78
|
+
|
|
79
|
+
## Troubleshooting
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
**"I installed but don't see /vibe tools"** — restart your editor after adding the MCP config.
|
|
68
82
|
|
|
69
|
-
|
|
70
|
-
- User presence and discovery
|
|
71
|
-
- Message routing
|
|
72
|
-
- Identity verification
|
|
83
|
+
**"Authentication failed"** — OAuth opens a browser window. If it didn't open, go to [slashvibe.dev/login](https://slashvibe.dev/login). The callback runs on `localhost:9876` — make sure that port is free.
|
|
73
84
|
|
|
74
|
-
##
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm install
|
|
89
|
+
npm test
|
|
90
|
+
npm run lint
|
|
91
|
+
```
|
|
75
92
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- [AIRC](https://airc.chat) - Agent identity protocol
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
We welcome contributions. See [CLA.md](./CLA.md) before submitting pull requests.
|
|
80
96
|
|
|
81
97
|
## License
|
|
82
98
|
|
|
83
|
-
MIT
|
|
99
|
+
MIT — see [LICENSE](./LICENSE)
|
|
100
|
+
|
|
101
|
+
## Links
|
|
102
|
+
|
|
103
|
+
- [slashvibe.dev](https://slashvibe.dev)
|
|
104
|
+
- [@slashvibe on X](https://twitter.com/slashvibe)
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
Built by [Slash Vibe, Inc.](https://slashvibe.dev)
|
package/analytics.js
CHANGED
|
@@ -97,11 +97,35 @@ function trackSession(event, sessionData = {}) {
|
|
|
97
97
|
track(event === 'started' ? 'session_started' : 'session_ended', sessionData);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Track editor install via universal installer
|
|
102
|
+
* @param {string} editor - Editor name configured
|
|
103
|
+
* @param {string} status - 'configured', 'exists', 'error'
|
|
104
|
+
*/
|
|
105
|
+
function trackInstall(editor, status) {
|
|
106
|
+
track('editor_install', {
|
|
107
|
+
editor,
|
|
108
|
+
status,
|
|
109
|
+
platform: process.platform,
|
|
110
|
+
node: process.version
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Track tool usage distribution (called per tool invocation)
|
|
116
|
+
* @param {string} toolName - Tool name (vibe_*)
|
|
117
|
+
*/
|
|
118
|
+
function trackToolUsage(toolName) {
|
|
119
|
+
track('tool_call', { tool: toolName });
|
|
120
|
+
}
|
|
121
|
+
|
|
100
122
|
module.exports = {
|
|
101
123
|
track,
|
|
102
124
|
trackEmptyInbox,
|
|
103
125
|
trackLurkMode,
|
|
104
126
|
trackOnboardingTask,
|
|
105
127
|
trackDiscovery,
|
|
106
|
-
trackSession
|
|
128
|
+
trackSession,
|
|
129
|
+
trackInstall,
|
|
130
|
+
trackToolUsage
|
|
107
131
|
};
|
package/auto-update.js
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
* Checks for updates and prompts user to update
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { exec } from 'child_process';
|
|
7
|
+
import { promisify } from 'util';
|
|
8
|
+
import fs from 'fs/promises';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
10
11
|
|
|
11
12
|
const execAsync = promisify(exec);
|
|
13
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
14
|
|
|
13
|
-
async function checkForUpdates() {
|
|
15
|
+
export async function checkForUpdates() {
|
|
14
16
|
try {
|
|
15
17
|
// Read local version
|
|
16
18
|
const versionPath = path.join(__dirname, 'version.json');
|
|
@@ -45,7 +47,7 @@ async function checkForUpdates() {
|
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
async function performUpdate() {
|
|
50
|
+
export async function performUpdate() {
|
|
49
51
|
try {
|
|
50
52
|
const repoPath = path.join(__dirname, '..');
|
|
51
53
|
|
|
@@ -82,7 +84,7 @@ async function performUpdate() {
|
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
function compareVersions(v1, v2) {
|
|
87
|
+
export function compareVersions(v1, v2) {
|
|
86
88
|
const parts1 = v1.split('.').map(Number);
|
|
87
89
|
const parts2 = v2.split('.').map(Number);
|
|
88
90
|
|
|
@@ -94,7 +96,7 @@ function compareVersions(v1, v2) {
|
|
|
94
96
|
return 0;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
|
-
function formatUpdateNotification(update) {
|
|
99
|
+
export function formatUpdateNotification(update) {
|
|
98
100
|
if (!update) return null;
|
|
99
101
|
|
|
100
102
|
let message = `\n${'='.repeat(60)}\n`;
|
|
@@ -121,10 +123,3 @@ function formatUpdateNotification(update) {
|
|
|
121
123
|
|
|
122
124
|
return message;
|
|
123
125
|
}
|
|
124
|
-
|
|
125
|
-
module.exports = {
|
|
126
|
-
checkForUpdates,
|
|
127
|
-
performUpdate,
|
|
128
|
-
compareVersions,
|
|
129
|
-
formatUpdateNotification
|
|
130
|
-
};
|
package/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Config — User identity and paths
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Falls back to ~/.
|
|
4
|
+
* UNIFIED: Uses ~/.vibecodings/config.json as primary source
|
|
5
|
+
* Falls back to ~/.vibe/config.json for backward compat
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -10,31 +10,16 @@ const path = require('path');
|
|
|
10
10
|
|
|
11
11
|
const VIBE_DIR = path.join(process.env.HOME, '.vibe');
|
|
12
12
|
const VIBECODINGS_DIR = path.join(process.env.HOME, '.vibecodings');
|
|
13
|
-
const PRIMARY_CONFIG = path.join(
|
|
14
|
-
const FALLBACK_CONFIG = path.join(
|
|
15
|
-
const TERMINAL_AUTH_FILE = path.join(VIBE_DIR, 'auth.json'); // Cross-client (Buddy/Terminal)
|
|
13
|
+
const PRIMARY_CONFIG = path.join(VIBECODINGS_DIR, 'config.json'); // Primary
|
|
14
|
+
const FALLBACK_CONFIG = path.join(VIBE_DIR, 'config.json'); // Fallback
|
|
16
15
|
const CONFIG_FILE = PRIMARY_CONFIG;
|
|
17
16
|
|
|
18
17
|
function ensureDir() {
|
|
19
|
-
if (!fs.existsSync(
|
|
20
|
-
fs.mkdirSync(
|
|
18
|
+
if (!fs.existsSync(VIBECODINGS_DIR)) {
|
|
19
|
+
fs.mkdirSync(VIBECODINGS_DIR, { recursive: true });
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
/**
|
|
25
|
-
* Load terminal/buddy auth file (~/.vibe/auth.json)
|
|
26
|
-
* Cross-client: if user authenticated via Buddy app, MCP server can pick it up
|
|
27
|
-
* Format: { token, handle, provider, authenticated_at }
|
|
28
|
-
*/
|
|
29
|
-
function loadTerminalAuth() {
|
|
30
|
-
try {
|
|
31
|
-
if (fs.existsSync(TERMINAL_AUTH_FILE)) {
|
|
32
|
-
return JSON.parse(fs.readFileSync(TERMINAL_AUTH_FILE, 'utf8'));
|
|
33
|
-
}
|
|
34
|
-
} catch (e) {}
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
23
|
function load() {
|
|
39
24
|
ensureDir();
|
|
40
25
|
// Try primary config first
|
|
@@ -72,7 +57,7 @@ function save(config) {
|
|
|
72
57
|
}
|
|
73
58
|
} catch (e) {}
|
|
74
59
|
|
|
75
|
-
// Save to primary config
|
|
60
|
+
// Save to primary config in vibecodings format
|
|
76
61
|
const data = {
|
|
77
62
|
username: config.handle || config.username || existing.username,
|
|
78
63
|
workingOn: config.one_liner || config.workingOn || existing.workingOn,
|
|
@@ -85,27 +70,27 @@ function save(config) {
|
|
|
85
70
|
// Notification level
|
|
86
71
|
notifications: config.notifications || existing.notifications || null,
|
|
87
72
|
// GitHub Activity settings
|
|
88
|
-
github_activity_enabled:
|
|
73
|
+
github_activity_enabled:
|
|
74
|
+
config.github_activity_enabled !== undefined ? config.github_activity_enabled : existing.github_activity_enabled,
|
|
89
75
|
github_activity_privacy: config.github_activity_privacy || existing.github_activity_privacy || null,
|
|
90
|
-
// OAuth token (persisted across MCP process restarts)
|
|
91
|
-
|
|
76
|
+
// Privy OAuth token (persisted across MCP process restarts)
|
|
77
|
+
privyToken: config.privyToken || existing.privyToken || null,
|
|
92
78
|
authMethod: config.authMethod || existing.authMethod || null
|
|
93
79
|
};
|
|
94
80
|
fs.writeFileSync(PRIMARY_CONFIG, JSON.stringify(data, null, 2));
|
|
95
81
|
}
|
|
96
82
|
|
|
83
|
+
/** @returns {string|null} Current user handle */
|
|
97
84
|
function getHandle() {
|
|
98
85
|
// Prefer session-specific handle over shared config
|
|
99
86
|
const sessionHandle = getSessionHandle();
|
|
100
87
|
if (sessionHandle) return sessionHandle;
|
|
101
88
|
// Fall back to shared config
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
// Cross-client: check terminal/buddy auth file
|
|
105
|
-
const terminalAuth = loadTerminalAuth();
|
|
106
|
-
return terminalAuth?.handle || null;
|
|
89
|
+
const config = load();
|
|
90
|
+
return config.handle || null;
|
|
107
91
|
}
|
|
108
92
|
|
|
93
|
+
/** @returns {string|null} Current user one-liner */
|
|
109
94
|
function getOneLiner() {
|
|
110
95
|
// Prefer session-specific one_liner over shared config
|
|
111
96
|
const sessionOneLiner = getSessionOneLiner();
|
|
@@ -115,6 +100,7 @@ function getOneLiner() {
|
|
|
115
100
|
return config.one_liner || null;
|
|
116
101
|
}
|
|
117
102
|
|
|
103
|
+
/** @returns {boolean} Whether user identity is set */
|
|
118
104
|
function isInitialized() {
|
|
119
105
|
// Check session first, then shared config
|
|
120
106
|
const sessionHandle = getSessionHandle();
|
|
@@ -125,8 +111,9 @@ function isInitialized() {
|
|
|
125
111
|
|
|
126
112
|
// Session management - unique ID per Claude Code instance
|
|
127
113
|
// Now stores full identity (handle + one_liner), not just sessionId
|
|
128
|
-
const SESSION_FILE = path.join(
|
|
114
|
+
const SESSION_FILE = path.join(VIBECODINGS_DIR, `.session_${process.pid}`);
|
|
129
115
|
|
|
116
|
+
/** @returns {string} New session ID (sess_*) */
|
|
130
117
|
function generateSessionId() {
|
|
131
118
|
return 'sess_' + Date.now().toString(36) + Math.random().toString(36).substring(2, 10);
|
|
132
119
|
}
|
|
@@ -235,64 +222,43 @@ function getAuthToken() {
|
|
|
235
222
|
|
|
236
223
|
// Fall back to shared config (persisted across MCP process restarts)
|
|
237
224
|
const cfg = load();
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
// Cross-client: check terminal/buddy auth file (~/.vibe/auth.json)
|
|
241
|
-
const terminalAuth = loadTerminalAuth();
|
|
242
|
-
if (terminalAuth?.token) return terminalAuth.token;
|
|
243
|
-
|
|
244
|
-
return null;
|
|
225
|
+
return cfg?.privyToken || null;
|
|
245
226
|
}
|
|
246
227
|
|
|
247
228
|
/**
|
|
248
|
-
* Save
|
|
249
|
-
* @param {string} token -
|
|
229
|
+
* Save Privy JWT token (used after browser OAuth flow)
|
|
230
|
+
* @param {string} token - Privy access token
|
|
250
231
|
*/
|
|
251
|
-
function
|
|
232
|
+
function savePrivyToken(token) {
|
|
252
233
|
// Save to session data
|
|
253
234
|
const data = getSessionData() || {};
|
|
254
235
|
saveSessionData({
|
|
255
236
|
...data,
|
|
256
237
|
sessionId: data.sessionId || generateSessionId(),
|
|
257
238
|
token,
|
|
258
|
-
authMethod: '
|
|
239
|
+
authMethod: 'privy' // Track that this is a Privy token
|
|
259
240
|
});
|
|
260
241
|
|
|
261
242
|
// Also save to shared config for persistence across MCP restarts
|
|
262
243
|
const cfg = load();
|
|
263
|
-
cfg.
|
|
264
|
-
cfg.authMethod = '
|
|
244
|
+
cfg.privyToken = token;
|
|
245
|
+
cfg.authMethod = 'privy';
|
|
265
246
|
save(cfg);
|
|
266
247
|
}
|
|
267
248
|
|
|
268
|
-
// Backwards compatibility alias
|
|
269
|
-
const savePrivyToken = saveAuthToken;
|
|
270
|
-
|
|
271
249
|
/**
|
|
272
|
-
* Check if user has
|
|
273
|
-
* Accepts 'github', 'privy', and 'browser' as valid auth methods (backwards compat)
|
|
250
|
+
* Check if user has Privy auth (vs legacy keypair)
|
|
274
251
|
*/
|
|
275
|
-
function
|
|
276
|
-
const validAuthMethods = ['github', 'privy', 'browser'];
|
|
277
|
-
|
|
252
|
+
function hasPrivyAuth() {
|
|
278
253
|
const data = getSessionData();
|
|
279
|
-
if (
|
|
254
|
+
if (data?.authMethod === 'privy' && data?.token) return true;
|
|
280
255
|
|
|
281
256
|
const cfg = load();
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
// Cross-client: check terminal/buddy auth file
|
|
285
|
-
const terminalAuth = loadTerminalAuth();
|
|
286
|
-
if (terminalAuth?.token && validAuthMethods.includes(terminalAuth?.provider)) return true;
|
|
287
|
-
|
|
288
|
-
return false;
|
|
257
|
+
return cfg?.authMethod === 'privy' && cfg?.privyToken;
|
|
289
258
|
}
|
|
290
259
|
|
|
291
|
-
// Backwards compatibility alias
|
|
292
|
-
const hasPrivyAuth = hasOAuth;
|
|
293
|
-
|
|
294
260
|
/**
|
|
295
|
-
* Remove keypair after migration to
|
|
261
|
+
* Remove keypair after migration to Privy
|
|
296
262
|
* Clears private key from config (security improvement)
|
|
297
263
|
*/
|
|
298
264
|
function removeKeypair() {
|
|
@@ -398,7 +364,7 @@ function setGithubActivityPrivacy(level) {
|
|
|
398
364
|
save(config);
|
|
399
365
|
}
|
|
400
366
|
|
|
401
|
-
|
|
367
|
+
/** @returns {string} API base URL */
|
|
402
368
|
function getApiUrl() {
|
|
403
369
|
return process.env.VIBE_API_URL || 'https://www.slashvibe.dev';
|
|
404
370
|
}
|
|
@@ -410,10 +376,22 @@ function getApiUrl() {
|
|
|
410
376
|
// ─────────────────────────────────────────────────────────────
|
|
411
377
|
const sessionState = {};
|
|
412
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Get ephemeral session state value
|
|
381
|
+
* @param {string} key - State key
|
|
382
|
+
* @param {*} [defaultValue=null] - Default if not set
|
|
383
|
+
* @returns {*} Stored value or default
|
|
384
|
+
*/
|
|
413
385
|
function get(key, defaultValue = null) {
|
|
414
386
|
return sessionState[key] !== undefined ? sessionState[key] : defaultValue;
|
|
415
387
|
}
|
|
416
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Set ephemeral session state value
|
|
391
|
+
* @param {string} key - State key
|
|
392
|
+
* @param {*} value - Value to store
|
|
393
|
+
* @returns {*} The stored value
|
|
394
|
+
*/
|
|
417
395
|
function set(key, value) {
|
|
418
396
|
sessionState[key] = value;
|
|
419
397
|
return value;
|
|
@@ -424,7 +402,6 @@ module.exports = {
|
|
|
424
402
|
CONFIG_FILE,
|
|
425
403
|
load,
|
|
426
404
|
save,
|
|
427
|
-
loadTerminalAuth,
|
|
428
405
|
getHandle,
|
|
429
406
|
getOneLiner,
|
|
430
407
|
isInitialized,
|
|
@@ -449,10 +426,7 @@ module.exports = {
|
|
|
449
426
|
getGithubActivityPrivacy,
|
|
450
427
|
setGithubActivityPrivacy,
|
|
451
428
|
getApiUrl,
|
|
452
|
-
// OAuth helpers
|
|
453
|
-
saveAuthToken,
|
|
454
|
-
hasOAuth,
|
|
455
|
-
// Backwards compatibility aliases
|
|
429
|
+
// Privy OAuth helpers
|
|
456
430
|
savePrivyToken,
|
|
457
431
|
hasPrivyAuth,
|
|
458
432
|
removeKeypair,
|
package/crypto.js
CHANGED
|
@@ -106,12 +106,7 @@ function verify(obj, publicKeyBase64) {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
// Verify
|
|
109
|
-
return crypto.verify(
|
|
110
|
-
null,
|
|
111
|
-
Buffer.from(canonical, 'utf8'),
|
|
112
|
-
publicKey,
|
|
113
|
-
Buffer.from(signature, 'base64')
|
|
114
|
-
);
|
|
109
|
+
return crypto.verify(null, Buffer.from(canonical, 'utf8'), publicKey, Buffer.from(signature, 'base64'));
|
|
115
110
|
} catch (e) {
|
|
116
111
|
console.error('[crypto] Verification failed:', e.message);
|
|
117
112
|
return false;
|
package/debug.js
ADDED