@loxia-labs/loxia-autopilot-one 2.0.0 → 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 +123 -255
- package/bin/cli.js +1 -1
- package/bin/loxia-terminal-v2.js +1 -1
- package/bin/loxia-terminal.js +1 -1
- package/bin/start-with-terminal.js +1 -1
- package/package.json +1 -1
- package/scripts/install-scanners.js +1 -1
- package/scripts/watchdog.js +1 -1
- package/src/analyzers/CSSAnalyzer.js +1 -1
- package/src/analyzers/ConfigValidator.js +1 -1
- package/src/analyzers/ESLintAnalyzer.js +1 -1
- package/src/analyzers/JavaScriptAnalyzer.js +1 -1
- package/src/analyzers/PrettierFormatter.js +1 -1
- package/src/analyzers/PythonAnalyzer.js +1 -1
- package/src/analyzers/SecurityAnalyzer.js +1 -1
- package/src/analyzers/SparrowAnalyzer.js +1 -1
- package/src/analyzers/TypeScriptAnalyzer.js +1 -1
- package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
- package/src/analyzers/codeCloneDetector/detector.js +1 -1
- package/src/analyzers/codeCloneDetector/index.js +1 -1
- package/src/analyzers/codeCloneDetector/parser.js +1 -1
- package/src/analyzers/codeCloneDetector/reporter.js +1 -1
- package/src/analyzers/codeCloneDetector/scanner.js +1 -1
- package/src/core/agentPool.js +1 -1
- package/src/core/agentScheduler.js +1 -1
- package/src/core/contextManager.js +1 -1
- package/src/core/flowExecutor.js +1 -1
- package/src/core/messageProcessor.js +1 -1
- package/src/core/orchestrator.js +1 -1
- package/src/core/stateManager.js +1 -1
- package/src/index.js +1 -1
- package/src/interfaces/cli.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
- package/src/interfaces/terminal/api/apiClient.js +1 -1
- package/src/interfaces/terminal/api/messageRouter.js +1 -1
- package/src/interfaces/terminal/api/session.js +1 -1
- package/src/interfaces/terminal/api/websocket.js +1 -1
- package/src/interfaces/terminal/components/AgentCreator.js +1 -1
- package/src/interfaces/terminal/components/AgentEditor.js +1 -1
- package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
- package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
- package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
- package/src/interfaces/terminal/components/Header.js +1 -1
- package/src/interfaces/terminal/components/HelpPanel.js +1 -1
- package/src/interfaces/terminal/components/InputBox.js +1 -1
- package/src/interfaces/terminal/components/Layout.js +1 -1
- package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
- package/src/interfaces/terminal/components/MessageList.js +1 -1
- package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
- package/src/interfaces/terminal/components/SearchPanel.js +1 -1
- package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
- package/src/interfaces/terminal/components/StatusBar.js +1 -1
- package/src/interfaces/terminal/components/TextInput.js +1 -1
- package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
- package/src/interfaces/terminal/config/constants.js +1 -1
- package/src/interfaces/terminal/index.js +1 -1
- package/src/interfaces/terminal/state/useAgentControl.js +1 -1
- package/src/interfaces/terminal/state/useAgents.js +1 -1
- package/src/interfaces/terminal/state/useConnection.js +1 -1
- package/src/interfaces/terminal/state/useMessages.js +1 -1
- package/src/interfaces/terminal/state/useTools.js +1 -1
- package/src/interfaces/terminal/utils/debugLogger.js +1 -1
- package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
- package/src/interfaces/terminal/utils/theme.js +1 -1
- package/src/interfaces/webServer.js +1 -1
- package/src/modules/fileExplorer/controller.js +1 -1
- package/src/modules/fileExplorer/index.js +1 -1
- package/src/modules/fileExplorer/middleware.js +1 -1
- package/src/modules/fileExplorer/routes.js +1 -1
- package/src/services/agentActivityService.js +1 -1
- package/src/services/aiService.js +1 -1
- package/src/services/apiKeyManager.js +1 -1
- package/src/services/benchmarkService.js +1 -1
- package/src/services/budgetService.js +1 -1
- package/src/services/contextInjectionService.js +1 -1
- package/src/services/conversationCompactionService.js +1 -1
- package/src/services/credentialVault.js +1 -1
- package/src/services/errorHandler.js +1 -1
- package/src/services/fileAttachmentService.js +1 -1
- package/src/services/flowContextService.js +1 -1
- package/src/services/memoryService.js +1 -1
- package/src/services/modelRouterService.js +1 -1
- package/src/services/modelsService.js +1 -1
- package/src/services/portRegistry.js +1 -1
- package/src/services/portTracker.js +1 -1
- package/src/services/projectDetector.js +1 -1
- package/src/services/promptService.js +1 -1
- package/src/services/qualityInspector.js +1 -1
- package/src/services/serviceRegistry.js +1 -1
- package/src/services/tokenCountingService.js +1 -1
- package/src/services/visualEditorBridge.js +1 -1
- package/src/services/visualEditorServer.js +1 -1
- package/src/tools/agentCommunicationTool.js +1 -1
- package/src/tools/agentDelayTool.js +1 -1
- package/src/tools/asyncToolManager.js +1 -1
- package/src/tools/baseTool.js +1 -1
- package/src/tools/browserTool.js +1 -1
- package/src/tools/cloneDetectionTool.js +1 -1
- package/src/tools/dependencyResolverTool.js +1 -1
- package/src/tools/fileContentReplaceTool.js +1 -1
- package/src/tools/fileSystemTool.js +1 -1
- package/src/tools/fileTreeTool.js +1 -1
- package/src/tools/imageTool.js +1 -1
- package/src/tools/importAnalyzerTool.js +1 -1
- package/src/tools/jobDoneTool.js +1 -1
- package/src/tools/memoryTool.js +1 -1
- package/src/tools/pdfTool.js +1 -1
- package/src/tools/seekTool.js +1 -1
- package/src/tools/staticAnalysisTool.js +1 -1
- package/src/tools/taskManagerTool.js +1 -1
- package/src/tools/terminalTool.js +1 -1
- package/src/tools/userPromptTool.js +1 -1
- package/src/tools/videoTool.js +1 -1
- package/src/tools/visualEditorTool.js +1 -1
- package/src/tools/webTool.js +1 -1
- package/src/types/agent.js +1 -1
- package/src/types/contextReference.js +1 -1
- package/src/types/conversation.js +1 -1
- package/src/types/toolCommand.js +1 -1
- package/src/utilities/attachmentValidator.js +1 -1
- package/src/utilities/browserStealth.js +1 -1
- package/src/utilities/configManager.js +1 -1
- package/src/utilities/constants.js +1 -1
- package/src/utilities/directoryAccessManager.js +1 -1
- package/src/utilities/fileProcessor.js +1 -1
- package/src/utilities/humanBehavior.js +1 -1
- package/src/utilities/jsonRepair.js +1 -1
- package/src/utilities/logger.js +1 -1
- package/src/utilities/platformUtils.js +1 -1
- package/src/utilities/platformUtils.test.js +1 -1
- package/src/utilities/stealthConstants.js +1 -1
- package/src/utilities/structuredFileValidator.js +1 -1
- package/src/utilities/tagParser.js +1 -1
- package/src/utilities/toolConstants.js +1 -1
- package/src/utilities/userDataDir.js +1 -1
- package/web-ui/build/index.html +2 -2
- package/web-ui/build/static/{index-CbQvXGHE.js → index-9lwuGbV1.js} +119 -119
- package/web-ui/build/static/index-ewlrW3xd.css +1 -0
- package/web-ui/build/static/index-CWfjdxno.css +0 -1
package/README.md
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Loxia Autopilot One
|
|
4
4
|
|
|
5
5
|
**Autonomous AI Agent System for Software Development**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@loxia-labs/loxia-autopilot-one)
|
|
8
8
|
[](https://nodejs.org)
|
|
9
9
|
[](./LICENSE)
|
|
10
|
-
[](CONTRIBUTING.md)
|
|
11
10
|
|
|
12
|
-
**[Quick Start](#-quick-start)**
|
|
11
|
+
**[Quick Start](#-quick-start)** | **[Features](#-features)** | **[Documentation](#-documentation)** | **[Tools](#-ai-powered-tools)** | **[Web UI](#-web-interface)**
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
16
15
|
---
|
|
17
16
|
|
|
18
|
-
##
|
|
17
|
+
## What is Loxia Autopilot One?
|
|
19
18
|
|
|
20
19
|
Loxia Autopilot One is a **production-ready autonomous AI agent system** that empowers developers with intelligent coding assistance. It combines the power of multiple AI models with a comprehensive toolkit for software development, code analysis, and automation.
|
|
21
20
|
|
|
22
21
|
### Why Loxia?
|
|
23
22
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
23
|
+
- **Multi-Agent Orchestration** - Run multiple AI agents simultaneously with isolated workspaces
|
|
24
|
+
- **Rich Tool Ecosystem** - 18+ specialized tools for development, analysis, and automation
|
|
25
|
+
- **Dual Interface** - Modern Web UI + powerful CLI for any workflow
|
|
26
|
+
- **Real-Time Monitoring** - Track agent activity, costs, and performance
|
|
27
|
+
- **Persistent State** - Resume conversations and continue work across sessions
|
|
28
|
+
- **Secure by Design** - Agent isolation, resource limits, and security scanning
|
|
30
29
|
|
|
31
30
|
---
|
|
32
31
|
|
|
33
|
-
##
|
|
32
|
+
## Features
|
|
34
33
|
|
|
35
34
|
### Core Capabilities
|
|
36
35
|
|
|
@@ -38,7 +37,7 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
38
37
|
<tr>
|
|
39
38
|
<td width="50%">
|
|
40
39
|
|
|
41
|
-
####
|
|
40
|
+
#### Intelligent Agent System
|
|
42
41
|
- Multi-agent conversation orchestration
|
|
43
42
|
- Automatic model selection and routing
|
|
44
43
|
- Task-based agent specialization
|
|
@@ -48,7 +47,7 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
48
47
|
</td>
|
|
49
48
|
<td width="50%">
|
|
50
49
|
|
|
51
|
-
####
|
|
50
|
+
#### Professional Tooling
|
|
52
51
|
- Terminal command execution
|
|
53
52
|
- File system operations
|
|
54
53
|
- Web browsing and scraping
|
|
@@ -60,7 +59,7 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
60
59
|
<tr>
|
|
61
60
|
<td width="50%">
|
|
62
61
|
|
|
63
|
-
####
|
|
62
|
+
#### Development Features
|
|
64
63
|
- Import/export analysis
|
|
65
64
|
- Dependency resolution
|
|
66
65
|
- Static code analysis
|
|
@@ -70,7 +69,7 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
70
69
|
</td>
|
|
71
70
|
<td width="50%">
|
|
72
71
|
|
|
73
|
-
####
|
|
72
|
+
#### Smart Assistance
|
|
74
73
|
- Context-aware responses
|
|
75
74
|
- File attachments in chat
|
|
76
75
|
- Conversation compaction
|
|
@@ -83,7 +82,7 @@ Loxia Autopilot One is a **production-ready autonomous AI agent system** that em
|
|
|
83
82
|
|
|
84
83
|
---
|
|
85
84
|
|
|
86
|
-
##
|
|
85
|
+
## Quick Start
|
|
87
86
|
|
|
88
87
|
### 1. Create an Account
|
|
89
88
|
|
|
@@ -99,7 +98,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
|
|
|
99
98
|
|
|
100
99
|
```bash
|
|
101
100
|
loxia --version
|
|
102
|
-
# Should display: Loxia Autopilot One v2.0.
|
|
101
|
+
# Should display: Loxia Autopilot One v2.0.2
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
### 4. Create an API Key
|
|
@@ -142,28 +141,24 @@ loxia --help # Show all options
|
|
|
142
141
|
|
|
143
142
|
---
|
|
144
143
|
|
|
145
|
-
##
|
|
144
|
+
## Web Interface
|
|
146
145
|
|
|
147
146
|
The modern Web UI provides an intuitive interface for managing agents and conversations:
|
|
148
147
|
|
|
149
148
|
### Key Features
|
|
150
149
|
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
### Web UI Screenshots
|
|
161
|
-
|
|
162
|
-
*Coming soon - the interface provides a clean, modern experience for interacting with AI agents*
|
|
150
|
+
- **Chat Interface** - Clean, responsive chat with markdown support
|
|
151
|
+
- **File Attachments** - Drag and drop files into conversations
|
|
152
|
+
- **Agent Management** - Create, switch, and manage multiple agents
|
|
153
|
+
- **Real-Time Updates** - Live agent status and output streaming
|
|
154
|
+
- **Model Selection** - Switch between AI models on the fly
|
|
155
|
+
- **Task Tracking** - Visual task lists with progress indicators
|
|
156
|
+
- **Search & Filter** - Find conversations and messages quickly
|
|
157
|
+
- **Modern UI** - Built with React, TailwindCSS, and WebSockets
|
|
163
158
|
|
|
164
159
|
---
|
|
165
160
|
|
|
166
|
-
##
|
|
161
|
+
## AI-Powered Tools
|
|
167
162
|
|
|
168
163
|
Loxia comes with 18+ specialized tools that agents can use autonomously:
|
|
169
164
|
|
|
@@ -171,97 +166,85 @@ Loxia comes with 18+ specialized tools that agents can use autonomously:
|
|
|
171
166
|
|
|
172
167
|
| Tool | Description | Key Features |
|
|
173
168
|
|------|-------------|--------------|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
169
|
+
| **Terminal** | Execute shell commands | Background processes, stdin input, prompt detection |
|
|
170
|
+
| **File System** | File operations | Create, read, update, delete files and directories |
|
|
171
|
+
| **Browser** | Web automation | Headless browsing, screenshots, scraping with Puppeteer |
|
|
172
|
+
| **Seek** | Code search | Pattern matching, multi-directory support |
|
|
173
|
+
| **File Tree** | Directory visualization | Tree structure generation, filtering |
|
|
179
174
|
|
|
180
175
|
### Analysis Tools
|
|
181
176
|
|
|
182
177
|
| Tool | Description | Key Features |
|
|
183
178
|
|------|-------------|--------------|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
179
|
+
| **Import Analyzer** | Import/export analysis | ES6, CommonJS, circular dependencies, unused exports |
|
|
180
|
+
| **Dependency Resolver** | Dependency management | Semantic versioning, conflict detection, upgrade paths |
|
|
181
|
+
| **Static Analysis** | Code quality | ESLint, Prettier, TypeScript, Stylelint integration |
|
|
182
|
+
| **Clone Detection** | Code duplication | AST-based analysis, similarity scoring |
|
|
183
|
+
| **Security Scanner** | Security audits | npm audit, dependency vulnerabilities, deployment checks |
|
|
189
184
|
|
|
190
185
|
### AI & Automation Tools
|
|
191
186
|
|
|
192
187
|
| Tool | Description | Key Features |
|
|
193
188
|
|------|-------------|--------------|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
189
|
+
| **Image Generator** | AI image creation | Flux Pro support, high-quality outputs |
|
|
190
|
+
| **Video Generator** | AI video creation | Azure OpenAI Sora integration, async processing |
|
|
191
|
+
| **Task Manager** | Task tracking | Todo lists, progress tracking, agent synchronization |
|
|
192
|
+
| **Web Tool** | HTTP requests | GET, POST, API testing, webhook debugging |
|
|
193
|
+
| **File Content Replace** | Bulk replacements | Pattern-based, multi-file, preview changes |
|
|
194
|
+
| **Agent Communication** | Inter-agent messaging | Task delegation, collaborative workflows |
|
|
200
195
|
|
|
201
196
|
### System Tools
|
|
202
197
|
|
|
203
198
|
| Tool | Description | Key Features |
|
|
204
199
|
|------|-------------|--------------|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
|
|
|
200
|
+
| **Agent Delay** | Pause agent execution | Timed delays, background operation support |
|
|
201
|
+
| **Job Done** | Task completion | Mark autonomous work complete, exit to chat mode |
|
|
202
|
+
| **Async Tool Manager** | Background task handling | Long-running operations, status tracking |
|
|
203
|
+
| **Loop Detection** | Repetition prevention | Sliding window analysis, automatic termination |
|
|
209
204
|
|
|
210
205
|
---
|
|
211
206
|
|
|
212
|
-
##
|
|
207
|
+
## System Requirements
|
|
213
208
|
|
|
214
|
-
- **Node.js**: >=
|
|
209
|
+
- **Node.js**: >= 20.0.0 (20.x LTS recommended)
|
|
215
210
|
- **npm**: >= 7.0.0
|
|
216
211
|
- **Operating System**: Windows, macOS (Intel & Apple Silicon), Linux
|
|
217
212
|
- **Memory**: 2GB minimum, 4GB+ recommended
|
|
218
213
|
- **Disk Space**: 500MB for package and dependencies
|
|
219
214
|
- **Shell**: bash, zsh (macOS default), PowerShell, cmd
|
|
220
215
|
|
|
221
|
-
### Optional Dependencies
|
|
222
|
-
|
|
223
|
-
For full functionality, install these tools:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Security scanning
|
|
227
|
-
npm install -g eslint prettier typescript stylelint
|
|
228
|
-
|
|
229
|
-
# For development
|
|
230
|
-
npm install -g nodemon jest
|
|
231
|
-
```
|
|
232
|
-
|
|
233
216
|
---
|
|
234
217
|
|
|
235
|
-
##
|
|
218
|
+
## Architecture
|
|
236
219
|
|
|
237
220
|
### High-Level Overview
|
|
238
221
|
|
|
239
222
|
```
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
223
|
+
+--------------------------------------------------+
|
|
224
|
+
| Client Interfaces |
|
|
225
|
+
| +-------------+ +-------------------------+ |
|
|
226
|
+
| | Web UI | | CLI Interface | |
|
|
227
|
+
| | (React) | | (Interactive Shell) | |
|
|
228
|
+
| +-------------+ +-------------------------+ |
|
|
229
|
+
+------------------------+-------------------------+
|
|
230
|
+
| WebSocket / IPC
|
|
231
|
+
+-------------v--------------+
|
|
232
|
+
| Orchestrator Service |
|
|
233
|
+
| (Request Coordination) |
|
|
234
|
+
+---------+--------+--------+
|
|
235
|
+
| |
|
|
236
|
+
+----------v--+ +--v--------------+
|
|
237
|
+
| Agent Pool | | AI Service |
|
|
238
|
+
| - Lifecycle | | - Model Router |
|
|
239
|
+
| - Scheduling| | - Backend API |
|
|
240
|
+
+------+------+ +-----------------+
|
|
241
|
+
|
|
|
242
|
+
+------v--------------------------+
|
|
243
|
+
| Message Processor |
|
|
244
|
+
| - Tool Registry |
|
|
245
|
+
| - Command Extraction |
|
|
246
|
+
| - Execution Engine |
|
|
247
|
+
+----------------------------------+
|
|
265
248
|
```
|
|
266
249
|
|
|
267
250
|
### Key Components
|
|
@@ -275,146 +258,74 @@ npm install -g nodemon jest
|
|
|
275
258
|
|
|
276
259
|
---
|
|
277
260
|
|
|
278
|
-
##
|
|
261
|
+
## Documentation
|
|
279
262
|
|
|
280
263
|
### For Users
|
|
281
264
|
|
|
282
265
|
- **[Installation Guide](./INSTALLATION.md)** - Detailed installation and setup
|
|
283
|
-
- **[
|
|
284
|
-
- **[
|
|
285
|
-
- **[Configuration](./docs/CONFIGURATION.md)** - Environment variables and settings
|
|
266
|
+
- **[Tool Documentation](./docs/CREATING_TOOLS.md)** - How to use and create tools
|
|
267
|
+
- **[Architecture Docs](./docs/README.md)** - Interactive architecture diagrams
|
|
286
268
|
|
|
287
269
|
### For Developers
|
|
288
270
|
|
|
289
|
-
- **[Architecture Overview](./docs/
|
|
290
|
-
- **[API
|
|
271
|
+
- **[Architecture Overview](./docs/architecture/)** - System design and components
|
|
272
|
+
- **[API Agent Capabilities](./docs/API-AGENT-CAPABILITIES.md)** - Agent API reference
|
|
291
273
|
- **[Creating Tools](./docs/CREATING_TOOLS.md)** - Build custom tools
|
|
292
|
-
- **[Contributing Guide](./CONTRIBUTING.md)** - How to contribute
|
|
293
274
|
|
|
294
275
|
---
|
|
295
276
|
|
|
296
|
-
##
|
|
277
|
+
## Security & Privacy
|
|
297
278
|
|
|
298
279
|
### Built-In Security Features
|
|
299
280
|
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
281
|
+
- **Agent Isolation** - Each agent has isolated workspace and permissions
|
|
282
|
+
- **Resource Limits** - Prevents resource exhaustion (CPU, memory, commands)
|
|
283
|
+
- **Path Validation** - Prevents directory traversal attacks
|
|
284
|
+
- **Command Sanitization** - Protects against command injection
|
|
285
|
+
- **Security Scanning** - Built-in vulnerability detection
|
|
286
|
+
- **Audit Logging** - Comprehensive activity logs
|
|
306
287
|
|
|
307
288
|
### Privacy
|
|
308
289
|
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
- ✅ **Secure Communication** - Authentication data protected during transmission
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## 🎯 Use Cases
|
|
319
|
-
|
|
320
|
-
### Software Development
|
|
321
|
-
|
|
322
|
-
```
|
|
323
|
-
✓ Code refactoring and modernization
|
|
324
|
-
✓ Dependency updates and conflict resolution
|
|
325
|
-
✓ Test generation and debugging
|
|
326
|
-
✓ Documentation generation
|
|
327
|
-
✓ Code review automation
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Project Analysis
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
✓ Import/export dependency mapping
|
|
334
|
-
✓ Circular dependency detection
|
|
335
|
-
✓ Code duplication analysis
|
|
336
|
-
✓ Security vulnerability scanning
|
|
337
|
-
✓ Code quality assessment
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
### Automation
|
|
341
|
-
|
|
342
|
-
```
|
|
343
|
-
✓ Build and deployment scripts
|
|
344
|
-
✓ Batch file operations
|
|
345
|
-
✓ API testing and monitoring
|
|
346
|
-
✓ Web scraping and data collection
|
|
347
|
-
✓ Image generation workflows
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
|
|
352
|
-
## 📊 Performance
|
|
353
|
-
|
|
354
|
-
### Benchmarks
|
|
355
|
-
|
|
356
|
-
- **Agent Response Time**: < 2s for simple queries
|
|
357
|
-
- **Tool Execution**: < 100ms overhead per tool
|
|
358
|
-
- **Memory Usage**: ~150-300MB per agent
|
|
359
|
-
- **Concurrent Agents**: Up to 10 agents per instance
|
|
360
|
-
- **Message Processing**: 1000+ messages/second
|
|
361
|
-
- **Chat Scrolling**: 60fps with 1000+ messages (virtualized rendering)
|
|
362
|
-
|
|
363
|
-
### Conversation Compaction
|
|
364
|
-
|
|
365
|
-
Loxia automatically compacts long conversations to stay within token limits:
|
|
366
|
-
|
|
367
|
-
- **Intelligent Summarization** - Preserves context while reducing tokens
|
|
368
|
-
- **Configurable Strategies** - Aggressive or balanced compaction
|
|
369
|
-
- **Index Tracking** - References original message ranges for retrieval
|
|
290
|
+
- **Authentication Only** - Only credential verification communicates with servers
|
|
291
|
+
- **Local-First** - All work data stays on your machine
|
|
292
|
+
- **No Usage Telemetry** - No tracking or analytics of your work
|
|
293
|
+
- **State Control** - Full control over conversation history
|
|
294
|
+
- **Easy Cleanup** - Delete state directory to remove all local data
|
|
370
295
|
|
|
371
296
|
---
|
|
372
297
|
|
|
373
|
-
##
|
|
298
|
+
## Roadmap
|
|
374
299
|
|
|
375
|
-
### Current Version (2.0.
|
|
300
|
+
### Current Version (2.0.2)
|
|
376
301
|
|
|
377
|
-
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
- ✅ **Flow conversation clearing** - Agents start with fresh context on each flow run
|
|
381
|
-
- ✅ **Awaiting user input scheduling** - Agents block on credentials/prompts without disappearing from other agents' radar
|
|
382
|
-
- ✅ **Inter-agent reply defaults** - `requiresReply` defaults to true for reliable agent-to-agent conversations
|
|
383
|
-
- ✅ **Flow execution fixes** - Progress indicators, completion detection, node count accuracy
|
|
302
|
+
- Compaction system rewrite: response-data-based token counting, multi-pass summarization
|
|
303
|
+
- SSE stream parser fix for token usage tracking
|
|
304
|
+
- Compaction UI indicator auto-cleanup
|
|
384
305
|
|
|
385
306
|
### Previous Versions
|
|
386
307
|
|
|
387
|
-
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
-
|
|
391
|
-
-
|
|
392
|
-
-
|
|
393
|
-
-
|
|
394
|
-
-
|
|
395
|
-
-
|
|
396
|
-
- ✅ Structured file validation and security scanning
|
|
308
|
+
- v2.0.0: System port protection, UI responsiveness fixes, model error handling
|
|
309
|
+
- v1.9.x: Port registry fix, startup timeout fix, agent creation UX, flow agent visibility
|
|
310
|
+
- v1.8.0: Teams, agent duplication, flow execution, awaiting user input scheduling
|
|
311
|
+
- v1.6.x: JSON repair, filesystem hardening, streaming abort, stop button visibility
|
|
312
|
+
- v1.5.0: Dynamic version display, tool builtin delay, compaction indicator redesign
|
|
313
|
+
- v1.4.x: Parallel agent processing, streaming response display, smart auto-scroll
|
|
314
|
+
- v1.3.x: Binary distribution, video tool (Sora), PDF tool, API key persistence
|
|
315
|
+
- v1.2.x: Full macOS compatibility, help modal, keyboard shortcuts
|
|
316
|
+
- v1.1.x: Multi-agent orchestration, 18+ tools, conversation compaction
|
|
397
317
|
|
|
398
318
|
### Upcoming Features
|
|
399
319
|
|
|
400
|
-
-
|
|
401
|
-
-
|
|
402
|
-
-
|
|
403
|
-
- 🔄 **Voice Interface** - Speech-to-text integration
|
|
320
|
+
- **VSCode Extension** - Native IDE integration
|
|
321
|
+
- **Plugin System** - Custom tool marketplace
|
|
322
|
+
- **Cloud Sync** - Optional cloud backup (opt-in)
|
|
404
323
|
|
|
405
324
|
---
|
|
406
325
|
|
|
407
|
-
##
|
|
408
|
-
|
|
409
|
-
We welcome contributions! Here's how you can help:
|
|
326
|
+
## Contributing
|
|
410
327
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
- 🐛 **Report Bugs** - Open an issue with reproduction steps
|
|
414
|
-
- 💡 **Suggest Features** - Share ideas for improvements
|
|
415
|
-
- 📝 **Improve Documentation** - Fix typos, add examples
|
|
416
|
-
- 🔧 **Build Tools** - Create new tools for the ecosystem
|
|
417
|
-
- 🎨 **UI/UX** - Enhance the Web interface
|
|
328
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
418
329
|
|
|
419
330
|
### Development Setup
|
|
420
331
|
|
|
@@ -433,46 +344,26 @@ cd web-ui && npm install && npm run build && cd ..
|
|
|
433
344
|
npm run dev
|
|
434
345
|
```
|
|
435
346
|
|
|
436
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
|
|
437
|
-
|
|
438
347
|
---
|
|
439
348
|
|
|
440
|
-
##
|
|
349
|
+
## License
|
|
441
350
|
|
|
442
351
|
**Commercial License** - see [LICENSE](./LICENSE) file for complete terms.
|
|
443
352
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
448
|
-
- ✅ **Modify Configuration** - Customize settings and configuration files
|
|
449
|
-
- ❌ **No Free Use** - Requires active subscription or valid license
|
|
450
|
-
- ❌ **No Credential Sharing** - Personal credentials cannot be shared
|
|
451
|
-
- ❌ **No Redistribution** - Cannot resell, redistribute, or sublicense
|
|
452
|
-
- ❌ **No Reverse Engineering** - Code is obfuscated and protected
|
|
453
|
-
- ❌ **No Derivative Products** - Cannot create competing products
|
|
454
|
-
|
|
455
|
-
### Subscription & Access
|
|
456
|
-
|
|
457
|
-
- **Registration**: Sign up at [autopilot.loxia.ai](https://autopilot.loxia.ai)
|
|
458
|
-
- **Authentication**: Software requires valid API key to operate
|
|
459
|
-
- **Verification**: Periodic authentication checks with licensing server
|
|
460
|
-
- **Expiration**: Access ends when subscription expires (renewable)
|
|
461
|
-
|
|
462
|
-
**Copyright © 2025-2026 Loxia AI. All rights reserved.**
|
|
353
|
+
- **Authentication Required** - Valid subscription or license needed to use
|
|
354
|
+
- **Commercial Use** - Use in your own projects and services (with active subscription)
|
|
355
|
+
- **No Free Use** - Requires active subscription or valid license
|
|
356
|
+
- **No Redistribution** - Cannot resell, redistribute, or sublicense
|
|
463
357
|
|
|
464
|
-
|
|
358
|
+
**Copyright (c) 2025-2026 Loxia AI. All rights reserved.**
|
|
465
359
|
|
|
466
360
|
---
|
|
467
361
|
|
|
468
|
-
##
|
|
362
|
+
## Support
|
|
469
363
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
-
|
|
473
|
-
- 💬 **Discussions**: [GitHub Discussions](https://github.com/loxia-ai/autopilot-cli-v10/discussions)
|
|
474
|
-
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/loxia-ai/autopilot-cli-v10/issues)
|
|
475
|
-
- 📧 **Email**: support@loxia.ai
|
|
364
|
+
- **Documentation**: Check the [docs](./docs/) directory
|
|
365
|
+
- **Bug Reports**: [GitHub Issues](https://github.com/loxia-ai/autopilot-cli-v10/issues)
|
|
366
|
+
- **Email**: support@loxia.ai
|
|
476
367
|
|
|
477
368
|
### Troubleshooting
|
|
478
369
|
|
|
@@ -505,44 +396,21 @@ npm install -g @loxia-labs/loxia-autopilot-one --force
|
|
|
505
396
|
|
|
506
397
|
**macOS Installation**
|
|
507
398
|
|
|
508
|
-
On macOS,
|
|
509
|
-
```bash
|
|
510
|
-
sudo npm install -g @loxia-labs/loxia-autopilot-one
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
Or better, configure npm to use a user-writable directory:
|
|
399
|
+
On macOS, configure npm to use a user-writable directory:
|
|
514
400
|
```bash
|
|
515
|
-
# Create a directory for global packages
|
|
516
401
|
mkdir ~/.npm-global
|
|
517
|
-
|
|
518
|
-
# Configure npm to use it
|
|
519
402
|
npm config set prefix '~/.npm-global'
|
|
520
|
-
|
|
521
|
-
# Add to your shell (zsh is default on macOS)
|
|
522
403
|
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
|
|
523
404
|
source ~/.zshrc
|
|
524
|
-
|
|
525
|
-
# Now install without sudo
|
|
526
405
|
npm install -g @loxia-labs/loxia-autopilot-one
|
|
527
406
|
```
|
|
528
407
|
|
|
529
|
-
**macOS Python Scanners**
|
|
530
|
-
|
|
531
|
-
If using Homebrew Python, security scanner installation will automatically detect it:
|
|
532
|
-
```bash
|
|
533
|
-
# Verify with
|
|
534
|
-
which python3
|
|
535
|
-
# Should show /opt/homebrew/bin/python3 (Apple Silicon) or /usr/local/bin/python3 (Intel)
|
|
536
|
-
```
|
|
537
|
-
|
|
538
408
|
---
|
|
539
409
|
|
|
540
410
|
<div align="center">
|
|
541
411
|
|
|
542
|
-
**Made with
|
|
543
|
-
|
|
544
|
-
[Website](https://loxia.ai) • [Twitter](https://twitter.com/loxia_ai) • [Discord](https://discord.gg/loxia)
|
|
412
|
+
**Made with care by the Loxia team**
|
|
545
413
|
|
|
546
|
-
|
|
414
|
+
[Website](https://loxia.ai) | [Twitter](https://twitter.com/loxia_ai)
|
|
547
415
|
|
|
548
416
|
</div>
|
package/bin/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const a0_0x35c427=a0_0x2379;(function(_0xff1a9e,_0x3dfeb2){const _0x434d81=a0_0x2379,_0x1f64fe=_0xff1a9e();while(!![]){try{const _0x5b696d=-parseInt(_0x434d81(0xb5))/0x1*(-parseInt(_0x434d81(0x7e))/0x2)+-parseInt(_0x434d81(0xb6))/0x3*(-parseInt(_0x434d81(0xc5))/0x4)+parseInt(_0x434d81(0xb2))/0x5*(-parseInt(_0x434d81(0xa7))/0x6)+-parseInt(_0x434d81(0x97))/0x7*(parseInt(_0x434d81(0x83))/0x8)+parseInt(_0x434d81(0xb4))/0x9*(parseInt(_0x434d81(0x9b))/0xa)+parseInt(_0x434d81(0xa9))/0xb+-parseInt(_0x434d81(0x95))/0xc;if(_0x5b696d===_0x3dfeb2)break;else _0x1f64fe['push'](_0x1f64fe['shift']());}catch(_0x253180){_0x1f64fe['push'](_0x1f64fe['shift']());}}}(a0_0x4df0,0xb7919));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x8519d1 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x35c427(0x84),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x35c427(0xb1)][a0_0x35c427(0xba)](0x2),command=args[0x0]&&!args[0x0][a0_0x35c427(0xa4)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x35c427(0xbc)]('--help')||args['includes']('-h'),'version':args['includes']('--version')||args[a0_0x35c427(0xbc)]('-v')};for(let i=0x0;i<args[a0_0x35c427(0xb9)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x35c427(0x7c)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x35c427(0x80)]=args[i+0x1]);}const explicitPort=flags[a0_0x35c427(0x7c)],host=flags[a0_0x35c427(0x80)]||DEFAULT_HOST;if(flags[a0_0x35c427(0x8f)]){const pkgPath=join(__dirname,'..',a0_0x35c427(0x7b)),pkg=JSON[a0_0x35c427(0xbf)](readFileSync(pkgPath,'utf8'));console['log'](a0_0x35c427(0x79)+pkg['version']),process[a0_0x35c427(0x99)](0x0);}if(flags[a0_0x35c427(0x8a)]||!command){const pkgPath=join(__dirname,'..',a0_0x35c427(0x7b)),pkg=JSON[a0_0x35c427(0xbf)](readFileSync(pkgPath,a0_0x35c427(0x82)));console[a0_0x35c427(0xa8)](a0_0x35c427(0x98)+pkg['version']+'\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\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20only\x20(no\x20UI\x20opened)\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:\x20auto-select\x20starting\x20from\x20'+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+')\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\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only\x20(headless)\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\x20specific\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\x20\x203.\x20Or\x20run\x20\x27loxia\x20serve\x27\x20for\x20headless\x20server\x20(connect\x20remotely)\x0a\x0aNote:\x20If\x20no\x20port\x20is\x20specified,\x20the\x20server\x20will\x20automatically\x20find\x0aan\x20available\x20port.\x20The\x20Terminal\x20UI\x20will\x20discover\x20the\x20server\x20port\x0aautomatically\x20from\x20the\x20port\x20registry.\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x35c427(0x99)](0x0);}async function getPortRegistry(){const _0x31aefb=a0_0x35c427,{getPortRegistry:_0x7a0c78}=await import(_0x31aefb(0x72));return _0x7a0c78();}async function discoverBackend(){const _0x1a6cc5=a0_0x35c427;try{const _0x204e52=await getPortRegistry();await _0x204e52['cleanupStaleEntries']();const _0x3c7b55=await _0x204e52[_0x1a6cc5(0x90)](_0x1a6cc5(0x81));if(_0x3c7b55)return{'host':_0x3c7b55['host']||_0x1a6cc5(0xb8),'port':_0x3c7b55[_0x1a6cc5(0x7c)],'pid':_0x3c7b55[_0x1a6cc5(0x9a)]};return null;}catch(_0xea7858){return null;}}async function checkServerRunning(_0x13f86e,_0xcc6be8,_0x3254fd=0x1){for(let _0x1743ec=0x0;_0x1743ec<_0x3254fd;_0x1743ec++){const _0x45129f=await new Promise(_0x183b87=>{const _0x327e42=a0_0x2379,_0x13030a=a0_0x8519d1[_0x327e42(0xab)](_0x327e42(0x96)+_0x13f86e+':'+_0xcc6be8+_0x327e42(0x75),_0x1f1278=>{_0x183b87(_0x1f1278['statusCode']===0xc8);});_0x13030a['on'](_0x327e42(0xb0),()=>_0x183b87(![])),_0x13030a[_0x327e42(0xaa)](0x7d0,()=>{const _0x242e2c=_0x327e42;_0x13030a[_0x242e2c(0x7a)](),_0x183b87(![]);});});if(_0x45129f)return!![];_0x1743ec<_0x3254fd-0x1&&await new Promise(_0x47e6c0=>setTimeout(_0x47e6c0,SERVER_CHECK_INTERVAL));}return![];}async function waitForServerWithDiscovery(_0xb0067=SERVER_STARTUP_TIMEOUT){const _0x31c970=a0_0x35c427,_0x2b7490=Date[_0x31c970(0x8c)]();while(Date[_0x31c970(0x8c)]()-_0x2b7490<_0xb0067){const _0x4162da=await discoverBackend();if(_0x4162da){const _0x555c79=await checkServerRunning(_0x4162da[_0x31c970(0x80)],_0x4162da[_0x31c970(0x7c)]);if(_0x555c79)return _0x4162da;}await new Promise(_0x57b72b=>setTimeout(_0x57b72b,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x2d5aff,_0x3887af,_0x43ef9a=SERVER_STARTUP_TIMEOUT){const _0x36e80a=a0_0x35c427,_0x1ec869=Math[_0x36e80a(0x74)](_0x43ef9a/SERVER_CHECK_INTERVAL),_0x2e8dc8=await checkServerRunning(_0x2d5aff,_0x3887af,_0x1ec869);return _0x2e8dc8?{'host':_0x2d5aff,'port':_0x3887af}:null;}function a0_0x2379(_0x3bfea3,_0x13bc64){_0x3bfea3=_0x3bfea3-0x72;const _0x4df0aa=a0_0x4df0();let _0x23792d=_0x4df0aa[_0x3bfea3];return _0x23792d;}function a0_0x4df0(){const _0x2071fc=['Server\x20discovered\x20at\x20','\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only','Please\x20open\x20manually:\x20','error','argv','70805JeopgY','SIGTERM','2164257okUiAh','298409yKEJYi','15lyfGSG','Waiting\x20for\x20server\x20to\x20start...','localhost','length','slice','Could\x20not\x20open\x20browser\x20automatically.','includes','ignore','Starting\x20Loxia\x20server\x20in\x20background...','parse','SIGINT','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','Unknown\x20command:\x20','\x20\x20API\x20Health:\x20\x20\x20','loxia-terminal.js','1176236DInGGA','../src/services/portRegistry.js','platform','ceil','/api/health','LOXIA_PORT','PORT','Starting\x20Terminal\x20UI...\x0a','Loxia\x20Autopilot\x20One\x20v','destroy','package.json','port','It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.','6SoaCxo','src','host','backend','utf8','8VynPve','127.0.0.1','win32','\x20but\x20not\x20responding.','kill','LOXIA_HOST','\x0aShutting\x20down\x20server...','help','node','now','cmd','\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.','version','getService','\x0aPlease\x20start\x20the\x20server\x20first:','\x0a✓\x20Server\x20running\x20at\x20','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','open','17177676hYuBeV','http://','2315551ObFzFF','\x0aLoxia\x20Autopilot\x20One\x20v','exit','pid','20tRTsMX','unref','inherit','web','catch','\x0aOpening\x20Web\x20UI\x20at\x20','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal','Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.','message','startsWith','start','toString','144EyfqnH','log','83149xFIDUZ','setTimeout','get','\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20'];a0_0x4df0=function(){return _0x2071fc;};return a0_0x4df0();}function openBrowser(_0x589205){const _0x377d35=a0_0x35c427;let _0x1bfc40,_0x53acde;if(process[_0x377d35(0x73)]==='darwin')_0x1bfc40=_0x377d35(0x94),_0x53acde=[_0x589205];else process[_0x377d35(0x73)]===_0x377d35(0x85)?(_0x1bfc40=_0x377d35(0x8d),_0x53acde=['/c',_0x377d35(0xa5),'\x22\x22',_0x589205]):(_0x1bfc40='xdg-open',_0x53acde=[_0x589205]);const _0x515381=spawn(_0x1bfc40,_0x53acde,{'detached':!![],'stdio':_0x377d35(0xbd)});_0x515381['unref'](),_0x515381['on'](_0x377d35(0xb0),()=>{const _0x28160b=_0x377d35;console[_0x28160b(0xa8)](_0x28160b(0xbb)),console[_0x28160b(0xa8)](_0x28160b(0xaf)+_0x589205);});}function startServer(_0xe4a269=![]){const _0x874e8e=a0_0x35c427,_0x2a2472={...process.env};explicitPort&&(_0x2a2472[_0x874e8e(0x76)]=explicitPort[_0x874e8e(0xa6)](),_0x2a2472[_0x874e8e(0x77)]=explicitPort[_0x874e8e(0xa6)]());flags[_0x874e8e(0x80)]&&(_0x2a2472[_0x874e8e(0x88)]=flags[_0x874e8e(0x80)]);const _0x589e7c=join(__dirname,'..',_0x874e8e(0x7f),'index.js'),_0x52bfad=spawn(_0x874e8e(0x8b),[_0x589e7c],{'cwd':join(__dirname,'..'),'env':_0x2a2472,'stdio':_0xe4a269?['ignore',_0x874e8e(0xbd),_0x874e8e(0xbd)]:_0x874e8e(0x9d),'detached':_0xe4a269});return _0xe4a269&&_0x52bfad[_0x874e8e(0x9c)](),_0x52bfad;}function startTerminalUIProcess(_0x41af68,_0x3142d5){const _0x313a17=a0_0x35c427,_0xad3c6a=join(__dirname,_0x313a17(0xc4)),_0x368f6f={...process.env,'LOXIA_PORT':_0x3142d5[_0x313a17(0xa6)](),'LOXIA_HOST':_0x41af68},_0x2cd247=spawn('node',[_0xad3c6a],{'cwd':join(__dirname,'..'),'env':_0x368f6f,'stdio':'inherit'});return _0x2cd247;}const commands={'web':async()=>{const _0x3f51a2=a0_0x35c427;console['log']('Starting\x20Loxia\x20server...\x0a');const _0x4c3d0c=startServer(![]);console[_0x3f51a2(0xa8)]('Waiting\x20for\x20server\x20to\x20start...');let _0x53c347;explicitPort?_0x53c347=await waitForServerAtPort(host,explicitPort):_0x53c347=await waitForServerWithDiscovery();if(_0x53c347){const _0xbc090=_0x3f51a2(0x96)+_0x53c347[_0x3f51a2(0x80)]+':'+_0x53c347['port'];console['log'](_0x3f51a2(0xa0)+_0xbc090),openBrowser(_0xbc090);}else console['log'](_0x3f51a2(0x93));process['on'](_0x3f51a2(0xc0),()=>_0x4c3d0c[_0x3f51a2(0x87)](_0x3f51a2(0xc0))),process['on'](_0x3f51a2(0xb3),()=>_0x4c3d0c['kill']('SIGTERM')),_0x4c3d0c['on'](_0x3f51a2(0x99),_0x5bd82a=>process['exit'](_0x5bd82a||0x0));},'plus-web':async()=>{const _0x5146e2=a0_0x35c427;await commands[_0x5146e2(0x9e)]();},'serve':async()=>{const _0x54c01b=a0_0x35c427;console[_0x54c01b(0xa8)]('Starting\x20Loxia\x20server...\x0a');const _0x33ac17=startServer(![]);console[_0x54c01b(0xa8)](_0x54c01b(0xb7));let _0x45b070;explicitPort?_0x45b070=await waitForServerAtPort(host,explicitPort):_0x45b070=await waitForServerWithDiscovery();if(_0x45b070){const _0x2f4d24='http://'+_0x45b070[_0x54c01b(0x80)]+':'+_0x45b070[_0x54c01b(0x7c)];console[_0x54c01b(0xa8)](_0x54c01b(0x92)+_0x2f4d24),console[_0x54c01b(0xa8)](_0x54c01b(0xac)+_0x2f4d24),console[_0x54c01b(0xa8)](_0x54c01b(0xa1)),console[_0x54c01b(0xa8)](_0x54c01b(0xc3)+_0x2f4d24+'/api/health\x0a');}else console[_0x54c01b(0xa8)](_0x54c01b(0x8e)),console[_0x54c01b(0xa8)](_0x54c01b(0xa2));process['on']('SIGINT',()=>_0x33ac17[_0x54c01b(0x87)](_0x54c01b(0xc0))),process['on'](_0x54c01b(0xb3),()=>_0x33ac17[_0x54c01b(0x87)](_0x54c01b(0xb3))),_0x33ac17['on']('exit',_0x404ef9=>process[_0x54c01b(0x99)](_0x404ef9||0x0));},'terminal':async()=>{const _0x47ff6d=a0_0x35c427;console[_0x47ff6d(0xa8)]('Looking\x20for\x20running\x20server...');let _0xdc3226=await discoverBackend();explicitPort&&(_0xdc3226={'host':host,'port':explicitPort});!_0xdc3226&&(console['error']('\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.'),console[_0x47ff6d(0xb0)](_0x47ff6d(0x91)),console[_0x47ff6d(0xb0)]('\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI'),console[_0x47ff6d(0xb0)](_0x47ff6d(0xae)),console['error'](_0x47ff6d(0xc1)),process[_0x47ff6d(0x99)](0x1));const _0x487ca3=await checkServerRunning(_0xdc3226[_0x47ff6d(0x80)],_0xdc3226[_0x47ff6d(0x7c)]);!_0x487ca3&&(console[_0x47ff6d(0xb0)]('\x0aServer\x20registered\x20at\x20'+_0xdc3226[_0x47ff6d(0x80)]+':'+_0xdc3226[_0x47ff6d(0x7c)]+_0x47ff6d(0x86)),console['error'](_0x47ff6d(0x7d)),process[_0x47ff6d(0x99)](0x1));console[_0x47ff6d(0xa8)](_0x47ff6d(0xad)+_0xdc3226[_0x47ff6d(0x80)]+':'+_0xdc3226['port']),console[_0x47ff6d(0xa8)](_0x47ff6d(0x78));const _0x4a54ca=startTerminalUIProcess(_0xdc3226[_0x47ff6d(0x80)],_0xdc3226[_0x47ff6d(0x7c)]);process['on'](_0x47ff6d(0xc0),()=>_0x4a54ca[_0x47ff6d(0x87)](_0x47ff6d(0xc0))),process['on'](_0x47ff6d(0xb3),()=>_0x4a54ca['kill'](_0x47ff6d(0xb3))),_0x4a54ca['on'](_0x47ff6d(0x99),_0x32185a=>process[_0x47ff6d(0x99)](_0x32185a||0x0));},'plus-terminal':async()=>{const _0xf5c767=a0_0x35c427;console['log'](_0xf5c767(0xbe));const _0x163a17=startServer(!![]);let _0x3e6397;explicitPort?_0x3e6397=await waitForServerAtPort(host,explicitPort):_0x3e6397=await waitForServerWithDiscovery();!_0x3e6397&&(console[_0xf5c767(0xb0)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0xf5c767(0x99)](0x1));console[_0xf5c767(0xa8)]('Server\x20running\x20at\x20http://'+_0x3e6397[_0xf5c767(0x80)]+':'+_0x3e6397[_0xf5c767(0x7c)]),console[_0xf5c767(0xa8)](_0xf5c767(0x78));const _0x6ac328=startTerminalUIProcess(_0x3e6397[_0xf5c767(0x80)],_0x3e6397[_0xf5c767(0x7c)]);_0x6ac328['on'](_0xf5c767(0x99),_0x1e40b6=>{const _0x219df4=_0xf5c767;console[_0x219df4(0xa8)](_0x219df4(0x89));try{process['kill'](_0x163a17[_0x219df4(0x9a)],_0x219df4(0xb3));}catch(_0x4c1273){}process[_0x219df4(0x99)](_0x1e40b6||0x0);}),process['on'](_0xf5c767(0xc0),()=>{const _0x2a8dbf=_0xf5c767;_0x6ac328[_0x2a8dbf(0x87)](_0x2a8dbf(0xc0));}),process['on']('SIGTERM',()=>{const _0x2b1a16=_0xf5c767;_0x6ac328[_0x2b1a16(0x87)](_0x2b1a16(0xb3));});}};commands[command]?commands[command]()[a0_0x35c427(0x9f)](_0xa40938=>{const _0x28b76d=a0_0x35c427;console[_0x28b76d(0xb0)]('Error:',_0xa40938[_0x28b76d(0xa3)]),process['exit'](0x1);}):(console['error'](a0_0x35c427(0xc2)+command),console[a0_0x35c427(0xb0)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x35c427(0x99)](0x1));
|
|
3
|
+
function a0_0x11bf(){const _0x44ce9c=['LOXIA_PORT','unref','ignore','utf8','help','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','\x0aServer\x20registered\x20at\x20','getService','cmd','\x0aOpening\x20Web\x20UI\x20at\x20','--port','darwin','statusCode','cleanupStaleEntries','2FiUDOZ','argv','includes','Error:','--host','\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.','/api/health','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','Unknown\x20command:\x20','host','503256aHVxqH','http://','catch','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','../src/services/portRegistry.js','3545050QBMpgu','open','loxia-terminal.js','PORT','parse','2801412SwoVlU','/api/health\x0a','platform','SIGTERM','SIGINT','package.json','Looking\x20for\x20running\x20server...','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','kill','exit','node','\x0aLoxia\x20Autopilot\x20One\x20v','1848161wTtXQO','Starting\x20Terminal\x20UI...\x0a',')\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\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only\x20(headless)\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\x20specific\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\x20\x203.\x20Or\x20run\x20\x27loxia\x20serve\x27\x20for\x20headless\x20server\x20(connect\x20remotely)\x0a\x0aNote:\x20If\x20no\x20port\x20is\x20specified,\x20the\x20server\x20will\x20automatically\x20find\x0aan\x20available\x20port.\x20The\x20Terminal\x20UI\x20will\x20discover\x20the\x20server\x20port\x0aautomatically\x20from\x20the\x20port\x20registry.\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','inherit','Server\x20discovered\x20at\x20','setTimeout','\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.','message',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','\x0aPlease\x20start\x20the\x20server\x20first:','8780778vWasLE','toString','localhost','backend','It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.','pid','Starting\x20Loxia\x20server\x20in\x20background...','\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20','LOXIA_HOST','Starting\x20Loxia\x20server...\x0a','web','index.js','log','24291776GpUxux','error','xdg-open','\x0a✓\x20Server\x20running\x20at\x20','version','port','3480432JWctzZ','Could\x20not\x20open\x20browser\x20automatically.'];a0_0x11bf=function(){return _0x44ce9c;};return a0_0x11bf();}const a0_0x2bfa4c=a0_0x4168;(function(_0x449e6a,_0x194cee){const _0x4c8db8=a0_0x4168,_0x2135a0=_0x449e6a();while(!![]){try{const _0xb895a8=parseInt(_0x4c8db8(0x214))/0x1*(-parseInt(_0x4c8db8(0x20a))/0x2)+parseInt(_0x4c8db8(0x1fa))/0x3+parseInt(_0x4c8db8(0x1d1))/0x4+parseInt(_0x4c8db8(0x219))/0x5+parseInt(_0x4c8db8(0x1e7))/0x6+parseInt(_0x4c8db8(0x1dd))/0x7+-parseInt(_0x4c8db8(0x1f4))/0x8;if(_0xb895a8===_0x194cee)break;else _0x2135a0['push'](_0x2135a0['shift']());}catch(_0x1712a7){_0x2135a0['push'](_0x2135a0['shift']());}}}(a0_0x11bf,0xb8e11));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x2ad8e4 from'http';function a0_0x4168(_0x2a5d02,_0x476321){_0x2a5d02=_0x2a5d02-0x1cf;const _0x11bf46=a0_0x11bf();let _0x416807=_0x11bf46[_0x2a5d02];return _0x416807;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST='127.0.0.1',SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x2bfa4c(0x20b)]['slice'](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x2bfa4c(0x20c)]('--help')||args[a0_0x2bfa4c(0x20c)]('-h'),'version':args[a0_0x2bfa4c(0x20c)]('--version')||args[a0_0x2bfa4c(0x20c)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0x2bfa4c(0x206)&&args[i+0x1]&&(flags[a0_0x2bfa4c(0x1f9)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x2bfa4c(0x20e)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const explicitPort=flags['port'],host=flags['host']||DEFAULT_HOST;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x2bfa4c(0x1d6)),pkg=JSON[a0_0x2bfa4c(0x1d0)](readFileSync(pkgPath,a0_0x2bfa4c(0x1ff)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x2bfa4c(0x1f8)]),process[a0_0x2bfa4c(0x1da)](0x0);}if(flags[a0_0x2bfa4c(0x200)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x2bfa4c(0x1d0)](readFileSync(pkgPath,a0_0x2bfa4c(0x1ff)));console['log'](a0_0x2bfa4c(0x1dc)+pkg['version']+'\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\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20only\x20(no\x20UI\x20opened)\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:\x20auto-select\x20starting\x20from\x20'+DEFAULT_PORT+a0_0x2bfa4c(0x1e5)+DEFAULT_HOST+a0_0x2bfa4c(0x1df)),process[a0_0x2bfa4c(0x1da)](0x0);}async function getPortRegistry(){const _0x1ee3bf=a0_0x2bfa4c,{getPortRegistry:_0x350bbc}=await import(_0x1ee3bf(0x218));return _0x350bbc();}async function discoverBackend(){const _0x3951e9=a0_0x2bfa4c;try{const _0x15f972=await getPortRegistry();await _0x15f972[_0x3951e9(0x209)]();const _0xdbb2da=await _0x15f972[_0x3951e9(0x203)](_0x3951e9(0x1ea));if(_0xdbb2da)return{'host':_0xdbb2da['host']||_0x3951e9(0x1e9),'port':_0xdbb2da[_0x3951e9(0x1f9)],'pid':_0xdbb2da['pid']};return null;}catch(_0x366f04){return null;}}async function checkServerRunning(_0x3aa3f0,_0x12b2b0,_0x5497b8=0x1){for(let _0x3d3490=0x0;_0x3d3490<_0x5497b8;_0x3d3490++){const _0x597a57=await new Promise(_0x19f8ff=>{const _0x1e31fe=a0_0x4168,_0x430be9=a0_0x2ad8e4['get'](_0x1e31fe(0x215)+_0x3aa3f0+':'+_0x12b2b0+_0x1e31fe(0x210),_0x31b188=>{const _0xa90ddc=_0x1e31fe;_0x19f8ff(_0x31b188[_0xa90ddc(0x208)]===0xc8);});_0x430be9['on'](_0x1e31fe(0x1f5),()=>_0x19f8ff(![])),_0x430be9[_0x1e31fe(0x1e2)](0x7d0,()=>{_0x430be9['destroy'](),_0x19f8ff(![]);});});if(_0x597a57)return!![];_0x3d3490<_0x5497b8-0x1&&await new Promise(_0x5e9113=>setTimeout(_0x5e9113,SERVER_CHECK_INTERVAL));}return![];}async function waitForServerWithDiscovery(_0x370c78=SERVER_STARTUP_TIMEOUT){const _0x38778b=a0_0x2bfa4c,_0x27c905=Date['now']();while(Date['now']()-_0x27c905<_0x370c78){const _0x116ced=await discoverBackend();if(_0x116ced){const _0x472629=await checkServerRunning(_0x116ced[_0x38778b(0x213)],_0x116ced[_0x38778b(0x1f9)]);if(_0x472629)return _0x116ced;}await new Promise(_0x147277=>setTimeout(_0x147277,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x181169,_0x2b6c8c,_0x4a38c0=SERVER_STARTUP_TIMEOUT){const _0x25f81a=Math['ceil'](_0x4a38c0/SERVER_CHECK_INTERVAL),_0x282605=await checkServerRunning(_0x181169,_0x2b6c8c,_0x25f81a);return _0x282605?{'host':_0x181169,'port':_0x2b6c8c}:null;}function openBrowser(_0x305397){const _0x15251b=a0_0x2bfa4c;let _0x8e08f2,_0x59d94e;if(process['platform']===_0x15251b(0x207))_0x8e08f2=_0x15251b(0x21a),_0x59d94e=[_0x305397];else process[_0x15251b(0x1d3)]==='win32'?(_0x8e08f2=_0x15251b(0x204),_0x59d94e=['/c','start','\x22\x22',_0x305397]):(_0x8e08f2=_0x15251b(0x1f6),_0x59d94e=[_0x305397]);const _0x379b10=spawn(_0x8e08f2,_0x59d94e,{'detached':!![],'stdio':'ignore'});_0x379b10['unref'](),_0x379b10['on']('error',()=>{const _0x56e0f9=_0x15251b;console['log'](_0x56e0f9(0x1fb)),console[_0x56e0f9(0x1f3)]('Please\x20open\x20manually:\x20'+_0x305397);});}function startServer(_0x4b71f8=![]){const _0x1b3715=a0_0x2bfa4c,_0x2c28b9={...process.env};explicitPort&&(_0x2c28b9[_0x1b3715(0x1fc)]=explicitPort['toString'](),_0x2c28b9[_0x1b3715(0x1cf)]=explicitPort[_0x1b3715(0x1e8)]());flags[_0x1b3715(0x213)]&&(_0x2c28b9[_0x1b3715(0x1ef)]=flags['host']);const _0x4dc578=join(__dirname,'..','src',_0x1b3715(0x1f2)),_0x58e1ac=spawn(_0x1b3715(0x1db),[_0x4dc578],{'cwd':join(__dirname,'..'),'env':_0x2c28b9,'stdio':_0x4b71f8?['ignore',_0x1b3715(0x1fe),_0x1b3715(0x1fe)]:_0x1b3715(0x1e0),'detached':_0x4b71f8});return _0x4b71f8&&_0x58e1ac[_0x1b3715(0x1fd)](),_0x58e1ac;}function startTerminalUIProcess(_0x3b204,_0x1c7bc6){const _0x3601d9=a0_0x2bfa4c,_0x2d0d27=join(__dirname,_0x3601d9(0x21b)),_0x3135f5={...process.env,'LOXIA_PORT':_0x1c7bc6['toString'](),'LOXIA_HOST':_0x3b204},_0x4540d0=spawn(_0x3601d9(0x1db),[_0x2d0d27],{'cwd':join(__dirname,'..'),'env':_0x3135f5,'stdio':_0x3601d9(0x1e0)});return _0x4540d0;}const commands={'web':async()=>{const _0x320ecf=a0_0x2bfa4c;console[_0x320ecf(0x1f3)](_0x320ecf(0x1f0));const _0x1793d1=startServer(![]);console[_0x320ecf(0x1f3)]('Waiting\x20for\x20server\x20to\x20start...');let _0x299391;explicitPort?_0x299391=await waitForServerAtPort(host,explicitPort):_0x299391=await waitForServerWithDiscovery();if(_0x299391){const _0x57ef80=_0x320ecf(0x215)+_0x299391[_0x320ecf(0x213)]+':'+_0x299391[_0x320ecf(0x1f9)];console[_0x320ecf(0x1f3)](_0x320ecf(0x205)+_0x57ef80),openBrowser(_0x57ef80);}else console[_0x320ecf(0x1f3)](_0x320ecf(0x211));process['on']('SIGINT',()=>_0x1793d1[_0x320ecf(0x1d9)](_0x320ecf(0x1d5))),process['on']('SIGTERM',()=>_0x1793d1['kill']('SIGTERM')),_0x1793d1['on'](_0x320ecf(0x1da),_0x12d33c=>process[_0x320ecf(0x1da)](_0x12d33c||0x0));},'plus-web':async()=>{const _0x455f0c=a0_0x2bfa4c;await commands[_0x455f0c(0x1f1)]();},'serve':async()=>{const _0x418c2a=a0_0x2bfa4c;console[_0x418c2a(0x1f3)](_0x418c2a(0x1f0));const _0x4cf04a=startServer(![]);console['log']('Waiting\x20for\x20server\x20to\x20start...');let _0x1bd023;explicitPort?_0x1bd023=await waitForServerAtPort(host,explicitPort):_0x1bd023=await waitForServerWithDiscovery();if(_0x1bd023){const _0x35621b=_0x418c2a(0x215)+_0x1bd023['host']+':'+_0x1bd023[_0x418c2a(0x1f9)];console[_0x418c2a(0x1f3)](_0x418c2a(0x1f7)+_0x35621b),console[_0x418c2a(0x1f3)](_0x418c2a(0x1ee)+_0x35621b),console[_0x418c2a(0x1f3)]('\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal'),console[_0x418c2a(0x1f3)]('\x20\x20API\x20Health:\x20\x20\x20'+_0x35621b+_0x418c2a(0x1d2));}else console['log'](_0x418c2a(0x1e3)),console[_0x418c2a(0x1f3)]('Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.');process['on'](_0x418c2a(0x1d5),()=>_0x4cf04a['kill'](_0x418c2a(0x1d5))),process['on']('SIGTERM',()=>_0x4cf04a[_0x418c2a(0x1d9)](_0x418c2a(0x1d4))),_0x4cf04a['on'](_0x418c2a(0x1da),_0x4af034=>process[_0x418c2a(0x1da)](_0x4af034||0x0));},'terminal':async()=>{const _0x5bf714=a0_0x2bfa4c;console[_0x5bf714(0x1f3)](_0x5bf714(0x1d7));let _0x47e7b6=await discoverBackend();explicitPort&&(_0x47e7b6={'host':host,'port':explicitPort});!_0x47e7b6&&(console[_0x5bf714(0x1f5)](_0x5bf714(0x20f)),console['error'](_0x5bf714(0x1e6)),console[_0x5bf714(0x1f5)](_0x5bf714(0x201)),console[_0x5bf714(0x1f5)]('\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only'),console['error'](_0x5bf714(0x217)),process['exit'](0x1));const _0x25e350=await checkServerRunning(_0x47e7b6['host'],_0x47e7b6[_0x5bf714(0x1f9)]);!_0x25e350&&(console[_0x5bf714(0x1f5)](_0x5bf714(0x202)+_0x47e7b6['host']+':'+_0x47e7b6[_0x5bf714(0x1f9)]+'\x20but\x20not\x20responding.'),console[_0x5bf714(0x1f5)](_0x5bf714(0x1eb)),process['exit'](0x1));console['log'](_0x5bf714(0x1e1)+_0x47e7b6[_0x5bf714(0x213)]+':'+_0x47e7b6['port']),console[_0x5bf714(0x1f3)](_0x5bf714(0x1de));const _0x906e83=startTerminalUIProcess(_0x47e7b6[_0x5bf714(0x213)],_0x47e7b6['port']);process['on']('SIGINT',()=>_0x906e83[_0x5bf714(0x1d9)](_0x5bf714(0x1d5))),process['on'](_0x5bf714(0x1d4),()=>_0x906e83['kill']('SIGTERM')),_0x906e83['on'](_0x5bf714(0x1da),_0x52b960=>process['exit'](_0x52b960||0x0));},'plus-terminal':async()=>{const _0x2f3438=a0_0x2bfa4c;console[_0x2f3438(0x1f3)](_0x2f3438(0x1ed));const _0x5664ab=startServer(!![]);let _0x5d537d;explicitPort?_0x5d537d=await waitForServerAtPort(host,explicitPort):_0x5d537d=await waitForServerWithDiscovery();!_0x5d537d&&(console[_0x2f3438(0x1f5)](_0x2f3438(0x1d8)),process[_0x2f3438(0x1da)](0x1));console[_0x2f3438(0x1f3)]('Server\x20running\x20at\x20http://'+_0x5d537d['host']+':'+_0x5d537d['port']),console[_0x2f3438(0x1f3)]('Starting\x20Terminal\x20UI...\x0a');const _0x46056c=startTerminalUIProcess(_0x5d537d[_0x2f3438(0x213)],_0x5d537d[_0x2f3438(0x1f9)]);_0x46056c['on'](_0x2f3438(0x1da),_0x26541d=>{const _0x525f79=_0x2f3438;console['log']('\x0aShutting\x20down\x20server...');try{process[_0x525f79(0x1d9)](_0x5664ab[_0x525f79(0x1ec)],_0x525f79(0x1d4));}catch(_0x8e7ce0){}process['exit'](_0x26541d||0x0);}),process['on']('SIGINT',()=>{const _0x4b4b3b=_0x2f3438;_0x46056c[_0x4b4b3b(0x1d9)]('SIGINT');}),process['on'](_0x2f3438(0x1d4),()=>{const _0x4486d7=_0x2f3438;_0x46056c[_0x4486d7(0x1d9)](_0x4486d7(0x1d4));});}};commands[command]?commands[command]()[a0_0x2bfa4c(0x216)](_0x33f5a4=>{const _0x310a81=a0_0x2bfa4c;console[_0x310a81(0x1f5)](_0x310a81(0x20d),_0x33f5a4[_0x310a81(0x1e4)]),process[_0x310a81(0x1da)](0x1);}):(console[a0_0x2bfa4c(0x1f5)](a0_0x2bfa4c(0x212)+command),console['error']('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x2bfa4c(0x1da)](0x1));
|