cicy-desktop 1.0.8
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/.github/workflows/build.yml +85 -0
- package/.kiro/steering/dev-workflow.md +166 -0
- package/AGENTS.md +247 -0
- package/CLAUDE.md +162 -0
- package/DOCKER.md +85 -0
- package/Dockerfile +46 -0
- package/README.md +720 -0
- package/TODO-anti-detection.md +326 -0
- package/bin/cicy +176 -0
- package/bin/preinstall.sh +32 -0
- package/copy-to-desktop.sh +26 -0
- package/docs/AUTOMATION-API.md +342 -0
- package/docs/REQUEST_MONITORING.md +435 -0
- package/docs/REST-API-FEATURE.md +155 -0
- package/docs/REST-API.md +319 -0
- package/docs/feature-distributed-multi-agent.md +555 -0
- package/docs/yaml.md +255 -0
- package/electron-mcp-fixed.command +134 -0
- package/electron-mcp-simple.command +135 -0
- package/electron-mcp.command +92 -0
- package/generate-openapi.js +158 -0
- package/jest.config.js +10 -0
- package/jest.setup.global.js +13 -0
- package/jest.teardown.global.js +7 -0
- package/package.json +75 -0
- package/service.sh +164 -0
- package/src/config.js +8 -0
- package/src/extension/inject.js +135 -0
- package/src/main-old.js +837 -0
- package/src/main.js +403 -0
- package/src/preload-rpc.js +4 -0
- package/src/server/args-parser.js +37 -0
- package/src/server/electron-setup.js +33 -0
- package/src/server/express-app.js +166 -0
- package/src/server/logging.js +58 -0
- package/src/server/mcp-server.js +53 -0
- package/src/server/tool-registry.js +77 -0
- package/src/server/ui-routes.js +81 -0
- package/src/swagger-ui.html +41 -0
- package/src/tools/account-tools.js +194 -0
- package/src/tools/automation-tools.js +297 -0
- package/src/tools/cdp-tools.js +444 -0
- package/src/tools/clipboard-tools.js +180 -0
- package/src/tools/download-tools.js +57 -0
- package/src/tools/exec-js.js +297 -0
- package/src/tools/exec-tools.js +139 -0
- package/src/tools/file-tools.js +212 -0
- package/src/tools/hook-chatgpt.js +489 -0
- package/src/tools/hook-gemini.js +454 -0
- package/src/tools/index.js +19 -0
- package/src/tools/ipc-bridge.js +31 -0
- package/src/tools/ping.js +60 -0
- package/src/tools/r-reset.js +28 -0
- package/src/tools/screenshot-tools.js +28 -0
- package/src/tools/system-tools.js +531 -0
- package/src/tools/window-tools.js +882 -0
- package/src/ui.html +914 -0
- package/src/utils/auth.js +81 -0
- package/src/utils/cdp-utils.js +8 -0
- package/src/utils/download-manager.js +41 -0
- package/src/utils/process-utils.js +185 -0
- package/src/utils/snapshot-utils.js +56 -0
- package/src/utils/window-monitor.js +605 -0
- package/src/utils/window-state.js +137 -0
- package/src/utils/window-utils.js +336 -0
- package/update-desktop.sh +33 -0
package/DOCKER.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Electron RCP Docker
|
|
2
|
+
|
|
3
|
+
Docker image for electron-rcp with browser automation capabilities.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Node.js 22
|
|
8
|
+
- Electron with Xvfb (headless)
|
|
9
|
+
- Python 3 + pip
|
|
10
|
+
- Non-root user (electron)
|
|
11
|
+
- Port 8101 exposed
|
|
12
|
+
|
|
13
|
+
## Build
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
docker build -t electron-rcp .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Run
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
docker run -d \
|
|
23
|
+
--name electron-rcp \
|
|
24
|
+
-p 8101:8101 \
|
|
25
|
+
-e TOKEN=your-token-here \
|
|
26
|
+
--cap-add=SYS_ADMIN \
|
|
27
|
+
electron-rcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
### Check status
|
|
33
|
+
```bash
|
|
34
|
+
docker exec electron-rcp electron-rpc status
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### View logs
|
|
38
|
+
```bash
|
|
39
|
+
docker logs electron-rcp
|
|
40
|
+
# or
|
|
41
|
+
docker exec electron-rcp tail -f /home/electron/logs/electron-mcp.log
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Use cicy-rpc from host
|
|
45
|
+
```bash
|
|
46
|
+
# Set token on host
|
|
47
|
+
echo "your-token-here" > ~/data/electron/token.txt
|
|
48
|
+
|
|
49
|
+
# Test connection
|
|
50
|
+
cicy-rpc ping
|
|
51
|
+
|
|
52
|
+
# Open window
|
|
53
|
+
cicy-rpc open_window url=https://google.com
|
|
54
|
+
|
|
55
|
+
# Take screenshot
|
|
56
|
+
cicy-rpc webpage_snapshot win_id=1
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Extract screenshot to host
|
|
60
|
+
```bash
|
|
61
|
+
curl -s http://localhost:8101/rpc/tools/call \
|
|
62
|
+
-H "Authorization: Bearer $(cat ~/data/electron/token.txt)" \
|
|
63
|
+
-H "Content-Type: application/json" \
|
|
64
|
+
-d '{"name":"webpage_snapshot","arguments":{"win_id":1}}' | \
|
|
65
|
+
jq -r '.result.content[] | select(.type=="image") | .data' | \
|
|
66
|
+
base64 -d > screenshot.png
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Execute shell commands
|
|
70
|
+
```bash
|
|
71
|
+
cicy-rpc exec_shell command="pip3 install package-name --break-system-packages"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Environment Variables
|
|
75
|
+
|
|
76
|
+
- `TOKEN`: Authentication token (default: your-token-here)
|
|
77
|
+
- `DISPLAY`: X display (default: :99)
|
|
78
|
+
|
|
79
|
+
## Stop and Remove
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
docker stop electron-rcp
|
|
83
|
+
docker rm electron-rcp
|
|
84
|
+
```
|
|
85
|
+
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
FROM node:22
|
|
2
|
+
|
|
3
|
+
# Install system dependencies
|
|
4
|
+
RUN apt-get update && apt-get install -y \
|
|
5
|
+
xvfb \
|
|
6
|
+
libgtk-3-0 \
|
|
7
|
+
libnotify4 \
|
|
8
|
+
libnss3 \
|
|
9
|
+
libxss1 \
|
|
10
|
+
libxtst6 \
|
|
11
|
+
xdg-utils \
|
|
12
|
+
libatspi2.0-0 \
|
|
13
|
+
libdrm2 \
|
|
14
|
+
libgbm1 \
|
|
15
|
+
libasound2 \
|
|
16
|
+
python3-pip \
|
|
17
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
18
|
+
|
|
19
|
+
# Create non-root user
|
|
20
|
+
RUN useradd -m -s /bin/bash electron
|
|
21
|
+
|
|
22
|
+
# Install electron-rcp globally
|
|
23
|
+
RUN npm install -g electron-rcp
|
|
24
|
+
|
|
25
|
+
# Configure chrome-sandbox
|
|
26
|
+
RUN chown root:root /usr/local/lib/node_modules/electron/dist/chrome-sandbox && \
|
|
27
|
+
chmod 4755 /usr/local/lib/node_modules/electron/dist/chrome-sandbox
|
|
28
|
+
|
|
29
|
+
# Switch to non-root user
|
|
30
|
+
USER electron
|
|
31
|
+
WORKDIR /home/electron
|
|
32
|
+
|
|
33
|
+
# Create token file
|
|
34
|
+
RUN echo "your-token-here" > /home/electron/electron-mcp-token.txt
|
|
35
|
+
|
|
36
|
+
# Set display
|
|
37
|
+
ENV DISPLAY=:99
|
|
38
|
+
|
|
39
|
+
# Expose port
|
|
40
|
+
EXPOSE 8101
|
|
41
|
+
|
|
42
|
+
# Start Xvfb and electron-rpc
|
|
43
|
+
CMD Xvfb :99 -screen 0 1024x768x24 & \
|
|
44
|
+
sleep 3 && \
|
|
45
|
+
electron-rpc start && \
|
|
46
|
+
tail -f /home/electron/logs/electron-mcp.log
|