vesper-wizard 2.3.6 → 2.3.8

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/README.md +1 -1
  2. package/package.json +1 -1
  3. package/wizard.js +30 -11
package/README.md CHANGED
@@ -14,7 +14,7 @@ That's it. The wizard handles everything:
14
14
  2. Initializes a local credentials vault in unified-key mode (no external API keys required)
15
15
  3. Installs `@vespermcp/mcp-server` and auto-configures MCP for all detected agents (Claude, Cursor, VS Code, Codex, Gemini CLI)
16
16
  4. Verifies the installation
17
- 5. Opens browser onboarding automatically only once (first-time setup)
17
+ 5. Opens browser onboarding during wizard auth (can be disabled with `VESPER_WIZARD_AUTO_OPEN=0`)
18
18
 
19
19
  ## What you get
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vesper-wizard",
3
- "version": "2.3.6",
3
+ "version": "2.3.8",
4
4
  "description": "Zero-friction setup wizard for Vesper — local MCP server, unified dataset API, and agent auto-config in 60 seconds",
5
5
  "bin": {
6
6
  "vesper-wizard": "wizard.js"
package/wizard.js CHANGED
@@ -182,6 +182,10 @@ function openBrowser(url) {
182
182
  } catch { /* browser open is best-effort */ }
183
183
  }
184
184
 
185
+ function isInteractiveTerminal() {
186
+ return Boolean(process.stdin && process.stdin.isTTY && process.stdout && process.stdout.isTTY);
187
+ }
188
+
185
189
  function askYesNo(question) {
186
190
  return new Promise((resolve) => {
187
191
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -309,12 +313,15 @@ async function deviceAuthFlow() {
309
313
  console.log(` │ │`);
310
314
  console.log(` └───────────────────────────────────────────────┘\n`);
311
315
 
312
- if (!hasCompletedOnboarding()) {
316
+ const shouldAutoOpenBrowser = process.env.VESPER_WIZARD_AUTO_OPEN !== '0';
317
+ if (shouldAutoOpenBrowser) {
313
318
  openBrowser(loginUrl);
314
- markOnboardingCompleted();
315
- console.log(` ${dim('Browser opened automatically (first-time onboarding).')}`);
319
+ if (!hasCompletedOnboarding()) {
320
+ markOnboardingCompleted();
321
+ }
322
+ console.log(` ${dim('Browser opened automatically for device auth.')}`);
316
323
  } else {
317
- console.log(` ${dim('Browser auto-open skipped (onboarding already completed).')}`);
324
+ console.log(` ${dim('Browser auto-open disabled via VESPER_WIZARD_AUTO_OPEN=0. Open the URL manually to continue.')}`);
318
325
  }
319
326
  console.log(` ${dim('Waiting for you to sign in...')}\n`);
320
327
 
@@ -469,6 +476,13 @@ async function checkServerHealth() {
469
476
 
470
477
  // ── Main Wizard ──────────────────────────────────────────────
471
478
  async function main() {
479
+ if (!isInteractiveTerminal()) {
480
+ console.error(red('vesper-wizard is interactive and cannot run in MCP stdio mode.'));
481
+ console.error(dim('Use this command for MCP server runtime instead:'));
482
+ console.error(cyan('npx -y -p @vespermcp/mcp-server@latest vespermcp'));
483
+ process.exit(2);
484
+ }
485
+
472
486
  printBanner();
473
487
 
474
488
  console.log(` ${green('→')} Setting up Vesper on ${bold(os.hostname())}\n`);
@@ -519,17 +533,22 @@ async function main() {
519
533
  console.log(` ${green('✓')}`);
520
534
  console.log(` ${dim('Mode:')} ${dim(vaultData.auth_mode === 'cloud' ? 'cloud (linked to Vesper account)' : 'single local Vesper key (no external keys required)')}`);
521
535
 
522
- // ─── Step 4: Install @vespermcp/mcp-server ─────────────────
523
- console.log(`\n ${dim('[')}${cyan('4/6')}${dim(']')} Installing Vesper MCP server...`);
536
+ // ─── Step 4: Verify @vespermcp/mcp-server command ───────────
537
+ console.log(`\n ${dim('[')}${cyan('4/6')}${dim(']')} Verifying Vesper MCP server command...`);
524
538
  try {
525
539
  const npmCmd = IS_WIN ? 'npx.cmd' : 'npx';
526
- spawnSync(npmCmd, ['-y', '@vespermcp/mcp-server@latest', '--setup', '--silent'], {
527
- stdio: 'inherit',
528
- timeout: 120000,
540
+ const verify = spawnSync(npmCmd, ['-y', '-p', '@vespermcp/mcp-server@latest', 'vespermcp', '--version'], {
541
+ stdio: 'pipe',
542
+ timeout: 30000,
543
+ encoding: 'utf8',
529
544
  });
530
- console.log(` ${green('✓')} @vespermcp/mcp-server installed`);
545
+ if (verify.status === 0) {
546
+ console.log(` ${green('✓')} @vespermcp/mcp-server command is available`);
547
+ } else {
548
+ console.log(` ${yellow('⚠')} Could not verify vespermcp binary. MCP clients will still install it on first run.`);
549
+ }
531
550
  } catch {
532
- console.log(` ${yellow('⚠')} Could not auto-install run manually: npx -y @vespermcp/mcp-server@latest --setup`);
551
+ console.log(` ${yellow('⚠')} Could not verify vespermcp binary. MCP clients will still install it on first run.`);
533
552
  }
534
553
 
535
554
  // ─── Step 5: Auto-configure all detected IDEs ──────────────