vesper-wizard 2.3.4 → 2.3.6

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 -0
  2. package/package.json +1 -1
  3. package/wizard.js +35 -3
package/README.md CHANGED
@@ -14,6 +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
18
 
18
19
  ## What you get
19
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vesper-wizard",
3
- "version": "2.3.4",
3
+ "version": "2.3.6",
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
@@ -18,6 +18,7 @@ const readline = require('readline');
18
18
  const HOME = os.homedir();
19
19
  const VESPER_DIR = path.join(HOME, '.vesper');
20
20
  const CONFIG_TOML = path.join(VESPER_DIR, 'config.toml');
21
+ const CONFIG_JSON = path.join(VESPER_DIR, 'config.json');
21
22
  const DATA_DIR = path.join(VESPER_DIR, 'data');
22
23
  const IS_WIN = process.platform === 'win32';
23
24
  const APPDATA = process.env.APPDATA || path.join(HOME, 'AppData', 'Roaming');
@@ -49,6 +50,32 @@ function writeToml(filePath, data) {
49
50
  fs.writeFileSync(filePath, lines.join('\n') + '\n', 'utf8');
50
51
  }
51
52
 
53
+ function readWizardState() {
54
+ if (!fs.existsSync(CONFIG_JSON)) return {};
55
+ try {
56
+ const content = fs.readFileSync(CONFIG_JSON, 'utf8').trim();
57
+ return content ? JSON.parse(content) : {};
58
+ } catch {
59
+ return {};
60
+ }
61
+ }
62
+
63
+ function writeWizardState(state) {
64
+ ensureDir(path.dirname(CONFIG_JSON));
65
+ fs.writeFileSync(CONFIG_JSON, JSON.stringify(state, null, 2), 'utf8');
66
+ }
67
+
68
+ function hasCompletedOnboarding() {
69
+ const state = readWizardState();
70
+ return state.onboardingCompleted === true;
71
+ }
72
+
73
+ function markOnboardingCompleted() {
74
+ const state = readWizardState();
75
+ state.onboardingCompleted = true;
76
+ writeWizardState(state);
77
+ }
78
+
52
79
  function dim(text) { return `\x1b[2m${text}\x1b[0m`; }
53
80
  function bold(text) { return `\x1b[1m${text}\x1b[0m`; }
54
81
  function green(text) { return `\x1b[32m${text}\x1b[0m`; }
@@ -282,8 +309,13 @@ async function deviceAuthFlow() {
282
309
  console.log(` │ │`);
283
310
  console.log(` └───────────────────────────────────────────────┘\n`);
284
311
 
285
- openBrowser(loginUrl);
286
- console.log(` ${dim('Browser opened automatically.')}`);
312
+ if (!hasCompletedOnboarding()) {
313
+ openBrowser(loginUrl);
314
+ markOnboardingCompleted();
315
+ console.log(` ${dim('Browser opened automatically (first-time onboarding).')}`);
316
+ } else {
317
+ console.log(` ${dim('Browser auto-open skipped (onboarding already completed).')}`);
318
+ }
287
319
  console.log(` ${dim('Waiting for you to sign in...')}\n`);
288
320
 
289
321
  // Step 3: Poll until confirmed or expired
@@ -386,7 +418,7 @@ function getAllAgentConfigs() {
386
418
 
387
419
  function installMcpToAgent(agent) {
388
420
  const npxCmd = IS_WIN ? 'npx.cmd' : 'npx';
389
- const serverEntry = { command: npxCmd, args: ['-y', '@vespermcp/mcp-server@latest'] };
421
+ const serverEntry = { command: npxCmd, args: ['-y', '-p', '@vespermcp/mcp-server@latest', 'vespermcp'] };
390
422
 
391
423
  try {
392
424
  if (agent.format === 'toml') {