@lanonasis/cli 3.6.0 → 3.6.2

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.
@@ -65,7 +65,7 @@ async function handleAuthenticationFailure(error, config, authMethod = 'jwt') {
65
65
  case 'network_error':
66
66
  console.log(chalk.red('Network connection failed'));
67
67
  console.log(chalk.gray('• Check your internet connection'));
68
- console.log(chalk.gray('• Verify you can access https://api.lanonasis.com'));
68
+ console.log(chalk.gray('• Verify you can access https://auth.lanonasis.com'));
69
69
  console.log(chalk.gray('• Try again in a few moments'));
70
70
  if (failureCount >= 2) {
71
71
  console.log(chalk.gray('• Consider using a different network if issues persist'));
@@ -101,7 +101,7 @@ async function handleAuthenticationFailure(error, config, authMethod = 'jwt') {
101
101
  if (authMethod === 'vendor_key') {
102
102
  console.log(chalk.cyan('• Generate a new vendor key from your dashboard'));
103
103
  console.log(chalk.cyan('• Try: lanonasis auth logout && lanonasis auth login'));
104
- console.log(chalk.cyan('• Switch to browser login: lanonasis auth login --use-web-auth'));
104
+ console.log(chalk.cyan('• Switch to browser login: lanonasis auth login (choose Browser Login)'));
105
105
  }
106
106
  else {
107
107
  console.log(chalk.cyan('• Reset your password if you\'re unsure'));
@@ -485,7 +485,7 @@ export async function diagnoseCommand() {
485
485
  console.log(chalk.gray('\n🔧 Additional troubleshooting:'));
486
486
  console.log(chalk.gray(' • Verify the vendor key matches the value shown in your dashboard'));
487
487
  console.log(chalk.gray(' • Check if your key is active in the dashboard'));
488
- console.log(chalk.gray(' • Try browser authentication: lanonasis auth login --use-web-auth'));
488
+ console.log(chalk.gray(' • Try browser authentication: lanonasis auth login (choose Browser Login)'));
489
489
  console.log(chalk.gray(' • Contact support if issues persist'));
490
490
  }
491
491
  }
@@ -574,7 +574,7 @@ async function handleVendorKeyFlow(config) {
574
574
  console.log();
575
575
  // Enhanced guidance for obtaining vendor keys
576
576
  console.log(chalk.cyan('📋 How to get your vendor key:'));
577
- console.log(chalk.gray('1. Visit your Lanonasis dashboard at https://app.lanonasis.com'));
577
+ console.log(chalk.gray('1. Visit your Lanonasis dashboard at https://dashboard.lanonasis.com'));
578
578
  console.log(chalk.gray('2. Navigate to Settings → API Keys'));
579
579
  console.log(chalk.gray('3. Click "Generate New Key" and copy the full key value'));
580
580
  console.log();
@@ -649,6 +649,7 @@ async function handleOAuthFlow(config) {
649
649
  console.log();
650
650
  console.log(chalk.green('✓ OAuth2 authentication successful'));
651
651
  console.log(colors.info('You can now use Lanonasis services'));
652
+ process.exit(0);
652
653
  }
653
654
  catch (error) {
654
655
  console.error(chalk.red('✖ OAuth2 authentication failed'));
@@ -45,14 +45,17 @@ export function mcpCommands(program) {
45
45
  const connected = await client.connect({ useRemote: isAuthenticated });
46
46
  if (connected) {
47
47
  spinner.succeed(chalk.green(`Connected to ${isAuthenticated ? 'remote' : 'local'} MCP server`));
48
+ process.exit(0);
48
49
  }
49
50
  else {
50
51
  spinner.fail('Failed to auto-connect to MCP');
52
+ process.exit(1);
51
53
  }
52
54
  }
53
55
  catch {
54
56
  spinner.fail('MCP auto-connect failed');
55
57
  }
58
+ process.exit(1);
56
59
  });
57
60
  // Connect command
58
61
  mcp.command('connect')
@@ -109,6 +112,7 @@ export function mcpCommands(program) {
109
112
  connected = await enhancedClient.connectSingle(serverConfig);
110
113
  if (connected) {
111
114
  spinner.succeed(chalk.green(`Connected to MCP server at ${options.url}`));
115
+ process.exit(0);
112
116
  return;
113
117
  }
114
118
  }
@@ -127,6 +131,7 @@ export function mcpCommands(program) {
127
131
  }
128
132
  if (connected) {
129
133
  spinner.succeed(chalk.green(`Connected to MCP server in ${connectionMode} mode`));
134
+ process.exit(0);
130
135
  if (connectionMode === 'remote') {
131
136
  console.log(chalk.cyan('ℹ️ Using remote MCP via mcp.lanonasis.com'));
132
137
  console.log(chalk.cyan('📡 SSE endpoint active for real-time updates'));
@@ -141,6 +146,7 @@ export function mcpCommands(program) {
141
146
  }
142
147
  }
143
148
  catch (error) {
149
+ process.exit(1);
144
150
  spinner.fail(`Connection failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
145
151
  process.exit(1);
146
152
  }
@@ -341,15 +347,15 @@ export function mcpCommands(program) {
341
347
  .action(async (options) => {
342
348
  const config = new CLIConfig();
343
349
  if (options.preferRemote) {
344
- config.set('mcpPreference', 'remote');
350
+ await config.setAndSave('mcpPreference', 'remote');
345
351
  console.log(chalk.green('✓ Set MCP preference to remote'));
346
352
  }
347
353
  else if (options.preferLocal) {
348
- config.set('mcpPreference', 'local');
354
+ await config.setAndSave('mcpPreference', 'local');
349
355
  console.log(chalk.green('✓ Set MCP preference to local'));
350
356
  }
351
357
  else if (options.auto) {
352
- config.set('mcpPreference', 'auto');
358
+ await config.setAndSave('mcpPreference', 'auto');
353
359
  console.log(chalk.green('✓ Set MCP preference to auto-detect'));
354
360
  }
355
361
  else {
package/dist/index.js CHANGED
@@ -208,6 +208,7 @@ authCmd
208
208
  .action(async () => {
209
209
  await cliConfig.logout();
210
210
  console.log(chalk.green('✓ Logged out successfully'));
211
+ process.exit(0);
211
212
  });
212
213
  authCmd
213
214
  .command('status')
@@ -74,11 +74,13 @@ export class MCPClient {
74
74
  // 3) configured preference
75
75
  // 4) default to 'websocket' (production-ready pm2 mcp-core)
76
76
  const configuredMode = this.config.get('mcpConnectionMode');
77
+ const mcpPreference = this.config.get('mcpPreference');
77
78
  const preferRemote = this.config.get('mcpUseRemote');
78
79
  const connectionMode = options.connectionMode
79
80
  ?? (options.useWebSocket ? 'websocket' : undefined)
80
81
  ?? (options.useRemote ? 'remote' : undefined)
81
82
  ?? configuredMode
83
+ ?? mcpPreference
82
84
  ?? (preferRemote ? 'remote' : 'websocket');
83
85
  let wsUrl;
84
86
  let serverUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanonasis/cli",
3
- "version": "3.6.0",
3
+ "version": "3.6.2",
4
4
  "description": "LanOnasis Enterprise CLI - Memory as a Service, API Key Management, and Infrastructure Orchestration",
5
5
  "main": "dist/index-simple.js",
6
6
  "bin": {