@loxia-labs/loxia-autopilot-one 1.0.1 → 1.0.4
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 +44 -54
- package/bin/cli.js +1 -115
- package/bin/loxia-terminal-v2.js +3 -0
- package/bin/loxia-terminal.js +3 -0
- package/bin/start-with-terminal.js +3 -0
- package/package.json +15 -15
- package/scripts/install-scanners.js +1 -235
- package/src/analyzers/CSSAnalyzer.js +1 -297
- package/src/analyzers/ConfigValidator.js +1 -690
- package/src/analyzers/ESLintAnalyzer.js +1 -320
- package/src/analyzers/JavaScriptAnalyzer.js +1 -261
- package/src/analyzers/PrettierFormatter.js +1 -247
- package/src/analyzers/PythonAnalyzer.js +1 -266
- package/src/analyzers/SecurityAnalyzer.js +1 -729
- package/src/analyzers/TypeScriptAnalyzer.js +1 -247
- package/src/analyzers/codeCloneDetector/analyzer.js +1 -344
- package/src/analyzers/codeCloneDetector/detector.js +1 -203
- package/src/analyzers/codeCloneDetector/index.js +1 -160
- package/src/analyzers/codeCloneDetector/parser.js +1 -199
- package/src/analyzers/codeCloneDetector/reporter.js +1 -148
- package/src/analyzers/codeCloneDetector/scanner.js +1 -59
- package/src/core/agentPool.js +1 -1474
- package/src/core/agentScheduler.js +1 -2147
- package/src/core/contextManager.js +1 -709
- package/src/core/messageProcessor.js +1 -732
- package/src/core/orchestrator.js +1 -548
- package/src/core/stateManager.js +1 -877
- package/src/index.js +1 -631
- package/src/interfaces/cli.js +1 -549
- package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -0
- package/src/interfaces/terminal/api/apiClient.js +1 -0
- package/src/interfaces/terminal/api/messageRouter.js +1 -0
- package/src/interfaces/terminal/api/session.js +1 -0
- package/src/interfaces/terminal/api/websocket.js +1 -0
- package/src/interfaces/terminal/components/AgentCreator.js +1 -0
- package/src/interfaces/terminal/components/AgentEditor.js +1 -0
- package/src/interfaces/terminal/components/AgentSwitcher.js +1 -0
- package/src/interfaces/terminal/components/ErrorBoundary.js +1 -0
- package/src/interfaces/terminal/components/ErrorPanel.js +1 -0
- package/src/interfaces/terminal/components/Header.js +1 -0
- package/src/interfaces/terminal/components/HelpPanel.js +1 -0
- package/src/interfaces/terminal/components/InputBox.js +1 -0
- package/src/interfaces/terminal/components/Layout.js +1 -0
- package/src/interfaces/terminal/components/LoadingSpinner.js +1 -0
- package/src/interfaces/terminal/components/MessageList.js +1 -0
- package/src/interfaces/terminal/components/MultilineTextInput.js +1 -0
- package/src/interfaces/terminal/components/SearchPanel.js +1 -0
- package/src/interfaces/terminal/components/SettingsPanel.js +1 -0
- package/src/interfaces/terminal/components/StatusBar.js +1 -0
- package/src/interfaces/terminal/components/TextInput.js +1 -0
- package/src/interfaces/terminal/config/agentEditorConstants.js +1 -0
- package/src/interfaces/terminal/config/constants.js +1 -0
- package/src/interfaces/terminal/index.js +1 -0
- package/src/interfaces/terminal/state/useAgentControl.js +1 -0
- package/src/interfaces/terminal/state/useAgents.js +1 -0
- package/src/interfaces/terminal/state/useConnection.js +1 -0
- package/src/interfaces/terminal/state/useMessages.js +1 -0
- package/src/interfaces/terminal/state/useTools.js +1 -0
- package/src/interfaces/terminal/utils/debugLogger.js +1 -0
- package/src/interfaces/terminal/utils/settingsStorage.js +1 -0
- package/src/interfaces/terminal/utils/theme.js +1 -0
- package/src/interfaces/webServer.js +1 -2162
- package/src/modules/fileExplorer/controller.js +1 -280
- package/src/modules/fileExplorer/index.js +1 -37
- package/src/modules/fileExplorer/middleware.js +1 -92
- package/src/modules/fileExplorer/routes.js +1 -125
- package/src/modules/fileExplorer/types.js +1 -44
- package/src/services/aiService.js +1 -1232
- package/src/services/apiKeyManager.js +1 -164
- package/src/services/benchmarkService.js +1 -366
- package/src/services/budgetService.js +1 -539
- package/src/services/contextInjectionService.js +1 -247
- package/src/services/conversationCompactionService.js +1 -637
- package/src/services/errorHandler.js +1 -810
- package/src/services/fileAttachmentService.js +1 -544
- package/src/services/modelRouterService.js +1 -366
- package/src/services/modelsService.js +1 -322
- package/src/services/qualityInspector.js +1 -796
- package/src/services/tokenCountingService.js +1 -536
- package/src/tools/agentCommunicationTool.js +1 -1344
- package/src/tools/agentDelayTool.js +1 -485
- package/src/tools/asyncToolManager.js +1 -604
- package/src/tools/baseTool.js +1 -800
- package/src/tools/browserTool.js +1 -920
- package/src/tools/cloneDetectionTool.js +1 -621
- package/src/tools/dependencyResolverTool.js +1 -1215
- package/src/tools/fileContentReplaceTool.js +1 -875
- package/src/tools/fileSystemTool.js +1 -1107
- package/src/tools/fileTreeTool.js +1 -853
- package/src/tools/imageTool.js +1 -901
- package/src/tools/importAnalyzerTool.js +1 -1060
- package/src/tools/jobDoneTool.js +1 -248
- package/src/tools/seekTool.js +1 -956
- package/src/tools/staticAnalysisTool.js +1 -1778
- package/src/tools/taskManagerTool.js +1 -2873
- package/src/tools/terminalTool.js +1 -2304
- package/src/tools/webTool.js +1 -1430
- package/src/types/agent.js +1 -519
- package/src/types/contextReference.js +1 -972
- package/src/types/conversation.js +1 -730
- package/src/types/toolCommand.js +1 -747
- package/src/utilities/attachmentValidator.js +1 -292
- package/src/utilities/configManager.js +1 -582
- package/src/utilities/constants.js +1 -722
- package/src/utilities/directoryAccessManager.js +1 -535
- package/src/utilities/fileProcessor.js +1 -307
- package/src/utilities/logger.js +1 -436
- package/src/utilities/tagParser.js +1 -1246
- package/src/utilities/toolConstants.js +1 -317
- package/web-ui/build/index.html +2 -2
- package/web-ui/build/static/{index-Dy2bYbOa.css → index-CClD1090.css} +1 -1
- package/web-ui/build/static/{index-CjkkcnFA.js → index-lCBai6dX.js} +66 -67
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Autonomous AI Agent System for Software Development**
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/loxia-autopilot-one)
|
|
8
|
-
[](https://nodejs.org)
|
|
7
|
+
[](https://www.npmjs.com/package/@loxia-labs/loxia-autopilot-one)
|
|
8
|
+
[](https://nodejs.org)
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|
[](CONTRIBUTING.md)
|
|
11
11
|
|
|
@@ -85,55 +85,60 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
85
85
|
|
|
86
86
|
## 🚀 Quick Start
|
|
87
87
|
|
|
88
|
-
###
|
|
88
|
+
### 1. Create an Account
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
- Active subscription or valid license
|
|
92
|
-
- Authentication credentials from [loxia.ai](https://loxia.ai)
|
|
90
|
+
Register at **[autopilot.loxia.ai](https://autopilot.loxia.ai)** to get started.
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Installation
|
|
92
|
+
### 2. Install the Package
|
|
97
93
|
|
|
98
94
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
npm install -g @loxia-labs/loxia-autopilot-one
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 3. Verify Installation
|
|
101
99
|
|
|
102
|
-
|
|
103
|
-
loxia
|
|
100
|
+
```bash
|
|
101
|
+
loxia --version
|
|
102
|
+
# Should display: Loxia Autopilot One v1.0.3
|
|
104
103
|
```
|
|
105
104
|
|
|
106
|
-
|
|
105
|
+
### 4. Create an API Key
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
1. Sign in at [autopilot.loxia.ai](https://autopilot.loxia.ai)
|
|
108
|
+
2. Navigate to [API Keys](https://autopilot.loxia.ai/api-keys)
|
|
109
|
+
3. Create a new API key and copy it
|
|
109
110
|
|
|
110
|
-
###
|
|
111
|
+
### 5. Launch & Configure
|
|
111
112
|
|
|
113
|
+
#### Option A: Web UI
|
|
112
114
|
```bash
|
|
113
|
-
loxia
|
|
114
|
-
loxia --no-web # CLI only
|
|
115
|
-
loxia --web-only # Web UI server only
|
|
116
|
-
loxia --port 3000 # Custom port
|
|
117
|
-
loxia --host 0.0.0.0 # Custom host binding
|
|
118
|
-
loxia --help # Show all options
|
|
115
|
+
loxia web
|
|
119
116
|
```
|
|
117
|
+
This starts the server and opens the Web UI in your browser. Go to **Settings** and paste your API key.
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
#### Option B: Terminal UI
|
|
120
|
+
```bash
|
|
121
|
+
loxia plus-terminal
|
|
122
|
+
```
|
|
123
|
+
This starts the server + Terminal UI. Press `Ctrl+,` to open Settings, paste your API key. Press `Alt+H` for help.
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
loxia> /create DevAssistant
|
|
126
|
-
```
|
|
125
|
+
### 6. Start Using Loxia
|
|
127
126
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```
|
|
127
|
+
1. **Create an agent** using the interface
|
|
128
|
+
2. **Send a message** to start interacting
|
|
129
|
+
3. **Enjoy** autonomous AI assistance!
|
|
132
130
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
### CLI Reference
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
loxia web # Start server + open Web UI in browser
|
|
135
|
+
loxia terminal # Start Terminal UI (server must be running)
|
|
136
|
+
loxia plus-terminal # Start server + Terminal UI together
|
|
137
|
+
loxia plus-web # Alias for 'web'
|
|
138
|
+
loxia --port 3000 # Use custom port (works with any command)
|
|
139
|
+
loxia --version # Show version
|
|
140
|
+
loxia --help # Show all options
|
|
141
|
+
```
|
|
137
142
|
|
|
138
143
|
---
|
|
139
144
|
|
|
@@ -363,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
|
|
|
363
368
|
|
|
364
369
|
## 🛣️ Roadmap
|
|
365
370
|
|
|
366
|
-
### Current Version (1.0.
|
|
371
|
+
### Current Version (1.0.3)
|
|
367
372
|
|
|
368
373
|
- ✅ Multi-agent orchestration
|
|
369
374
|
- ✅ 18+ specialized tools
|
|
@@ -432,8 +437,8 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
|
|
|
432
437
|
|
|
433
438
|
### Subscription & Access
|
|
434
439
|
|
|
435
|
-
- **Registration**: Sign up at [loxia.ai
|
|
436
|
-
- **Authentication**: Software requires valid
|
|
440
|
+
- **Registration**: Sign up at [autopilot.loxia.ai](https://autopilot.loxia.ai)
|
|
441
|
+
- **Authentication**: Software requires valid API key to operate
|
|
437
442
|
- **Verification**: Periodic authentication checks with licensing server
|
|
438
443
|
- **Expiration**: Access ends when subscription expires (renewable)
|
|
439
444
|
|
|
@@ -478,26 +483,11 @@ LOXIA_LOG_LEVEL=debug loxia
|
|
|
478
483
|
npm cache clean --force
|
|
479
484
|
|
|
480
485
|
# Reinstall
|
|
481
|
-
npm install -g loxia-autopilot-one --force
|
|
486
|
+
npm install -g @loxia-labs/loxia-autopilot-one --force
|
|
482
487
|
```
|
|
483
488
|
|
|
484
489
|
---
|
|
485
490
|
|
|
486
|
-
## 🌟 Acknowledgments
|
|
487
|
-
|
|
488
|
-
Built with love using:
|
|
489
|
-
|
|
490
|
-
- [Node.js](https://nodejs.org/) - Runtime environment
|
|
491
|
-
- [Express](https://expressjs.com/) - Web server framework
|
|
492
|
-
- [React](https://reactjs.org/) - UI framework
|
|
493
|
-
- [Puppeteer](https://pptr.dev/) - Browser automation
|
|
494
|
-
- [TailwindCSS](https://tailwindcss.com/) - Styling
|
|
495
|
-
- [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) - Real-time communication
|
|
496
|
-
|
|
497
|
-
Special thanks to the open-source community for the amazing tools and libraries that make this project possible.
|
|
498
|
-
|
|
499
|
-
---
|
|
500
|
-
|
|
501
491
|
<div align="center">
|
|
502
492
|
|
|
503
493
|
**Made with ❤️ by the Loxia team**
|
package/bin/cli.js
CHANGED
|
@@ -1,117 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Loxia Autopilot One - CLI Entry Point
|
|
5
|
-
*
|
|
6
|
-
* This is the executable entry point for the `loxia` command.
|
|
7
|
-
* It parses CLI arguments and launches the system with appropriate configuration.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
11
|
-
import { dirname, join } from 'path';
|
|
12
|
-
import { spawn } from 'child_process';
|
|
13
|
-
import { readFileSync } from 'fs';
|
|
14
|
-
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = dirname(__filename);
|
|
17
|
-
|
|
18
|
-
// Parse CLI arguments
|
|
19
|
-
const args = process.argv.slice(2);
|
|
20
|
-
const flags = {
|
|
21
|
-
noWeb: args.includes('--no-web'),
|
|
22
|
-
webOnly: args.includes('--web-only'),
|
|
23
|
-
port: null,
|
|
24
|
-
host: null,
|
|
25
|
-
help: args.includes('--help') || args.includes('-h'),
|
|
26
|
-
version: args.includes('--version') || args.includes('-v')
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Extract port and host if provided
|
|
30
|
-
for (let i = 0; i < args.length; i++) {
|
|
31
|
-
if (args[i] === '--port' && args[i + 1]) {
|
|
32
|
-
flags.port = parseInt(args[i + 1], 10);
|
|
33
|
-
}
|
|
34
|
-
if (args[i] === '--host' && args[i + 1]) {
|
|
35
|
-
flags.host = args[i + 1];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Show version
|
|
40
|
-
if (flags.version) {
|
|
41
|
-
const pkgPath = join(__dirname, '..', 'package.json');
|
|
42
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
43
|
-
console.log(`Loxia Autopilot One v${pkg.version}`);
|
|
44
|
-
process.exit(0);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Show help
|
|
48
|
-
if (flags.help) {
|
|
49
|
-
console.log(`
|
|
50
|
-
Loxia Autopilot One - AI Agent System
|
|
51
|
-
|
|
52
|
-
Usage:
|
|
53
|
-
loxia [options]
|
|
54
|
-
|
|
55
|
-
Options:
|
|
56
|
-
--no-web Start CLI only (disable Web UI)
|
|
57
|
-
--web-only Start Web UI server only (no interactive CLI)
|
|
58
|
-
--port <number> Specify port for Web UI (default: 8080)
|
|
59
|
-
--host <host> Specify host for Web UI (default: 0.0.0.0)
|
|
60
|
-
-h, --help Show this help message
|
|
61
|
-
-v, --version Show version number
|
|
62
|
-
|
|
63
|
-
Examples:
|
|
64
|
-
loxia # Start with CLI and Web UI
|
|
65
|
-
loxia --no-web # Start CLI only
|
|
66
|
-
loxia --web-only # Start Web UI server only
|
|
67
|
-
loxia --port 3000 # Use custom port
|
|
68
|
-
loxia --host localhost # Use custom host
|
|
69
|
-
|
|
70
|
-
Documentation:
|
|
71
|
-
https://github.com/loxia-ai/autopilot-one
|
|
72
|
-
|
|
73
|
-
`);
|
|
74
|
-
process.exit(0);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Set environment variables based on flags
|
|
78
|
-
const env = { ...process.env };
|
|
79
|
-
|
|
80
|
-
if (flags.noWeb) {
|
|
81
|
-
env.LOXIA_DISABLE_WEB = 'true';
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (flags.webOnly) {
|
|
85
|
-
env.LOXIA_WEB_ONLY = 'true';
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (flags.port) {
|
|
89
|
-
env.LOXIA_PORT = flags.port.toString();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (flags.host) {
|
|
93
|
-
env.LOXIA_HOST = flags.host;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Launch the main application
|
|
97
|
-
const mainScript = join(__dirname, '..', 'src', 'index.js');
|
|
98
|
-
|
|
99
|
-
const child = spawn('node', [mainScript], {
|
|
100
|
-
stdio: 'inherit',
|
|
101
|
-
env,
|
|
102
|
-
cwd: join(__dirname, '..')
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// Forward signals
|
|
106
|
-
process.on('SIGINT', () => {
|
|
107
|
-
child.kill('SIGINT');
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
process.on('SIGTERM', () => {
|
|
111
|
-
child.kill('SIGTERM');
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// Exit with same code as child process
|
|
115
|
-
child.on('exit', (code) => {
|
|
116
|
-
process.exit(code || 0);
|
|
117
|
-
});
|
|
3
|
+
const a0_0x2846be=a0_0x5882;(function(_0x2438b1,_0x536d84){const _0xa7367f=a0_0x5882,_0x388bf1=_0x2438b1();while(!![]){try{const _0x53c487=-parseInt(_0xa7367f(0xc3))/0x1*(-parseInt(_0xa7367f(0x9f))/0x2)+parseInt(_0xa7367f(0xc2))/0x3+parseInt(_0xa7367f(0xb1))/0x4+-parseInt(_0xa7367f(0xbd))/0x5+-parseInt(_0xa7367f(0x9e))/0x6*(parseInt(_0xa7367f(0xd3))/0x7)+parseInt(_0xa7367f(0xa4))/0x8*(parseInt(_0xa7367f(0xae))/0x9)+-parseInt(_0xa7367f(0xaa))/0xa;if(_0x53c487===_0x536d84)break;else _0x388bf1['push'](_0x388bf1['shift']());}catch(_0x2937a5){_0x388bf1['push'](_0x388bf1['shift']());}}}(a0_0x5391,0x76df0));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x5288c8 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x2846be(0xd7),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x2846be(0xb5)][a0_0x2846be(0xbc)](0x2),command=args[0x0]&&!args[0x0][a0_0x2846be(0xb6)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x2846be(0xa1)](a0_0x2846be(0x99))||args['includes']('-h'),'version':args[a0_0x2846be(0xa1)](a0_0x2846be(0xad))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x2846be(0xd2)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x2846be(0xd4)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x2846be(0xbf)&&args[i+0x1]&&(flags[a0_0x2846be(0x9c)]=args[i+0x1]);}const port=flags[a0_0x2846be(0xd4)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x2846be(0xd6)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x2846be(0xcb)](readFileSync(pkgPath,a0_0x2846be(0x9b)));console[a0_0x2846be(0xbb)](a0_0x2846be(0xcc)+pkg[a0_0x2846be(0xd6)]),process[a0_0x2846be(0xcf)](0x0);}if(flags[a0_0x2846be(0x9a)]||!command){const pkgPath=join(__dirname,'..',a0_0x2846be(0xa6)),pkg=JSON[a0_0x2846be(0xcb)](readFileSync(pkgPath,a0_0x2846be(0x9b)));console[a0_0x2846be(0xbb)](a0_0x2846be(0xc6)+pkg[a0_0x2846be(0xd6)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+a0_0x2846be(0xaf)+DEFAULT_HOST+a0_0x2846be(0xab)),process[a0_0x2846be(0xcf)](0x0);}async function checkServerRunning(_0x482eb8,_0x4bba8e,_0x35b70e=0x1){for(let _0x5bfe51=0x0;_0x5bfe51<_0x35b70e;_0x5bfe51++){const _0x136d8f=await new Promise(_0x35ee1f=>{const _0x309f1c=a0_0x5882,_0x1ee439=a0_0x5288c8[_0x309f1c(0xce)](_0x309f1c(0xb4)+_0x482eb8+':'+_0x4bba8e+_0x309f1c(0x9d),_0x541103=>{const _0x11d5e1=_0x309f1c;_0x35ee1f(_0x541103[_0x11d5e1(0xb9)]===0xc8);});_0x1ee439['on'](_0x309f1c(0xb8),()=>_0x35ee1f(![])),_0x1ee439[_0x309f1c(0xc7)](0x7d0,()=>{_0x1ee439['destroy'](),_0x35ee1f(![]);});});if(_0x136d8f)return!![];_0x5bfe51<_0x35b70e-0x1&&await new Promise(_0x261590=>setTimeout(_0x261590,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0xa557b5,_0x1e3df2,_0x5900c4=SERVER_STARTUP_TIMEOUT){const _0x5b9da9=a0_0x2846be,_0x362fbe=Math[_0x5b9da9(0x93)](_0x5900c4/SERVER_CHECK_INTERVAL);return checkServerRunning(_0xa557b5,_0x1e3df2,_0x362fbe);}function openBrowser(_0x34e544){const _0x22caab=a0_0x2846be,_0x1084a8=process[_0x22caab(0xa7)];let _0x25fccb;if(_0x1084a8==='darwin')_0x25fccb=_0x22caab(0xb0)+_0x34e544+'\x22';else _0x1084a8==='win32'?_0x25fccb='start\x20\x22\x22\x20\x22'+_0x34e544+'\x22':_0x25fccb=_0x22caab(0xa0)+_0x34e544+'\x22';exec(_0x25fccb,_0x39248a=>{const _0x1e4e36=_0x22caab;_0x39248a&&(console[_0x1e4e36(0xbb)](_0x1e4e36(0x95)),console['log'](_0x1e4e36(0xd5)+_0x34e544));});}function a0_0x5882(_0x27ee24,_0x54225a){_0x27ee24=_0x27ee24-0x93;const _0x5391cd=a0_0x5391();let _0x588248=_0x5391cd[_0x27ee24];return _0x588248;}function startServer(_0x3bf380=![]){const _0x18d825=a0_0x2846be,_0x2cf5f1={...process[_0x18d825(0xc4)],'LOXIA_PORT':port['toString'](),'PORT':port[_0x18d825(0x96)]()};flags[_0x18d825(0x9c)]&&(_0x2cf5f1[_0x18d825(0xa8)]=flags[_0x18d825(0x9c)]);const _0x3e19af=join(__dirname,'..',_0x18d825(0x94),_0x18d825(0xc8)),_0x5694fc=spawn(_0x18d825(0xc1),[_0x3e19af],{'cwd':join(__dirname,'..'),'env':_0x2cf5f1,'stdio':_0x3bf380?[_0x18d825(0xcd),_0x18d825(0xcd),'ignore']:_0x18d825(0xac),'detached':_0x3bf380});return _0x3bf380&&_0x5694fc['unref'](),_0x5694fc;}function startTerminalUI(){const _0x12c233=a0_0x2846be,_0x3efc46=join(__dirname,_0x12c233(0xd1)),_0x2e0eef={...process[_0x12c233(0xc4)],'LOXIA_PORT':port[_0x12c233(0x96)](),'LOXIA_HOST':host},_0x5557e5=spawn(_0x12c233(0xc1),[_0x3efc46],{'cwd':join(__dirname,'..'),'env':_0x2e0eef,'stdio':_0x12c233(0xac)});return _0x5557e5;}const commands={'web':async()=>{const _0xf510c1=a0_0x2846be;console[_0xf510c1(0xbb)](_0xf510c1(0xc0));const _0x565bb1=startServer(![]);console[_0xf510c1(0xbb)](_0xf510c1(0xba));const _0x1cd05d=await waitForServer(host,port);_0x1cd05d?(console[_0xf510c1(0xbb)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console['log']('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0xf510c1(0x97)),process['on'](_0xf510c1(0xa9),()=>_0x565bb1[_0xf510c1(0x98)](_0xf510c1(0xa9))),process['on'](_0xf510c1(0xd8),()=>_0x565bb1[_0xf510c1(0x98)](_0xf510c1(0xd8))),_0x565bb1['on']('exit',_0x5191f0=>process[_0xf510c1(0xcf)](_0x5191f0||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x40002=a0_0x2846be;console['log'](_0x40002(0xa2));const _0x5e6757=await checkServerRunning(host,port);!_0x5e6757&&(console[_0x40002(0xb8)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console['error']('\x0aPlease\x20start\x20the\x20server\x20first:'),console['error'](_0x40002(0xc9)),console[_0x40002(0xb8)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process['exit'](0x1));console[_0x40002(0xbb)]('Server\x20is\x20running\x20at\x20'+serverUrl),console['log'](_0x40002(0xb2));const _0x23adf1=startTerminalUI();process['on'](_0x40002(0xa9),()=>_0x23adf1['kill']('SIGINT')),process['on']('SIGTERM',()=>_0x23adf1['kill'](_0x40002(0xd8))),_0x23adf1['on'](_0x40002(0xcf),_0x681ede=>process[_0x40002(0xcf)](_0x681ede||0x0));},'plus-terminal':async()=>{const _0x35c393=a0_0x2846be;console[_0x35c393(0xbb)](_0x35c393(0xc5));const _0x2660df=startServer(!![]),_0x2e8c46=await waitForServer(host,port);!_0x2e8c46&&(console[_0x35c393(0xb8)](_0x35c393(0xca)),process[_0x35c393(0xcf)](0x1));console[_0x35c393(0xbb)](_0x35c393(0xd0)+serverUrl),console[_0x35c393(0xbb)]('Starting\x20Terminal\x20UI...\x0a');const _0xf939b8=startTerminalUI();_0xf939b8['on']('exit',_0x581b99=>{const _0x27311a=_0x35c393;console[_0x27311a(0xbb)]('\x0aShutting\x20down\x20server...');try{process[_0x27311a(0x98)](_0x2660df['pid'],_0x27311a(0xd8));}catch(_0x47ad61){}process[_0x27311a(0xcf)](_0x581b99||0x0);}),process['on'](_0x35c393(0xa9),()=>{const _0x573e18=_0x35c393;_0xf939b8['kill'](_0x573e18(0xa9));}),process['on'](_0x35c393(0xd8),()=>{const _0x59cc0a=_0x35c393;_0xf939b8[_0x59cc0a(0x98)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x2846be(0xa5)](_0x2a978b=>{const _0x5b53ce=a0_0x2846be;console[_0x5b53ce(0xb8)](_0x5b53ce(0xb3),_0x2a978b[_0x5b53ce(0xb7)]),process[_0x5b53ce(0xcf)](0x1);}):(console[a0_0x2846be(0xb8)](a0_0x2846be(0xbe)+command),console[a0_0x2846be(0xb8)](a0_0x2846be(0xa3)),process[a0_0x2846be(0xcf)](0x1));function a0_0x5391(){const _0x400237=['1261253oLIEZC','port','Please\x20open\x20manually:\x20','version','localhost','SIGTERM','ceil','src','Could\x20not\x20open\x20browser\x20automatically.','toString','\x20manually.','kill','--help','help','utf8','host','/api/health','30iumBeC','68212nSryvx','xdg-open\x20\x22','includes','Checking\x20if\x20server\x20is\x20running...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','7608Jjocvk','catch','package.json','platform','LOXIA_HOST','SIGINT','1863600midYka',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','inherit','--version','6210rKgRwn',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','open\x20\x22','1105888nBLiPY','Starting\x20Terminal\x20UI...\x0a','Error:','http://','argv','startsWith','message','error','statusCode','Waiting\x20for\x20server\x20to\x20start...','log','slice','362935pvxJCo','Unknown\x20command:\x20','--host','Starting\x20Loxia\x20server...\x0a','node','1119048GxiSsz','10NifobK','env','Starting\x20Loxia\x20server\x20in\x20background...','\x0aLoxia\x20Autopilot\x20One\x20v','setTimeout','index.js','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','parse','Loxia\x20Autopilot\x20One\x20v','ignore','get','exit','Server\x20running\x20at\x20','loxia-terminal.js','length'];a0_0x5391=function(){return _0x400237;};return a0_0x5391();}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const a0_0x1f3fc9=a0_0x388d;(function(_0x2a05f4,_0x4de26a){const _0x2ef324=a0_0x388d,_0x2238f3=_0x2a05f4();while(!![]){try{const _0x19e9b8=parseInt(_0x2ef324(0xe3))/0x1+-parseInt(_0x2ef324(0xbd))/0x2+-parseInt(_0x2ef324(0xc3))/0x3*(parseInt(_0x2ef324(0xe1))/0x4)+-parseInt(_0x2ef324(0xde))/0x5*(-parseInt(_0x2ef324(0xdd))/0x6)+parseInt(_0x2ef324(0xdb))/0x7*(-parseInt(_0x2ef324(0xca))/0x8)+parseInt(_0x2ef324(0xe4))/0x9*(-parseInt(_0x2ef324(0xec))/0xa)+parseInt(_0x2ef324(0xeb))/0xb;if(_0x19e9b8===_0x4de26a)break;else _0x2238f3['push'](_0x2238f3['shift']());}catch(_0xee91cc){_0x2238f3['push'](_0x2238f3['shift']());}}}(a0_0x53a4,0x43432));import{spawn}from'child_process';import a0_0x85aeed from'net';import a0_0x425cda from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x425cda[a0_0x1f3fc9(0xcf)](__filename),projectRoot=a0_0x425cda[a0_0x1f3fc9(0xcf)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x1c93d0,_0x1b6ffe){return new Promise(_0x511d8c=>{const _0x10c97b=a0_0x388d,_0x4ed916=new a0_0x85aeed[(_0x10c97b(0xc0))]();_0x4ed916[_0x10c97b(0xd2)](0x7d0),_0x4ed916['on'](_0x10c97b(0xd4),()=>{const _0x51fb0d=_0x10c97b;_0x4ed916[_0x51fb0d(0xbc)](),_0x511d8c(!![]);}),_0x4ed916['on'](_0x10c97b(0xc2),()=>{const _0x25c0f5=_0x10c97b;_0x4ed916[_0x25c0f5(0xbc)](),_0x511d8c(![]);}),_0x4ed916['on']('error',()=>{const _0x436179=_0x10c97b;_0x4ed916[_0x436179(0xbc)](),_0x511d8c(![]);}),_0x4ed916[_0x10c97b(0xd4)](_0x1b6ffe,_0x1c93d0);});}function a0_0x388d(_0x4595ef,_0x22dfec){_0x4595ef=_0x4595ef-0xba;const _0x53a43e=a0_0x53a4();let _0x388d0a=_0x53a43e[_0x4595ef];return _0x388d0a;}async function startServer(_0x2bcdc8,_0x9ed093){const _0x3aeca4=a0_0x1f3fc9;return console[_0x3aeca4(0xd0)](_0x3aeca4(0xbb)),new Promise((_0x51d74a,_0x1670d0)=>{const _0x28bcb7=_0x3aeca4,_0x2d29f6=spawn(_0x28bcb7(0xc1),[a0_0x425cda[_0x28bcb7(0xe7)](projectRoot,_0x28bcb7(0xd1)),'--ui',_0x28bcb7(0xcc),_0x28bcb7(0xe0),_0x2bcdc8,_0x28bcb7(0xd5),_0x9ed093[_0x28bcb7(0xd8)]()],{'detached':![],'stdio':[_0x28bcb7(0xd3),_0x28bcb7(0xc6),_0x28bcb7(0xc6)]});_0x2d29f6['stdout']['on']('data',()=>{}),_0x2d29f6[_0x28bcb7(0xc9)]['on'](_0x28bcb7(0xdf),()=>{}),_0x2d29f6['on'](_0x28bcb7(0xd7),_0x2faea9=>{const _0x561ca4=_0x28bcb7;console[_0x561ca4(0xd7)](_0x561ca4(0xce),_0x2faea9[_0x561ca4(0xcb)]),_0x1670d0(_0x2faea9);});const _0x2ec30a=Date[_0x28bcb7(0xe6)](),_0x7b451a=setInterval(async()=>{const _0x23d550=_0x28bcb7,_0x173f3d=await isServerRunning(_0x2bcdc8,_0x9ed093);if(_0x173f3d)clearInterval(_0x7b451a),console[_0x23d550(0xd0)]('✓\x20Server\x20started\x20at\x20'+_0x2bcdc8+':'+_0x9ed093),_0x51d74a();else Date[_0x23d550(0xe6)]()-_0x2ec30a>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x7b451a),_0x2d29f6[_0x23d550(0xe2)](),_0x1670d0(new Error(_0x23d550(0xe8))));},0x1f4);});}function a0_0x53a4(){const _0x403f5e=['../src/interfaces/terminal/index.js','12rcERtJ','17240FNrGQw','data','--host','4eQaaVM','kill','28440SMQOjy','1836747TGJqYC','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','now','join','Server\x20startup\x20timeout','LOXIA_HOST','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','13925131OeIXgK','10oUpxqy','exit','🚀\x20Starting\x20Loxia\x20server...','destroy','775672fFnhic','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','env','Socket','node','timeout','1118823HUPHal','argv','💡\x20Troubleshooting:','pipe','slice','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','stderr','487128wdzQWU','message','web','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','Failed\x20to\x20start\x20server:','dirname','log','bin/cli.js','setTimeout','ignore','connect','--port','...','error','toString','LOXIA_PORT','✗\x20Server\x20is\x20not\x20running','7WINjyw'];a0_0x53a4=function(){return _0x403f5e;};return a0_0x53a4();}async function main(){const _0x1e0586=a0_0x1f3fc9;try{console['log'](_0x1e0586(0xea)),console[_0x1e0586(0xd0)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x1e0586(0xd0)](_0x1e0586(0xea)),console[_0x1e0586(0xd0)]('');const _0xfb78c7=process[_0x1e0586(0xc4)][_0x1e0586(0xc7)](0x2);let _0x3b98e8=DEFAULT_HOST,_0x5e1c48=DEFAULT_PORT;for(let _0x52faf7=0x0;_0x52faf7<_0xfb78c7['length'];_0x52faf7++){if(_0xfb78c7[_0x52faf7]===_0x1e0586(0xe0)&&_0xfb78c7[_0x52faf7+0x1])_0x3b98e8=_0xfb78c7[_0x52faf7+0x1],_0x52faf7++;else _0xfb78c7[_0x52faf7]==='--port'&&_0xfb78c7[_0x52faf7+0x1]&&(_0x5e1c48=parseInt(_0xfb78c7[_0x52faf7+0x1],0xa),_0x52faf7++);}console[_0x1e0586(0xd0)]('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x3b98e8+':'+_0x5e1c48+_0x1e0586(0xd6));const _0x4cae8a=await isServerRunning(_0x3b98e8,_0x5e1c48);!_0x4cae8a?(console['log'](_0x1e0586(0xda)),await startServer(_0x3b98e8,_0x5e1c48)):console[_0x1e0586(0xd0)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x3b98e8+':'+_0x5e1c48),console[_0x1e0586(0xd0)](''),console[_0x1e0586(0xd0)](_0x1e0586(0xe5)),console[_0x1e0586(0xd0)](''),await new Promise(_0x3b54ce=>setTimeout(_0x3b54ce,0x1f4)),process[_0x1e0586(0xbf)][_0x1e0586(0xe9)]=_0x3b98e8,process[_0x1e0586(0xbf)][_0x1e0586(0xd9)]=_0x5e1c48[_0x1e0586(0xd8)](),await import(_0x1e0586(0xdc));}catch(_0x1663d7){console[_0x1e0586(0xd7)](''),console[_0x1e0586(0xd7)](_0x1e0586(0xbe)),console[_0x1e0586(0xd7)]('\x20\x20',_0x1663d7[_0x1e0586(0xcb)]),console[_0x1e0586(0xd7)](''),console[_0x1e0586(0xd7)](_0x1e0586(0xc5)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x1e0586(0xd7)](_0x1e0586(0xcd)),console[_0x1e0586(0xd7)](_0x1e0586(0xc8)),console['error'](''),process[_0x1e0586(0xba)](0x1);}}main();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const a0_0x564356=a0_0x4496;function a0_0x42e9(){const _0x1708b3=['1020IXjKMT','isTTY','--port','catch','49671mRwDWT','host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','98186dZCgWs','1030755rUOOFB','1634952yOrbbM','3420906nYmbgA','\x20\x20npm\x20run\x20terminal-ui','error','638196jUFEZE','--help','LOXIA_PORT','7133784vbcAfR','\x20\x20-\x20Some\x20CI/CD\x20environments','waitUntilExit','length','localhost','\x0aTerminal\x20UI\x20exited','Or\x20use\x20the\x20web\x20UI\x20instead:','slice','1VCxfRr','log','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','Press\x20Ctrl+C\x20to\x20exit\x0a','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','port','168NzwNJw','env','--host','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','exit','5kfMoaP'];a0_0x42e9=function(){return _0x1708b3;};return a0_0x42e9();}(function(_0x1b478f,_0x57e3b7){const _0x524175=a0_0x4496,_0x4ddbe7=_0x1b478f();while(!![]){try{const _0x52a25b=-parseInt(_0x524175(0xc8))/0x1*(parseInt(_0x524175(0xbd))/0x2)+-parseInt(_0x524175(0xb8))/0x3+parseInt(_0x524175(0xb9))/0x4+-parseInt(_0x524175(0xaf))/0x5*(-parseInt(_0x524175(0xba))/0x6)+parseInt(_0x524175(0xc0))/0x7+-parseInt(_0x524175(0xaa))/0x8*(-parseInt(_0x524175(0xb4))/0x9)+-parseInt(_0x524175(0xb0))/0xa*(parseInt(_0x524175(0xb7))/0xb);if(_0x52a25b===_0x57e3b7)break;else _0x4ddbe7['push'](_0x4ddbe7['shift']());}catch(_0x36b4ca){_0x4ddbe7['push'](_0x4ddbe7['shift']());}}}(a0_0x42e9,0x8405d));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process['argv'][a0_0x564356(0xc7)](0x2),options={'host':a0_0x564356(0xc4),'port':0x1f90};for(let i=0x0;i<args[a0_0x564356(0xc3)];i++){const arg=args[i];if(arg===a0_0x564356(0xac)||arg==='-h')options[a0_0x564356(0xb5)]=args[++i];else{if(arg===a0_0x564356(0xb2)||arg==='-p')options[a0_0x564356(0xa9)]=parseInt(args[++i],0xa);else arg===a0_0x564356(0xbe)&&(console[a0_0x564356(0xc9)](a0_0x564356(0xa8)),process[a0_0x564356(0xae)](0x0));}}process[a0_0x564356(0xab)]['LOXIA_HOST']&&(options[a0_0x564356(0xb5)]=process['env']['LOXIA_HOST']);process[a0_0x564356(0xab)][a0_0x564356(0xbf)]&&(options['port']=parseInt(process[a0_0x564356(0xab)]['LOXIA_PORT'],0xa));!process['stdin'][a0_0x564356(0xb1)]&&(console['error'](a0_0x564356(0xad)),console[a0_0x564356(0xbc)](''),console[a0_0x564356(0xbc)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x564356(0xbc)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x564356(0xbc)](a0_0x564356(0xb6)),console['error'](a0_0x564356(0xca)),console['error'](a0_0x564356(0xc1)),console['error'](''),console[a0_0x564356(0xbc)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x564356(0xbc)](a0_0x564356(0xbb)),console['error'](''),console['error'](a0_0x564356(0xc6)),console[a0_0x564356(0xbc)]('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x564356(0xc9)]('Starting\x20Loxia\x20Terminal\x20UI...'),console[a0_0x564356(0xc9)]('Connecting\x20to:\x20'+options[a0_0x564356(0xb5)]+':'+options[a0_0x564356(0xa9)]),console[a0_0x564356(0xc9)](a0_0x564356(0xcb));function a0_0x4496(_0x545134,_0x3c488d){_0x545134=_0x545134-0xa8;const _0x42e98=a0_0x42e9();let _0x449696=_0x42e98[_0x545134];return _0x449696;}const instance=startTerminalUI(options);instance[a0_0x564356(0xc2)]()['then'](()=>{const _0x232533=a0_0x564356;console[_0x232533(0xc9)](_0x232533(0xc5)),process[_0x232533(0xae)](0x0);})[a0_0x564356(0xb3)](_0x2a0d48=>{const _0x46e606=a0_0x564356;console[_0x46e606(0xbc)]('\x0aTerminal\x20UI\x20error:',_0x2a0d48),process[_0x46e606(0xae)](0x1);});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const a0_0x117b0f=a0_0x35d7;(function(_0x27bcd4,_0x48481f){const _0x5df5da=a0_0x35d7,_0x17327e=_0x27bcd4();while(!![]){try{const _0x25e536=parseInt(_0x5df5da(0x110))/0x1+-parseInt(_0x5df5da(0xef))/0x2*(-parseInt(_0x5df5da(0xec))/0x3)+-parseInt(_0x5df5da(0xea))/0x4*(-parseInt(_0x5df5da(0x109))/0x5)+-parseInt(_0x5df5da(0xfb))/0x6+parseInt(_0x5df5da(0xe2))/0x7+parseInt(_0x5df5da(0xf3))/0x8*(-parseInt(_0x5df5da(0xfc))/0x9)+-parseInt(_0x5df5da(0x101))/0xa;if(_0x25e536===_0x48481f)break;else _0x17327e['push'](_0x17327e['shift']());}catch(_0x21d97f){_0x17327e['push'](_0x17327e['shift']());}}}(a0_0x28b5,0x3c2a9));import{spawn}from'child_process';import{fileURLToPath}from'url';function a0_0x35d7(_0x1b3200,_0x359a67){_0x1b3200=_0x1b3200-0xe2;const _0x28b501=a0_0x28b5();let _0x35d74e=_0x28b501[_0x1b3200];return _0x35d74e;}import{dirname,join}from'path';import a0_0x17120e from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env'][a0_0x117b0f(0xfe)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x28044a=0xa,_0x547fbf=0x1f4){const _0x545e07=a0_0x117b0f;for(let _0x3335f2=0x0;_0x3335f2<_0x28044a;_0x3335f2++){try{return await new Promise((_0x2bbc78,_0x3c09d8)=>{const _0x2bc8f2=a0_0x35d7,_0x23d98b=a0_0x17120e[_0x2bc8f2(0x103)](_0x2bc8f2(0xee)+SERVER_PORT+_0x2bc8f2(0xe3),_0x230ca8=>{const _0x5b51e6=_0x2bc8f2;_0x230ca8['statusCode']===0xc8?_0x2bbc78():_0x3c09d8(new Error(_0x5b51e6(0xf1)+_0x230ca8[_0x5b51e6(0x10e)]));});_0x23d98b['on'](_0x2bc8f2(0x105),_0x3c09d8),_0x23d98b['setTimeout'](0x3e8,()=>{const _0xea3c9a=_0x2bc8f2;_0x23d98b[_0xea3c9a(0x113)](),_0x3c09d8(new Error('Timeout'));});}),console[_0x545e07(0x108)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x586e65){_0x3335f2<_0x28044a-0x1&&await new Promise(_0x5e7452=>setTimeout(_0x5e7452,_0x547fbf));}}return console[_0x545e07(0x108)](_0x545e07(0x116)),![];}async function startServer(){return new Promise(_0x465e1e=>{const _0x44703c=a0_0x35d7;console[_0x44703c(0x108)](_0x44703c(0x100));const _0x5c6257=join(rootDir,'src',_0x44703c(0xed));serverProcess=spawn(_0x44703c(0xe4),[_0x5c6257],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x44703c(0xe8),_0x44703c(0xf4),_0x44703c(0xf4)],'detached':![]}),serverProcess[_0x44703c(0x10c)]['on'](_0x44703c(0xf6),_0x367e69=>{const _0x35a2c6=_0x44703c,_0x25f4c6=_0x367e69['toString']()[_0x35a2c6(0xf8)]();_0x25f4c6&&console[_0x35a2c6(0x108)](_0x35a2c6(0xf0)+_0x25f4c6);}),serverProcess[_0x44703c(0xff)]['on'](_0x44703c(0xf6),_0x54b085=>{const _0x137542=_0x44703c,_0x32cd7d=_0x54b085[_0x137542(0xe7)]()['trim']();_0x32cd7d&&!_0x32cd7d[_0x137542(0x107)](_0x137542(0xeb))&&console[_0x137542(0x105)]('[SERVER\x20ERROR]\x20'+_0x32cd7d);}),serverProcess['on'](_0x44703c(0x105),_0x3c399d=>{const _0x3f8a6b=_0x44703c;console[_0x3f8a6b(0x105)](_0x3f8a6b(0x10d),_0x3c399d[_0x3f8a6b(0xf5)]),process[_0x3f8a6b(0x112)](0x1);}),serverProcess['on'](_0x44703c(0x112),(_0x3c31ad,_0x2f9d1a)=>{const _0x4611c8=_0x44703c;_0x3c31ad!==null&&_0x3c31ad!==0x0&&(console['error'](_0x4611c8(0x102)+_0x3c31ad),process[_0x4611c8(0x112)](_0x3c31ad));}),setTimeout(_0x465e1e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x5b613a=a0_0x117b0f;console[_0x5b613a(0x108)](_0x5b613a(0x106)),console[_0x5b613a(0x108)]('');const _0x8c300e=join(rootDir,_0x5b613a(0xf7),_0x5b613a(0x104)),_0x8217c9=spawn(_0x5b613a(0xe4),[_0x8c300e],{'cwd':rootDir,'env':{...process[_0x5b613a(0xf9)]},'stdio':'inherit'});return _0x8217c9['on'](_0x5b613a(0x105),_0x245aa5=>{const _0x1fa6d6=_0x5b613a;console[_0x1fa6d6(0x105)](_0x1fa6d6(0x111),_0x245aa5[_0x1fa6d6(0xf5)]),cleanup(),process[_0x1fa6d6(0x112)](0x1);}),_0x8217c9['on'](_0x5b613a(0x112),_0x13b909=>{const _0x4bbcf8=_0x5b613a;console['log'](_0x4bbcf8(0xfa)),cleanup(),process[_0x4bbcf8(0x112)](_0x13b909||0x0);}),_0x8217c9;}function cleanup(){const _0xea4549=a0_0x117b0f;serverProcess&&!serverProcess['killed']&&(console[_0xea4549(0x108)](_0xea4549(0x115)),serverProcess[_0xea4549(0x10f)](_0xea4549(0xe9)),setTimeout(()=>{const _0x2c687c=_0xea4549;!serverProcess[_0x2c687c(0xfd)]&&serverProcess[_0x2c687c(0x10f)](_0x2c687c(0x10a));},0x1388));}process['on'](a0_0x117b0f(0x114),()=>{const _0x3c5f9c=a0_0x117b0f;console[_0x3c5f9c(0x108)](_0x3c5f9c(0xf2)),cleanup(),process[_0x3c5f9c(0x112)](0x0);}),process['on'](a0_0x117b0f(0xe9),()=>{console['log']('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process['exit'](0x0);}),process['on'](a0_0x117b0f(0x112),()=>{cleanup();});async function main(){const _0xb8f2f4=a0_0x117b0f;console[_0xb8f2f4(0x108)](_0xb8f2f4(0x10b)),console['log'](_0xb8f2f4(0xe5)),console[_0xb8f2f4(0x108)](_0xb8f2f4(0xe6)),console[_0xb8f2f4(0x108)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x1e082e){console[_0xb8f2f4(0x105)]('Error\x20during\x20startup:',_0x1e082e[_0xb8f2f4(0xf5)]),cleanup(),process[_0xb8f2f4(0x112)](0x1);}}main();function a0_0x28b5(){const _0xf849ec=['destroy','SIGINT','🛑\x20Stopping\x20server...','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','1949717eBoZqg','/health','node','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','╚════════════════════════════════════════════════╝','toString','ignore','SIGTERM','4wLCGUR','ExperimentalWarning','78MNXOqp','index.js','http://localhost:','35732WFeyRW','[SERVER]\x20','Server\x20returned\x20','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','16kvylCH','pipe','message','data','bin','trim','env','\x0a👋\x20Terminal\x20UI\x20closed.','549372ZULHrN','356571ZEdiOM','killed','PORT','stderr','🚀\x20Starting\x20Loxia\x20server...','9153840bDBSpz','Server\x20exited\x20with\x20code\x20','get','loxia-terminal.js','error','🖥️\x20\x20Starting\x20Terminal\x20UI...','includes','log','2213170jzozZK','SIGKILL','╔════════════════════════════════════════════════╗','stdout','Failed\x20to\x20start\x20server:','statusCode','kill','146944sDuNFp','Failed\x20to\x20start\x20Terminal\x20UI:','exit'];a0_0x28b5=function(){return _0xf849ec;};return a0_0x28b5();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loxia-labs/loxia-autopilot-one",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node src/index.js",
|
|
12
12
|
"dev": "node --inspect src/index.js",
|
|
13
|
-
"
|
|
13
|
+
"terminal-ui": "node bin/loxia-terminal.js",
|
|
14
|
+
"terminal-ui-v2": "node bin/loxia-terminal-v2.js",
|
|
15
|
+
"start:terminal": "node bin/start-with-terminal.js",
|
|
16
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
14
17
|
"lint": "eslint src/",
|
|
15
18
|
"typecheck": "echo 'No TypeScript - skipping typecheck'",
|
|
16
|
-
"build": "npm run build:web-ui",
|
|
17
|
-
"build:web-ui": "cd web-ui && npm install && npm run build && cd ..",
|
|
18
19
|
"docs": "jsdoc -c jsdoc.config.json",
|
|
19
|
-
"postinstall": "node scripts/install-scanners.js"
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
20
|
+
"postinstall": "node scripts/install-scanners.js"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"ai",
|
|
@@ -44,8 +44,12 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/parser": "^7.28.5",
|
|
46
46
|
"@babel/traverse": "^7.28.5",
|
|
47
|
+
"blessed": "^0.1.81",
|
|
48
|
+
"blessed-contrib": "^4.11.0",
|
|
49
|
+
"chalk": "^5.6.2",
|
|
47
50
|
"express": "^4.18.2",
|
|
48
51
|
"glob": "^10.4.5",
|
|
52
|
+
"ink": "^5.2.1",
|
|
49
53
|
"node-fetch": "^3.3.2",
|
|
50
54
|
"pdf-parse": "^2.2.2",
|
|
51
55
|
"postcss": "^8.5.6",
|
|
@@ -53,22 +57,18 @@
|
|
|
53
57
|
"postcss-scss": "^4.0.9",
|
|
54
58
|
"prettier": "^3.6.2",
|
|
55
59
|
"puppeteer": "^24.25.0",
|
|
60
|
+
"react": "^18.3.1",
|
|
61
|
+
"strip-ansi": "^7.1.2",
|
|
56
62
|
"stylelint": "^16.25.0",
|
|
57
63
|
"stylelint-config-standard": "^39.0.1",
|
|
58
64
|
"tiktoken": "^1.0.15",
|
|
59
65
|
"typescript": "^5.9.3",
|
|
66
|
+
"uuid": "^11.1.0",
|
|
60
67
|
"ws": "^8.16.0"
|
|
61
68
|
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"ajv": "^8.17.1",
|
|
64
|
-
"ajv-formats": "^3.0.1",
|
|
65
|
-
"eslint": "^8.57.1",
|
|
66
|
-
"eslint-plugin-security": "^3.0.1",
|
|
67
|
-
"jest": "^29.7.0",
|
|
68
|
-
"jsdoc": "^4.0.2"
|
|
69
|
-
},
|
|
70
69
|
"jest": {
|
|
71
70
|
"testEnvironment": "node",
|
|
71
|
+
"transform": {},
|
|
72
72
|
"collectCoverageFrom": [
|
|
73
73
|
"src/**/*.js",
|
|
74
74
|
"!src/**/*.test.js"
|
|
@@ -91,4 +91,4 @@
|
|
|
91
91
|
"no-console": "off"
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
}
|
|
94
|
+
}
|