cicy-desktop 1.0.9 → 2.1.31

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.
Files changed (196) hide show
  1. package/.cicy-code-ref +1 -0
  2. package/.env.dev +7 -0
  3. package/.github/workflows/linux-app-release.yml +78 -0
  4. package/.github/workflows/mac-app-release.yml +161 -0
  5. package/.github/workflows/windows-exe-release.yml +105 -0
  6. package/.kiro/steering/dev-workflow.md +6 -6
  7. package/AGENTS.md +30 -2
  8. package/CLAUDE.md +609 -162
  9. package/CLAUDE_HANDOFF.md +168 -0
  10. package/DESIGN.md +66 -0
  11. package/DOCKER.md +12 -12
  12. package/Dockerfile +2 -2
  13. package/README.md +331 -720
  14. package/bin/cicy-desktop +862 -0
  15. package/bin/cicy-rpc +13 -0
  16. package/build/icon.icns +0 -0
  17. package/build/icon.ico +0 -0
  18. package/build/icon.png +0 -0
  19. package/build/icon.svg +22 -0
  20. package/build/icons/icon-1024.png +0 -0
  21. package/build/icons/icon-128.png +0 -0
  22. package/build/icons/icon-16.png +0 -0
  23. package/build/icons/icon-24.png +0 -0
  24. package/build/icons/icon-256.png +0 -0
  25. package/build/icons/icon-32.png +0 -0
  26. package/build/icons/icon-48.png +0 -0
  27. package/build/icons/icon-512.png +0 -0
  28. package/build/icons/icon-64.png +0 -0
  29. package/build/icons/icon-96.png +0 -0
  30. package/build/icons/trayTemplate-16.png +0 -0
  31. package/build/icons/trayTemplate-16@2x.png +0 -0
  32. package/build/icons/trayTemplate-22.png +0 -0
  33. package/build/icons/trayTemplate-22@2x.png +0 -0
  34. package/build/icons/trayTemplate-32.png +0 -0
  35. package/build/icons/trayTemplate-32@2x.png +0 -0
  36. package/build/trayTemplate.png +0 -0
  37. package/build/trayTemplate.svg +13 -0
  38. package/build/trayTemplate@2x.png +0 -0
  39. package/cicy-dektop.command +51 -0
  40. package/copy-to-desktop.sh +4 -4
  41. package/dev-app-update.yml +3 -0
  42. package/docs/AUTOMATION-API.md +2 -2
  43. package/docs/REQUEST_MONITORING.md +1 -1
  44. package/docs/REST-API-FEATURE.md +2 -2
  45. package/docs/REST-API.md +276 -319
  46. package/docs/backend-selector-design.md +204 -0
  47. package/docs/chrome-proxy.md +142 -0
  48. package/docs/cicy-desktop-current-execution-bridge.md +509 -0
  49. package/docs/feature-distributed-multi-agent.md +11 -11
  50. package/docs/worklog-2026-03-27.md +108 -0
  51. package/docs/yaml.md +1 -1
  52. package/generate-openapi.js +159 -158
  53. package/package.json +80 -12
  54. package/scripts/prepare-cicy-code-sidecar.js +116 -0
  55. package/service.sh +5 -5
  56. package/src/app-updater.js +131 -0
  57. package/src/backends/auth-loopback.js +141 -0
  58. package/src/backends/homepage-preload.js +283 -0
  59. package/src/backends/homepage-react/assets/index-B8FrtpTX.js +49 -0
  60. package/src/backends/homepage-react/assets/index-CNVsvsZX.css +1 -0
  61. package/src/backends/homepage-react/index.html +13 -0
  62. package/src/backends/homepage-window.js +104 -0
  63. package/src/backends/homepage.html +1127 -0
  64. package/src/backends/ipc.js +220 -0
  65. package/src/backends/local-teams.js +621 -0
  66. package/src/backends/poller.js +63 -0
  67. package/src/backends/registry.js +141 -0
  68. package/src/backends/sidecar-ipc.js +186 -0
  69. package/src/backends/updater.js +71 -0
  70. package/src/backends/webview-preload.js +60 -0
  71. package/src/backends/window-manager.js +172 -0
  72. package/src/backends/window-tracker.js +50 -0
  73. package/src/chrome/chrome-cdp-client.js +80 -0
  74. package/src/chrome/chrome-launcher.js +229 -0
  75. package/src/chrome/debugger-port-resolver.js +44 -0
  76. package/src/chrome/runtime-registry.js +83 -0
  77. package/src/cli/rpc.js +356 -0
  78. package/src/cluster/artifact-registry.js +61 -0
  79. package/src/cluster/local-agent-registry.js +40 -0
  80. package/src/cluster/remote-executor.js +20 -0
  81. package/src/cluster/types.js +31 -0
  82. package/src/cluster/worker-client.js +74 -0
  83. package/src/cluster/worker-identity.js +25 -0
  84. package/src/i18n/index.js +56 -0
  85. package/src/i18n/locales/en.json +81 -0
  86. package/src/i18n/locales/fr.json +81 -0
  87. package/src/i18n/locales/ja.json +81 -0
  88. package/src/i18n/locales/zh-CN.json +81 -0
  89. package/src/main-old.js +7 -7
  90. package/src/main.js +840 -272
  91. package/src/master/agent-index.js +24 -0
  92. package/src/master/chrome-config.js +97 -0
  93. package/src/master/master-admin-routes.js +68 -0
  94. package/src/master/master-admin.html +359 -0
  95. package/src/master/master-main.js +103 -0
  96. package/src/master/master-metrics.js +145 -0
  97. package/src/master/master-routes.js +241 -0
  98. package/src/master/master-token-manager.js +46 -0
  99. package/src/master/session-affinity-store.js +36 -0
  100. package/src/master/task-scheduler.js +150 -0
  101. package/src/master/task-store.js +53 -0
  102. package/src/master/worker-inventory.js +267 -0
  103. package/src/master/worker-registry.js +74 -0
  104. package/src/server/args-parser.js +57 -2
  105. package/src/server/chrome-management-routes.js +145 -0
  106. package/src/server/chrome-proxy-routes.js +121 -0
  107. package/src/server/express-app.js +24 -5
  108. package/src/server/logging.js +1 -1
  109. package/src/server/mcp-server.js +1 -1
  110. package/src/server/tool-catalog.js +46 -0
  111. package/src/server/tool-executor.js +22 -0
  112. package/src/server/tool-registry.js +81 -77
  113. package/src/server/worker-observability-routes.js +54 -0
  114. package/src/sidecar/cicy-code.js +126 -0
  115. package/src/sidecar/docker.js +113 -0
  116. package/src/sidecar/installer.js +672 -0
  117. package/src/sidecar/mirrors.js +67 -0
  118. package/src/sidecar/net-detect.js +50 -0
  119. package/src/sidecar/wsl.js +585 -0
  120. package/src/swagger-ui.html +1 -1
  121. package/src/tools/account-tools.js +86 -59
  122. package/src/tools/chrome-tools.js +770 -0
  123. package/src/tools/exec-tools.js +27 -6
  124. package/src/tools/file-tools.js +3 -3
  125. package/src/tools/index.js +2 -1
  126. package/src/tools/ping.js +63 -60
  127. package/src/tools/system-tools.js +6 -6
  128. package/src/tools/window-tools.js +29 -5
  129. package/src/tray.js +93 -0
  130. package/src/ui-react-dist/assets/index-IWkApOSk.css +1 -0
  131. package/src/ui-react-dist/assets/index-jGZoL6K1.js +154 -0
  132. package/src/ui-react-dist/index.html +13 -0
  133. package/src/utils/auth.js +48 -12
  134. package/src/utils/global-json.js +85 -0
  135. package/src/utils/snapshot-utils.js +1 -1
  136. package/src/utils/window-monitor.js +17 -7
  137. package/src/utils/window-utils.js +94 -30
  138. package/update-desktop.sh +3 -3
  139. package/workers/render/index.html +12 -0
  140. package/workers/render/package-lock.json +2438 -0
  141. package/workers/render/package.json +20 -0
  142. package/workers/render/src/App.css +631 -0
  143. package/workers/render/src/App.jsx +864 -0
  144. package/workers/render/src/main.jsx +20 -0
  145. package/workers/render/vite.config.js +10 -0
  146. package/workers/render/wrangler.toml +15 -0
  147. package/workers/render.bak.20260528-2338/DESIGN_v2.md +254 -0
  148. package/workers/render.bak.20260528-2338/index.html +12 -0
  149. package/workers/render.bak.20260528-2338/package-lock.json +827 -0
  150. package/workers/render.bak.20260528-2338/package.json +19 -0
  151. package/workers/render.bak.20260528-2338/public/_headers +5 -0
  152. package/workers/render.bak.20260528-2338/public/manifest.json +6 -0
  153. package/workers/render.bak.20260528-2338/src/App.css +224 -0
  154. package/workers/render.bak.20260528-2338/src/App.jsx +1028 -0
  155. package/workers/render.bak.20260528-2338/src/api.js +285 -0
  156. package/workers/render.bak.20260528-2338/src/cicycode-ops.js +222 -0
  157. package/workers/render.bak.20260528-2338/src/components/BackendCard.css +299 -0
  158. package/workers/render.bak.20260528-2338/src/components/BackendCard.jsx +133 -0
  159. package/workers/render.bak.20260528-2338/src/components/BackendModal.css +161 -0
  160. package/workers/render.bak.20260528-2338/src/components/BackendModal.jsx +199 -0
  161. package/workers/render.bak.20260528-2338/src/components/Button.css +72 -0
  162. package/workers/render.bak.20260528-2338/src/components/Button.jsx +37 -0
  163. package/workers/render.bak.20260528-2338/src/components/Card.css +42 -0
  164. package/workers/render.bak.20260528-2338/src/components/Card.jsx +21 -0
  165. package/workers/render.bak.20260528-2338/src/components/Icon.jsx +30 -0
  166. package/workers/render.bak.20260528-2338/src/components/Menu.css +55 -0
  167. package/workers/render.bak.20260528-2338/src/components/Menu.jsx +91 -0
  168. package/workers/render.bak.20260528-2338/src/components/SidecarBanner.css +79 -0
  169. package/workers/render.bak.20260528-2338/src/components/SidecarBanner.jsx +84 -0
  170. package/workers/render.bak.20260528-2338/src/components/StatusChip.css +19 -0
  171. package/workers/render.bak.20260528-2338/src/components/StatusChip.jsx +31 -0
  172. package/workers/render.bak.20260528-2338/src/components/Toast.css +31 -0
  173. package/workers/render.bak.20260528-2338/src/components/Toast.jsx +23 -0
  174. package/workers/render.bak.20260528-2338/src/components/WslSetupBanner.css +464 -0
  175. package/workers/render.bak.20260528-2338/src/components/WslSetupBanner.jsx +716 -0
  176. package/workers/render.bak.20260528-2338/src/dockerInstaller.js +0 -0
  177. package/workers/render.bak.20260528-2338/src/i18n/en.json +116 -0
  178. package/workers/render.bak.20260528-2338/src/i18n/fr.json +116 -0
  179. package/workers/render.bak.20260528-2338/src/i18n/index.js +69 -0
  180. package/workers/render.bak.20260528-2338/src/i18n/ja.json +116 -0
  181. package/workers/render.bak.20260528-2338/src/i18n/zh-CN.json +121 -0
  182. package/workers/render.bak.20260528-2338/src/main.js +475 -0
  183. package/workers/render.bak.20260528-2338/src/main.jsx +18 -0
  184. package/workers/render.bak.20260528-2338/src/style.css +275 -0
  185. package/workers/render.bak.20260528-2338/src/styles/base.css +98 -0
  186. package/workers/render.bak.20260528-2338/src/styles/tokens.css +90 -0
  187. package/workers/render.bak.20260528-2338/src/tos.js +72 -0
  188. package/workers/render.bak.20260528-2338/src/worker.js +40 -0
  189. package/workers/render.bak.20260528-2338/src/wslInstaller.js +1563 -0
  190. package/workers/render.bak.20260528-2338/vite.config.js +36 -0
  191. package/workers/render.bak.20260528-2338/wrangler.toml +17 -0
  192. package/.github/workflows/build.yml +0 -85
  193. package/bin/cicy +0 -176
  194. package/electron-mcp-fixed.command +0 -134
  195. package/electron-mcp-simple.command +0 -135
  196. package/electron-mcp.command +0 -92
package/.cicy-code-ref ADDED
@@ -0,0 +1 @@
1
+ v2.1.9
package/.env.dev ADDED
@@ -0,0 +1,7 @@
1
+ # Dev mode overrides — loaded by cicy-dektop.command if this file exists.
2
+ # Delete or rename this file to revert to production homepage URL behavior.
3
+
4
+ # Load the homepage from the workers/render vite dev server (HMR enabled).
5
+ # Requires `cd workers/render && npm run dev` to be running, and—if Mac is
6
+ # remote—ssh -R 8173:127.0.0.1:8173 mac forwarding from the build host.
7
+ CICY_HOMEPAGE_URL=http://localhost:8173
@@ -0,0 +1,78 @@
1
+ name: Build Linux App Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v[0-9]+.[0-9]+.[0-9]+"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ build-linux-app:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Setup Go (for cicy-code sidecar build)
27
+ uses: actions/setup-go@v5
28
+ with:
29
+ go-version: '1.25'
30
+
31
+ - name: Read cicy-code ref pin
32
+ id: cicy_code_ref
33
+ shell: bash
34
+ run: |
35
+ ref="$(cat .cicy-code-ref | tr -d '[:space:]')"
36
+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
37
+ if ! [[ "$ref" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
38
+ echo "::error::.cicy-code-ref must be a release tag (vX.Y.Z), got: $ref"
39
+ exit 1
40
+ fi
41
+
42
+ - name: Checkout cicy-code as sibling
43
+ uses: actions/checkout@v4
44
+ with:
45
+ repository: cicy-ai/cicy-code
46
+ ref: ${{ steps.cicy_code_ref.outputs.ref }}
47
+ path: cicy-code
48
+
49
+ - name: Build cicy-code sidecar binaries (linux amd64 + arm64)
50
+ shell: bash
51
+ working-directory: cicy-code
52
+ run: |
53
+ SKIP_TTYD_ASSET=1 SKIP_SKILLS_EMBED=1 bash build.sh all
54
+ ls -lh dist/
55
+
56
+ - name: Install project dependencies
57
+ run: npm install --no-audit
58
+
59
+ - name: Install Electron build dependencies
60
+ run: npm install --save-dev --no-audit electron@41.0.2 electron-builder@26.7.0
61
+
62
+ - name: Build Linux app (deb + AppImage)
63
+ shell: bash
64
+ env:
65
+ CICY_CODE_DIST_DIR: ${{ github.workspace }}/cicy-code/dist
66
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67
+ run: |
68
+ set -euo pipefail
69
+ npm run build:linux -- --publish always
70
+
71
+ - name: Upload Linux artifacts
72
+ uses: actions/upload-artifact@v4
73
+ with:
74
+ name: cicy-desktop-linux
75
+ path: |
76
+ dist/*.deb
77
+ dist/*.AppImage
78
+ dist/latest-linux.yml
@@ -0,0 +1,161 @@
1
+ name: Build macOS App Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v[0-9]+.[0-9]+.[0-9]+"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ build-mac-app:
14
+ runs-on: macos-latest
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Setup Go (for cicy-code sidecar build)
27
+ uses: actions/setup-go@v5
28
+ with:
29
+ go-version: '1.25'
30
+
31
+ - name: Read cicy-code ref pin
32
+ id: cicy_code_ref
33
+ shell: bash
34
+ run: |
35
+ ref="$(cat .cicy-code-ref | tr -d '[:space:]')"
36
+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
37
+ # Enforce: ref must be a tagged release (vX.Y.Z), not a branch.
38
+ # This guarantees a deterministic build and lets the homepage
39
+ # display the same version it shipped with.
40
+ if ! [[ "$ref" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
41
+ echo "::error::.cicy-code-ref must be a release tag (vX.Y.Z), got: $ref"
42
+ exit 1
43
+ fi
44
+
45
+ - name: Checkout cicy-code as sibling
46
+ uses: actions/checkout@v4
47
+ with:
48
+ repository: cicy-ai/cicy-code
49
+ ref: ${{ steps.cicy_code_ref.outputs.ref }}
50
+ path: cicy-code
51
+
52
+ - name: Build cicy-code sidecar binaries (darwin amd64 + arm64)
53
+ # `bash build.sh all` runs prepare_embed (cicy-skills tarball, frontend,
54
+ # ttyd assets) and cross-compiles all four darwin/linux targets.
55
+ # We only need the two darwin slots for the Mac .app, but building
56
+ # the linux ones here is cheap (~20s) and keeps the prepare:sidecar
57
+ # script's "all targets at once" mode happy.
58
+ shell: bash
59
+ working-directory: cicy-code
60
+ run: |
61
+ bash build.sh all
62
+ ls -lh dist/
63
+
64
+ - name: Install project dependencies
65
+ run: npm install --no-audit
66
+
67
+ - name: Install Electron build dependencies in project directory
68
+ run: npm install --save-dev --no-audit electron@41.0.2 electron-builder@26.7.0
69
+
70
+ - name: Prepare macOS icon
71
+ shell: bash
72
+ # cicy-ai.com sometimes returns 522 (origin unreachable). Don't let an
73
+ # icon-asset hiccup kill the whole release — we fall back to the
74
+ # default Electron icon if the fetch + convert chain fails. Build
75
+ # step downstream checks `build/logo.icns` and conditionally passes
76
+ # --config.mac.icon.
77
+ continue-on-error: true
78
+ run: |
79
+ set +e
80
+ mkdir -p build/icon.iconset
81
+ if ! curl -fsSL --max-time 12 "https://cicy-ai.com/logo.svg" -o build/logo.svg; then
82
+ echo "::warning::logo.svg fetch failed (cicy-ai.com unreachable); building with default Electron icon"
83
+ exit 0
84
+ fi
85
+ magick -background none -density 1024 build/logo.svg \
86
+ -alpha on -resize 1024x1024 PNG32:build/logo-1024.png || { echo "::warning::magick failed"; exit 0; }
87
+ for size in 16 32 128 256 512; do
88
+ sips -z $size $size build/logo-1024.png \
89
+ --out "build/icon.iconset/icon_${size}x${size}.png" >/dev/null
90
+ sips -z $((size*2)) $((size*2)) build/logo-1024.png \
91
+ --out "build/icon.iconset/icon_${size}x${size}@2x.png" >/dev/null
92
+ done
93
+ iconutil -c icns build/icon.iconset -o build/logo.icns || { echo "::warning::iconutil failed"; exit 0; }
94
+
95
+ - name: Build macOS app (dmg + zip, unsigned)
96
+ # prebuild:mac (declared in package.json) chains npm run prepare:sidecar
97
+ # which reads CICY_CODE_DIST_DIR and populates vendor/cicy-code/.
98
+ # CSC_IDENTITY_AUTO_DISCOVERY=false stops electron-builder from probing
99
+ # the runner keychain for a cert it does not have; combined with
100
+ # build.mac.identity=null in package.json this produces a clean
101
+ # unsigned build (with the cicy-code sidecar ad-hoc signed by
102
+ # prepare-cicy-code-sidecar.js so Apple Silicon will exec it).
103
+ shell: bash
104
+ env:
105
+ CICY_CODE_DIST_DIR: ${{ github.workspace }}/cicy-code/dist
106
+ CSC_IDENTITY_AUTO_DISCOVERY: "false"
107
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108
+ run: |
109
+ set -euo pipefail
110
+ rm -rf dist
111
+ if [ -f build/logo.icns ]; then
112
+ npm run build:mac -- --config.mac.icon=build/logo.icns --publish always
113
+ else
114
+ echo "::warning::build/logo.icns missing — using default Electron icon"
115
+ npm run build:mac -- --publish always
116
+ fi
117
+
118
+ - name: Upload macOS artifacts
119
+ uses: actions/upload-artifact@v4
120
+ with:
121
+ name: cicy-desktop-mac
122
+ path: |
123
+ dist/*.dmg
124
+ dist/*.zip
125
+ if-no-files-found: error
126
+
127
+ - name: Resolve release version
128
+ id: meta
129
+ shell: bash
130
+ run: |
131
+ version="$(node -p "require('./package.json').version")"
132
+ echo "version=${version}" >> "$GITHUB_OUTPUT"
133
+ echo "tag=v${version}" >> "$GITHUB_OUTPUT"
134
+
135
+ - name: Create GitHub release (idempotent)
136
+ shell: bash
137
+ env:
138
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139
+ run: |
140
+ gh release create "${{ steps.meta.outputs.tag }}" \
141
+ --repo "$GITHUB_REPOSITORY" \
142
+ --title "CiCy Desktop v${{ steps.meta.outputs.version }}" \
143
+ --target "$GITHUB_SHA" \
144
+ --generate-notes \
145
+ --latest \
146
+ 2>/dev/null || echo "release already exists, continuing"
147
+
148
+ - name: Publish macOS assets (dmg + zip + latest-mac.yml)
149
+ shell: bash
150
+ env:
151
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152
+ CICY_CODE_DIST_DIR: ${{ github.workspace }}/cicy-code/dist
153
+ CSC_IDENTITY_AUTO_DISCOVERY: "false"
154
+ run: |
155
+ gh release upload "${{ steps.meta.outputs.tag }}" dist/*.dmg dist/*.zip \
156
+ --repo "$GITHUB_REPOSITORY" --clobber
157
+ # Also upload latest-mac.yml generated by --publish always into dist/
158
+ if ls dist/latest-mac.yml 2>/dev/null; then
159
+ gh release upload "${{ steps.meta.outputs.tag }}" dist/latest-mac.yml \
160
+ --repo "$GITHUB_REPOSITORY" --clobber
161
+ fi
@@ -0,0 +1,105 @@
1
+ name: Build Windows EXE Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v[0-9]+.[0-9]+.[0-9]+"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ build-windows-exe:
14
+ runs-on: windows-latest
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Install project dependencies
27
+ run: npm install --no-audit
28
+
29
+ - name: Install Electron build dependencies in project directory
30
+ run: npm install --save-dev --no-audit electron@41.0.2 electron-builder@26.7.0
31
+
32
+ - name: Prepare Windows icon
33
+ shell: powershell
34
+ continue-on-error: true
35
+ run: |
36
+ New-Item -ItemType Directory -Force -Path build | Out-Null
37
+ try {
38
+ Invoke-WebRequest -Uri "https://cicy-ai.com/logo.svg" -OutFile "build\logo.svg" -TimeoutSec 12
39
+ } catch {
40
+ Write-Host "::warning::logo.svg fetch failed ($_); building with default Electron icon"
41
+ exit 0
42
+ }
43
+ try {
44
+ magick -background none -density 768 "build\logo.svg" -alpha on -resize 256x256 PNG32:"build\logo-256.png"
45
+ magick "build\logo-256.png" -define icon:auto-resize=256,128,64,48,32,16 "build\logo.ico"
46
+ } catch {
47
+ Write-Host "::warning::magick convert failed ($_); skipping icon"
48
+ exit 0
49
+ }
50
+
51
+ - name: Resolve release version
52
+ id: meta
53
+ shell: bash
54
+ run: |
55
+ version="$(node -p "require('./package.json').version")"
56
+ echo "version=${version}" >> "$GITHUB_OUTPUT"
57
+ echo "tag=v${version}" >> "$GITHUB_OUTPUT"
58
+
59
+ - name: Create GitHub release as draft (idempotent)
60
+ # Draft so autoUpdater doesn't pick it up before .exe + latest.yml are
61
+ # uploaded. Promoted to non-draft + latest in the final step.
62
+ shell: bash
63
+ env:
64
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65
+ run: |
66
+ gh release create "${{ steps.meta.outputs.tag }}" \
67
+ --repo "$GITHUB_REPOSITORY" \
68
+ --title "CiCy Desktop v${{ steps.meta.outputs.version }}" \
69
+ --target "$GITHUB_SHA" \
70
+ --generate-notes \
71
+ --draft \
72
+ 2>/dev/null || echo "release already exists, continuing"
73
+
74
+ - name: Build Windows EXE and publish assets
75
+ # --publish always uploads .exe + latest.yml to the release created above.
76
+ shell: powershell
77
+ env:
78
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79
+ run: |
80
+ if (Test-Path dist) { Remove-Item -Recurse -Force dist }
81
+ if (Test-Path "build\logo.ico") {
82
+ npm run build:win -- --config.win.icon=build/logo.ico --publish always
83
+ } else {
84
+ Write-Host "::warning::no icon, using default"
85
+ npm run build:win -- --publish always
86
+ }
87
+
88
+ - name: Upload EXE artifact
89
+ uses: actions/upload-artifact@v4
90
+ with:
91
+ name: cicy-desktop-windows-exe
92
+ path: dist/*.exe
93
+ if-no-files-found: error
94
+
95
+ - name: Publish release (drop draft, mark latest)
96
+ # Only promote AFTER all assets uploaded successfully. autoUpdater on
97
+ # existing clients will pick up the new version on its next poll.
98
+ shell: bash
99
+ env:
100
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101
+ run: |
102
+ gh release edit "${{ steps.meta.outputs.tag }}" \
103
+ --repo "$GITHUB_REPOSITORY" \
104
+ --draft=false \
105
+ --latest
@@ -41,9 +41,9 @@ inclusion: always
41
41
  # - Bug修复:fix-MMDD-问题简述
42
42
 
43
43
  # 1. 直接在工作目录克隆并创建分支
44
- mkdir -p ~/projects/electron-mcp/branches/
45
- git clone -b origin/main git@github.com:cicy-dev/electron-mcp.git ~/projects/electron-mcp/branches/<branch-name>
46
- sudo ln -s /<branch-name> ~/projects/electron-mcp/branches/<branch-name>
44
+ mkdir -p ~/projects/cicy-desktop/branches/
45
+ git clone -b origin/main git@github.com:cicy-ai/cicy-desktop.git ~/projects/cicy-desktop/branches/<branch-name>
46
+ sudo ln -s /<branch-name> ~/projects/cicy-desktop/branches/<branch-name>
47
47
  cd /<branch-name>
48
48
  git fetch origin
49
49
  git checkout -b <branch-name> origin/main
@@ -144,8 +144,8 @@ gh pr create --base main --head <branch-name> --title "标题" --body "详细描
144
144
  ```
145
145
  ~/
146
146
  ├── projects/
147
- │ └── electron-mcp/main # 主仓库
148
- └── projects/electron-mcp/branches/
147
+ │ └── cicy-desktop/main # 主仓库
148
+ └── projects/cicy-desktop/branches/
149
149
  ├── feat-0206-feature1/
150
150
  ├── fix-0206-bug1/
151
151
  └── feat-0206-feature2/
@@ -163,4 +163,4 @@ gh pr create --base main --head <branch-name> --title "标题" --body "详细描
163
163
 
164
164
  ---
165
165
  **制定时间:2026-02-06**
166
- **适用项目:electron-mcp**
166
+ **适用项目:cicy-desktop**
package/AGENTS.md CHANGED
@@ -41,7 +41,7 @@ npm run build
41
41
  - Jest runs with `--runInBand` (serial execution) due to Electron's single-process nature
42
42
  - Tests use supertest for HTTP API testing
43
43
  - Tests spawn actual Electron processes on dynamic ports
44
- - Auth token loaded from `~/data/electron/token.txt`
44
+ - Auth token loaded from `~/global.json`
45
45
  - Test utilities in `tests/test-utils.js`
46
46
 
47
47
  ## Code Style Guidelines
@@ -236,7 +236,7 @@ log.error("[MCP] Error:", error);
236
236
  - Never log secrets or API keys
237
237
  - Validate all inputs with Zod schemas
238
238
  - Return structured errors without internal details
239
- - Auth token loaded from `~/data/electron/token.txt`
239
+ - Auth token loaded from `~/global.json`
240
240
 
241
241
  ### Electron Best Practices
242
242
 
@@ -245,3 +245,31 @@ log.error("[MCP] Error:", error);
245
245
  - Enable remote debugging with `--remote-debugging-port`
246
246
  - Use `nodeIntegration: false` and `contextIsolation: true`
247
247
  - Multi-account support via `partition: persist:sandbox-{accountIdx}`
248
+
249
+ ## Master/Worker Cluster Commands
250
+
251
+ ```bash
252
+ # Start Master server (port 8100)
253
+ npm run start:master
254
+
255
+ # Start Worker registered to Master
256
+ MASTER_TOKEN=$(jq -r '.api_token' ~/global.json)
257
+ PORT=8101 CICY_MASTER_URL="http://127.0.0.1:8100" CICY_MASTER_TOKEN="$MASTER_TOKEN" npm start
258
+
259
+ # Master API endpoints
260
+ curl http://127.0.0.1:8100/api/ping
261
+ curl http://127.0.0.1:8100/api/workers
262
+ curl http://127.0.0.1:8100/api/agents
263
+
264
+ # Worker direct API (requires auth token from ~/global.json)
265
+ curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8101/rpc/tools
266
+ curl -H "Authorization: Bearer $TOKEN" -X POST http://127.0.0.1:8101/rpc/tools/call \
267
+ -H "Content-Type: application/json" \
268
+ -d '{"name":"ping","arguments":{}}'
269
+ ```
270
+
271
+ ### Master Token
272
+
273
+ - Token stored in `~/global.json` as `api_token`
274
+ - Token file created automatically on first startup if missing
275
+ - Token passed to workers via `CICY_MASTER_TOKEN` env var