@lanonasis/cli 3.2.14 → 3.4.15

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 (36) hide show
  1. package/README.md +57 -13
  2. package/dist/commands/auth.js +7 -7
  3. package/dist/commands/completion.js +2 -0
  4. package/dist/commands/config.js +4 -4
  5. package/dist/commands/enhanced-memory.js +1 -1
  6. package/dist/commands/mcp.js +15 -9
  7. package/dist/core/achievements.js +1 -1
  8. package/dist/core/power-mode.js +5 -3
  9. package/dist/core/welcome.js +7 -6
  10. package/dist/enhanced-cli.js +6 -3
  11. package/dist/index-simple.js +5 -1
  12. package/dist/index.js +5 -1
  13. package/dist/mcp/access-control.d.ts +1 -1
  14. package/dist/mcp/access-control.js +4 -4
  15. package/dist/mcp/client/enhanced-client.js +4 -5
  16. package/dist/mcp/schemas/tool-schemas.d.ts +1 -1
  17. package/dist/mcp/schemas/tool-schemas.js +1 -1
  18. package/dist/mcp/server/lanonasis-server.d.ts +2 -1
  19. package/dist/mcp/server/lanonasis-server.js +7 -5
  20. package/dist/mcp/transports/transport-manager.js +3 -3
  21. package/dist/mcp-server.js +3 -3
  22. package/dist/utils/config.js +59 -10
  23. package/dist/utils/mcp-client.d.ts +4 -2
  24. package/dist/utils/mcp-client.js +86 -42
  25. package/package.json +3 -3
  26. package/dist/__tests__/auth-persistence.test.d.ts +0 -1
  27. package/dist/__tests__/auth-persistence.test.js +0 -243
  28. package/dist/__tests__/cross-device-integration.test.d.ts +0 -1
  29. package/dist/__tests__/cross-device-integration.test.js +0 -305
  30. package/dist/__tests__/mcp-connection-reliability.test.d.ts +0 -1
  31. package/dist/__tests__/mcp-connection-reliability.test.js +0 -489
  32. package/dist/__tests__/setup.d.ts +0 -1
  33. package/dist/__tests__/setup.js +0 -26
  34. package/dist/mcp/server/mcp/server/lanonasis-server.js +0 -911
  35. package/dist/mcp/server/utils/api.js +0 -431
  36. package/dist/mcp/server/utils/config.js +0 -855
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @lanonasis/cli v3.0.1 - Enhanced MCP & Interactive CLI Experience
1
+ # @lanonasis/cli v3.4.15 - Enhanced MCP & Interactive CLI Experience
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/@lanonasis/cli)](https://www.npmjs.com/package/@lanonasis/cli)
4
4
  [![Downloads](https://img.shields.io/npm/dt/@lanonasis/cli)](https://www.npmjs.com/package/@lanonasis/cli)
@@ -10,6 +10,7 @@
10
10
  ## 🚀 Quick Start
11
11
 
12
12
  ### Installation
13
+
13
14
  ```bash
14
15
  # Global installation (recommended)
15
16
  npm install -g @lanonasis/cli
@@ -19,6 +20,7 @@ lanonasis --version # or onasis --version
19
20
  ```
20
21
 
21
22
  ### First Steps
23
+
22
24
  ```bash
23
25
  # Interactive guided setup (recommended for new users)
24
26
  onasis guide
@@ -36,12 +38,12 @@ onasis memory create --title "Welcome" --content "My first memory"
36
38
 
37
39
  The CLI supports multiple command aliases for different use cases:
38
40
 
39
- | Command | Purpose | Golden Contract |
40
- |---------|---------|-----------------|
41
- | `onasis` | Golden Contract compliant interface | ✅ Yes |
42
- | `lanonasis` | Standard LanOnasis interface | ✅ Yes |
43
- | `memory` | Memory-focused operations | ✅ Yes |
44
- | `maas` | Memory as a Service operations | ✅ Yes |
41
+ | Command | Purpose | Golden Contract |
42
+ | ----------- | ----------------------------------- | --------------- |
43
+ | `onasis` | Golden Contract compliant interface | ✅ Yes |
44
+ | `lanonasis` | Standard LanOnasis interface | ✅ Yes |
45
+ | `memory` | Memory-focused operations | ✅ Yes |
46
+ | `maas` | Memory as a Service operations | ✅ Yes |
45
47
 
46
48
  ```bash
47
49
  # All of these are equivalent:
@@ -54,24 +56,31 @@ maas memory list
54
56
  ## 🔐 Authentication Methods
55
57
 
56
58
  ### 1. Vendor Key Authentication (Recommended)
59
+
57
60
  Best for API integrations and automation:
61
+
58
62
  ```bash
59
63
  onasis login --vendor-key pk_xxxxx.sk_xxxxx
60
64
  ```
61
65
 
62
66
  ### 2. OAuth Browser Authentication
67
+
63
68
  Secure browser-based authentication:
69
+
64
70
  ```bash
65
71
  onasis login --oauth
66
72
  ```
67
73
 
68
74
  ### 3. Interactive Credentials
75
+
69
76
  Traditional username/password authentication:
77
+
70
78
  ```bash
71
79
  onasis login # Will prompt for email and password
72
80
  ```
73
81
 
74
82
  ### Authentication Status
83
+
75
84
  ```bash
76
85
  onasis auth status # Check current authentication
77
86
  onasis auth logout # Logout from current session
@@ -80,11 +89,13 @@ onasis auth logout # Logout from current session
80
89
  ## 💻 Shell Completions
81
90
 
82
91
  ### Installation Guide
92
+
83
93
  ```bash
84
94
  onasis completion # Shows installation instructions for all shells
85
95
  ```
86
96
 
87
97
  ### Direct Installation
98
+
88
99
  ```bash
89
100
  # Bash
90
101
  echo 'source <(onasis --completion bash)' >> ~/.bashrc
@@ -97,8 +108,9 @@ echo 'onasis --completion fish | source' >> ~/.config/fish/config.fish
97
108
  ```
98
109
 
99
110
  ### Features
111
+
100
112
  - ✅ Command and subcommand completion
101
- - ✅ Option and flag completion
113
+ - ✅ Option and flag completion
102
114
  - ✅ Context-aware suggestions
103
115
  - ✅ Dynamic completion data via JSON API
104
116
  - ✅ Support for all command aliases
@@ -106,15 +118,17 @@ echo 'onasis --completion fish | source' >> ~/.config/fish/config.fish
106
118
  ## 📚 Core Commands
107
119
 
108
120
  ### System Management
121
+
109
122
  ```bash
110
123
  onasis health # Comprehensive system health check
111
- onasis status # Quick status overview
124
+ onasis status # Quick status overview
112
125
  onasis init # Initialize CLI configuration
113
126
  onasis guide # Interactive setup guide
114
127
  onasis quickstart # Essential commands reference
115
128
  ```
116
129
 
117
130
  ### Memory Management
131
+
118
132
  ```bash
119
133
  # List memories
120
134
  onasis memory list
@@ -136,6 +150,7 @@ onasis memory stats # Memory statistics
136
150
  ```
137
151
 
138
152
  ### Topic Management
153
+
139
154
  ```bash
140
155
  onasis topic list # List all topics
141
156
  onasis topic create --name "Development" --color blue --icon "💻"
@@ -145,6 +160,7 @@ onasis topic delete <id> # Delete topic
145
160
  ```
146
161
 
147
162
  ### API Key Management
163
+
148
164
  ```bash
149
165
  onasis api-keys list # List API keys
150
166
  onasis api-keys create --name "Integration Key" --scope "memory:read"
@@ -153,6 +169,7 @@ onasis api-keys rotate <id> # Rotate API key
153
169
  ```
154
170
 
155
171
  ### MCP Integration (Enhanced in v2.0.9)
172
+
156
173
  ```bash
157
174
  # Connection Management
158
175
  onasis mcp status # MCP server status with health info
@@ -161,7 +178,7 @@ onasis mcp connect --local # Connect to local MCP server
161
178
  onasis mcp disconnect # Disconnect from MCP
162
179
  onasis mcp list-servers # List all connected servers
163
180
 
164
- # Tool & Resource Management
181
+ # Tool & Resource Management
165
182
  onasis mcp tools # List available MCP tools
166
183
  onasis mcp resources # List MCP resources
167
184
  onasis mcp call <tool> --args # Execute MCP tool directly
@@ -173,7 +190,9 @@ onasis mcp server stop # Stop local MCP server
173
190
  ```
174
191
 
175
192
  ### 🆕 MCP Server Mode (v3.0)
193
+
176
194
  Run the CLI as a standalone MCP server:
195
+
177
196
  ```bash
178
197
  # Start MCP server for IDE integrations
179
198
  lanonasis-mcp-server --verbose
@@ -184,7 +203,8 @@ LANONASIS_TOKEN=your-token \
184
203
  lanonasis-mcp-server
185
204
  ```
186
205
 
187
- ### Configuration Management
206
+ ### Configuration Management
207
+
188
208
  ```bash
189
209
  onasis config list # List all configuration
190
210
  onasis config get <key> # Get configuration value
@@ -193,6 +213,7 @@ onasis config reset # Reset configuration
193
213
  ```
194
214
 
195
215
  ### Service Management
216
+
196
217
  ```bash
197
218
  onasis service list # List all services
198
219
  onasis service status # Service status overview
@@ -216,12 +237,14 @@ onasis deploy health # Deployment health check
216
237
  ## 🎯 Advanced Usage
217
238
 
218
239
  ### JSON Output for Automation
240
+
219
241
  ```bash
220
242
  onasis memory list --output json | jq '.data[].title'
221
243
  onasis health --output json | jq '.status'
222
244
  ```
223
245
 
224
246
  ### Environment Variables
247
+
225
248
  ```bash
226
249
  export MEMORY_API_URL="https://api.lanonasis.com/api/v1"
227
250
  export CLI_OUTPUT_FORMAT="json"
@@ -229,7 +252,9 @@ export CLI_VERBOSE="true"
229
252
  ```
230
253
 
231
254
  ### Configuration File
255
+
232
256
  Location: `~/.maas/config.json`
257
+
233
258
  ```json
234
259
  {
235
260
  "apiUrl": "https://api.lanonasis.com/api/v1",
@@ -242,12 +267,14 @@ Location: `~/.maas/config.json`
242
267
  ## 🔧 Development & Debugging
243
268
 
244
269
  ### Verbose Mode
270
+
245
271
  ```bash
246
272
  onasis --verbose memory list # Detailed operation logs
247
273
  onasis -V health # Short flag version
248
274
  ```
249
275
 
250
276
  ### Configuration Debugging
277
+
251
278
  ```bash
252
279
  onasis config list # Check current configuration
253
280
  onasis auth status # Verify authentication
@@ -255,6 +282,7 @@ onasis health --verbose # Detailed health information
255
282
  ```
256
283
 
257
284
  ### MCP Debugging
285
+
258
286
  ```bash
259
287
  onasis mcp status --verbose # Detailed MCP diagnostics
260
288
  onasis --no-mcp memory list # Bypass MCP, use direct API
@@ -263,6 +291,7 @@ onasis --no-mcp memory list # Bypass MCP, use direct API
263
291
  ## 🌐 Golden Contract Compliance
264
292
 
265
293
  ### Onasis-Core v0.1 Standards
294
+
266
295
  - ✅ Service discovery via `/.well-known/onasis.json`
267
296
  - ✅ Vendor key authentication (`pk_*.sk_*` format)
268
297
  - ✅ Request correlation with UUID tracking
@@ -271,14 +300,18 @@ onasis --no-mcp memory list # Bypass MCP, use direct API
271
300
  - ✅ WebSocket path alignment (`/mcp/ws`)
272
301
 
273
302
  ### Service Discovery Integration
303
+
274
304
  The CLI automatically discovers service endpoints:
305
+
275
306
  ```bash
276
307
  # Service discovery happens automatically
277
308
  onasis health # Uses discovered endpoints for health checks
278
309
  ```
279
310
 
280
311
  ### Request Correlation
312
+
281
313
  Every API request includes correlation headers:
314
+
282
315
  - `X-Request-ID`: UUID for request tracking
283
316
  - `X-Project-Scope`: Project scope validation
284
317
  - `X-Auth-Method`: Authentication method used
@@ -286,6 +319,7 @@ Every API request includes correlation headers:
286
319
  ## 🧪 Testing & Quality
287
320
 
288
321
  ### Command Validation
322
+
289
323
  ```bash
290
324
  onasis --help # Validate CLI installation
291
325
  onasis completion # Test completion system
@@ -293,6 +327,7 @@ onasis guide # Test interactive guidance
293
327
  ```
294
328
 
295
329
  ### API Integration Testing
330
+
296
331
  ```bash
297
332
  onasis health # Test API connectivity
298
333
  onasis memory list --limit 1 # Test memory service
@@ -304,6 +339,7 @@ onasis mcp status # Test MCP integration
304
339
  ### Common Issues
305
340
 
306
341
  #### Authentication Failures
342
+
307
343
  ```bash
308
344
  # Check authentication status
309
345
  onasis auth status
@@ -314,6 +350,7 @@ onasis login --vendor-key pk_xxx.sk_xxx
314
350
  ```
315
351
 
316
352
  #### Connection Issues
353
+
317
354
  ```bash
318
355
  # Check system health
319
356
  onasis health --verbose
@@ -323,6 +360,7 @@ onasis --api-url https://api.lanonasis.com/api/v1 health
323
360
  ```
324
361
 
325
362
  #### MCP Connection Issues
363
+
326
364
  ```bash
327
365
  # Check MCP status
328
366
  onasis mcp status --verbose
@@ -332,6 +370,7 @@ onasis --no-mcp memory list
332
370
  ```
333
371
 
334
372
  ### Debug Mode
373
+
335
374
  ```bash
336
375
  # Enable maximum verbosity
337
376
  CLI_VERBOSE=true onasis --verbose health
@@ -340,6 +379,7 @@ CLI_VERBOSE=true onasis --verbose health
340
379
  ## 🤝 Contributing
341
380
 
342
381
  ### Development Setup
382
+
343
383
  ```bash
344
384
  # Clone CLI source
345
385
  git clone https://github.com/lanonasis/lanonasis-maas.git
@@ -356,6 +396,7 @@ npm link
356
396
  ```
357
397
 
358
398
  ### Testing Changes
399
+
359
400
  ```bash
360
401
  # Test build
361
402
  npm run build
@@ -368,8 +409,9 @@ onasis health
368
409
  ## 📝 Version History
369
410
 
370
411
  ### v2.0.0 (Current)
412
+
371
413
  - 🎯 **Interactive Dashboard**: Central command center for all operations
372
- - 🎉 **Welcome Experience**: Guided onboarding for new users
414
+ - 🎉 **Welcome Experience**: Guided onboarding for new users
373
415
  - ⚡ **Power Mode**: Streamlined interface for expert users
374
416
  - 🤖 **Smart Suggestions**: Context-aware command recommendations
375
417
  - 🏆 **Achievement System**: Gamification to track progress
@@ -377,6 +419,7 @@ onasis health
377
419
  - 📊 **Progress Indicators**: Visual feedback for operations
378
420
 
379
421
  ### v1.5.2
422
+
380
423
  - ✅ Golden Contract compliance (Onasis-Core v0.1)
381
424
  - ✅ Professional shell completions (bash/zsh/fish)
382
425
  - ✅ Enhanced authentication (vendor keys, OAuth, credentials)
@@ -386,6 +429,7 @@ onasis health
386
429
  - ✅ Request correlation and enhanced security
387
430
 
388
431
  ### Previous Versions
432
+
389
433
  - v1.4.x: Basic CLI functionality
390
434
  - v1.3.x: MCP integration
391
435
  - v1.2.x: Memory management
@@ -407,4 +451,4 @@ MIT License - see [LICENSE](../LICENSE) for details.
407
451
 
408
452
  ---
409
453
 
410
- *Professional CLI for Enterprise Memory as a Service - Golden Contract Compliant*
454
+ _Professional CLI for Enterprise Memory as a Service - Golden Contract Compliant_
@@ -231,7 +231,7 @@ export async function diagnoseCommand() {
231
231
  console.log(chalk.green(' ✓ Token is not expired'));
232
232
  }
233
233
  }
234
- catch (error) {
234
+ catch {
235
235
  console.log(chalk.yellow(' ⚠ Could not validate token expiry'));
236
236
  }
237
237
  }
@@ -315,7 +315,7 @@ export async function diagnoseCommand() {
315
315
  diagnostics.deviceId = deviceId;
316
316
  console.log(chalk.green(' ✓ Device ID:'), chalk.gray(deviceId));
317
317
  }
318
- catch (error) {
318
+ catch {
319
319
  console.log(chalk.yellow(' ⚠ Could not get device ID'));
320
320
  }
321
321
  // Summary and recommendations
@@ -435,7 +435,7 @@ async function handleVendorKeyAuth(vendorKey, config) {
435
435
  try {
436
436
  await config.setVendorKey(vendorKey);
437
437
  // Test the vendor key with a health check
438
- const response = await apiClient.get('/health');
438
+ await apiClient.get('/health');
439
439
  spinner.succeed('Vendor key authentication successful');
440
440
  console.log();
441
441
  console.log(chalk.green('✓ Authenticated with vendor key'));
@@ -536,9 +536,9 @@ async function handleOAuthFlow(config) {
536
536
  console.log(chalk.yellow('⚠️ Authentication cancelled'));
537
537
  return;
538
538
  }
539
- // Use the browser-based CLI login endpoint from MCP service
540
- // The discovery JSON points to mcp.lanonasis.com/auth/cli-login
541
- const authUrl = 'https://mcp.lanonasis.com/auth/cli-login';
539
+ // Use the browser-based CLI login endpoint discovered from auth_base
540
+ const authBase = config.getDiscoveredApiUrl();
541
+ const authUrl = `${authBase.replace(/\/$/, '')}/auth/cli-login`;
542
542
  try {
543
543
  console.log(colors.info('Opening browser...'));
544
544
  await open(authUrl);
@@ -590,7 +590,7 @@ async function handleOAuthFlow(config) {
590
590
  console.log(chalk.yellow('⚠️ No token provided'));
591
591
  }
592
592
  }
593
- catch (error) {
593
+ catch {
594
594
  console.error(chalk.red('✖ Failed to open browser'));
595
595
  console.log(colors.muted(`Please visit manually: ${authUrl}`));
596
596
  }
@@ -28,6 +28,8 @@ export async function generateCompletionData() {
28
28
  catch {
29
29
  // Ignore errors in completion generation
30
30
  }
31
+ // Enrich contextual data using fetched topics if available (reserved for future use)
32
+ void topics; // suppress until we wire topic-based completions
31
33
  const completionData = {
32
34
  commands: [
33
35
  {
@@ -204,7 +204,7 @@ export function configCommands(program) {
204
204
  console.log(` Project: ${services.project_scope}`);
205
205
  }
206
206
  }
207
- catch (error) {
207
+ catch {
208
208
  console.log(chalk.red('✖ Service discovery failed'));
209
209
  console.log(chalk.gray('Using fallback endpoints'));
210
210
  }
@@ -374,7 +374,7 @@ export function configCommands(program) {
374
374
  validation.repairs.push('Recreated corrupted config file');
375
375
  console.log(chalk.cyan(' → Repaired: Recreated config file'));
376
376
  }
377
- catch (repairError) {
377
+ catch {
378
378
  console.log(chalk.red(' ✖ Could not repair corrupted config'));
379
379
  }
380
380
  }
@@ -486,7 +486,7 @@ export function configCommands(program) {
486
486
  validation.issues.push('Service endpoints not configured');
487
487
  }
488
488
  }
489
- catch (error) {
489
+ catch {
490
490
  console.log(chalk.red(' ✖ Service endpoint discovery failed'));
491
491
  validation.issues.push('Service endpoint discovery failed');
492
492
  if (options.repair) {
@@ -505,7 +505,7 @@ export function configCommands(program) {
505
505
  // Step 4: Validate MCP configuration
506
506
  console.log(chalk.cyan('\n4. MCP Configuration'));
507
507
  const mcpPreference = config.get('mcpPreference');
508
- const mcpServerPath = config.get('mcpServerPath');
508
+ // const mcpServerPath = config.get<string>('mcpServerPath');
509
509
  const mcpServerUrl = config.get('mcpServerUrl');
510
510
  if (mcpPreference) {
511
511
  if (['local', 'remote', 'auto'].includes(mcpPreference)) {
@@ -11,7 +11,7 @@ export function enhancedMemoryCommands(program) {
11
11
  memory.command('bulk-pause')
12
12
  .description('Pause multiple memories by criteria')
13
13
  .option('--category <category>', 'Category to pause')
14
- .action(async (options) => {
14
+ .action(async (_options) => {
15
15
  const spinner = ora('Processing bulk pause...').start();
16
16
  try {
17
17
  const client = getMCPClient();
@@ -4,6 +4,7 @@ import { table } from 'table';
4
4
  import { getMCPClient } from '../utils/mcp-client.js';
5
5
  import { EnhancedMCPClient } from '../mcp/client/enhanced-client.js';
6
6
  import { CLIConfig } from '../utils/config.js';
7
+ import WebSocket from 'ws';
7
8
  export function mcpCommands(program) {
8
9
  const mcp = program
9
10
  .command('mcp')
@@ -61,6 +62,7 @@ export function mcpCommands(program) {
61
62
  .option('-w, --websocket', 'Connect using WebSocket mode for enterprise users')
62
63
  .option('-s, --server <path>', 'Local MCP server path')
63
64
  .option('-u, --url <url>', 'Remote/WebSocket server URL')
65
+ .option('--local-args <args>', 'Extra args for local server (e.g., "--stdio --port 3001")')
64
66
  .action(async (options) => {
65
67
  const spinner = ora('Connecting to MCP server...').start();
66
68
  const config = new CLIConfig();
@@ -78,7 +80,7 @@ export function mcpCommands(program) {
78
80
  }
79
81
  else {
80
82
  // Default to remote if authenticated, otherwise local
81
- connectionMode = !!config.get('token') ? 'remote' : 'local';
83
+ connectionMode = config.get('token') ? 'remote' : 'local';
82
84
  }
83
85
  // Save preferences
84
86
  config.set('mcpConnectionMode', connectionMode);
@@ -113,10 +115,14 @@ export function mcpCommands(program) {
113
115
  else {
114
116
  // Fall back to old client for local connections
115
117
  const client = getMCPClient();
118
+ const localArgs = typeof options.localArgs === 'string' && options.localArgs.trim().length > 0
119
+ ? options.localArgs.split(' ').map((s) => s.trim()).filter(Boolean)
120
+ : undefined;
116
121
  connected = await client.connect({
117
122
  connectionMode,
118
123
  serverPath: options.server,
119
- serverUrl: options.url
124
+ serverUrl: options.url,
125
+ localArgs
120
126
  });
121
127
  }
122
128
  if (connected) {
@@ -415,9 +421,10 @@ export function mcpCommands(program) {
415
421
  diagnostics.endpointsReachable = true;
416
422
  console.log(chalk.green(' ✓ Service discovery successful'));
417
423
  if (options.verbose) {
418
- console.log(chalk.gray(` HTTP: ${services.mcp_base}`));
419
- console.log(chalk.gray(` WebSocket: ${services.mcp_ws_base}`));
420
- console.log(chalk.gray(` SSE: ${services.mcp_sse_base}`));
424
+ const svc = services;
425
+ console.log(chalk.gray(` HTTP: ${svc.mcp_base}`));
426
+ console.log(chalk.gray(` WebSocket: ${svc.mcp_ws_base}`));
427
+ console.log(chalk.gray(` SSE: ${svc.mcp_sse_base}`));
421
428
  }
422
429
  }
423
430
  else {
@@ -457,7 +464,7 @@ export function mcpCommands(program) {
457
464
  httpSpinner.fail('HTTP transport failed');
458
465
  console.log(chalk.red(' ✖ HTTP/REST endpoint failed'));
459
466
  if (options.verbose) {
460
- console.log(chalk.gray(` Error: ${error.message}`));
467
+ console.log(chalk.gray(` Error: ${error instanceof Error ? error.message : String(error)}`));
461
468
  }
462
469
  }
463
470
  // Test WebSocket endpoint
@@ -466,7 +473,6 @@ export function mcpCommands(program) {
466
473
  const startTime = Date.now();
467
474
  const wsUrl = config.getMCPServerUrl();
468
475
  // Create a test WebSocket connection
469
- const WebSocket = (await import('ws'));
470
476
  const ws = new WebSocket(wsUrl, [], {
471
477
  headers: {
472
478
  'Authorization': `Bearer ${token}`,
@@ -498,7 +504,7 @@ export function mcpCommands(program) {
498
504
  wsSpinner.fail('WebSocket transport failed');
499
505
  console.log(chalk.red(' ✖ WebSocket endpoint failed'));
500
506
  if (options.verbose) {
501
- console.log(chalk.gray(` Error: ${error.message}`));
507
+ console.log(chalk.gray(` Error: ${error instanceof Error ? error.message : String(error)}`));
502
508
  }
503
509
  }
504
510
  // Test SSE endpoint
@@ -525,7 +531,7 @@ export function mcpCommands(program) {
525
531
  sseSpinner.fail('SSE transport failed');
526
532
  console.log(chalk.red(' ✖ SSE endpoint failed'));
527
533
  if (options.verbose) {
528
- console.log(chalk.gray(` Error: ${error.message}`));
534
+ console.log(chalk.gray(` Error: ${error instanceof Error ? error.message : String(error)}`));
529
535
  }
530
536
  }
531
537
  }
@@ -272,7 +272,7 @@ export class AchievementSystem extends EventEmitter {
272
272
  padding: 1,
273
273
  borderStyle: 'double',
274
274
  borderColor: 'yellow',
275
- align: 'center'
275
+ textAlignment: 'center'
276
276
  });
277
277
  console.log('\n' + celebration + '\n');
278
278
  }
@@ -186,7 +186,8 @@ export class PowerUserMode {
186
186
  }
187
187
  const params = this.parseArgs(args);
188
188
  const title = params.t || params.title || 'Quick Memory';
189
- const content = params.c || params.content || args.filter(a => !a.startsWith('-')).join(' ');
189
+ const _content = params.c || params.content || args.filter(a => !a.startsWith('-')).join(' ');
190
+ void _content;
190
191
  const tags = params.tags ? params.tags.split(',') : [];
191
192
  const type = params.type || 'knowledge';
192
193
  const topic = params.topic;
@@ -304,7 +305,7 @@ export class PowerUserMode {
304
305
  /**
305
306
  * Handle pipe operations
306
307
  */
307
- async handlePipe(args) {
308
+ async handlePipe(_args) {
308
309
  console.log(chalk.cyan('Pipe operations coming soon...'));
309
310
  }
310
311
  /**
@@ -313,7 +314,8 @@ export class PowerUserMode {
313
314
  handleFormat(args) {
314
315
  const format = args[0];
315
316
  if (['table', 'json', 'yaml', 'minimal'].includes(format)) {
316
- this.stateManager.updatePreference('outputFormat', format);
317
+ const fmt = format;
318
+ this.stateManager.updatePreference('outputFormat', fmt);
317
319
  console.log(chalk.green(`✓ Output format set to ${format}`));
318
320
  }
319
321
  else {
@@ -24,7 +24,7 @@ export class WelcomeExperience {
24
24
  margin: 1,
25
25
  borderStyle: 'round',
26
26
  borderColor: 'cyan',
27
- align: 'center'
27
+ textAlignment: 'center'
28
28
  });
29
29
  console.clear();
30
30
  console.log(banner);
@@ -205,7 +205,6 @@ export class InteractiveSetup {
205
205
  console.log(boxen('Setup Progress\n' +
206
206
  steps.map((step, i) => {
207
207
  const num = `[${i + 1}]`;
208
- const status = step.done ? chalk.green('●') : chalk.gray('○');
209
208
  const name = step.done ? chalk.green(step.name) : chalk.gray(step.name);
210
209
  return `${num} ${name}`;
211
210
  }).join(' ') + '\n' +
@@ -328,7 +327,7 @@ export class InteractiveSetup {
328
327
  }
329
328
  }
330
329
  async authenticateWithVendorKey() {
331
- const { publicKey, secretKey } = await inquirer.prompt([
330
+ const creds = await inquirer.prompt([
332
331
  {
333
332
  type: 'input',
334
333
  name: 'publicKey',
@@ -353,6 +352,7 @@ export class InteractiveSetup {
353
352
  }
354
353
  }
355
354
  ]);
355
+ void creds; // collected for future use when hooking real auth
356
356
  const spinner = ora('Authenticating...').start();
357
357
  await this.simulateDelay(1000);
358
358
  spinner.succeed('Authentication successful!');
@@ -373,7 +373,7 @@ export class InteractiveSetup {
373
373
  });
374
374
  }
375
375
  async authenticateWithEmail() {
376
- const { email, password } = await inquirer.prompt([
376
+ const auth = await inquirer.prompt([
377
377
  {
378
378
  type: 'input',
379
379
  name: 'email',
@@ -393,12 +393,13 @@ export class InteractiveSetup {
393
393
  mask: '*'
394
394
  }
395
395
  ]);
396
+ void auth; // suppress unused until real auth wired
396
397
  const spinner = ora('Signing in...').start();
397
398
  await this.simulateDelay(1000);
398
399
  spinner.succeed('Sign in successful!');
399
400
  this.stateManager.updateUserContext({
400
401
  userId: 'email_user',
401
- email
402
+ email: auth.email
402
403
  });
403
404
  }
404
405
  async setupConfiguration() {
@@ -450,7 +451,7 @@ export class InteractiveSetup {
450
451
  padding: 1,
451
452
  borderStyle: 'double',
452
453
  borderColor: 'green',
453
- align: 'center'
454
+ textAlignment: 'center'
454
455
  }));
455
456
  await inquirer.prompt([
456
457
  {
@@ -18,7 +18,7 @@ import { CLIConfig } from './utils/config.js';
18
18
  config();
19
19
  // Initialize the enhanced architecture
20
20
  const architecture = createCLIArchitecture();
21
- const { stateManager, interactionEngine, presentationLayer } = architecture;
21
+ const { stateManager } = architecture;
22
22
  // Initialize systems
23
23
  const errorHandler = new ErrorHandler(stateManager);
24
24
  const errorBoundary = new ErrorBoundary(errorHandler);
@@ -96,23 +96,26 @@ program
96
96
  }, 'Creating memory...');
97
97
  }
98
98
  break;
99
- case 'search':
99
+ case 'search': {
100
100
  const search = new InteractiveSearch(stateManager);
101
101
  await search.search(options.query || '');
102
102
  achievementSystem.updateStats({
103
103
  totalSearches: achievementSystem.userStats.totalSearches + 1
104
104
  });
105
105
  break;
106
+ }
106
107
  case 'list':
107
108
  await progressIndicator.withSpinner(async () => {
108
109
  // List memories logic
109
110
  console.log(chalk.cyan('Memories listed'));
110
111
  }, 'Loading memories...');
111
112
  break;
112
- default:
113
+ default: {
113
114
  // If no action specified, go to interactive mode
114
115
  const dashboard = new DashboardCommandCenter(stateManager);
115
116
  await dashboard.show();
117
+ break;
118
+ }
116
119
  }
117
120
  }));
118
121
  // Topic management with visual feedback