slashvibe-mcp 0.3.26 → 0.3.28

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.
Files changed (246) hide show
  1. package/README.md +47 -240
  2. package/analytics.js +1 -25
  3. package/auth-store.js +158 -0
  4. package/auto-update.js +15 -10
  5. package/bridges/bridge-monitor.js +50 -61
  6. package/bridges/discord-bot.js +47 -37
  7. package/bridges/farcaster.js +9 -9
  8. package/bridges/telegram.js +28 -28
  9. package/bridges/webhook-health.js +40 -36
  10. package/bridges/webhook-server.js +103 -127
  11. package/bridges/whatsapp.js +42 -42
  12. package/bridges/x-webhook.js +71 -54
  13. package/config.js +70 -44
  14. package/crypto.js +6 -1
  15. package/discord.js +19 -19
  16. package/games/arcade.js +406 -0
  17. package/games/chess.js +451 -0
  18. package/games/colorguess.js +343 -0
  19. package/games/crossword-words.js +171 -0
  20. package/games/crossword.js +461 -0
  21. package/games/drawing.js +347 -0
  22. package/games/gameroulette.js +300 -0
  23. package/games/gamerouter.js +336 -0
  24. package/games/gamestatus.js +337 -0
  25. package/games/guessnumber.js +209 -0
  26. package/games/hangman.js +279 -0
  27. package/games/memory.js +338 -0
  28. package/games/multiplayer-tictactoe.js +389 -0
  29. package/games/pixelart.js +399 -0
  30. package/games/quickduel.js +354 -0
  31. package/games/riddle.js +371 -0
  32. package/games/rockpaperscissors.js +291 -0
  33. package/games/snake.js +406 -0
  34. package/games/storybuilder.js +343 -0
  35. package/games/tictactoe.js +345 -0
  36. package/games/twentyquestions.js +286 -0
  37. package/games/twotruths.js +207 -0
  38. package/games/werewolf.js +508 -0
  39. package/games/wordassociation.js +247 -0
  40. package/games/wordchain.js +135 -0
  41. package/index.js +307 -364
  42. package/intelligence/index.js +9 -2
  43. package/intelligence/infer.js +16 -10
  44. package/intelligence/interests.js +369 -0
  45. package/intelligence/patterns.js +18 -23
  46. package/intelligence/proactive.js +15 -16
  47. package/intelligence/serendipity.js +20 -57
  48. package/lib/tech-detection.js +243 -0
  49. package/memory.js +8 -13
  50. package/notification-emitter.js +2 -2
  51. package/notify.js +14 -39
  52. package/package.json +30 -32
  53. package/presence.js +2 -39
  54. package/prompts.js +9 -5
  55. package/protocol/index.js +87 -123
  56. package/protocol/telegram-commands.js +37 -36
  57. package/setup.js +480 -0
  58. package/smart-inbox.js +276 -0
  59. package/store/api.js +531 -380
  60. package/store/local.js +10 -9
  61. package/store/profiles.js +192 -48
  62. package/store/reservations.js +9 -2
  63. package/store/skills.js +71 -69
  64. package/tools/_actions.js +387 -48
  65. package/tools/_connection-queue.js +56 -45
  66. package/tools/_deprecated/auto-suggest-connections.js +304 -0
  67. package/tools/{back.js → _deprecated/back.js} +1 -1
  68. package/tools/_deprecated/bootstrap-skills.js +231 -0
  69. package/tools/_deprecated/bridge-dashboard.js +342 -0
  70. package/tools/_deprecated/bridge-health.js +400 -0
  71. package/tools/_deprecated/bridge-live.js +384 -0
  72. package/tools/_deprecated/bridges.js +383 -0
  73. package/tools/_deprecated/colorguess.js +281 -0
  74. package/tools/_deprecated/discover-insights.js +379 -0
  75. package/tools/_deprecated/discover-momentum.js +256 -0
  76. package/tools/_deprecated/discovery-analytics.js +345 -0
  77. package/tools/_deprecated/discovery-auto-suggest.js +275 -0
  78. package/tools/_deprecated/discovery-bootstrap.js +267 -0
  79. package/tools/_deprecated/discovery-daily.js +375 -0
  80. package/tools/_deprecated/discovery-dashboard.js +385 -0
  81. package/tools/_deprecated/discovery-digest.js +314 -0
  82. package/tools/_deprecated/discovery-hub.js +357 -0
  83. package/tools/_deprecated/discovery-insights.js +384 -0
  84. package/tools/_deprecated/discovery-momentum.js +281 -0
  85. package/tools/_deprecated/discovery-monitor.js +319 -0
  86. package/tools/_deprecated/discovery-proactive.js +300 -0
  87. package/tools/_deprecated/draw.js +317 -0
  88. package/tools/_deprecated/farcaster.js +307 -0
  89. package/tools/{forget.js → _deprecated/forget.js} +7 -4
  90. package/tools/_deprecated/games-catalog.js +376 -0
  91. package/tools/_deprecated/games.js +313 -0
  92. package/tools/_deprecated/guessnumber.js +194 -0
  93. package/tools/_deprecated/hangman.js +129 -0
  94. package/tools/_deprecated/multiplayer-tictactoe.js +303 -0
  95. package/tools/{mute.js → _deprecated/mute.js} +3 -4
  96. package/tools/{recall.js → _deprecated/recall.js} +10 -5
  97. package/tools/{remember.js → _deprecated/remember.js} +6 -4
  98. package/tools/_deprecated/riddle.js +240 -0
  99. package/tools/_deprecated/run-bootstrap.js +69 -0
  100. package/tools/_deprecated/skills-analytics.js +349 -0
  101. package/tools/_deprecated/skills-bootstrap.js +301 -0
  102. package/tools/_deprecated/skills-dashboard.js +268 -0
  103. package/tools/{skills-exchange.js → _deprecated/skills-exchange.js} +39 -38
  104. package/tools/_deprecated/skills.js +380 -0
  105. package/tools/_deprecated/smart-intro.js +353 -0
  106. package/tools/_deprecated/storybuilder.js +331 -0
  107. package/tools/_deprecated/telegram-bot.js +183 -0
  108. package/tools/_deprecated/telegram-setup.js +214 -0
  109. package/tools/{tictactoe.js → _deprecated/tictactoe.js} +26 -26
  110. package/tools/_deprecated/twentyquestions.js +143 -0
  111. package/tools/{wordassociation.js → _deprecated/wordassociation.js} +20 -23
  112. package/tools/_discovery-enhanced.js +57 -52
  113. package/tools/_discovery.js +185 -87
  114. package/tools/_proactive-discovery.js +73 -60
  115. package/tools/_shared/index.js +64 -41
  116. package/tools/_shared.js +234 -0
  117. package/tools/_work-context.js +338 -0
  118. package/tools/_work-context.manual-test.js +199 -0
  119. package/tools/_work-context.test.js +260 -0
  120. package/tools/activity.js +220 -0
  121. package/tools/admin-inbox.js +15 -10
  122. package/tools/agent-treasury.js +288 -0
  123. package/tools/agents.js +1 -1
  124. package/tools/analytics.js +191 -0
  125. package/tools/approve.js +197 -0
  126. package/tools/arcade.js +173 -0
  127. package/tools/artifact-create.js +23 -13
  128. package/tools/artifact-view.js +4 -4
  129. package/tools/artifacts-price.js +107 -0
  130. package/tools/ask-expert.js +160 -0
  131. package/tools/available.js +120 -0
  132. package/tools/become-expert.js +150 -0
  133. package/tools/broadcast.js +325 -0
  134. package/tools/bye.js +5 -3
  135. package/tools/cc-insights.js +320 -0
  136. package/tools/chat.js +202 -0
  137. package/tools/collaborative-drawing.js +286 -0
  138. package/tools/connection-status.js +178 -0
  139. package/tools/consent.js +2 -2
  140. package/tools/context.js +10 -9
  141. package/tools/crossword.js +2 -3
  142. package/tools/discover.js +356 -94
  143. package/tools/dm.js +86 -27
  144. package/tools/doctor.js +41 -12
  145. package/tools/drawing.js +20 -34
  146. package/tools/earnings.js +126 -0
  147. package/tools/echo.js +11 -11
  148. package/tools/feed.js +58 -30
  149. package/tools/follow.js +187 -64
  150. package/tools/forked.js +301 -0
  151. package/tools/friends.js +207 -0
  152. package/tools/game.js +48 -144
  153. package/tools/genesis.js +233 -0
  154. package/tools/gig-browse.js +206 -0
  155. package/tools/gig-complete.js +144 -0
  156. package/tools/handoff.js +8 -6
  157. package/tools/health.js +87 -0
  158. package/tools/help.js +3 -3
  159. package/tools/idea.js +27 -15
  160. package/tools/inbox.js +293 -121
  161. package/tools/init.js +151 -54
  162. package/tools/invite.js +21 -8
  163. package/tools/{_experimental/l2-status.js → l2-status.js} +70 -68
  164. package/tools/leaderboard.js +117 -0
  165. package/tools/lib/git-apply.js +206 -0
  166. package/tools/lib/git-bundle.js +407 -0
  167. package/tools/migrate.js +24 -27
  168. package/tools/mint.js +377 -0
  169. package/tools/multiplayer-game.js +40 -50
  170. package/tools/notifications.js +48 -58
  171. package/tools/observe.js +15 -12
  172. package/tools/onboarding.js +11 -8
  173. package/tools/open.js +151 -13
  174. package/tools/party-game.js +12 -23
  175. package/tools/patterns.js +1 -2
  176. package/tools/ping.js +7 -5
  177. package/tools/plan.js +225 -0
  178. package/tools/profile.js +219 -0
  179. package/tools/proof-of-work.js +144 -0
  180. package/tools/pulse.js +218 -0
  181. package/tools/react.js +30 -28
  182. package/tools/release.js +2 -4
  183. package/tools/reply.js +166 -0
  184. package/tools/report.js +2 -2
  185. package/tools/reputation.js +175 -0
  186. package/tools/request.js +26 -6
  187. package/tools/reserve.js +1 -1
  188. package/tools/schedule.js +367 -0
  189. package/tools/search-messages.js +123 -0
  190. package/tools/session.js +625 -0
  191. package/tools/session_price.js +128 -0
  192. package/tools/settings.js +99 -30
  193. package/tools/ship.js +56 -74
  194. package/tools/{_experimental/shipback.js → shipback.js} +3 -4
  195. package/tools/smart-check.js +201 -0
  196. package/tools/social-inbox.js +28 -22
  197. package/tools/social-post.js +27 -24
  198. package/tools/social-processor.js +445 -0
  199. package/tools/solo-game.js +46 -54
  200. package/tools/start.js +148 -14
  201. package/tools/status.js +68 -21
  202. package/tools/streak.js +147 -0
  203. package/tools/stuck.js +297 -0
  204. package/tools/submit.js +2 -4
  205. package/tools/subscribe.js +148 -0
  206. package/tools/subscriptions.js +134 -0
  207. package/tools/suggest-tags.js +33 -36
  208. package/tools/summarize.js +120 -91
  209. package/tools/tag-suggestions.js +73 -72
  210. package/tools/test.js +1 -1
  211. package/tools/tip.js +193 -0
  212. package/tools/token.js +4 -4
  213. package/tools/update.js +2 -1
  214. package/tools/wallet.js +269 -0
  215. package/tools/watch.js +112 -132
  216. package/tools/webhook-test.js +388 -0
  217. package/tools/who.js +66 -58
  218. package/tools/withdraw.js +145 -0
  219. package/tools/work-summary.js +96 -0
  220. package/tools/workshop-buddy.js +53 -52
  221. package/tools/workshop.js +327 -0
  222. package/tools/x-mentions.js +2 -1
  223. package/tools/x-reply.js +2 -1
  224. package/twitter.js +20 -14
  225. package/version.json +9 -7
  226. package/LICENSE +0 -21
  227. package/bridges/agent-gateway.js +0 -351
  228. package/debug.js +0 -12
  229. package/eslint.config.js +0 -54
  230. package/migrate-v2.js +0 -72
  231. package/post-install.js +0 -141
  232. package/scripts/install-editors.js +0 -258
  233. package/scripts/publish-registry.sh +0 -58
  234. package/scripts/sync-version.js +0 -39
  235. package/store/sessions.js +0 -280
  236. package/store/sqlite.js +0 -360
  237. package/test-skills-bootstrap.js +0 -20
  238. package/test-v2-integration.js +0 -385
  239. package/tools/presence-data.js +0 -102
  240. package/tools/session-fork.js +0 -97
  241. package/tools/session-resume.js +0 -186
  242. package/tools/session-save.js +0 -109
  243. package/webhook-runner.js +0 -132
  244. /package/tools/{away.js → _deprecated/away.js} +0 -0
  245. /package/tools/{_experimental/l2-bridge.js → l2-bridge.js} +0 -0
  246. /package/tools/{_experimental/l2.js → l2.js} +0 -0
package/README.md CHANGED
@@ -1,276 +1,83 @@
1
- # /vibe MCP Server
1
+ # vibe-mcp
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/slashvibe-mcp.svg)](https://www.npmjs.com/package/slashvibe-mcp)
4
- [![npm downloads](https://img.shields.io/npm/dw/slashvibe-mcp.svg)](https://www.npmjs.com/package/slashvibe-mcp)
5
- [![CI](https://github.com/VibeCodingInc/vibe-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/VibeCodingInc/vibe-mcp/actions/workflows/ci.yml)
6
- [![license](https://img.shields.io/npm/l/slashvibe-mcp.svg)](./LICENSE)
7
- [![node](https://img.shields.io/node/v/slashvibe-mcp.svg)](https://nodejs.org)
8
- [![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io)
9
- [![Smithery](https://smithery.ai/badge/slashvibe-mcp)](https://smithery.ai/server/slashvibe-mcp)
3
+ Social layer for AI-assisted coding. DMs, presence, and connection between developers.
10
4
 
11
- The presence layer for AI-mediated work. See who's building, message them, share context — without leaving your editor.
5
+ **Works in:** Claude Code Cursor Any MCP-compatible IDE
12
6
 
13
- **New:** Live buddy list widget renders inline in Claude Desktop and VS Code via [MCP Apps](https://modelcontextprotocol.io/docs/extensions/apps).
14
-
15
- Works with Claude Code, Cursor, VS Code, Windsurf, Cline, Continue.dev, JetBrains, and any MCP-compatible client.
16
-
17
- ## Install
18
-
19
- **Quick install** — auto-detects your editors and configures all of them:
7
+ ## Quick Start
20
8
 
9
+ **Claude Code:**
21
10
  ```bash
22
- npx slashvibe-mcp install
11
+ npx slashvibe-mcp setup
23
12
  ```
24
13
 
25
- **Or** add to your MCP config manually and restart your editor:
14
+ **Cursor:** See [Cursor Setup Guide](docs/CURSOR_SETUP.md)
26
15
 
27
- <details open>
28
- <summary><strong>Claude Code</strong></summary>
29
-
30
- ```bash
31
- claude mcp add vibe -- npx -y slashvibe-mcp
32
- ```
16
+ **Other IDEs:** Any editor supporting MCP protocol can use the manual config below.
33
17
 
34
- Or add to `~/.claude.json`:
35
- ```json
36
- {
37
- "mcpServers": {
38
- "vibe": {
39
- "command": "npx",
40
- "args": ["-y", "slashvibe-mcp"]
41
- }
42
- }
43
- }
44
- ```
45
- </details>
18
+ ## Installation
46
19
 
47
- <details>
48
- <summary><strong>Cursor</strong></summary>
20
+ ```bash
21
+ # Install globally
22
+ npm install -g vibe-mcp
49
23
 
50
- Add to `~/.cursor/mcp.json`:
51
- ```json
52
- {
53
- "mcpServers": {
54
- "vibe": {
55
- "command": "npx",
56
- "args": ["-y", "slashvibe-mcp"]
57
- }
58
- }
59
- }
24
+ # Or add to Claude Code MCP config
25
+ claude mcp add vibe-mcp
60
26
  ```
61
- </details>
62
-
63
- <details>
64
- <summary><strong>VS Code (GitHub Copilot)</strong></summary>
65
27
 
66
- Add to `.vscode/mcp.json` in your workspace:
67
- ```json
68
- {
69
- "servers": {
70
- "vibe": {
71
- "command": "npx",
72
- "args": ["-y", "slashvibe-mcp"]
73
- }
74
- }
75
- }
76
- ```
77
- </details>
28
+ ## Manual Setup
78
29
 
79
- <details>
80
- <summary><strong>Windsurf</strong></summary>
30
+ Add to `~/.claude.json`:
81
31
 
82
- Add to `~/.codeium/windsurf/mcp_config.json`:
83
32
  ```json
84
33
  {
85
34
  "mcpServers": {
86
35
  "vibe": {
87
36
  "command": "npx",
88
- "args": ["-y", "slashvibe-mcp"]
37
+ "args": ["vibe-mcp"],
38
+ "env": {
39
+ "VIBE_API_URL": "https://www.slashvibe.dev"
40
+ }
89
41
  }
90
42
  }
91
43
  }
92
44
  ```
93
- </details>
94
45
 
95
- <details>
96
- <summary><strong>Cline / Continue.dev / JetBrains</strong></summary>
46
+ ## Features
97
47
 
98
- **Cline:** Open MCP Servers > Configure > Edit JSON, add `vibe` server as above.
99
-
100
- **Continue.dev:** Create `.continue/mcpServers/vibe.json`:
101
- ```json
102
- {
103
- "command": "npx",
104
- "args": ["-y", "slashvibe-mcp"]
105
- }
106
- ```
48
+ - **Presence** - See who's online building with Claude Code
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
107
53
 
108
- **JetBrains:** Settings > Tools > AI Assistant > MCP, add server with command `npx` and args `-y slashvibe-mcp`.
109
- </details>
54
+ ## Commands
110
55
 
111
- ## Getting Started
56
+ Once installed, use these in Claude Code:
112
57
 
113
- Once installed, tell your AI:
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `vibe` | Check inbox and see who's online |
61
+ | `vibe who` | List online users |
62
+ | `vibe dm @handle "message"` | Send a DM |
63
+ | `vibe status shipping` | Set your status |
64
+ | `vibe remember @handle "note"` | Save a memory |
65
+ | `vibe recall @handle` | Recall memories |
114
66
 
115
- ```
116
- "let's vibe"
117
- ```
67
+ ## API
118
68
 
119
- That's it. It authenticates you via GitHub, shows who's online, and checks your inbox.
69
+ The MCP server connects to `slashvibe.dev` for:
70
+ - User presence and discovery
71
+ - Message routing
72
+ - Identity verification
120
73
 
121
- Step-by-step:
74
+ ## Related
122
75
 
123
- 1. **Authenticate** — `vibe init` opens GitHub OAuth. Takes 30 seconds.
124
- 2. **See who's around** — `vibe who` shows online builders and what they're working on.
125
- 3. **Check messages** `vibe inbox` shows unread DMs.
126
- 4. **Send a message** — `vibe dm @seth hey, just set up /vibe!`
127
-
128
- ## Tools
129
-
130
- ### Presence
131
-
132
- | Tool | What it does |
133
- |------|-------------|
134
- | `vibe_who` | See who's online and what they're building |
135
- | `vibe_status` | Set your mood or what you're working on |
136
- | `vibe_away` | Set yourself away with a message |
137
- | `vibe_back` | Return from away |
138
- | `vibe_presence_agent` | Background presence agent |
139
-
140
- ### Messaging
141
-
142
- | Tool | What it does |
143
- |------|-------------|
144
- | `vibe_dm` | Send a direct message |
145
- | `vibe_inbox` | Check your unread messages |
146
- | `vibe_ping` | Send a quick wave to someone |
147
- | `vibe_react` | React to a message |
148
- | `vibe_open` | Open a conversation thread |
149
- | `vibe_follow` | Follow someone for notifications |
150
- | `vibe_unfollow` | Unfollow someone |
151
-
152
- ### Sessions & Context
153
-
154
- | Tool | What it does |
155
- |------|-------------|
156
- | `vibe_start` | Entry point — authenticates, shows presence, checks inbox |
157
- | `vibe_bye` | End your session |
158
- | `vibe_context` | Share what you're working on |
159
- | `vibe_summarize` | Generate session summary from local journal |
160
- | `vibe_session_resume` | Resume context from a prior session |
161
- | `vibe_session_save` | Save your session — replayable, discoverable, forkable |
162
- | `vibe_session_fork` | Fork an existing session to build on it |
163
- | `vibe_handoff` | Hand off a task with full context |
164
-
165
- ### Discovery & Memory
166
-
167
- | Tool | What it does |
168
- |------|-------------|
169
- | `vibe_discover` | Find people, skills, and collaborators |
170
- | `vibe_invite` | Generate an invite link |
171
- | `vibe_remember` | Save a note about someone |
172
- | `vibe_recall` | Pull up everything you know about someone |
173
- | `vibe_forget` | Delete a memory |
174
-
175
- ### Collaboration
176
-
177
- | Tool | What it does |
178
- |------|-------------|
179
- | `vibe_ship` | Share what you shipped, an idea, or a request |
180
- | `vibe_feed` | See what people are shipping |
181
- | `vibe_reserve` | Reserve files for editing (prevents conflicts) |
182
- | `vibe_release` | Release file reservations |
183
- | `vibe_reservations` | List active reservations |
184
- | `vibe_create_artifact` | Create a shareable guide or workspace |
185
- | `vibe_view_artifact` | View shared artifacts |
186
-
187
- ### Infrastructure
188
-
189
- | Tool | What it does |
190
- |------|-------------|
191
- | `vibe_init` | Set up identity via GitHub OAuth |
192
- | `vibe_help` | Show available commands |
193
- | `vibe_doctor` | Health check — API, auth, storage, presence |
194
- | `vibe_update` | Check for and apply updates |
195
- | `vibe_settings` | Configure preferences |
196
- | `vibe_notifications` | Configure notification channels |
197
- | `vibe_mute` | Mute a user |
198
- | `vibe_report` | Report issues or inappropriate behavior |
199
-
200
- ## How It Works
201
-
202
- ```
203
- Your Editor ←→ /vibe MCP (stdio) ←→ slashvibe.dev API ←→ Other users
204
-
205
- Local SQLite DB
206
- (~/.vibecodings/sessions.db)
207
- ```
208
-
209
- - **Presence** broadcasts via heartbeat — others see you in real time
210
- - **Messages** are stored locally first, then synced (optimistic send)
211
- - **Sessions** are journaled to SQLite — durable, resumable, summarizable
212
- - **Identity** persists via GitHub OAuth — your handle follows you across editors and machines
213
- - **Memory** is local — notes about people stay on your machine
214
-
215
- ## Troubleshooting
216
-
217
- **"I installed but don't see /vibe tools"**
218
- - Restart your editor after adding the MCP config
219
- - Run `vibe doctor` to diagnose
220
-
221
- **"Authentication failed or timed out"**
222
- - OAuth opens a browser window — if it didn't, go to [slashvibe.dev/login](https://slashvibe.dev/login)
223
- - The callback runs on `localhost:9876` — make sure that port is free
224
-
225
- **"Messages aren't sending"**
226
- - Run `vibe doctor` to check API connectivity
227
- - Messages save locally even when offline — they sync on reconnect
228
-
229
- ## Configuration
230
-
231
- Config: `~/.vibecodings/config.json` (primary) or `~/.vibe/config.json` (legacy fallback).
232
-
233
- Database: `~/.vibecodings/sessions.db` (SQLite, WAL mode).
234
-
235
- ## Development
236
-
237
- ```bash
238
- npm install
239
- npm test # All tests
240
- npm run lint # ESLint
241
- npm run typecheck # TypeScript validation
242
- ```
243
-
244
- ```
245
- vibe-mcp/
246
- ├── index.js # MCP server entry + CLI
247
- ├── config.js # User identity
248
- ├── presence.js # Heartbeat loop (30s)
249
- ├── analytics.js # Anonymous usage tracking
250
- ├── tools/ # MCP tools
251
- ├── store/ # Persistence (api.js, sqlite.js, sessions.js)
252
- ├── bridges/ # Platform integrations (Discord, Telegram, etc.)
253
- ├── intelligence/ # Ambient signals (serendipity, proactive discovery)
254
- └── protocol/ # AIRC protocol
255
- ```
256
-
257
- ## Contributing
258
-
259
- We welcome contributions. See [CLA.md](./CLA.md) before submitting pull requests.
260
-
261
- - [GitHub Issues](https://github.com/VibeCodingInc/vibe-mcp/issues) — Bug reports
262
- - [Discussions](https://github.com/VibeCodingInc/vibe-mcp/discussions) — Feature proposals
76
+ - [GitHub](https://github.com/VibeCodingInc/vibe-mcp) - Source code
77
+ - [slashvibe.dev](https://slashvibe.dev) - Web presence
78
+ - [Spirit Protocol](https://spiritprotocol.io) - Parent ecosystem
79
+ - [AIRC](https://airc.chat) - Agent identity protocol
263
80
 
264
81
  ## License
265
82
 
266
- MIT — see [LICENSE](./LICENSE)
267
-
268
- ## Links
269
-
270
- - [slashvibe.dev](https://slashvibe.dev) — Platform
271
- - [Vibe Terminal](https://github.com/VibeCodingInc/vibe-terminal) — Desktop app
272
- - [@slashvibe on X](https://twitter.com/slashvibe) — Updates
273
-
274
- ---
275
-
276
- Built by [Slash Vibe, Inc.](https://slashvibe.dev)
83
+ MIT
package/analytics.js CHANGED
@@ -97,35 +97,11 @@ 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
-
122
100
  module.exports = {
123
101
  track,
124
102
  trackEmptyInbox,
125
103
  trackLurkMode,
126
104
  trackOnboardingTask,
127
105
  trackDiscovery,
128
- trackSession,
129
- trackInstall,
130
- trackToolUsage
106
+ trackSession
131
107
  };
package/auth-store.js ADDED
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Auth Store - In-memory singleton for authentication state
3
+ *
4
+ * This is the SOURCE OF TRUTH for auth during MCP runtime.
5
+ * File persistence (config.json) is only for durability across restarts.
6
+ *
7
+ * Why this exists:
8
+ * - OAuth callback and API calls happen in the same MCP process
9
+ * - File-based auth was unreliable due to per-PID session files and caching
10
+ * - In-memory state is immediate and deterministic
11
+ *
12
+ * Usage:
13
+ * - Startup: authStore.hydrate() loads from disk once
14
+ * - OAuth: authStore.setToken(token) updates immediately
15
+ * - API calls: authStore.getToken() returns current token (no file I/O)
16
+ */
17
+
18
+ // In-memory state - the single source of truth during runtime
19
+ let _token = null;
20
+ let _handle = null;
21
+ let _oneLiner = null;
22
+ let _hydrated = false;
23
+
24
+ /**
25
+ * Hydrate auth state from disk (call once at MCP startup)
26
+ * This loads persisted state from config.json
27
+ */
28
+ function hydrate() {
29
+ if (_hydrated) return; // Only hydrate once
30
+
31
+ try {
32
+ const config = require('./config');
33
+ const cfg = config.load();
34
+
35
+ _token = cfg.authToken || cfg.privyToken || null;
36
+ _handle = cfg.handle || cfg.username || null;
37
+ _oneLiner = cfg.one_liner || cfg.workingOn || null;
38
+
39
+ // Cross-client: if no token from config.json, check terminal/buddy auth.json
40
+ if (!_token) {
41
+ const terminalAuth = config.loadTerminalAuth();
42
+ if (terminalAuth?.token) {
43
+ _token = terminalAuth.token;
44
+ _handle = _handle || terminalAuth.handle || null;
45
+ }
46
+ }
47
+
48
+ _hydrated = true;
49
+
50
+ if (_token) {
51
+ console.error('[auth-store] Hydrated: @' + _handle);
52
+ } else {
53
+ console.error('[auth-store] Hydrated: no token');
54
+ }
55
+ } catch (e) {
56
+ console.error('[auth-store] Hydration failed:', e.message);
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Set auth token (call after OAuth completes)
62
+ * @param {string} token - JWT token
63
+ */
64
+ function setToken(token) {
65
+ const hadToken = !!_token;
66
+ _token = token;
67
+
68
+ if (!hadToken && token) {
69
+ console.error('[auth-store] Token set (was empty)');
70
+ } else if (hadToken && token && token !== _token) {
71
+ console.error('[auth-store] Token updated');
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Get current auth token
77
+ * @returns {string|null} Current token or null
78
+ */
79
+ function getToken() {
80
+ return _token;
81
+ }
82
+
83
+ /**
84
+ * Set user handle
85
+ * @param {string} handle - User handle (without @)
86
+ */
87
+ function setHandle(handle) {
88
+ _handle = handle;
89
+ }
90
+
91
+ /**
92
+ * Get current handle
93
+ * @returns {string|null} Current handle or null
94
+ */
95
+ function getHandle() {
96
+ return _handle;
97
+ }
98
+
99
+ /**
100
+ * Set one-liner (what user is building)
101
+ * @param {string} oneLiner - One-liner description
102
+ */
103
+ function setOneLiner(oneLiner) {
104
+ _oneLiner = oneLiner;
105
+ }
106
+
107
+ /**
108
+ * Get current one-liner
109
+ * @returns {string|null} Current one-liner or null
110
+ */
111
+ function getOneLiner() {
112
+ return _oneLiner;
113
+ }
114
+
115
+ /**
116
+ * Check if user is authenticated
117
+ * @returns {boolean} True if token exists
118
+ */
119
+ function isAuthenticated() {
120
+ return !!_token;
121
+ }
122
+
123
+ /**
124
+ * Clear all auth state (for logout/reset)
125
+ */
126
+ function clear() {
127
+ _token = null;
128
+ _handle = null;
129
+ _oneLiner = null;
130
+ console.error('[auth-store] Cleared');
131
+ }
132
+
133
+ /**
134
+ * Get full auth state (for debugging)
135
+ * @returns {object} Current auth state
136
+ */
137
+ function getState() {
138
+ return {
139
+ token: _token ? _token.substring(0, 20) + '...' : null,
140
+ handle: _handle,
141
+ oneLiner: _oneLiner,
142
+ hydrated: _hydrated,
143
+ isAuthenticated: !!_token
144
+ };
145
+ }
146
+
147
+ module.exports = {
148
+ hydrate,
149
+ setToken,
150
+ getToken,
151
+ setHandle,
152
+ getHandle,
153
+ setOneLiner,
154
+ getOneLiner,
155
+ isAuthenticated,
156
+ clear,
157
+ getState
158
+ };
package/auto-update.js CHANGED
@@ -3,16 +3,14 @@
3
3
  * Checks for updates and prompts user to update
4
4
  */
5
5
 
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';
6
+ const { exec } = require('child_process');
7
+ const { promisify } = require('util');
8
+ const fs = require('fs').promises;
9
+ const path = require('path');
11
10
 
12
11
  const execAsync = promisify(exec);
13
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
14
12
 
15
- export async function checkForUpdates() {
13
+ async function checkForUpdates() {
16
14
  try {
17
15
  // Read local version
18
16
  const versionPath = path.join(__dirname, 'version.json');
@@ -47,7 +45,7 @@ export async function checkForUpdates() {
47
45
  }
48
46
  }
49
47
 
50
- export async function performUpdate() {
48
+ async function performUpdate() {
51
49
  try {
52
50
  const repoPath = path.join(__dirname, '..');
53
51
 
@@ -84,7 +82,7 @@ export async function performUpdate() {
84
82
  }
85
83
  }
86
84
 
87
- export function compareVersions(v1, v2) {
85
+ function compareVersions(v1, v2) {
88
86
  const parts1 = v1.split('.').map(Number);
89
87
  const parts2 = v2.split('.').map(Number);
90
88
 
@@ -96,7 +94,7 @@ export function compareVersions(v1, v2) {
96
94
  return 0;
97
95
  }
98
96
 
99
- export function formatUpdateNotification(update) {
97
+ function formatUpdateNotification(update) {
100
98
  if (!update) return null;
101
99
 
102
100
  let message = `\n${'='.repeat(60)}\n`;
@@ -123,3 +121,10 @@ export function formatUpdateNotification(update) {
123
121
 
124
122
  return message;
125
123
  }
124
+
125
+ module.exports = {
126
+ checkForUpdates,
127
+ performUpdate,
128
+ compareVersions,
129
+ formatUpdateNotification
130
+ };