@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,33 +1,27 @@
1
- "use strict";
2
1
  /**
3
2
  * Enhanced Memory Commands - mem0-inspired advanced operations
4
3
  * Simplified working version
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.enhancedMemoryCommands = enhancedMemoryCommands;
11
- const chalk_1 = __importDefault(require("chalk"));
12
- const ora_1 = __importDefault(require("ora"));
13
- const mcp_client_js_1 = require("../utils/mcp-client.js");
14
- const config_js_1 = require("../utils/config.js");
15
- function enhancedMemoryCommands(program) {
5
+ import chalk from 'chalk';
6
+ import ora from 'ora';
7
+ import { getMCPClient } from '../utils/mcp-client.js';
8
+ import { CLIConfig } from '../utils/config.js';
9
+ export function enhancedMemoryCommands(program) {
16
10
  const memory = program.command('memory-enhanced').description('Enhanced memory operations');
17
11
  memory.command('bulk-pause')
18
12
  .description('Pause multiple memories by criteria')
19
13
  .option('--category <category>', 'Category to pause')
20
14
  .action(async (_options) => {
21
- const spinner = (0, ora_1.default)('Processing bulk pause...').start();
15
+ const spinner = ora('Processing bulk pause...').start();
22
16
  try {
23
- const client = (0, mcp_client_js_1.getMCPClient)();
17
+ const client = getMCPClient();
24
18
  if (!client.isConnectedToServer()) {
25
- const config = new config_js_1.CLIConfig();
19
+ const config = new CLIConfig();
26
20
  await client.connect({ useRemote: !!config.get('token') });
27
21
  }
28
22
  // Simplified implementation
29
23
  spinner.succeed('Bulk pause operation completed');
30
- console.log(chalk_1.default.green('✓ Enhanced memory operations are available'));
24
+ console.log(chalk.green('✓ Enhanced memory operations are available'));
31
25
  }
32
26
  catch (error) {
33
27
  spinner.fail(`Operation failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -36,7 +30,7 @@ function enhancedMemoryCommands(program) {
36
30
  memory.command('analytics')
37
31
  .description('Show memory analytics')
38
32
  .action(async () => {
39
- console.log(chalk_1.default.cyan('📊 Memory Analytics'));
40
- console.log(chalk_1.default.green('✓ Enhanced analytics features are available'));
33
+ console.log(chalk.cyan('📊 Memory Analytics'));
34
+ console.log(chalk.green('✓ Enhanced analytics features are available'));
41
35
  });
42
36
  }
@@ -1,31 +1,23 @@
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.UserGuidanceSystem = void 0;
7
- exports.guideCommand = guideCommand;
8
- exports.quickStartCommand = quickStartCommand;
9
- const chalk_1 = __importDefault(require("chalk"));
10
- const inquirer_1 = __importDefault(require("inquirer"));
11
- const config_js_1 = require("../utils/config.js");
12
- const api_js_1 = require("../utils/api.js");
1
+ import chalk from 'chalk';
2
+ import inquirer from 'inquirer';
3
+ import { CLIConfig } from '../utils/config.js';
4
+ import { apiClient } from '../utils/api.js';
13
5
  // Color scheme
14
6
  const colors = {
15
- primary: chalk_1.default.blue.bold,
16
- success: chalk_1.default.green,
17
- warning: chalk_1.default.yellow,
18
- error: chalk_1.default.red,
19
- info: chalk_1.default.cyan,
20
- accent: chalk_1.default.magenta,
21
- muted: chalk_1.default.gray,
22
- highlight: chalk_1.default.white.bold
7
+ primary: chalk.blue.bold,
8
+ success: chalk.green,
9
+ warning: chalk.yellow,
10
+ error: chalk.red,
11
+ info: chalk.cyan,
12
+ accent: chalk.magenta,
13
+ muted: chalk.gray,
14
+ highlight: chalk.white.bold
23
15
  };
24
- class UserGuidanceSystem {
16
+ export class UserGuidanceSystem {
25
17
  config;
26
18
  steps = [];
27
19
  constructor() {
28
- this.config = new config_js_1.CLIConfig();
20
+ this.config = new CLIConfig();
29
21
  this.initializeSteps();
30
22
  }
31
23
  initializeSteps() {
@@ -72,7 +64,7 @@ class UserGuidanceSystem {
72
64
  ];
73
65
  }
74
66
  async runGuidedSetup() {
75
- console.log(chalk_1.default.blue.bold('🚀 Welcome to Onasis-Core CLI Setup Guide'));
67
+ console.log(chalk.blue.bold('🚀 Welcome to Onasis-Core CLI Setup Guide'));
76
68
  console.log(colors.info('═'.repeat(50)));
77
69
  console.log();
78
70
  console.log(colors.highlight('This guided setup will help you get started with enterprise-grade'));
@@ -80,7 +72,7 @@ class UserGuidanceSystem {
80
72
  console.log();
81
73
  // Check current status
82
74
  await this.assessCurrentStatus();
83
- const { proceedWithGuide } = await inquirer_1.default.prompt([
75
+ const { proceedWithGuide } = await inquirer.prompt([
84
76
  {
85
77
  type: 'confirm',
86
78
  name: 'proceedWithGuide',
@@ -89,14 +81,14 @@ class UserGuidanceSystem {
89
81
  }
90
82
  ]);
91
83
  if (!proceedWithGuide) {
92
- console.log(chalk_1.default.yellow('Setup cancelled. You can run this guide anytime with:'));
93
- console.log(chalk_1.default.cyan(' lanonasis guide'));
84
+ console.log(chalk.yellow('Setup cancelled. You can run this guide anytime with:'));
85
+ console.log(chalk.cyan(' lanonasis guide'));
94
86
  return;
95
87
  }
96
88
  // Run through steps
97
89
  for (const step of this.steps) {
98
90
  if (step.completed) {
99
- console.log(chalk_1.default.green(`✅ ${step.title} (already completed)`));
91
+ console.log(chalk.green(`✅ ${step.title} (already completed)`));
100
92
  continue;
101
93
  }
102
94
  await this.executeStep(step);
@@ -104,35 +96,35 @@ class UserGuidanceSystem {
104
96
  await this.showCompletionSummary();
105
97
  }
106
98
  async assessCurrentStatus() {
107
- console.log(chalk_1.default.yellow('📋 Checking current setup status...'));
99
+ console.log(chalk.yellow('📋 Checking current setup status...'));
108
100
  console.log();
109
101
  // Check configuration
110
102
  const configExists = await this.config.exists();
111
103
  if (configExists) {
112
104
  this.markStepCompleted('initialization');
113
- console.log(chalk_1.default.green('✅ Configuration found'));
105
+ console.log(chalk.green('✅ Configuration found'));
114
106
  }
115
107
  else {
116
- console.log(chalk_1.default.gray('⏳ Configuration needs setup'));
108
+ console.log(chalk.gray('⏳ Configuration needs setup'));
117
109
  }
118
110
  // Check authentication
119
111
  const isAuthenticated = await this.config.isAuthenticated();
120
112
  const hasVendorKey = this.config.hasVendorKey();
121
113
  if (isAuthenticated || hasVendorKey) {
122
114
  this.markStepCompleted('authentication');
123
- console.log(chalk_1.default.green(`✅ Authentication configured (${hasVendorKey ? 'vendor key' : 'JWT token'})`));
115
+ console.log(chalk.green(`✅ Authentication configured (${hasVendorKey ? 'vendor key' : 'JWT token'})`));
124
116
  }
125
117
  else {
126
- console.log(chalk_1.default.gray('⏳ Authentication needs setup'));
118
+ console.log(chalk.gray('⏳ Authentication needs setup'));
127
119
  }
128
120
  // Check connection
129
121
  try {
130
- await api_js_1.apiClient.get('/health');
122
+ await apiClient.get('/health');
131
123
  this.markStepCompleted('verification');
132
- console.log(chalk_1.default.green('✅ Service connection verified'));
124
+ console.log(chalk.green('✅ Service connection verified'));
133
125
  }
134
126
  catch {
135
- console.log(chalk_1.default.gray('⏳ Service connection needs verification'));
127
+ console.log(chalk.gray('⏳ Service connection needs verification'));
136
128
  }
137
129
  console.log();
138
130
  }
@@ -143,12 +135,12 @@ class UserGuidanceSystem {
143
135
  }
144
136
  }
145
137
  async executeStep(step) {
146
- console.log(chalk_1.default.blue.bold(`🔧 ${step.title}`));
138
+ console.log(chalk.blue.bold(`🔧 ${step.title}`));
147
139
  console.log(colors.info('─'.repeat(30)));
148
- console.log(chalk_1.default.white(step.description));
140
+ console.log(chalk.white(step.description));
149
141
  console.log();
150
142
  if (step.optional) {
151
- const { proceed } = await inquirer_1.default.prompt([
143
+ const { proceed } = await inquirer.prompt([
152
144
  {
153
145
  type: 'confirm',
154
146
  name: 'proceed',
@@ -157,7 +149,7 @@ class UserGuidanceSystem {
157
149
  }
158
150
  ]);
159
151
  if (!proceed) {
160
- console.log(chalk_1.default.yellow('⏭️ Skipped'));
152
+ console.log(chalk.yellow('⏭️ Skipped'));
161
153
  console.log();
162
154
  return;
163
155
  }
@@ -166,12 +158,12 @@ class UserGuidanceSystem {
166
158
  try {
167
159
  await step.action();
168
160
  step.completed = true;
169
- console.log(chalk_1.default.green(`✅ ${step.title} completed successfully`));
161
+ console.log(chalk.green(`✅ ${step.title} completed successfully`));
170
162
  }
171
163
  catch (error) {
172
- console.log(chalk_1.default.red(`❌ ${step.title} failed`));
173
- console.log(chalk_1.default.gray(error instanceof Error ? error.message : String(error)));
174
- const { retry } = await inquirer_1.default.prompt([
164
+ console.log(chalk.red(`❌ ${step.title} failed`));
165
+ console.log(chalk.gray(error instanceof Error ? error.message : String(error)));
166
+ const { retry } = await inquirer.prompt([
175
167
  {
176
168
  type: 'confirm',
177
169
  name: 'retry',
@@ -188,7 +180,7 @@ class UserGuidanceSystem {
188
180
  }
189
181
  async initializeConfig() {
190
182
  console.log(colors.info('Initializing CLI configuration...'));
191
- const { apiUrl, outputFormat } = await inquirer_1.default.prompt([
183
+ const { apiUrl, outputFormat } = await inquirer.prompt([
192
184
  {
193
185
  type: 'input',
194
186
  name: 'apiUrl',
@@ -210,9 +202,9 @@ class UserGuidanceSystem {
210
202
  }
211
203
  async setupAuthentication() {
212
204
  console.log(colors.info('Setting up authentication...'));
213
- console.log(chalk_1.default.gray('Choose the authentication method that best fits your use case:'));
205
+ console.log(chalk.gray('Choose the authentication method that best fits your use case:'));
214
206
  console.log();
215
- const { authMethod } = await inquirer_1.default.prompt([
207
+ const { authMethod } = await inquirer.prompt([
216
208
  {
217
209
  type: 'list',
218
210
  name: 'authMethod',
@@ -240,17 +232,17 @@ class UserGuidanceSystem {
240
232
  const { loginCommand } = await import('./auth.js');
241
233
  switch (authMethod) {
242
234
  case 'vendor_key':
243
- console.log(chalk_1.default.yellow('📝 Vendor keys provide secure, programmatic access'));
244
- console.log(chalk_1.default.gray('Find it in your dashboard under API Keys.'));
235
+ console.log(chalk.yellow('📝 Vendor keys provide secure, programmatic access'));
236
+ console.log(chalk.gray('Find it in your dashboard under API Keys.'));
245
237
  console.log();
246
238
  break;
247
239
  case 'oauth':
248
- console.log(chalk_1.default.yellow('🌐 OAuth provides secure browser-based authentication'));
249
- console.log(chalk_1.default.gray('Your browser will open for authentication'));
240
+ console.log(chalk.yellow('🌐 OAuth provides secure browser-based authentication'));
241
+ console.log(chalk.gray('Your browser will open for authentication'));
250
242
  console.log();
251
243
  break;
252
244
  case 'credentials':
253
- console.log(chalk_1.default.yellow('📧 Direct authentication with your account'));
245
+ console.log(chalk.yellow('📧 Direct authentication with your account'));
254
246
  console.log();
255
247
  break;
256
248
  }
@@ -260,10 +252,10 @@ class UserGuidanceSystem {
260
252
  async verifyConnection() {
261
253
  console.log(colors.info('Verifying connection to Onasis-Core services...'));
262
254
  try {
263
- const health = await api_js_1.apiClient.get('/health');
255
+ const health = await apiClient.get('/health');
264
256
  console.log(colors.success('✅ Connection verified successfully'));
265
- console.log(chalk_1.default.gray(`Server status: ${health.status}`));
266
- console.log(chalk_1.default.gray(`Server version: ${health.version}`));
257
+ console.log(chalk.gray(`Server status: ${health.status}`));
258
+ console.log(chalk.gray(`Server version: ${health.version}`));
267
259
  }
268
260
  catch (error) {
269
261
  throw new Error(`Connection verification failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -271,9 +263,9 @@ class UserGuidanceSystem {
271
263
  }
272
264
  async createFirstMemory() {
273
265
  console.log(colors.info('Creating your first memory entry...'));
274
- console.log(chalk_1.default.gray('Memories are the core of the MaaS platform - they store and organize information'));
266
+ console.log(chalk.gray('Memories are the core of the MaaS platform - they store and organize information'));
275
267
  console.log();
276
- const { createSample } = await inquirer_1.default.prompt([
268
+ const { createSample } = await inquirer.prompt([
277
269
  {
278
270
  type: 'confirm',
279
271
  name: 'createSample',
@@ -283,18 +275,18 @@ class UserGuidanceSystem {
283
275
  ]);
284
276
  if (createSample) {
285
277
  try {
286
- const memory = await api_js_1.apiClient.createMemory({
278
+ const memory = await apiClient.createMemory({
287
279
  title: 'Welcome to Onasis-Core',
288
280
  content: 'This is your first memory in the Onasis-Core MaaS platform. You can store, search, and organize information efficiently using memories.',
289
281
  memory_type: 'reference',
290
282
  tags: ['welcome', 'getting-started', 'onasis-core']
291
283
  });
292
284
  console.log(colors.success('✅ Sample memory created successfully'));
293
- console.log(chalk_1.default.gray(`Memory ID: ${memory.id}`));
285
+ console.log(chalk.gray(`Memory ID: ${memory.id}`));
294
286
  console.log();
295
287
  console.log(colors.info('💡 Try these commands to explore:'));
296
- console.log(chalk_1.default.cyan(' lanonasis memory list'));
297
- console.log(chalk_1.default.cyan(' lanonasis memory search "welcome"'));
288
+ console.log(chalk.cyan(' lanonasis memory list'));
289
+ console.log(chalk.cyan(' lanonasis memory search "welcome"'));
298
290
  }
299
291
  catch (error) {
300
292
  throw new Error(`Failed to create sample memory: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -302,7 +294,7 @@ class UserGuidanceSystem {
302
294
  }
303
295
  else {
304
296
  console.log(colors.info('💡 You can create memories anytime with:'));
305
- console.log(chalk_1.default.cyan(' lanonasis memory create --title "My Title" --content "Content"'));
297
+ console.log(chalk.cyan(' lanonasis memory create --title "My Title" --content "Content"'));
306
298
  }
307
299
  }
308
300
  async exploreFeatures() {
@@ -330,10 +322,10 @@ class UserGuidanceSystem {
330
322
  command: 'lanonasis memory search "your query"'
331
323
  }
332
324
  ];
333
- console.log(chalk_1.default.yellow('📚 Available Features:'));
325
+ console.log(chalk.yellow('📚 Available Features:'));
334
326
  features.forEach((feature, index) => {
335
327
  console.log(`${index + 1}. ${colors.accent(feature.name)}: ${feature.description}`);
336
- console.log(` ${chalk_1.default.cyan(feature.command)}`);
328
+ console.log(` ${chalk.cyan(feature.command)}`);
337
329
  console.log();
338
330
  });
339
331
  console.log(colors.info('💡 Run any command with --help to learn more'));
@@ -341,7 +333,7 @@ class UserGuidanceSystem {
341
333
  async setupProductivity() {
342
334
  console.log(colors.info('🚀 Productivity Setup'));
343
335
  console.log();
344
- const { shell } = await inquirer_1.default.prompt([
336
+ const { shell } = await inquirer.prompt([
345
337
  {
346
338
  type: 'list',
347
339
  name: 'shell',
@@ -355,34 +347,34 @@ class UserGuidanceSystem {
355
347
  }
356
348
  ]);
357
349
  if (shell !== 'skip') {
358
- console.log(chalk_1.default.yellow(`📝 Shell Completion Setup (${shell}):`));
350
+ console.log(chalk.yellow(`📝 Shell Completion Setup (${shell}):`));
359
351
  console.log();
360
352
  switch (shell) {
361
353
  case 'bash':
362
354
  console.log(colors.info('Add to your ~/.bashrc:'));
363
- console.log(chalk_1.default.cyan(' source <(lanonasis --completion bash)'));
355
+ console.log(chalk.cyan(' source <(lanonasis --completion bash)'));
364
356
  break;
365
357
  case 'zsh':
366
358
  console.log(colors.info('Add to your ~/.zshrc:'));
367
- console.log(chalk_1.default.cyan(' source <(lanonasis --completion zsh)'));
359
+ console.log(chalk.cyan(' source <(lanonasis --completion zsh)'));
368
360
  break;
369
361
  case 'fish':
370
362
  console.log(colors.info('Add to your ~/.config/fish/config.fish:'));
371
- console.log(chalk_1.default.cyan(' lanonasis --completion fish | source'));
363
+ console.log(chalk.cyan(' lanonasis --completion fish | source'));
372
364
  break;
373
365
  }
374
366
  console.log();
375
367
  console.log(colors.success('✅ Completions will provide tab completion for all commands'));
376
368
  }
377
369
  console.log();
378
- console.log(chalk_1.default.yellow('🔗 Useful Aliases:'));
370
+ console.log(chalk.yellow('🔗 Useful Aliases:'));
379
371
  console.log(colors.info('You can also use these command aliases:'));
380
- console.log(chalk_1.default.cyan(' onasis # Same as lanonasis (Golden Contract compliant)'));
381
- console.log(chalk_1.default.cyan(' memory # Direct memory management'));
382
- console.log(chalk_1.default.cyan(' maas # MaaS-focused interface'));
372
+ console.log(chalk.cyan(' onasis # Same as lanonasis (Golden Contract compliant)'));
373
+ console.log(chalk.cyan(' memory # Direct memory management'));
374
+ console.log(chalk.cyan(' maas # MaaS-focused interface'));
383
375
  }
384
376
  async showCompletionSummary() {
385
- console.log(chalk_1.default.blue.bold('🎉 Setup Complete!'));
377
+ console.log(chalk.blue.bold('🎉 Setup Complete!'));
386
378
  console.log(colors.info('═'.repeat(30)));
387
379
  console.log();
388
380
  const completedSteps = this.steps.filter(s => s.completed);
@@ -393,24 +385,23 @@ class UserGuidanceSystem {
393
385
  console.log(colors.info(`📚 Plus ${completedSteps.filter(s => s.optional).length} optional steps`));
394
386
  }
395
387
  console.log();
396
- console.log(chalk_1.default.yellow('🚀 You\'re ready to use Onasis-Core CLI!'));
388
+ console.log(chalk.yellow('🚀 You\'re ready to use Onasis-Core CLI!'));
397
389
  console.log();
398
390
  console.log(colors.info('Next steps:'));
399
- console.log(chalk_1.default.cyan(' lanonasis health # Check system status'));
400
- console.log(chalk_1.default.cyan(' lanonasis memory list # View your memories'));
401
- console.log(chalk_1.default.cyan(' lanonasis --help # Explore all commands'));
391
+ console.log(chalk.cyan(' lanonasis health # Check system status'));
392
+ console.log(chalk.cyan(' lanonasis memory list # View your memories'));
393
+ console.log(chalk.cyan(' lanonasis --help # Explore all commands'));
402
394
  console.log();
403
- console.log(chalk_1.default.gray('💡 Need help? Visit: https://docs.lanonasis.com/cli'));
404
- console.log(chalk_1.default.gray('🌐 Dashboard: https://api.lanonasis.com/dashboard'));
395
+ console.log(chalk.gray('💡 Need help? Visit: https://docs.lanonasis.com/cli'));
396
+ console.log(chalk.gray('🌐 Dashboard: https://api.lanonasis.com/dashboard'));
405
397
  }
406
398
  }
407
- exports.UserGuidanceSystem = UserGuidanceSystem;
408
- async function guideCommand() {
399
+ export async function guideCommand() {
409
400
  const guide = new UserGuidanceSystem();
410
401
  await guide.runGuidedSetup();
411
402
  }
412
- async function quickStartCommand() {
413
- console.log(chalk_1.default.blue.bold('⚡ Onasis-Core CLI Quick Start'));
403
+ export async function quickStartCommand() {
404
+ console.log(chalk.blue.bold('⚡ Onasis-Core CLI Quick Start'));
414
405
  console.log(colors.info('═'.repeat(30)));
415
406
  console.log();
416
407
  const essentialCommands = [
@@ -442,14 +433,14 @@ async function quickStartCommand() {
442
433
  essentialCommands.forEach(category => {
443
434
  console.log(colors.accent(`📁 ${category.category}:`));
444
435
  category.commands.forEach(({ cmd, desc }) => {
445
- console.log(` ${chalk_1.default.cyan(cmd)}`);
446
- console.log(` ${chalk_1.default.gray(desc)}`);
436
+ console.log(` ${chalk.cyan(cmd)}`);
437
+ console.log(` ${chalk.gray(desc)}`);
447
438
  console.log();
448
439
  });
449
440
  });
450
441
  console.log(colors.info('💡 Pro Tips:'));
451
- console.log(chalk_1.default.gray(' • Use --help with any command for detailed options'));
452
- console.log(chalk_1.default.gray(' • Set up shell completions: lanonasis completion'));
453
- console.log(chalk_1.default.gray(' • Use --verbose for detailed operation logs'));
442
+ console.log(chalk.gray(' • Use --help with any command for detailed options'));
443
+ console.log(chalk.gray(' • Set up shell completions: lanonasis completion'));
444
+ console.log(chalk.gray(' • Use --verbose for detailed operation logs'));
454
445
  console.log();
455
446
  }
@@ -1,20 +1,14 @@
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.initCommand = initCommand;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const inquirer_1 = __importDefault(require("inquirer"));
9
- const config_js_1 = require("../utils/config.js");
10
- async function initCommand(options) {
11
- const config = new config_js_1.CLIConfig();
12
- console.log(chalk_1.default.blue.bold('🚀 Initializing MaaS CLI'));
1
+ import chalk from 'chalk';
2
+ import inquirer from 'inquirer';
3
+ import { CLIConfig } from '../utils/config.js';
4
+ export async function initCommand(options) {
5
+ const config = new CLIConfig();
6
+ console.log(chalk.blue.bold('🚀 Initializing MaaS CLI'));
13
7
  console.log();
14
8
  // Check if config already exists
15
9
  const configExists = await config.exists();
16
10
  if (configExists && !options.force) {
17
- const answer = await inquirer_1.default.prompt([
11
+ const answer = await inquirer.prompt([
18
12
  {
19
13
  type: 'confirm',
20
14
  name: 'overwrite',
@@ -23,12 +17,12 @@ async function initCommand(options) {
23
17
  }
24
18
  ]);
25
19
  if (!answer.overwrite) {
26
- console.log(chalk_1.default.yellow('Initialization cancelled'));
20
+ console.log(chalk.yellow('Initialization cancelled'));
27
21
  return;
28
22
  }
29
23
  }
30
24
  // Get configuration
31
- const answers = await inquirer_1.default.prompt([
25
+ const answers = await inquirer.prompt([
32
26
  {
33
27
  type: 'input',
34
28
  name: 'apiUrl',
@@ -49,10 +43,10 @@ async function initCommand(options) {
49
43
  await config.init();
50
44
  await config.setApiUrl(answers.apiUrl);
51
45
  console.log();
52
- console.log(chalk_1.default.green('✓ CLI initialized successfully'));
53
- console.log(chalk_1.default.gray(`Configuration saved to: ${config.getConfigPath()}`));
46
+ console.log(chalk.green('✓ CLI initialized successfully'));
47
+ console.log(chalk.gray(`Configuration saved to: ${config.getConfigPath()}`));
54
48
  console.log();
55
- console.log(chalk_1.default.yellow('Next steps:'));
56
- console.log(chalk_1.default.white(' memory login # Authenticate with your account'));
57
- console.log(chalk_1.default.white(' memory --help # Show available commands'));
49
+ console.log(chalk.yellow('Next steps:'));
50
+ console.log(chalk.white(' memory login # Authenticate with your account'));
51
+ console.log(chalk.white(' memory --help # Show available commands'));
58
52
  }
@@ -1,2 +1,12 @@
1
1
  import { Command } from 'commander';
2
+ /**
3
+ * Register MCP-related CLI commands (mcp and mcp-server) on a Commander program.
4
+ *
5
+ * Adds commands and subcommands for MCP server initialization, connection management,
6
+ * status reporting, tool listing and invocation, memory create/search operations,
7
+ * preference configuration, and diagnostic routines, wiring each command to its
8
+ * corresponding action handlers.
9
+ *
10
+ * @param program - Commander program instance to extend with MCP commands
11
+ */
2
12
  export declare function mcpCommands(program: Command): void;