@lanonasis/cli 3.6.5 → 3.7.0

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 (43) hide show
  1. package/README.md +19 -2
  2. package/dist/commands/api-keys.d.ts +2 -1
  3. package/dist/commands/api-keys.js +73 -78
  4. package/dist/commands/auth.js +244 -177
  5. package/dist/commands/completion.js +31 -39
  6. package/dist/commands/config.js +162 -201
  7. package/dist/commands/enhanced-memory.js +11 -17
  8. package/dist/commands/guide.js +79 -88
  9. package/dist/commands/init.js +14 -20
  10. package/dist/commands/mcp.d.ts +10 -0
  11. package/dist/commands/mcp.js +215 -156
  12. package/dist/commands/memory.js +77 -83
  13. package/dist/commands/organization.js +15 -21
  14. package/dist/commands/topics.js +52 -58
  15. package/dist/core/achievements.js +19 -26
  16. package/dist/core/architecture.js +42 -59
  17. package/dist/core/dashboard.js +71 -81
  18. package/dist/core/error-handler.js +30 -39
  19. package/dist/core/power-mode.js +46 -53
  20. package/dist/core/progress.js +35 -44
  21. package/dist/core/welcome.js +56 -64
  22. package/dist/enhanced-cli.js +49 -58
  23. package/dist/index-simple.js +75 -113
  24. package/dist/index.js +64 -69
  25. package/dist/mcp/access-control.js +13 -17
  26. package/dist/mcp/client/enhanced-client.js +17 -28
  27. package/dist/mcp/enhanced-server.js +10 -14
  28. package/dist/mcp/logger.js +3 -7
  29. package/dist/mcp/memory-state.js +13 -17
  30. package/dist/mcp/schemas/tool-schemas.d.ts +16 -16
  31. package/dist/mcp/schemas/tool-schemas.js +122 -126
  32. package/dist/mcp/server/lanonasis-server.js +66 -57
  33. package/dist/mcp/transports/transport-manager.js +18 -25
  34. package/dist/mcp/vector-store.js +6 -10
  35. package/dist/mcp-server.js +23 -27
  36. package/dist/utils/api.js +21 -27
  37. package/dist/utils/config.d.ts +2 -1
  38. package/dist/utils/config.js +65 -78
  39. package/dist/utils/formatting.js +6 -14
  40. package/dist/utils/hash-utils.d.ts +23 -0
  41. package/dist/utils/hash-utils.js +37 -0
  42. package/dist/utils/mcp-client.js +76 -117
  43. package/package.json +36 -5
@@ -1,17 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.topicCommands = topicCommands;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const inquirer_1 = __importDefault(require("inquirer"));
9
- const ora_1 = __importDefault(require("ora"));
10
- const table_1 = require("table");
11
- const date_fns_1 = require("date-fns");
12
- const api_js_1 = require("../utils/api.js");
13
- const formatting_js_1 = require("../utils/formatting.js");
14
- function topicCommands(program) {
1
+ import chalk from 'chalk';
2
+ import inquirer from 'inquirer';
3
+ import ora from 'ora';
4
+ import { table } from 'table';
5
+ import { format } from 'date-fns';
6
+ import { apiClient } from '../utils/api.js';
7
+ import { truncateText } from '../utils/formatting.js';
8
+ export function topicCommands(program) {
15
9
  // Create topic
16
10
  program
17
11
  .command('create')
@@ -27,7 +21,7 @@ function topicCommands(program) {
27
21
  try {
28
22
  let { name, description, color, icon, parent, interactive } = options;
29
23
  if (interactive || !name) {
30
- const answers = await inquirer_1.default.prompt([
24
+ const answers = await inquirer.prompt([
31
25
  {
32
26
  type: 'input',
33
27
  name: 'name',
@@ -64,7 +58,7 @@ function topicCommands(program) {
64
58
  color = answers.color;
65
59
  icon = answers.icon;
66
60
  }
67
- const spinner = (0, ora_1.default)('Creating topic...').start();
61
+ const spinner = ora('Creating topic...').start();
68
62
  const topicData = { name };
69
63
  if (description)
70
64
  topicData.description = description;
@@ -74,11 +68,11 @@ function topicCommands(program) {
74
68
  topicData.icon = icon;
75
69
  if (parent)
76
70
  topicData.parent_topic_id = parent;
77
- const topic = await api_js_1.apiClient.createTopic(topicData);
71
+ const topic = await apiClient.createTopic(topicData);
78
72
  spinner.succeed('Topic created successfully');
79
73
  console.log();
80
- console.log(chalk_1.default.green('✓ Topic created:'));
81
- console.log(` ID: ${chalk_1.default.cyan(topic.id)}`);
74
+ console.log(chalk.green('✓ Topic created:'));
75
+ console.log(` ID: ${chalk.cyan(topic.id)}`);
82
76
  console.log(` Name: ${topic.name}`);
83
77
  if (topic.description) {
84
78
  console.log(` Description: ${topic.description}`);
@@ -89,7 +83,7 @@ function topicCommands(program) {
89
83
  }
90
84
  catch (error) {
91
85
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
92
- console.error(chalk_1.default.red('✖ Failed to create topic:'), errorMessage);
86
+ console.error(chalk.red('✖ Failed to create topic:'), errorMessage);
93
87
  process.exit(1);
94
88
  }
95
89
  });
@@ -100,14 +94,14 @@ function topicCommands(program) {
100
94
  .description('List topics')
101
95
  .action(async () => {
102
96
  try {
103
- const spinner = (0, ora_1.default)('Fetching topics...').start();
104
- const topics = await api_js_1.apiClient.getTopics();
97
+ const spinner = ora('Fetching topics...').start();
98
+ const topics = await apiClient.getTopics();
105
99
  spinner.stop();
106
100
  if (topics.length === 0) {
107
- console.log(chalk_1.default.yellow('No topics found'));
101
+ console.log(chalk.yellow('No topics found'));
108
102
  return;
109
103
  }
110
- console.log(chalk_1.default.blue.bold(`\n📁 Topics (${topics.length} total)`));
104
+ console.log(chalk.blue.bold(`\n📁 Topics (${topics.length} total)`));
111
105
  console.log();
112
106
  const outputFormat = process.env.CLI_OUTPUT_FORMAT || 'table';
113
107
  if (outputFormat === 'json') {
@@ -116,10 +110,10 @@ function topicCommands(program) {
116
110
  else {
117
111
  // Table format
118
112
  const tableData = topics.map((topic) => [
119
- (0, formatting_js_1.truncateText)(topic.name, 25),
120
- (0, formatting_js_1.truncateText)(topic.description || '', 40),
113
+ truncateText(topic.name, 25),
114
+ truncateText(topic.description || '', 40),
121
115
  topic.color || '',
122
- (0, date_fns_1.format)(new Date(topic.created_at), 'MMM dd, yyyy'),
116
+ format(new Date(topic.created_at), 'MMM dd, yyyy'),
123
117
  topic.parent_topic_id ? '✓' : ''
124
118
  ]);
125
119
  const tableConfig = {
@@ -136,12 +130,12 @@ function topicCommands(program) {
136
130
  ]
137
131
  };
138
132
  const tableHeaders = ['Name', 'Description', 'System', 'Created'];
139
- console.log((0, table_1.table)([tableHeaders, ...tableData], tableConfig));
133
+ console.log(table([tableHeaders, ...tableData], tableConfig));
140
134
  }
141
135
  }
142
136
  catch (error) {
143
137
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
144
- console.error(chalk_1.default.red('✖ Failed to list topics:'), errorMessage);
138
+ console.error(chalk.red('✖ Failed to list topics:'), errorMessage);
145
139
  process.exit(1);
146
140
  }
147
141
  });
@@ -153,37 +147,37 @@ function topicCommands(program) {
153
147
  .argument('<id>', 'topic ID')
154
148
  .action(async (id) => {
155
149
  try {
156
- const spinner = (0, ora_1.default)('Fetching topic...').start();
157
- const topic = await api_js_1.apiClient.getTopic(id);
150
+ const spinner = ora('Fetching topic...').start();
151
+ const topic = await apiClient.getTopic(id);
158
152
  spinner.stop();
159
- console.log(chalk_1.default.blue.bold('\n📁 Topic Details'));
153
+ console.log(chalk.blue.bold('\n📁 Topic Details'));
160
154
  console.log();
161
- console.log(chalk_1.default.green('Name:'), topic.name);
162
- console.log(chalk_1.default.green('ID:'), chalk_1.default.cyan(topic.id));
155
+ console.log(chalk.green('Name:'), topic.name);
156
+ console.log(chalk.green('ID:'), chalk.cyan(topic.id));
163
157
  if (topic.description) {
164
- console.log(chalk_1.default.green('Description:'), topic.description);
158
+ console.log(chalk.green('Description:'), topic.description);
165
159
  }
166
160
  if (topic.color) {
167
- console.log(chalk_1.default.green('Color:'), topic.color);
161
+ console.log(chalk.green('Color:'), topic.color);
168
162
  }
169
163
  if (topic.icon) {
170
- console.log(chalk_1.default.green('Icon:'), topic.icon);
164
+ console.log(chalk.green('Icon:'), topic.icon);
171
165
  }
172
166
  if (topic.parent_topic_id) {
173
- console.log(chalk_1.default.green('Parent Topic:'), topic.parent_topic_id);
167
+ console.log(chalk.green('Parent Topic:'), topic.parent_topic_id);
174
168
  }
175
- console.log(chalk_1.default.green('System Topic:'), topic.is_system ? 'Yes' : 'No');
176
- console.log(chalk_1.default.green('Created:'), (0, date_fns_1.format)(new Date(topic.created_at), 'PPpp'));
177
- console.log(chalk_1.default.green('Updated:'), (0, date_fns_1.format)(new Date(topic.updated_at), 'PPpp'));
169
+ console.log(chalk.green('System Topic:'), topic.is_system ? 'Yes' : 'No');
170
+ console.log(chalk.green('Created:'), format(new Date(topic.created_at), 'PPpp'));
171
+ console.log(chalk.green('Updated:'), format(new Date(topic.updated_at), 'PPpp'));
178
172
  if (topic.metadata && Object.keys(topic.metadata).length > 0) {
179
173
  console.log();
180
- console.log(chalk_1.default.green('Metadata:'));
174
+ console.log(chalk.green('Metadata:'));
181
175
  console.log(JSON.stringify(topic.metadata, null, 2));
182
176
  }
183
177
  }
184
178
  catch (error) {
185
179
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
186
- console.error(chalk_1.default.red('✖ Failed to get topic:'), errorMessage);
180
+ console.error(chalk.red('✖ Failed to get topic:'), errorMessage);
187
181
  process.exit(1);
188
182
  }
189
183
  });
@@ -202,10 +196,10 @@ function topicCommands(program) {
202
196
  let updateData = {};
203
197
  if (options.interactive) {
204
198
  // First, get current topic data
205
- const spinner = (0, ora_1.default)('Fetching current topic...').start();
206
- const currentTopic = await api_js_1.apiClient.getTopic(id);
199
+ const spinner = ora('Fetching current topic...').start();
200
+ const currentTopic = await apiClient.getTopic(id);
207
201
  spinner.stop();
208
- const answers = await inquirer_1.default.prompt([
202
+ const answers = await inquirer.prompt([
209
203
  {
210
204
  type: 'input',
211
205
  name: 'name',
@@ -254,20 +248,20 @@ function topicCommands(program) {
254
248
  updateData.icon = options.icon;
255
249
  }
256
250
  if (Object.keys(updateData).length === 0) {
257
- console.log(chalk_1.default.yellow('No updates specified'));
251
+ console.log(chalk.yellow('No updates specified'));
258
252
  return;
259
253
  }
260
- const spinner = (0, ora_1.default)('Updating topic...').start();
261
- const topic = await api_js_1.apiClient.updateTopic(id, updateData);
254
+ const spinner = ora('Updating topic...').start();
255
+ const topic = await apiClient.updateTopic(id, updateData);
262
256
  spinner.succeed('Topic updated successfully');
263
257
  console.log();
264
- console.log(chalk_1.default.green('✓ Topic updated:'));
265
- console.log(` ID: ${chalk_1.default.cyan(topic.id)}`);
258
+ console.log(chalk.green('✓ Topic updated:'));
259
+ console.log(` ID: ${chalk.cyan(topic.id)}`);
266
260
  console.log(` Name: ${topic.name}`);
267
261
  }
268
262
  catch (error) {
269
263
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
270
- console.error(chalk_1.default.red('✖ Failed to update topic:'), errorMessage);
264
+ console.error(chalk.red('✖ Failed to update topic:'), errorMessage);
271
265
  process.exit(1);
272
266
  }
273
267
  });
@@ -281,8 +275,8 @@ function topicCommands(program) {
281
275
  .action(async (id, options) => {
282
276
  try {
283
277
  if (!options.force) {
284
- const topic = await api_js_1.apiClient.getTopic(id);
285
- const answer = await inquirer_1.default.prompt([
278
+ const topic = await apiClient.getTopic(id);
279
+ const answer = await inquirer.prompt([
286
280
  {
287
281
  type: 'confirm',
288
282
  name: 'confirm',
@@ -291,17 +285,17 @@ function topicCommands(program) {
291
285
  }
292
286
  ]);
293
287
  if (!answer.confirm) {
294
- console.log(chalk_1.default.yellow('Deletion cancelled'));
288
+ console.log(chalk.yellow('Deletion cancelled'));
295
289
  return;
296
290
  }
297
291
  }
298
- const spinner = (0, ora_1.default)('Deleting topic...').start();
299
- await api_js_1.apiClient.deleteTopic(id);
292
+ const spinner = ora('Deleting topic...').start();
293
+ await apiClient.deleteTopic(id);
300
294
  spinner.succeed('Topic deleted successfully');
301
295
  }
302
296
  catch (error) {
303
297
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
304
- console.error(chalk_1.default.red('✖ Failed to delete topic:'), errorMessage);
298
+ console.error(chalk.red('✖ Failed to delete topic:'), errorMessage);
305
299
  process.exit(1);
306
300
  }
307
301
  });
@@ -1,17 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * Achievement System and Engagement Features
4
3
  * Gamification elements to enhance user engagement
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.AchievementSystem = void 0;
11
- const chalk_1 = __importDefault(require("chalk"));
12
- const boxen_1 = __importDefault(require("boxen"));
13
- const events_1 = require("events");
14
- class AchievementSystem extends events_1.EventEmitter {
5
+ import chalk from 'chalk';
6
+ import boxen from 'boxen';
7
+ import { EventEmitter } from 'events';
8
+ export class AchievementSystem extends EventEmitter {
15
9
  stateManager;
16
10
  achievements;
17
11
  userStats;
@@ -271,10 +265,10 @@ class AchievementSystem extends events_1.EventEmitter {
271
265
  * Show achievement celebration
272
266
  */
273
267
  celebrate(achievement) {
274
- const celebration = (0, boxen_1.default)(`${achievement.icon} ${chalk_1.default.bold.yellow('Achievement Unlocked!')}\n\n` +
275
- `${chalk_1.default.bold(achievement.name)}\n` +
276
- `${chalk_1.default.gray(achievement.description)}\n\n` +
277
- `${chalk_1.default.green(`+${achievement.points} points`)}`, {
268
+ const celebration = boxen(`${achievement.icon} ${chalk.bold.yellow('Achievement Unlocked!')}\n\n` +
269
+ `${chalk.bold(achievement.name)}\n` +
270
+ `${chalk.gray(achievement.description)}\n\n` +
271
+ `${chalk.green(`+${achievement.points} points`)}`, {
278
272
  padding: 1,
279
273
  borderStyle: 'double',
280
274
  borderColor: 'yellow',
@@ -287,14 +281,14 @@ class AchievementSystem extends events_1.EventEmitter {
287
281
  */
288
282
  showAchievements() {
289
283
  console.clear();
290
- console.log(chalk_1.default.bold.yellow('🏆 Achievements\n'));
284
+ console.log(chalk.bold.yellow('🏆 Achievements\n'));
291
285
  const categories = ['usage', 'milestone', 'special', 'hidden'];
292
286
  const totalPoints = this.getTotalPoints();
293
287
  const unlockedPoints = this.getUnlockedPoints();
294
288
  // Summary
295
- console.log((0, boxen_1.default)(`Points: ${chalk_1.default.bold.green(unlockedPoints)} / ${totalPoints}\n` +
296
- `Unlocked: ${chalk_1.default.bold(this.unlockedAchievements.size)} / ${this.achievements.size}\n` +
297
- `Completion: ${chalk_1.default.bold(Math.round((this.unlockedAchievements.size / this.achievements.size) * 100) + '%')}`, {
289
+ console.log(boxen(`Points: ${chalk.bold.green(unlockedPoints)} / ${totalPoints}\n` +
290
+ `Unlocked: ${chalk.bold(this.unlockedAchievements.size)} / ${this.achievements.size}\n` +
291
+ `Completion: ${chalk.bold(Math.round((this.unlockedAchievements.size / this.achievements.size) * 100) + '%')}`, {
298
292
  padding: 1,
299
293
  borderStyle: 'single',
300
294
  borderColor: 'cyan'
@@ -305,7 +299,7 @@ class AchievementSystem extends events_1.EventEmitter {
305
299
  .filter(a => a.category === category);
306
300
  if (categoryAchievements.length === 0)
307
301
  return;
308
- console.log(`\n${chalk_1.default.bold(this.getCategoryTitle(category))}\n`);
302
+ console.log(`\n${chalk.bold(this.getCategoryTitle(category))}\n`);
309
303
  categoryAchievements.forEach(achievement => {
310
304
  this.displayAchievement(achievement);
311
305
  });
@@ -317,9 +311,9 @@ class AchievementSystem extends events_1.EventEmitter {
317
311
  displayAchievement(achievement) {
318
312
  const unlocked = achievement.unlocked || this.unlockedAchievements.has(achievement.id);
319
313
  const icon = unlocked ? achievement.icon : '🔒';
320
- const name = unlocked ? chalk_1.default.bold(achievement.name) : chalk_1.default.dim(achievement.name);
321
- const description = unlocked ? achievement.description : chalk_1.default.dim(achievement.description);
322
- const points = chalk_1.default.green(`${achievement.points}pts`);
314
+ const name = unlocked ? chalk.bold(achievement.name) : chalk.dim(achievement.name);
315
+ const description = unlocked ? achievement.description : chalk.dim(achievement.description);
316
+ const points = chalk.green(`${achievement.points}pts`);
323
317
  let progressBar = '';
324
318
  if (achievement.maxProgress && !unlocked) {
325
319
  const progress = achievement.progress || 0;
@@ -327,12 +321,12 @@ class AchievementSystem extends events_1.EventEmitter {
327
321
  const barLength = 20;
328
322
  const filled = Math.round((progress / achievement.maxProgress) * barLength);
329
323
  const bar = '█'.repeat(filled) + '░'.repeat(barLength - filled);
330
- progressBar = `\n ${chalk_1.default.cyan(bar)} ${percentage}% (${progress}/${achievement.maxProgress})`;
324
+ progressBar = `\n ${chalk.cyan(bar)} ${percentage}% (${progress}/${achievement.maxProgress})`;
331
325
  }
332
326
  console.log(` ${icon} ${name} ${points}`);
333
327
  console.log(` ${description}${progressBar}`);
334
328
  if (unlocked && achievement.unlockedAt) {
335
- console.log(chalk_1.default.dim(` Unlocked: ${achievement.unlockedAt.toLocaleDateString()}`));
329
+ console.log(chalk.dim(` Unlocked: ${achievement.unlockedAt.toLocaleDateString()}`));
336
330
  }
337
331
  console.log();
338
332
  }
@@ -374,7 +368,7 @@ class AchievementSystem extends events_1.EventEmitter {
374
368
  // Show subtle notification for new achievements
375
369
  if (newAchievements.length > 0 && !this.stateManager.getPreferences().expertMode) {
376
370
  newAchievements.forEach(achievement => {
377
- console.log(chalk_1.default.yellow(`\n🎉 Achievement unlocked: ${achievement.name}!`));
371
+ console.log(chalk.yellow(`\n🎉 Achievement unlocked: ${achievement.name}!`));
378
372
  });
379
373
  }
380
374
  }
@@ -429,4 +423,3 @@ class AchievementSystem extends events_1.EventEmitter {
429
423
  // Would save to storage
430
424
  }
431
425
  }
432
- exports.AchievementSystem = AchievementSystem;
@@ -1,18 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * Core Architecture for Enhanced CLI Experience
4
3
  * Implements the layered architecture for state management, interaction, and presentation
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.SubtleAnimationController = exports.ResponsiveLayoutManager = exports.AdaptiveThemeEngine = exports.PresentationLayer = exports.InlineHelpProvider = exports.RealTimeFeedback = exports.ContextualValidator = exports.AdaptivePromptSystem = exports.InteractionEngine = exports.StateManager = void 0;
11
- exports.createCLIArchitecture = createCLIArchitecture;
12
- const events_1 = require("events");
13
- const chalk_1 = __importDefault(require("chalk"));
5
+ import { EventEmitter } from 'events';
6
+ import chalk from 'chalk';
14
7
  // State Management Layer
15
- class StateManager extends events_1.EventEmitter {
8
+ export class StateManager extends EventEmitter {
16
9
  navigationStack = [];
17
10
  userContext;
18
11
  sessionMemory;
@@ -73,7 +66,7 @@ class StateManager extends events_1.EventEmitter {
73
66
  renderBreadcrumb() {
74
67
  if (this.navigationStack.length > 0) {
75
68
  const path = this.navigationStack.map(s => s.name).join(' > ');
76
- console.log(chalk_1.default.dim(path));
69
+ console.log(chalk.dim(path));
77
70
  }
78
71
  }
79
72
  // Context methods
@@ -119,9 +112,8 @@ class StateManager extends events_1.EventEmitter {
119
112
  return this.sessionMemory.undoStack.pop();
120
113
  }
121
114
  }
122
- exports.StateManager = StateManager;
123
115
  // Interaction Engine
124
- class InteractionEngine {
116
+ export class InteractionEngine {
125
117
  stateManager;
126
118
  promptSystem;
127
119
  validationEngine;
@@ -147,9 +139,8 @@ class InteractionEngine {
147
139
  return this.helpSystem.getHelp();
148
140
  }
149
141
  }
150
- exports.InteractionEngine = InteractionEngine;
151
142
  // Adaptive Prompt System
152
- class AdaptivePromptSystem {
143
+ export class AdaptivePromptSystem {
153
144
  stateManager;
154
145
  constructor(stateManager) {
155
146
  this.stateManager = stateManager;
@@ -175,9 +166,8 @@ class AdaptivePromptSystem {
175
166
  return null;
176
167
  }
177
168
  }
178
- exports.AdaptivePromptSystem = AdaptivePromptSystem;
179
169
  // Contextual Validator
180
- class ContextualValidator {
170
+ export class ContextualValidator {
181
171
  validate(value, rules) {
182
172
  const errors = [];
183
173
  const warnings = [];
@@ -204,15 +194,14 @@ class ContextualValidator {
204
194
  };
205
195
  }
206
196
  }
207
- exports.ContextualValidator = ContextualValidator;
208
197
  // Real-time Feedback System
209
- class RealTimeFeedback {
198
+ export class RealTimeFeedback {
210
199
  icons = {
211
- success: chalk_1.default.green('✓'),
212
- error: chalk_1.default.red('✖'),
213
- warning: chalk_1.default.yellow('⚠'),
214
- info: chalk_1.default.cyan('ℹ'),
215
- loading: chalk_1.default.blue('◐')
200
+ success: chalk.green('✓'),
201
+ error: chalk.red('✖'),
202
+ warning: chalk.yellow('⚠'),
203
+ info: chalk.cyan('ℹ'),
204
+ loading: chalk.blue('◐')
216
205
  };
217
206
  show(message, type) {
218
207
  const icon = this.icons[type];
@@ -221,17 +210,16 @@ class RealTimeFeedback {
221
210
  }
222
211
  getColorFunction(type) {
223
212
  switch (type) {
224
- case 'success': return chalk_1.default.green;
225
- case 'error': return chalk_1.default.red;
226
- case 'warning': return chalk_1.default.yellow;
227
- case 'info': return chalk_1.default.cyan;
228
- default: return chalk_1.default.white;
213
+ case 'success': return chalk.green;
214
+ case 'error': return chalk.red;
215
+ case 'warning': return chalk.yellow;
216
+ case 'info': return chalk.cyan;
217
+ default: return chalk.white;
229
218
  }
230
219
  }
231
220
  }
232
- exports.RealTimeFeedback = RealTimeFeedback;
233
221
  // Inline Help Provider
234
- class InlineHelpProvider {
222
+ export class InlineHelpProvider {
235
223
  stateManager;
236
224
  constructor(stateManager) {
237
225
  this.stateManager = stateManager;
@@ -256,9 +244,8 @@ class InlineHelpProvider {
256
244
  return helps[state.name] || 'Type "?" for help, "←" to go back';
257
245
  }
258
246
  }
259
- exports.InlineHelpProvider = InlineHelpProvider;
260
247
  // Presentation Layer
261
- class PresentationLayer {
248
+ export class PresentationLayer {
262
249
  themeEngine;
263
250
  layoutManager;
264
251
  animationController;
@@ -277,32 +264,31 @@ class PresentationLayer {
277
264
  this.animationController.animate(_element, _animation);
278
265
  }
279
266
  }
280
- exports.PresentationLayer = PresentationLayer;
281
267
  // Theme Engine
282
- class AdaptiveThemeEngine {
268
+ export class AdaptiveThemeEngine {
283
269
  currentTheme = 'default';
284
270
  themes = {
285
271
  default: {
286
- primary: chalk_1.default.blue.bold,
287
- secondary: chalk_1.default.gray,
288
- success: chalk_1.default.green,
289
- warning: chalk_1.default.yellow,
290
- error: chalk_1.default.red,
291
- info: chalk_1.default.cyan,
292
- accent: chalk_1.default.magenta,
293
- muted: chalk_1.default.dim,
294
- highlight: chalk_1.default.white.bold
272
+ primary: chalk.blue.bold,
273
+ secondary: chalk.gray,
274
+ success: chalk.green,
275
+ warning: chalk.yellow,
276
+ error: chalk.red,
277
+ info: chalk.cyan,
278
+ accent: chalk.magenta,
279
+ muted: chalk.dim,
280
+ highlight: chalk.white.bold
295
281
  },
296
282
  dark: {
297
- primary: chalk_1.default.cyanBright.bold,
298
- secondary: chalk_1.default.gray,
299
- success: chalk_1.default.greenBright,
300
- warning: chalk_1.default.yellowBright,
301
- error: chalk_1.default.redBright,
302
- info: chalk_1.default.blueBright,
303
- accent: chalk_1.default.magentaBright,
304
- muted: chalk_1.default.dim,
305
- highlight: chalk_1.default.whiteBright.bold
283
+ primary: chalk.cyanBright.bold,
284
+ secondary: chalk.gray,
285
+ success: chalk.greenBright,
286
+ warning: chalk.yellowBright,
287
+ error: chalk.redBright,
288
+ info: chalk.blueBright,
289
+ accent: chalk.magentaBright,
290
+ muted: chalk.dim,
291
+ highlight: chalk.whiteBright.bold
306
292
  }
307
293
  };
308
294
  setTheme(theme) {
@@ -314,9 +300,8 @@ class AdaptiveThemeEngine {
314
300
  return this.themes[this.currentTheme];
315
301
  }
316
302
  }
317
- exports.AdaptiveThemeEngine = AdaptiveThemeEngine;
318
303
  // Layout Manager
319
- class ResponsiveLayoutManager {
304
+ export class ResponsiveLayoutManager {
320
305
  render(content, layout) {
321
306
  // Implement different layout strategies
322
307
  switch (layout) {
@@ -350,17 +335,15 @@ class ResponsiveLayoutManager {
350
335
  // Implementation here
351
336
  }
352
337
  }
353
- exports.ResponsiveLayoutManager = ResponsiveLayoutManager;
354
338
  // Animation Controller
355
- class SubtleAnimationController {
339
+ export class SubtleAnimationController {
356
340
  animate(_element, _animation) {
357
341
  // Implement subtle animations for CLI
358
342
  // This would handle progress bars, spinners, etc.
359
343
  }
360
344
  }
361
- exports.SubtleAnimationController = SubtleAnimationController;
362
345
  // Factory to create the complete architecture
363
- function createCLIArchitecture() {
346
+ export function createCLIArchitecture() {
364
347
  const stateManager = new StateManager();
365
348
  const interactionEngine = new InteractionEngine(stateManager);
366
349
  const presentationLayer = new PresentationLayer();