local-operator-ui 0.1.0-beta.5 โ 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -211
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -44,11 +44,11 @@ The Local Operator UI is a user interface for managing and interacting with the
|
|
|
44
44
|
Before you begin, ensure you have the following installed:
|
|
45
45
|
|
|
46
46
|
- **Node.js**: Version 22.13.1 or higher. It's recommended to use [nvm](https://github.com/nvm-sh/nvm) for managing Node.js versions.
|
|
47
|
-
- **Local Operator Backend**: The UI connects to the Local Operator backend API. See the [Local Operator GitHub repository](https://github.com/damianvtran/local-operator) for installation instructions.
|
|
47
|
+
- **Local Operator Backend**: The UI connects to the Local Operator backend API. See the [Local Operator GitHub repository](https://github.com/damianvtran/local-operator) for installation instructions. Install it globally or in a virtual environment with `pip install local-operator` and then boot it up on `localhost:1111` with `local-operator serve`.
|
|
48
48
|
|
|
49
49
|
### NPM Installation
|
|
50
50
|
|
|
51
|
-
You can install and run Local Operator UI directly using npx
|
|
51
|
+
You can install and run Local Operator UI directly using [npx](https://docs.n8n.io/hosting/installation/npm/).
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
# Install and run in one command
|
|
@@ -59,7 +59,7 @@ This will download and execute the latest version of the Local Operator UI, laun
|
|
|
59
59
|
|
|
60
60
|
### Manual Installation
|
|
61
61
|
|
|
62
|
-
Alternatively, you can install the package globally:
|
|
62
|
+
Alternatively, without npx, you can install the package globally with standard npm:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
# Install globally
|
|
@@ -69,153 +69,7 @@ npm install -g local-operator-ui
|
|
|
69
69
|
local-operator-ui
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
If you want to contribute or modify the application, follow these steps:
|
|
75
|
-
|
|
76
|
-
**Clone the repository:**
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
git clone https://github.com/local-operator/local-operator-ui.git
|
|
80
|
-
cd local-operator-ui
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Install dependencies:**
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
yarn install
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Configure environment variables:**
|
|
90
|
-
|
|
91
|
-
Copy the `.env.template` file to `.env` and update the values as needed:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
cp .env.template .env
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The main environment variable is:
|
|
98
|
-
|
|
99
|
-
- `VITE_LOCAL_OPERATOR_API_URL`: URL of the Local Operator backend API (default: `http://localhost:1111`)
|
|
100
|
-
|
|
101
|
-
### Development
|
|
102
|
-
|
|
103
|
-
For local development, follow these steps:
|
|
104
|
-
|
|
105
|
-
**Start the development server:**
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
yarn dev
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
This command will start the Electron application in development mode, with hot reloading enabled for both the main process and the renderer process.
|
|
112
|
-
|
|
113
|
-
### Production
|
|
114
|
-
|
|
115
|
-
To build and run the application in production mode:
|
|
116
|
-
|
|
117
|
-
**Build and start the application:**
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
yarn start
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
This command will run the pre-build script and then start the Electron application in production mode, loading the compiled assets.
|
|
124
|
-
|
|
125
|
-
## ๐๏ธ Project Structure
|
|
126
|
-
|
|
127
|
-
The project follows a modular architecture with clear separation of concerns:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
local-operator-ui/
|
|
131
|
-
โโโ .github/ # GitHub configuration
|
|
132
|
-
โ โโโ workflows/ # GitHub Actions workflows
|
|
133
|
-
โ โโโ ci.yml # CI workflow configuration
|
|
134
|
-
โ โโโ release.yml # Release workflow configuration
|
|
135
|
-
โโโ resources/ # Application resources (icons, images)
|
|
136
|
-
โโโ src/ # Source code
|
|
137
|
-
โ โโโ main/ # Electron main process
|
|
138
|
-
โ โ โโโ index.ts # Main process entry point
|
|
139
|
-
โ โโโ preload/ # Electron preload scripts
|
|
140
|
-
โ โ โโโ index.d.ts # Type definitions
|
|
141
|
-
โ โ โโโ index.ts # Preload script
|
|
142
|
-
โ โโโ renderer/ # Renderer process (React application)
|
|
143
|
-
โ โโโ index.html # HTML template
|
|
144
|
-
โ โโโ src/ # React application source
|
|
145
|
-
โ โโโ api/ # API clients and utilities
|
|
146
|
-
โ โ โโโ query-client.ts # React Query client setup
|
|
147
|
-
โ โ โโโ local-operator/ # Local Operator API client
|
|
148
|
-
โ โ โโโ agents-api.ts # Agents API endpoints
|
|
149
|
-
โ โ โโโ chat-api.ts # Chat API endpoints
|
|
150
|
-
โ โ โโโ config-api.ts # Config API endpoints
|
|
151
|
-
โ โ โโโ credentials-api.ts # Credentials API endpoints
|
|
152
|
-
โ โ โโโ health-api.ts # Health API endpoints
|
|
153
|
-
โ โ โโโ jobs-api.ts # Jobs API endpoints
|
|
154
|
-
โ โ โโโ types.ts # API type definitions
|
|
155
|
-
โ โ โโโ index.ts # API client exports
|
|
156
|
-
โ โโโ assets/ # Static assets
|
|
157
|
-
โ โโโ components/ # React components
|
|
158
|
-
โ โ โโโ agents/ # Agent management components
|
|
159
|
-
โ โ โโโ chat/ # Chat interface components
|
|
160
|
-
โ โ โโโ common/ # Shared/common components
|
|
161
|
-
โ โ โโโ navigation/ # Navigation components
|
|
162
|
-
โ โ โโโ settings/ # Settings components
|
|
163
|
-
โ โโโ hooks/ # Custom React hooks
|
|
164
|
-
โ โโโ store/ # State management (Zustand)
|
|
165
|
-
โ โโโ app.tsx # Main application component
|
|
166
|
-
โ โโโ config.ts # Application configuration
|
|
167
|
-
โ โโโ main.tsx # Application entry point
|
|
168
|
-
โ โโโ theme.ts # MUI theme configuration
|
|
169
|
-
โ โโโ vite-env.d.ts # Vite environment type definitions
|
|
170
|
-
โโโ .env.template # Environment variables template
|
|
171
|
-
โโโ biome.json # Biome configuration
|
|
172
|
-
โโโ electron.vite.config.js # Electron Vite configuration
|
|
173
|
-
โโโ eslint.config.js # ESLint configuration
|
|
174
|
-
โโโ GITHUB_ACTIONS.md # GitHub Actions documentation
|
|
175
|
-
โโโ package.json # Project dependencies and scripts
|
|
176
|
-
โโโ tsconfig.json # TypeScript configuration
|
|
177
|
-
โโโ README.md # Project documentation
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Key Directories
|
|
181
|
-
|
|
182
|
-
- **src/main**: Contains the Electron main process code
|
|
183
|
-
- **src/preload**: Contains the Electron preload scripts
|
|
184
|
-
- **src/renderer**: Contains the React application code
|
|
185
|
-
- **api**: API clients for communicating with the Local Operator backend
|
|
186
|
-
- **components**: React components organized by feature
|
|
187
|
-
- **hooks**: Custom React hooks for data fetching and state management
|
|
188
|
-
- **store**: Global state management using Zustand
|
|
189
|
-
|
|
190
|
-
## ๐ ๏ธ Technology Stack
|
|
191
|
-
|
|
192
|
-
The Local Operator UI is built with the following technologies:
|
|
193
|
-
|
|
194
|
-
### Core Technologies
|
|
195
|
-
|
|
196
|
-
- **Electron**: Cross-platform desktop application framework
|
|
197
|
-
- **React**: UI library for building component-based interfaces
|
|
198
|
-
- **TypeScript**: Typed superset of JavaScript for improved developer experience
|
|
199
|
-
- **Vite**: Modern frontend build tool
|
|
200
|
-
|
|
201
|
-
### UI Framework and Styling
|
|
202
|
-
|
|
203
|
-
- **Material UI (MUI)**: React component library implementing Google's Material Design
|
|
204
|
-
- **Styled Components**: CSS-in-JS library for component styling
|
|
205
|
-
- **Emotion**: CSS-in-JS library used by MUI
|
|
206
|
-
- **FontAwesome**: Icon library
|
|
207
|
-
|
|
208
|
-
### State Management and Data Fetching
|
|
209
|
-
|
|
210
|
-
- **Zustand**: Lightweight state management library
|
|
211
|
-
- **React Query**: Data fetching and caching library
|
|
212
|
-
- **Zod**: TypeScript-first schema validation
|
|
213
|
-
|
|
214
|
-
### Development Tools
|
|
215
|
-
|
|
216
|
-
- **Biome**: Fast linter and formatter for JavaScript and TypeScript
|
|
217
|
-
- **ESLint**: JavaScript and TypeScript linter
|
|
218
|
-
- **TypeScript**: Static type checking
|
|
72
|
+
After installation, the application will automatically connect to the Local Operator backend API at `http://localhost:1111` by default.
|
|
219
73
|
|
|
220
74
|
## โจ Features
|
|
221
75
|
|
|
@@ -248,67 +102,9 @@ The Local Operator UI provides a comprehensive interface for interacting with AI
|
|
|
248
102
|
- Real-time status updates for long-running operations
|
|
249
103
|
- Error handling and retry mechanisms
|
|
250
104
|
|
|
251
|
-
## ๐งช Testing
|
|
252
|
-
|
|
253
|
-
The project uses Jest for testing. To run tests:
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
yarn test
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
## ๐ Continuous Integration and Deployment
|
|
260
|
-
|
|
261
|
-
This project uses GitHub Actions for continuous integration and automated publishing to npm. The workflows include:
|
|
262
|
-
|
|
263
|
-
- **CI**: Runs Biome linting and security audits on pushes to `main` and `dev-*` branches
|
|
264
|
-
- **Release**: Automatically publishes the package to npm when a new GitHub Release is created
|
|
265
|
-
|
|
266
|
-
For detailed information on setting up and using these workflows, see [GITHUB_ACTIONS.md](./GITHUB_ACTIONS.md).
|
|
267
|
-
|
|
268
|
-
## ๐ง Linting and Formatting
|
|
269
|
-
|
|
270
|
-
The project uses Biome for linting and formatting. To lint and format the code:
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
# Check for linting issues
|
|
274
|
-
yarn lint
|
|
275
|
-
|
|
276
|
-
# Fix linting issues
|
|
277
|
-
yarn lint:fix
|
|
278
|
-
|
|
279
|
-
# Format code
|
|
280
|
-
yarn format
|
|
281
|
-
|
|
282
|
-
# Fix formatting issues
|
|
283
|
-
yarn format:fix
|
|
284
|
-
```
|
|
285
|
-
|
|
286
105
|
## ๐ค Contributing
|
|
287
106
|
|
|
288
|
-
Contributions are welcome!
|
|
289
|
-
|
|
290
|
-
1. Fork the repository
|
|
291
|
-
2. Create a new branch (`git checkout -b feature/your-feature-name`)
|
|
292
|
-
3. Make your changes
|
|
293
|
-
4. Run tests and linting (`yarn test && yarn lint`)
|
|
294
|
-
5. Commit your changes (`git commit -m 'Add some feature'`)
|
|
295
|
-
6. Push to the branch (`git push origin feature/your-feature-name`)
|
|
296
|
-
7. Open a Pull Request
|
|
297
|
-
|
|
298
|
-
Please ensure your code follows the project's coding standards:
|
|
299
|
-
|
|
300
|
-
- Use TypeScript for all new code
|
|
301
|
-
- Follow the existing code style and patterns
|
|
302
|
-
- Write tests for new features
|
|
303
|
-
- Update documentation as needed
|
|
304
|
-
|
|
305
|
-
### Code Style Guidelines
|
|
306
|
-
|
|
307
|
-
- Use `type` instead of `interface` for type definitions
|
|
308
|
-
- Use kebab-case for file names and PascalCase for component names
|
|
309
|
-
- Use named exports instead of default exports
|
|
310
|
-
- Include JSDoc documentation where appropriate
|
|
311
|
-
- Follow Biome linting conventions
|
|
107
|
+
Contributions are welcome! Please see our [Contributing Guide](./CONTRIBUTING.md) for details on how to get started with development, code style guidelines, and our contribution process.
|
|
312
108
|
|
|
313
109
|
## ๐ Troubleshooting
|
|
314
110
|
|
|
@@ -316,8 +112,8 @@ Please ensure your code follows the project's coding standards:
|
|
|
316
112
|
|
|
317
113
|
#### Application fails to connect to the backend
|
|
318
114
|
|
|
319
|
-
- Ensure the Local Operator backend is running
|
|
320
|
-
- Check that the `VITE_LOCAL_OPERATOR_API_URL` environment variable is set
|
|
115
|
+
- Ensure the Local Operator backend is running and hosting on `http://localhost:1111`
|
|
116
|
+
- Check that the `VITE_LOCAL_OPERATOR_API_URL` environment variable has not been set to a different URL. This value is set automatically to `http://localhost:1111` if a custom `.env` doesn't specify otherwise.
|
|
321
117
|
- Verify network connectivity between the UI and the backend
|
|
322
118
|
|
|
323
119
|
#### Development server crashes
|
package/out/main/index.jsc
CHANGED
|
Binary file
|
package/out/preload/index.jsc
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "User interface for the Local Operator agent environment",
|
|
5
5
|
"main": "./out/main/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,15 @@
|
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/damianvtran/local-operator-ui/issues"
|
|
29
29
|
},
|
|
30
|
-
"keywords": [
|
|
30
|
+
"keywords": [
|
|
31
|
+
"local-operator",
|
|
32
|
+
"agent",
|
|
33
|
+
"python",
|
|
34
|
+
"tool use",
|
|
35
|
+
"ui",
|
|
36
|
+
"electron",
|
|
37
|
+
"react"
|
|
38
|
+
],
|
|
31
39
|
"files": ["out", "bin", "LICENSE", "README.md"],
|
|
32
40
|
"publishConfig": {
|
|
33
41
|
"access": "public"
|
|
@@ -41,7 +49,8 @@
|
|
|
41
49
|
"lint:fix": "npx @biomejs/biome check --apply src",
|
|
42
50
|
"format": "npx @biomejs/biome format src",
|
|
43
51
|
"format:fix": "npx @biomejs/biome format --write src",
|
|
44
|
-
"prepublishOnly": "npm run build"
|
|
52
|
+
"prepublishOnly": "npm run build",
|
|
53
|
+
"check-types": "tsc --noEmit"
|
|
45
54
|
},
|
|
46
55
|
"dependencies": {
|
|
47
56
|
"@electron-toolkit/utils": "^4.0.0",
|