@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.
- package/dist/commands/api-keys.d.ts +2 -1
- package/dist/commands/api-keys.js +73 -78
- package/dist/commands/auth.js +160 -167
- package/dist/commands/completion.js +31 -39
- package/dist/commands/config.js +162 -201
- package/dist/commands/enhanced-memory.js +11 -17
- package/dist/commands/guide.js +79 -88
- package/dist/commands/init.js +14 -20
- package/dist/commands/mcp.d.ts +10 -0
- package/dist/commands/mcp.js +167 -156
- package/dist/commands/memory.js +77 -83
- package/dist/commands/organization.js +15 -21
- package/dist/commands/topics.js +52 -58
- package/dist/core/achievements.js +19 -26
- package/dist/core/architecture.js +42 -59
- package/dist/core/dashboard.js +71 -81
- package/dist/core/error-handler.js +30 -39
- package/dist/core/power-mode.js +46 -53
- package/dist/core/progress.js +35 -44
- package/dist/core/welcome.js +56 -64
- package/dist/enhanced-cli.js +49 -58
- package/dist/index-simple.js +75 -113
- package/dist/index.js +64 -69
- package/dist/mcp/access-control.js +13 -17
- package/dist/mcp/client/enhanced-client.js +16 -23
- package/dist/mcp/enhanced-server.js +10 -14
- package/dist/mcp/logger.js +3 -7
- package/dist/mcp/memory-state.js +13 -17
- package/dist/mcp/schemas/tool-schemas.d.ts +16 -16
- package/dist/mcp/schemas/tool-schemas.js +122 -126
- package/dist/mcp/server/lanonasis-server.js +66 -57
- package/dist/mcp/transports/transport-manager.js +18 -25
- package/dist/mcp/vector-store.js +6 -10
- package/dist/mcp-server.js +23 -27
- package/dist/utils/api.js +19 -26
- package/dist/utils/config.d.ts +2 -1
- package/dist/utils/config.js +65 -78
- package/dist/utils/formatting.js +6 -14
- package/dist/utils/mcp-client.js +76 -117
- package/package.json +36 -5
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateCompletionData = generateCompletionData;
|
|
7
|
-
exports.completionCommand = completionCommand;
|
|
8
|
-
exports.installCompletionsCommand = installCompletionsCommand;
|
|
9
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
-
const config_js_1 = require("../utils/config.js");
|
|
11
|
-
const api_js_1 = require("../utils/api.js");
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { CLIConfig } from '../utils/config.js';
|
|
3
|
+
import { apiClient } from '../utils/api.js';
|
|
12
4
|
// Color scheme
|
|
13
5
|
const colors = {
|
|
14
|
-
primary:
|
|
15
|
-
success:
|
|
16
|
-
warning:
|
|
17
|
-
error:
|
|
18
|
-
info:
|
|
19
|
-
accent:
|
|
20
|
-
muted:
|
|
21
|
-
highlight:
|
|
6
|
+
primary: chalk.blue.bold,
|
|
7
|
+
success: chalk.green,
|
|
8
|
+
warning: chalk.yellow,
|
|
9
|
+
error: chalk.red,
|
|
10
|
+
info: chalk.cyan,
|
|
11
|
+
accent: chalk.magenta,
|
|
12
|
+
muted: chalk.gray,
|
|
13
|
+
highlight: chalk.white.bold
|
|
22
14
|
};
|
|
23
|
-
async function generateCompletionData() {
|
|
24
|
-
const config = new
|
|
15
|
+
export async function generateCompletionData() {
|
|
16
|
+
const config = new CLIConfig();
|
|
25
17
|
await config.init();
|
|
26
18
|
// Dynamic data that might come from API or config
|
|
27
19
|
let memoryTypes = ['context', 'project', 'knowledge', 'reference', 'personal', 'workflow'];
|
|
@@ -29,7 +21,7 @@ async function generateCompletionData() {
|
|
|
29
21
|
try {
|
|
30
22
|
// Try to fetch dynamic data if authenticated
|
|
31
23
|
if (await config.isAuthenticated()) {
|
|
32
|
-
const topicsData = await
|
|
24
|
+
const topicsData = await apiClient.getTopics();
|
|
33
25
|
topics = topicsData.map(t => t.name);
|
|
34
26
|
}
|
|
35
27
|
}
|
|
@@ -351,38 +343,38 @@ async function generateCompletionData() {
|
|
|
351
343
|
};
|
|
352
344
|
return completionData;
|
|
353
345
|
}
|
|
354
|
-
async function completionCommand() {
|
|
346
|
+
export async function completionCommand() {
|
|
355
347
|
try {
|
|
356
348
|
const data = await generateCompletionData();
|
|
357
349
|
console.log(JSON.stringify(data, null, 2));
|
|
358
350
|
}
|
|
359
351
|
catch (error) {
|
|
360
|
-
console.error(
|
|
352
|
+
console.error(chalk.red('✖ Failed to generate completion data:'), error instanceof Error ? error.message : String(error));
|
|
361
353
|
process.exit(1);
|
|
362
354
|
}
|
|
363
355
|
}
|
|
364
|
-
async function installCompletionsCommand() {
|
|
365
|
-
console.log(
|
|
356
|
+
export async function installCompletionsCommand() {
|
|
357
|
+
console.log(chalk.blue.bold('🔧 Installing Shell Completions'));
|
|
366
358
|
console.log(colors.info('═'.repeat(40)));
|
|
367
359
|
console.log();
|
|
368
|
-
console.log(
|
|
360
|
+
console.log(chalk.yellow('📋 Installation Instructions:'));
|
|
369
361
|
console.log();
|
|
370
|
-
console.log(
|
|
371
|
-
console.log(
|
|
372
|
-
console.log(
|
|
362
|
+
console.log(chalk.white('Bash:'));
|
|
363
|
+
console.log(chalk.gray(' # Add to ~/.bashrc or ~/.bash_profile:'));
|
|
364
|
+
console.log(chalk.cyan(' source <(lanonasis --completion bash)'));
|
|
373
365
|
console.log();
|
|
374
|
-
console.log(
|
|
375
|
-
console.log(
|
|
376
|
-
console.log(
|
|
377
|
-
console.log(
|
|
366
|
+
console.log(chalk.white('Zsh:'));
|
|
367
|
+
console.log(chalk.gray(' # Add to ~/.zshrc:'));
|
|
368
|
+
console.log(chalk.cyan(' source <(lanonasis --completion zsh)'));
|
|
369
|
+
console.log(chalk.gray(' # Or for Oh My Zsh, create ~/.oh-my-zsh/completions/_lanonasis'));
|
|
378
370
|
console.log();
|
|
379
|
-
console.log(
|
|
380
|
-
console.log(
|
|
381
|
-
console.log(
|
|
382
|
-
console.log(
|
|
371
|
+
console.log(chalk.white('Fish:'));
|
|
372
|
+
console.log(chalk.gray(' # Add to ~/.config/fish/config.fish:'));
|
|
373
|
+
console.log(chalk.cyan(' lanonasis --completion fish | source'));
|
|
374
|
+
console.log(chalk.gray(' # Or save to ~/.config/fish/completions/lanonasis.fish'));
|
|
383
375
|
console.log();
|
|
384
376
|
console.log(colors.info('💡 Completions support all command aliases:'));
|
|
385
|
-
console.log(
|
|
377
|
+
console.log(chalk.gray(' • lanonasis, onasis, memory, maas'));
|
|
386
378
|
console.log();
|
|
387
379
|
console.log(colors.success('✅ Run the appropriate command above for your shell'));
|
|
388
380
|
}
|