@lanonasis/cli 2.0.1 → 2.0.2
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/README.md +1 -1
- package/dist/commands/auth.js +3 -1
- package/dist/core/architecture.d.ts +8 -8
- package/dist/core/architecture.js +11 -11
- package/dist/core/dashboard.js +3 -3
- package/dist/core/welcome.js +1 -1
- package/dist/utils/config.js +12 -3
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lanonasis/cli v2.0.
|
|
1
|
+
# @lanonasis/cli v2.0.1 - Enhanced Interactive CLI Experience
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
4
4
|
[](https://www.npmjs.com/package/@lanonasis/cli)
|
package/dist/commands/auth.js
CHANGED
|
@@ -118,7 +118,9 @@ async function handleOAuthFlow(config) {
|
|
|
118
118
|
console.log(chalk.yellow('Authentication cancelled'));
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
// Ensure proper URL joining to prevent double slashes
|
|
122
|
+
const baseUrl = config.getDiscoveredApiUrl().replace(/\/+$/, ''); // Remove trailing slashes
|
|
123
|
+
const authUrl = `${baseUrl}/auth/cli-login`;
|
|
122
124
|
try {
|
|
123
125
|
console.log(colors.info('Opening browser...'));
|
|
124
126
|
await open(authUrl);
|
|
@@ -6,7 +6,7 @@ import { EventEmitter } from 'events';
|
|
|
6
6
|
export interface NavigationState {
|
|
7
7
|
name: string;
|
|
8
8
|
path: string;
|
|
9
|
-
|
|
9
|
+
preferences: Record<string, unknown>;
|
|
10
10
|
timestamp: Date;
|
|
11
11
|
}
|
|
12
12
|
export interface UserContext {
|
|
@@ -83,7 +83,7 @@ export declare class AdaptivePromptSystem {
|
|
|
83
83
|
private guidedPrompt;
|
|
84
84
|
}
|
|
85
85
|
export declare class ContextualValidator {
|
|
86
|
-
validate(value:
|
|
86
|
+
validate(value: unknown, rules: ValidationRule[]): ValidationResult;
|
|
87
87
|
}
|
|
88
88
|
export declare class RealTimeFeedback {
|
|
89
89
|
private readonly icons;
|
|
@@ -103,7 +103,7 @@ export declare class PresentationLayer {
|
|
|
103
103
|
constructor();
|
|
104
104
|
applyTheme(theme: string): void;
|
|
105
105
|
renderLayout(content: any, layout: string): void;
|
|
106
|
-
animate
|
|
106
|
+
private animate;
|
|
107
107
|
}
|
|
108
108
|
export declare class AdaptiveThemeEngine {
|
|
109
109
|
private currentTheme;
|
|
@@ -112,16 +112,16 @@ export declare class AdaptiveThemeEngine {
|
|
|
112
112
|
getColors(): any;
|
|
113
113
|
}
|
|
114
114
|
export declare class ResponsiveLayoutManager {
|
|
115
|
-
render(content:
|
|
116
|
-
private
|
|
117
|
-
private
|
|
115
|
+
render(content: unknown, layout: string): void;
|
|
116
|
+
private renderContent;
|
|
117
|
+
private renderTitle;
|
|
118
118
|
private renderDashboard;
|
|
119
119
|
}
|
|
120
120
|
export declare class SubtleAnimationController {
|
|
121
|
-
animate(
|
|
121
|
+
animate(_element: unknown, _animation: string): void;
|
|
122
122
|
}
|
|
123
123
|
export interface ValidationRule {
|
|
124
|
-
validate(value:
|
|
124
|
+
validate(value: unknown): {
|
|
125
125
|
valid: boolean;
|
|
126
126
|
message: string;
|
|
127
127
|
severity: 'error' | 'warning';
|
|
@@ -155,12 +155,12 @@ export class AdaptivePromptSystem {
|
|
|
155
155
|
return this.guidedPrompt(config);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
async expertPrompt(
|
|
158
|
+
async expertPrompt(_config) {
|
|
159
159
|
// Minimal, streamlined prompt for expert users
|
|
160
160
|
// Implementation would use minimal UI elements
|
|
161
161
|
return null;
|
|
162
162
|
}
|
|
163
|
-
async guidedPrompt(
|
|
163
|
+
async guidedPrompt(_config) {
|
|
164
164
|
// Rich, guided prompt with helpful hints
|
|
165
165
|
// Implementation would use enhanced UI elements
|
|
166
166
|
return null;
|
|
@@ -230,7 +230,7 @@ export class InlineHelpProvider {
|
|
|
230
230
|
// Return contextual help based on current state
|
|
231
231
|
return this.generateHelpText(currentState, context);
|
|
232
232
|
}
|
|
233
|
-
generateHelpText(state,
|
|
233
|
+
generateHelpText(state, _context) {
|
|
234
234
|
if (!state) {
|
|
235
235
|
return 'Type "help" for available commands';
|
|
236
236
|
}
|
|
@@ -260,8 +260,8 @@ export class PresentationLayer {
|
|
|
260
260
|
renderLayout(content, layout) {
|
|
261
261
|
this.layoutManager.render(content, layout);
|
|
262
262
|
}
|
|
263
|
-
animate(
|
|
264
|
-
this.animationController.animate(
|
|
263
|
+
animate(_element, _animation) {
|
|
264
|
+
this.animationController.animate(_element, _animation);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
// Theme Engine
|
|
@@ -306,10 +306,10 @@ export class ResponsiveLayoutManager {
|
|
|
306
306
|
// Implement different layout strategies
|
|
307
307
|
switch (layout) {
|
|
308
308
|
case 'card':
|
|
309
|
-
this.
|
|
309
|
+
this.renderContent(content);
|
|
310
310
|
break;
|
|
311
311
|
case 'table':
|
|
312
|
-
this.
|
|
312
|
+
this.renderTitle(content);
|
|
313
313
|
break;
|
|
314
314
|
case 'dashboard':
|
|
315
315
|
this.renderDashboard(content);
|
|
@@ -318,7 +318,7 @@ export class ResponsiveLayoutManager {
|
|
|
318
318
|
console.log(content);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
renderContent(content) {
|
|
322
322
|
// Render content in card layout
|
|
323
323
|
console.log('╭─────────────────────────────────────────╮');
|
|
324
324
|
console.log(`│ ${content.title || ''}`.padEnd(42) + '│');
|
|
@@ -326,18 +326,18 @@ export class ResponsiveLayoutManager {
|
|
|
326
326
|
console.log(`│ ${content.body || ''}`.padEnd(42) + '│');
|
|
327
327
|
console.log('╰─────────────────────────────────────────╯');
|
|
328
328
|
}
|
|
329
|
-
|
|
329
|
+
renderTitle(_content) {
|
|
330
330
|
// Render content in table layout
|
|
331
331
|
// Implementation here
|
|
332
332
|
}
|
|
333
|
-
renderDashboard(
|
|
333
|
+
renderDashboard(_content) {
|
|
334
334
|
// Render dashboard layout
|
|
335
335
|
// Implementation here
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
// Animation Controller
|
|
339
339
|
export class SubtleAnimationController {
|
|
340
|
-
animate(
|
|
340
|
+
animate(_element, _animation) {
|
|
341
341
|
// Implement subtle animations for CLI
|
|
342
342
|
// This would handle progress bars, spinners, etc.
|
|
343
343
|
}
|
package/dist/core/dashboard.js
CHANGED
|
@@ -166,9 +166,9 @@ export class DashboardCommandCenter {
|
|
|
166
166
|
const creator = new InteractiveMemoryCreator(this.stateManager);
|
|
167
167
|
await creator.create();
|
|
168
168
|
}
|
|
169
|
-
async searchMemories(
|
|
169
|
+
async searchMemories(_query) {
|
|
170
170
|
const search = new InteractiveSearch(this.stateManager);
|
|
171
|
-
await search.search(
|
|
171
|
+
await search.search(_query);
|
|
172
172
|
}
|
|
173
173
|
async browseTopics() {
|
|
174
174
|
console.log(chalk.yellow('Browse Topics - Coming soon...'));
|
|
@@ -484,7 +484,7 @@ export class InteractiveSearch {
|
|
|
484
484
|
break;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
displayResults(
|
|
487
|
+
displayResults(_query) {
|
|
488
488
|
const results = [
|
|
489
489
|
{ score: 94, title: 'Payment Gateway Integration Guide', age: '3 days ago', type: 'Knowledge', tags: 'api, payments, stripe' },
|
|
490
490
|
{ score: 87, title: 'Payment Error Handling Strategy', age: '1 week ago', type: 'Context', tags: 'error-handling, payments' },
|
package/dist/core/welcome.js
CHANGED
package/dist/utils/config.js
CHANGED
|
@@ -51,11 +51,20 @@ export class CLIConfig {
|
|
|
51
51
|
this.config.discoveredServices = response.data;
|
|
52
52
|
await this.save();
|
|
53
53
|
}
|
|
54
|
-
catch
|
|
55
|
-
// Service discovery failed, use defaults
|
|
54
|
+
catch {
|
|
55
|
+
// Service discovery failed, use fallback defaults
|
|
56
56
|
if (process.env.CLI_VERBOSE === 'true') {
|
|
57
|
-
console.log('Service discovery failed, using defaults');
|
|
57
|
+
console.log('Service discovery failed, using fallback defaults');
|
|
58
58
|
}
|
|
59
|
+
// Set fallback service endpoints to prevent double slash issues
|
|
60
|
+
// Based on architecture: auth routes through onasis-core, not MCP server
|
|
61
|
+
this.config.discoveredServices = {
|
|
62
|
+
auth_base: 'https://api.lanonasis.com/api/v1',
|
|
63
|
+
memory_base: 'https://api.lanonasis.com/api/v1',
|
|
64
|
+
mcp_ws_base: 'wss://mcp.lanonasis.com/ws',
|
|
65
|
+
project_scope: 'lanonasis'
|
|
66
|
+
};
|
|
67
|
+
await this.save();
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
getDiscoveredApiUrl() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lanonasis/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "LanOnasis Enterprise CLI - Memory as a Service, API Key Management, and Infrastructure Orchestration",
|
|
5
5
|
"main": "dist/index-simple.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,11 +41,24 @@
|
|
|
41
41
|
"dist",
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public",
|
|
46
|
+
"registry": "https://registry.npmjs.org/"
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/lanonasis/lanonasis-maas.git",
|
|
51
|
+
"directory": "cli"
|
|
52
|
+
},
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/lanonasis/lanonasis-maas/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/lanonasis/lanonasis-maas#readme",
|
|
44
57
|
"dependencies": {
|
|
45
|
-
"@modelcontextprotocol/sdk": "^1.17.
|
|
58
|
+
"@modelcontextprotocol/sdk": "^1.17.4",
|
|
46
59
|
"@types/eventsource": "^1.1.15",
|
|
47
60
|
"@types/ws": "^8.18.1",
|
|
48
|
-
"axios": "^1.
|
|
61
|
+
"axios": "^1.12.0",
|
|
49
62
|
"boxen": "^7.1.1",
|
|
50
63
|
"chalk": "^5.5.0",
|
|
51
64
|
"cli-progress": "^3.12.0",
|
|
@@ -54,7 +67,7 @@
|
|
|
54
67
|
"date-fns": "^4.1.0",
|
|
55
68
|
"dotenv": "^17.2.1",
|
|
56
69
|
"eventsource": "^4.0.0",
|
|
57
|
-
"inquirer": "^12.9.
|
|
70
|
+
"inquirer": "^12.9.3",
|
|
58
71
|
"jwt-decode": "^4.0.0",
|
|
59
72
|
"open": "^10.2.0",
|
|
60
73
|
"ora": "^8.2.0",
|