slashvibe-mcp 0.8.3 → 0.8.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/setup.js +46 -8
  3. package/version.json +4 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slashvibe-mcp",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "mcpName": "io.github.vibecodinginc/vibe",
5
5
  "description": "Presence + messaging for terminal coding agents (Claude Code, Codex, Cursor) — the /vibe kernel",
6
6
  "main": "index.js",
package/setup.js CHANGED
@@ -93,8 +93,17 @@ function findClaudeConfig() {
93
93
  }
94
94
  }
95
95
 
96
- // Default to ~/.claude.json (will create if doesn't exist)
97
- return path.join(homeDir, '.claude.json');
96
+ // Nothing found. Returning a path anyway made setup report "→ Claude Code" and
97
+ // "configured" on machines with no Claude Code at all — a success message for work
98
+ // that helps nobody, and the reason "no supported host" was unreachable. Callers
99
+ // now get null and decide honestly; the default path is only for the create case,
100
+ // which is signalled explicitly.
101
+ return null;
102
+ }
103
+
104
+ /** Where we WOULD write a Claude Code config if the user wants one created. */
105
+ function defaultClaudeConfigPath() {
106
+ return path.join(os.homedir(), '.claude.json');
98
107
  }
99
108
 
100
109
  /**
@@ -140,10 +149,18 @@ function addVibeToJsonConfig(configPath) {
140
149
  }
141
150
 
142
151
  /**
143
- * Configure Claude Code (~/.claude.json et al). Always runs.
152
+ * Configure Claude Code (~/.claude.json et al).
153
+ *
154
+ * Cursor and Codex only configure when their directories exist; Claude Code used to
155
+ * configure unconditionally, inventing ~/.claude.json on machines that had never run
156
+ * it. That is what made setup announce "→ Claude Code · configured" during a walk on
157
+ * a clean machine with no Claude Code installed. Same rule for all three hosts now:
158
+ * we write where the host actually lives, and say so honestly when none is found.
144
159
  */
145
- function configureClaudeCode() {
146
- const configPath = findClaudeConfig();
160
+ function configureClaudeCode({ createIfMissing = false } = {}) {
161
+ const found = findClaudeConfig();
162
+ const configPath = found || (createIfMissing ? defaultClaudeConfigPath() : null);
163
+ if (!configPath) return null; // Claude Code not installed here
147
164
  try {
148
165
  return { host: 'Claude Code', path: configPath, status: addVibeToJsonConfig(configPath) };
149
166
  } catch (e) {
@@ -231,17 +248,38 @@ function configureCodex() {
231
248
  * Configure every detected host. Returns results for the ones present.
232
249
  */
233
250
  function configureAllHosts() {
234
- return [configureClaudeCode(), configureCodex(), configureCursor()].filter(Boolean);
251
+ const found = [configureClaudeCode(), configureCodex(), configureCursor()].filter(Boolean);
252
+ // No host detected at all — someone ran this before installing a coding agent, or
253
+ // in a container. Rather than silently doing nothing (or, as before, inventing a
254
+ // Claude Code config to have something to report), create the Claude Code config so
255
+ // /vibe is wired the moment they install it, and let the caller say which case it is.
256
+ if (found.length === 0) {
257
+ const created = configureClaudeCode({ createIfMissing: true });
258
+ return created ? [{ ...created, hostWasMissing: true }] : [];
259
+ }
260
+ return found;
235
261
  }
236
262
 
237
263
  /**
238
264
  * Test API connection
239
265
  */
240
266
  async function testConnection() {
267
+ // Found by actually RUNNING this on a clean machine, which no amount of reading
268
+ // the code surfaced: /api/health answers `{"status":"healthy"}`, and this asked
269
+ // for `'ok'`. So every first run — on a perfectly good connection — printed
270
+ // "Could not reach slashvibe.dev" and three troubleshooting steps, to a person
271
+ // whose very first experience of /vibe was being told it was broken.
272
+ //
273
+ // The client no longer guesses at the server's vocabulary. Reachability is what
274
+ // HTTP already answers; the body is only allowed to veto by reporting an explicit
275
+ // unhealthy state.
241
276
  try {
242
277
  const response = await fetch(`${API_BASE}/api/health`);
243
- const data = await response.json();
244
- return data.status === 'ok' || data.success;
278
+ if (!response.ok) return false;
279
+ const data = await response.json().catch(() => ({}));
280
+ if (data.success === false) return false;
281
+ if (typeof data.status === 'string' && /unhealthy|down|error/i.test(data.status)) return false;
282
+ return true;
245
283
  } catch (e) {
246
284
  return false;
247
285
  }
package/version.json CHANGED
@@ -1,14 +1,10 @@
1
1
  {
2
- "version": "0.8.3",
2
+ "version": "0.8.4",
3
3
  "updated": "2026-07-31",
4
- "changelog": "Security release, and the one that reaches the door people actually use. A clean install runs `npx slashvibe-mcp`, which had its own separate sign-in code \u2014 so the fixes shipped in 0.8.2 were never on that path. There is now one sign-in implementation: the listener binds before the browser opens, each attempt is tagged so another process's login can never land in yours, two sign-ins at once both work, and a slow sign-in gets a page explaining itself instead of a browser error. Identity is one thing everywhere \u2014 pasting a token no longer leaves your requests going out as the previous account, and presence announces the account your credential names rather than one read from a file. A message someone sends you is never placed next to an instruction telling your agent to reply.",
4
+ "changelog": "Setup told every new user the service was unreachable. The health check asked the server for one word and the server answers another, so step 3 of every first run reported 'could not reach slashvibe.dev' \u2014 with troubleshooting steps \u2014 to people whose connection was fine. Fixed by letting HTTP answer reachability instead of guessing at vocabulary. Setup also claimed to configure Claude Code on machines that had never installed it; all three coding agents are now detected the same way.",
5
5
  "features": [
6
- "One sign-in path for terminal setup and vibe_init \u2014 the invite path has the fixes",
7
- "Each sign-in attempt is tagged; a concurrent login cannot land in your session",
8
- "Two sign-ins at once both work (port falls back instead of colliding)",
9
- "vibe_token switches the whole session, not half of it",
10
- "Presence names the account your credential names",
11
- "Inbound messages are never seated beside an instruction to act on them"
6
+ "The connection test agrees with the server it is testing",
7
+ "Coding agents are detected, not assumed \u2014 no more configuring a host you don't have"
12
8
  ],
13
9
  "deprecated": [],
14
10
  "breaking": false,