@lanonasis/cli 3.6.5 → 3.6.7

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 (40) hide show
  1. package/dist/commands/api-keys.d.ts +2 -1
  2. package/dist/commands/api-keys.js +73 -78
  3. package/dist/commands/auth.js +160 -167
  4. package/dist/commands/completion.js +31 -39
  5. package/dist/commands/config.js +162 -201
  6. package/dist/commands/enhanced-memory.js +11 -17
  7. package/dist/commands/guide.js +79 -88
  8. package/dist/commands/init.js +14 -20
  9. package/dist/commands/mcp.d.ts +10 -0
  10. package/dist/commands/mcp.js +167 -156
  11. package/dist/commands/memory.js +77 -83
  12. package/dist/commands/organization.js +15 -21
  13. package/dist/commands/topics.js +52 -58
  14. package/dist/core/achievements.js +19 -26
  15. package/dist/core/architecture.js +42 -59
  16. package/dist/core/dashboard.js +71 -81
  17. package/dist/core/error-handler.js +30 -39
  18. package/dist/core/power-mode.js +46 -53
  19. package/dist/core/progress.js +35 -44
  20. package/dist/core/welcome.js +56 -64
  21. package/dist/enhanced-cli.js +49 -58
  22. package/dist/index-simple.js +75 -113
  23. package/dist/index.js +64 -69
  24. package/dist/mcp/access-control.js +13 -17
  25. package/dist/mcp/client/enhanced-client.js +16 -23
  26. package/dist/mcp/enhanced-server.js +10 -14
  27. package/dist/mcp/logger.js +3 -7
  28. package/dist/mcp/memory-state.js +13 -17
  29. package/dist/mcp/schemas/tool-schemas.d.ts +16 -16
  30. package/dist/mcp/schemas/tool-schemas.js +122 -126
  31. package/dist/mcp/server/lanonasis-server.js +66 -57
  32. package/dist/mcp/transports/transport-manager.js +18 -25
  33. package/dist/mcp/vector-store.js +6 -10
  34. package/dist/mcp-server.js +23 -27
  35. package/dist/utils/api.js +19 -26
  36. package/dist/utils/config.d.ts +2 -1
  37. package/dist/utils/config.js +65 -78
  38. package/dist/utils/formatting.js +6 -14
  39. package/dist/utils/mcp-client.js +76 -117
  40. package/package.json +36 -5
@@ -1,18 +1,12 @@
1
- "use strict";
2
1
  /**
3
2
  * Welcome and Onboarding Experience
4
3
  * Provides first-time user experience and guided setup
5
4
  */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.InteractiveSetup = exports.WelcomeExperience = void 0;
11
- const chalk_1 = __importDefault(require("chalk"));
12
- const inquirer_1 = __importDefault(require("inquirer"));
13
- const boxen_1 = __importDefault(require("boxen"));
14
- const ora_1 = __importDefault(require("ora"));
15
- class WelcomeExperience {
5
+ import chalk from 'chalk';
6
+ import inquirer from 'inquirer';
7
+ import boxen from 'boxen';
8
+ import ora from 'ora';
9
+ export class WelcomeExperience {
16
10
  stateManager;
17
11
  isFirstRun = false;
18
12
  constructor(stateManager) {
@@ -24,8 +18,8 @@ class WelcomeExperience {
24
18
  await this.handleMenuChoice(choice);
25
19
  }
26
20
  displayWelcomeBanner() {
27
- const banner = (0, boxen_1.default)(chalk_1.default.bold.blue('🧠 Welcome to Onasis Memory Service\n') +
28
- chalk_1.default.cyan(' Your Knowledge, Amplified'), {
21
+ const banner = boxen(chalk.bold.blue('🧠 Welcome to Onasis Memory Service\n') +
22
+ chalk.cyan(' Your Knowledge, Amplified'), {
29
23
  padding: 2,
30
24
  margin: 1,
31
25
  borderStyle: 'round',
@@ -38,7 +32,7 @@ class WelcomeExperience {
38
32
  async showMainMenu() {
39
33
  const newUserOptions = [
40
34
  {
41
- name: chalk_1.default.green.bold('[↵] Start Interactive Setup') + chalk_1.default.gray(' (Recommended)'),
35
+ name: chalk.green.bold('[↵] Start Interactive Setup') + chalk.gray(' (Recommended)'),
42
36
  value: 'setup',
43
37
  short: 'Setup'
44
38
  },
@@ -60,7 +54,7 @@ class WelcomeExperience {
60
54
  ];
61
55
  const existingUserOptions = [
62
56
  {
63
- name: chalk_1.default.bold('[↵] Continue to Dashboard'),
57
+ name: chalk.bold('[↵] Continue to Dashboard'),
64
58
  value: 'dashboard',
65
59
  short: 'Dashboard'
66
60
  },
@@ -77,7 +71,7 @@ class WelcomeExperience {
77
71
  ];
78
72
  const isAuthenticated = await this.checkAuthentication();
79
73
  const choices = isAuthenticated ? existingUserOptions : newUserOptions;
80
- const { choice } = await inquirer_1.default.prompt([
74
+ const { choice } = await inquirer.prompt([
81
75
  {
82
76
  type: 'list',
83
77
  name: 'choice',
@@ -127,26 +121,26 @@ class WelcomeExperience {
127
121
  });
128
122
  }
129
123
  showDocumentation() {
130
- console.log((0, boxen_1.default)(chalk_1.default.bold('šŸ“š Documentation\n\n') +
131
- 'Online Docs: ' + chalk_1.default.cyan('https://docs.lanonasis.com/cli\n') +
132
- 'Quick Start: ' + chalk_1.default.cyan('https://docs.lanonasis.com/quickstart\n') +
133
- 'API Reference: ' + chalk_1.default.cyan('https://api.lanonasis.com/docs\n\n') +
134
- chalk_1.default.dim('Press any key to continue...'), {
124
+ console.log(boxen(chalk.bold('šŸ“š Documentation\n\n') +
125
+ 'Online Docs: ' + chalk.cyan('https://docs.lanonasis.com/cli\n') +
126
+ 'Quick Start: ' + chalk.cyan('https://docs.lanonasis.com/quickstart\n') +
127
+ 'API Reference: ' + chalk.cyan('https://api.lanonasis.com/docs\n\n') +
128
+ chalk.dim('Press any key to continue...'), {
135
129
  padding: 1,
136
130
  borderStyle: 'single',
137
131
  borderColor: 'gray'
138
132
  }));
139
133
  }
140
134
  showAbout() {
141
- console.log((0, boxen_1.default)(chalk_1.default.bold('🧠 About Onasis Memory Service\n\n') +
135
+ console.log(boxen(chalk.bold('🧠 About Onasis Memory Service\n\n') +
142
136
  'Onasis is an enterprise-grade Memory as a Service platform that:\n\n' +
143
- ' • ' + chalk_1.default.green('Captures') + ' and organizes your knowledge\n' +
144
- ' • ' + chalk_1.default.blue('Searches') + ' with AI-powered semantic understanding\n' +
145
- ' • ' + chalk_1.default.magenta('Integrates') + ' with your existing tools\n' +
146
- ' • ' + chalk_1.default.yellow('Scales') + ' from personal to enterprise use\n\n' +
137
+ ' • ' + chalk.green('Captures') + ' and organizes your knowledge\n' +
138
+ ' • ' + chalk.blue('Searches') + ' with AI-powered semantic understanding\n' +
139
+ ' • ' + chalk.magenta('Integrates') + ' with your existing tools\n' +
140
+ ' • ' + chalk.yellow('Scales') + ' from personal to enterprise use\n\n' +
147
141
  'Built for developers, teams, and organizations who want to\n' +
148
142
  'transform information into actionable intelligence.\n\n' +
149
- chalk_1.default.dim('Learn more at lanonasis.com'), {
143
+ chalk.dim('Learn more at lanonasis.com'), {
150
144
  padding: 1,
151
145
  borderStyle: 'double',
152
146
  borderColor: 'cyan'
@@ -154,10 +148,10 @@ class WelcomeExperience {
154
148
  }
155
149
  async showSettings() {
156
150
  // Settings implementation
157
- console.log(chalk_1.default.yellow('Settings panel coming soon...'));
151
+ console.log(chalk.yellow('Settings panel coming soon...'));
158
152
  }
159
153
  showHelp() {
160
- console.log(chalk_1.default.cyan('šŸ’” Tip: You can always type "help" for assistance'));
154
+ console.log(chalk.cyan('šŸ’” Tip: You can always type "help" for assistance'));
161
155
  }
162
156
  async checkAuthentication() {
163
157
  // Check if user is authenticated
@@ -165,11 +159,10 @@ class WelcomeExperience {
165
159
  return !!context.userId;
166
160
  }
167
161
  }
168
- exports.WelcomeExperience = WelcomeExperience;
169
162
  /**
170
163
  * Interactive Setup Flow
171
164
  */
172
- class InteractiveSetup {
165
+ export class InteractiveSetup {
173
166
  stateManager;
174
167
  setupProgress = {
175
168
  connection: false,
@@ -209,10 +202,10 @@ class InteractiveSetup {
209
202
  { name: 'Ready!', done: this.setupProgress.ready }
210
203
  ];
211
204
  console.clear();
212
- console.log((0, boxen_1.default)('Setup Progress\n' +
205
+ console.log(boxen('Setup Progress\n' +
213
206
  steps.map((step, i) => {
214
207
  const num = `[${i + 1}]`;
215
- const name = step.done ? chalk_1.default.green(step.name) : chalk_1.default.gray(step.name);
208
+ const name = step.done ? chalk.green(step.name) : chalk.gray(step.name);
216
209
  return `${num} ${name}`;
217
210
  }).join(' ') + '\n' +
218
211
  this.renderProgressBar(steps), {
@@ -229,29 +222,29 @@ class InteractiveSetup {
229
222
  const barLength = 40;
230
223
  const filled = Math.round((completed / total) * barLength);
231
224
  const bar = '━'.repeat(filled) + '─'.repeat(barLength - filled);
232
- return chalk_1.default.cyan(bar) + ' ' + chalk_1.default.bold(`${percentage}%`);
225
+ return chalk.cyan(bar) + ' ' + chalk.bold(`${percentage}%`);
233
226
  }
234
227
  async setupConnection() {
235
- console.log(chalk_1.default.bold.blue('šŸ”— Step 1: Connection Setup'));
228
+ console.log(chalk.bold.blue('šŸ”— Step 1: Connection Setup'));
236
229
  console.log("Let's connect to your Onasis service\n");
237
- const { connectionType } = await inquirer_1.default.prompt([
230
+ const { connectionType } = await inquirer.prompt([
238
231
  {
239
232
  type: 'list',
240
233
  name: 'connectionType',
241
234
  message: 'Where is your Onasis service hosted?',
242
235
  choices: [
243
236
  {
244
- name: 'ā˜ļø Cloud (api.lanonasis.com)' + chalk_1.default.gray(' ← Recommended for most users'),
237
+ name: 'ā˜ļø Cloud (api.lanonasis.com)' + chalk.gray(' ← Recommended for most users'),
245
238
  value: 'cloud',
246
239
  short: 'Cloud'
247
240
  },
248
241
  {
249
- name: 'šŸ¢ Self-hosted' + chalk_1.default.gray(' Enter your server URL'),
242
+ name: 'šŸ¢ Self-hosted' + chalk.gray(' Enter your server URL'),
250
243
  value: 'self-hosted',
251
244
  short: 'Self-hosted'
252
245
  },
253
246
  {
254
- name: 'šŸ’» Local development' + chalk_1.default.gray(' Use localhost:3000'),
247
+ name: 'šŸ’» Local development' + chalk.gray(' Use localhost:3000'),
255
248
  value: 'local',
256
249
  short: 'Local'
257
250
  }
@@ -260,7 +253,7 @@ class InteractiveSetup {
260
253
  ]);
261
254
  let serverUrl = 'https://api.lanonasis.com';
262
255
  if (connectionType === 'self-hosted') {
263
- const { customUrl } = await inquirer_1.default.prompt([
256
+ const { customUrl } = await inquirer.prompt([
264
257
  {
265
258
  type: 'input',
266
259
  name: 'customUrl',
@@ -280,7 +273,7 @@ class InteractiveSetup {
280
273
  serverUrl = 'http://localhost:3000';
281
274
  }
282
275
  // Test connection
283
- const spinner = (0, ora_1.default)('Testing connection...').start();
276
+ const spinner = ora('Testing connection...').start();
284
277
  await this.simulateDelay(1500);
285
278
  spinner.succeed('Connection successful!');
286
279
  // Save to state
@@ -289,14 +282,14 @@ class InteractiveSetup {
289
282
  });
290
283
  }
291
284
  async setupAuthentication() {
292
- console.log(chalk_1.default.bold.blue('\nšŸ” Step 2: Authentication'));
285
+ console.log(chalk.bold.blue('\nšŸ” Step 2: Authentication'));
293
286
  console.log('Choose how you\'d like to connect:\n');
294
287
  const authBox = (title, description, features) => {
295
- return chalk_1.default.bold(title) + '\n' +
296
- chalk_1.default.gray(description) + '\n' +
297
- features.map(f => chalk_1.default.dim(` ā–Ŗ ${f}`)).join('\n');
288
+ return chalk.bold(title) + '\n' +
289
+ chalk.gray(description) + '\n' +
290
+ features.map(f => chalk.dim(` ā–Ŗ ${f}`)).join('\n');
298
291
  };
299
- const { authMethod } = await inquirer_1.default.prompt([
292
+ const { authMethod } = await inquirer.prompt([
300
293
  {
301
294
  type: 'list',
302
295
  name: 'authMethod',
@@ -334,7 +327,7 @@ class InteractiveSetup {
334
327
  }
335
328
  }
336
329
  async authenticateWithVendorKey() {
337
- const { vendorKey } = await inquirer_1.default.prompt([
330
+ const { vendorKey } = await inquirer.prompt([
338
331
  {
339
332
  type: 'password',
340
333
  name: 'vendorKey',
@@ -349,7 +342,7 @@ class InteractiveSetup {
349
342
  }
350
343
  ]);
351
344
  void vendorKey; // collected for future use when hooking real auth
352
- const spinner = (0, ora_1.default)('Authenticating...').start();
345
+ const spinner = ora('Authenticating...').start();
353
346
  await this.simulateDelay(1000);
354
347
  spinner.succeed('Authentication successful!');
355
348
  this.stateManager.updateUserContext({
@@ -358,9 +351,9 @@ class InteractiveSetup {
358
351
  });
359
352
  }
360
353
  async authenticateWithBrowser() {
361
- console.log(chalk_1.default.cyan('\n🌐 Opening browser for authentication...'));
362
- console.log(chalk_1.default.gray('Please complete the login in your browser'));
363
- const spinner = (0, ora_1.default)('Waiting for browser authentication...').start();
354
+ console.log(chalk.cyan('\n🌐 Opening browser for authentication...'));
355
+ console.log(chalk.gray('Please complete the login in your browser'));
356
+ const spinner = ora('Waiting for browser authentication...').start();
364
357
  await this.simulateDelay(3000);
365
358
  spinner.succeed('Browser authentication successful!');
366
359
  this.stateManager.updateUserContext({
@@ -369,7 +362,7 @@ class InteractiveSetup {
369
362
  });
370
363
  }
371
364
  async authenticateWithEmail() {
372
- const auth = await inquirer_1.default.prompt([
365
+ const auth = await inquirer.prompt([
373
366
  {
374
367
  type: 'input',
375
368
  name: 'email',
@@ -389,7 +382,7 @@ class InteractiveSetup {
389
382
  mask: '*'
390
383
  }
391
384
  ]);
392
- const spinner = (0, ora_1.default)('Signing in...').start();
385
+ const spinner = ora('Signing in...').start();
393
386
  await this.simulateDelay(1000);
394
387
  spinner.succeed('Sign in successful!');
395
388
  this.stateManager.updateUserContext({
@@ -398,9 +391,9 @@ class InteractiveSetup {
398
391
  });
399
392
  }
400
393
  async setupConfiguration() {
401
- console.log(chalk_1.default.bold.blue('\nāš™ļø Step 3: Configuration'));
394
+ console.log(chalk.bold.blue('\nāš™ļø Step 3: Configuration'));
402
395
  console.log("Let's personalize your experience\n");
403
- const answers = await inquirer_1.default.prompt([
396
+ const answers = await inquirer.prompt([
404
397
  {
405
398
  type: 'list',
406
399
  name: 'outputFormat',
@@ -433,22 +426,22 @@ class InteractiveSetup {
433
426
  // Update preferences
434
427
  const currentPrefs = this.stateManager.getPreferences();
435
428
  Object.assign(currentPrefs, preferences);
436
- console.log(chalk_1.default.green('\nāœ“ Configuration saved!'));
429
+ console.log(chalk.green('\nāœ“ Configuration saved!'));
437
430
  }
438
431
  async showSetupComplete() {
439
- console.log((0, boxen_1.default)(chalk_1.default.green.bold('šŸŽ‰ Setup Complete!\n\n') +
432
+ console.log(boxen(chalk.green.bold('šŸŽ‰ Setup Complete!\n\n') +
440
433
  'Your Onasis CLI is ready to use.\n\n' +
441
- chalk_1.default.bold('Quick Commands:\n') +
442
- ' ' + chalk_1.default.cyan('onasis memory create') + ' - Create a new memory\n' +
443
- ' ' + chalk_1.default.cyan('onasis search "query"') + ' - Search your memories\n' +
444
- ' ' + chalk_1.default.cyan('onasis help') + ' - Show all commands\n\n' +
445
- chalk_1.default.dim('Press Enter to continue to the dashboard...'), {
434
+ chalk.bold('Quick Commands:\n') +
435
+ ' ' + chalk.cyan('onasis memory create') + ' - Create a new memory\n' +
436
+ ' ' + chalk.cyan('onasis search "query"') + ' - Search your memories\n' +
437
+ ' ' + chalk.cyan('onasis help') + ' - Show all commands\n\n' +
438
+ chalk.dim('Press Enter to continue to the dashboard...'), {
446
439
  padding: 1,
447
440
  borderStyle: 'double',
448
441
  borderColor: 'green',
449
442
  textAlignment: 'center'
450
443
  }));
451
- await inquirer_1.default.prompt([
444
+ await inquirer.prompt([
452
445
  {
453
446
  type: 'input',
454
447
  name: 'continue',
@@ -460,4 +453,3 @@ class InteractiveSetup {
460
453
  return new Promise(resolve => setTimeout(resolve, ms));
461
454
  }
462
455
  }
463
- exports.InteractiveSetup = InteractiveSetup;
@@ -1,46 +1,35 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
2
  /**
4
3
  * Enhanced CLI Entry Point
5
4
  * Integrates all the enhanced experience components
6
5
  */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.progressIndicator = exports.achievementSystem = exports.errorHandler = exports.stateManager = exports.architecture = void 0;
12
- const commander_1 = require("commander");
13
- const chalk_1 = __importDefault(require("chalk"));
14
- const dotenv_1 = require("dotenv");
15
- const architecture_js_1 = require("./core/architecture.js");
16
- const welcome_js_1 = require("./core/welcome.js");
17
- const dashboard_js_1 = require("./core/dashboard.js");
18
- const error_handler_js_1 = require("./core/error-handler.js");
19
- const power_mode_js_1 = require("./core/power-mode.js");
20
- const achievements_js_1 = require("./core/achievements.js");
21
- const progress_js_1 = require("./core/progress.js");
22
- const config_js_1 = require("./utils/config.js");
6
+ import { Command } from 'commander';
7
+ import chalk from 'chalk';
8
+ import { config } from 'dotenv';
9
+ import { createCLIArchitecture } from './core/architecture.js';
10
+ import { WelcomeExperience } from './core/welcome.js';
11
+ import { DashboardCommandCenter } from './core/dashboard.js';
12
+ import { ErrorHandler, ErrorBoundary } from './core/error-handler.js';
13
+ import { PowerUserMode } from './core/power-mode.js';
14
+ import { AchievementSystem } from './core/achievements.js';
15
+ import { ProgressIndicator } from './core/progress.js';
16
+ import { CLIConfig } from './utils/config.js';
23
17
  // Load environment variables
24
- (0, dotenv_1.config)();
18
+ config();
25
19
  // Initialize the enhanced architecture
26
- const architecture = (0, architecture_js_1.createCLIArchitecture)();
27
- exports.architecture = architecture;
20
+ const architecture = createCLIArchitecture();
28
21
  const { stateManager } = architecture;
29
- exports.stateManager = stateManager;
30
22
  // Initialize systems
31
- const errorHandler = new error_handler_js_1.ErrorHandler(stateManager);
32
- exports.errorHandler = errorHandler;
33
- const errorBoundary = new error_handler_js_1.ErrorBoundary(errorHandler);
34
- const achievementSystem = new achievements_js_1.AchievementSystem(stateManager);
35
- exports.achievementSystem = achievementSystem;
36
- const progressIndicator = new progress_js_1.ProgressIndicator();
37
- exports.progressIndicator = progressIndicator;
38
- const cliConfig = new config_js_1.CLIConfig();
23
+ const errorHandler = new ErrorHandler(stateManager);
24
+ const errorBoundary = new ErrorBoundary(errorHandler);
25
+ const achievementSystem = new AchievementSystem(stateManager);
26
+ const progressIndicator = new ProgressIndicator();
27
+ const cliConfig = new CLIConfig();
39
28
  // Create the main program
40
- const program = new commander_1.Command();
29
+ const program = new Command();
41
30
  program
42
31
  .name('onasis')
43
- .description(chalk_1.default.cyan('🧠 Onasis Memory Service - Enhanced CLI Experience'))
32
+ .description(chalk.cyan('🧠 Onasis Memory Service - Enhanced CLI Experience'))
44
33
  .version('2.0.0', '-v, --version', 'display version number')
45
34
  .option('-V, --verbose', 'enable verbose logging')
46
35
  .option('--api-url <url>', 'override API URL')
@@ -53,7 +42,7 @@ program
53
42
  .command('init')
54
43
  .description('Initialize and configure Onasis CLI')
55
44
  .action(errorBoundary.wrapAsync(async () => {
56
- const welcome = new welcome_js_1.WelcomeExperience(stateManager);
45
+ const welcome = new WelcomeExperience(stateManager);
57
46
  await welcome.show();
58
47
  }));
59
48
  // Interactive dashboard command
@@ -62,7 +51,7 @@ program
62
51
  .alias('home')
63
52
  .description('Open the interactive command center')
64
53
  .action(errorBoundary.wrapAsync(async () => {
65
- const dashboard = new dashboard_js_1.DashboardCommandCenter(stateManager);
54
+ const dashboard = new DashboardCommandCenter(stateManager);
66
55
  await dashboard.show();
67
56
  }));
68
57
  // Power mode for expert users
@@ -71,7 +60,7 @@ program
71
60
  .alias('expert')
72
61
  .description('Enter power user mode for streamlined operations')
73
62
  .action(errorBoundary.wrapAsync(async () => {
74
- const powerMode = new power_mode_js_1.PowerUserMode(stateManager);
63
+ const powerMode = new PowerUserMode(stateManager);
75
64
  await powerMode.enter();
76
65
  }));
77
66
  // Enhanced memory commands with progress and feedback
@@ -103,7 +92,7 @@ program
103
92
  else {
104
93
  await progressIndicator.withSpinner(async () => {
105
94
  // Create memory logic here
106
- console.log(chalk_1.default.green('āœ“ Memory created successfully'));
95
+ console.log(chalk.green('āœ“ Memory created successfully'));
107
96
  }, 'Creating memory...');
108
97
  }
109
98
  break;
@@ -118,12 +107,12 @@ program
118
107
  case 'list':
119
108
  await progressIndicator.withSpinner(async () => {
120
109
  // List memories logic
121
- console.log(chalk_1.default.cyan('Memories listed'));
110
+ console.log(chalk.cyan('Memories listed'));
122
111
  }, 'Loading memories...');
123
112
  break;
124
113
  default: {
125
114
  // If no action specified, go to interactive mode
126
- const dashboard = new dashboard_js_1.DashboardCommandCenter(stateManager);
115
+ const dashboard = new DashboardCommandCenter(stateManager);
127
116
  await dashboard.show();
128
117
  break;
129
118
  }
@@ -151,19 +140,19 @@ program
151
140
  ]);
152
141
  name = topicName;
153
142
  }
154
- console.log(chalk_1.default.green(`āœ“ Topic "${name}" created`));
143
+ console.log(chalk.green(`āœ“ Topic "${name}" created`));
155
144
  break;
156
145
  case 'list':
157
- console.log(chalk_1.default.bold('šŸ“ Topics:'));
146
+ console.log(chalk.bold('šŸ“ Topics:'));
158
147
  console.log(' • Architecture');
159
148
  console.log(' • API Documentation');
160
149
  console.log(' • Meeting Notes');
161
150
  break;
162
151
  case 'delete':
163
- console.log(chalk_1.default.red(`āœ“ Topic "${name}" deleted`));
152
+ console.log(chalk.red(`āœ“ Topic "${name}" deleted`));
164
153
  break;
165
154
  default:
166
- console.log(chalk_1.default.yellow('Usage: onasis topic [create|list|delete] [name]'));
155
+ console.log(chalk.yellow('Usage: onasis topic [create|list|delete] [name]'));
167
156
  }
168
157
  }));
169
158
  // Achievement system
@@ -195,15 +184,15 @@ program
195
184
  if (!key) {
196
185
  // Show all settings
197
186
  const prefs = stateManager.getPreferences();
198
- console.log(chalk_1.default.bold('āš™ļø Settings:\n'));
187
+ console.log(chalk.bold('āš™ļø Settings:\n'));
199
188
  Object.entries(prefs).forEach(([k, v]) => {
200
- console.log(` ${chalk_1.default.cyan(k)}: ${v}`);
189
+ console.log(` ${chalk.cyan(k)}: ${v}`);
201
190
  });
202
191
  }
203
192
  else if (value !== undefined) {
204
193
  // Set a value
205
194
  stateManager.updatePreference(key, value);
206
- console.log(chalk_1.default.green(`āœ“ ${key} set to ${value}`));
195
+ console.log(chalk.green(`āœ“ ${key} set to ${value}`));
207
196
  }
208
197
  else {
209
198
  // Get a value
@@ -222,16 +211,16 @@ program
222
211
  cmd.outputHelp();
223
212
  }
224
213
  else {
225
- console.log(chalk_1.default.red(`Command "${command}" not found`));
214
+ console.log(chalk.red(`Command "${command}" not found`));
226
215
  }
227
216
  }
228
217
  else {
229
- console.log(chalk_1.default.bold.cyan('\n🧠 Onasis Memory Service - Enhanced CLI\n'));
218
+ console.log(chalk.bold.cyan('\n🧠 Onasis Memory Service - Enhanced CLI\n'));
230
219
  console.log('Available commands:\n');
231
220
  program.commands.forEach(cmd => {
232
221
  const name = cmd.name().padEnd(15);
233
222
  const desc = cmd.description();
234
- console.log(` ${chalk_1.default.cyan(name)} ${desc}`);
223
+ console.log(` ${chalk.cyan(name)} ${desc}`);
235
224
  });
236
225
  console.log('\nFor detailed help: onasis help [command]');
237
226
  console.log('Interactive mode: onasis (no arguments)');
@@ -248,11 +237,11 @@ program
248
237
  // Check API connection
249
238
  await new Promise(resolve => setTimeout(resolve, 1000));
250
239
  }, 'Checking service status...');
251
- console.log(chalk_1.default.green('āœ“ Service: Online'));
252
- console.log(chalk_1.default.green('āœ“ API: Connected'));
253
- console.log(chalk_1.default.green('āœ“ Auth: Valid'));
254
- console.log(chalk_1.default.cyan(' Endpoint: api.lanonasis.com'));
255
- console.log(chalk_1.default.cyan(' Version: 2.0.0'));
240
+ console.log(chalk.green('āœ“ Service: Online'));
241
+ console.log(chalk.green('āœ“ API: Connected'));
242
+ console.log(chalk.green('āœ“ Auth: Valid'));
243
+ console.log(chalk.cyan(' Endpoint: api.lanonasis.com'));
244
+ console.log(chalk.cyan(' Version: 2.0.0'));
256
245
  }));
257
246
  // Default action - show interactive dashboard if no command
258
247
  if (process.argv.length === 2) {
@@ -261,11 +250,11 @@ if (process.argv.length === 2) {
261
250
  // Check if first run
262
251
  const isFirstRun = !(await cliConfig.isAuthenticated());
263
252
  if (isFirstRun) {
264
- const welcome = new welcome_js_1.WelcomeExperience(stateManager);
253
+ const welcome = new WelcomeExperience(stateManager);
265
254
  await welcome.show();
266
255
  }
267
256
  else {
268
- const dashboard = new dashboard_js_1.DashboardCommandCenter(stateManager);
257
+ const dashboard = new DashboardCommandCenter(stateManager);
269
258
  await dashboard.show();
270
259
  }
271
260
  }
@@ -283,11 +272,11 @@ else {
283
272
  const options = program.opts();
284
273
  if (options.verbose) {
285
274
  process.env.CLI_VERBOSE = 'true';
286
- console.log(chalk_1.default.dim('Verbose mode enabled'));
275
+ console.log(chalk.dim('Verbose mode enabled'));
287
276
  }
288
277
  if (options.apiUrl) {
289
278
  process.env.MEMORY_API_URL = options.apiUrl;
290
- console.log(chalk_1.default.dim(`API URL set to: ${options.apiUrl}`));
279
+ console.log(chalk.dim(`API URL set to: ${options.apiUrl}`));
291
280
  }
292
281
  if (options.output) {
293
282
  stateManager.updatePreference('outputFormat', options.output);
@@ -298,11 +287,13 @@ if (options.noAnimations) {
298
287
  if (options.expert) {
299
288
  // Start directly in power mode
300
289
  (async () => {
301
- const powerMode = new power_mode_js_1.PowerUserMode(stateManager);
290
+ const powerMode = new PowerUserMode(stateManager);
302
291
  await powerMode.enter();
303
292
  })();
304
293
  }
305
294
  if (options.offline) {
306
295
  process.env.CLI_OFFLINE = 'true';
307
- console.log(chalk_1.default.yellow('⚠ Running in offline mode'));
296
+ console.log(chalk.yellow('⚠ Running in offline mode'));
308
297
  }
298
+ // Export for testing and extension
299
+ export { architecture, stateManager, errorHandler, achievementSystem, progressIndicator };