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.
- package/.cicy-code-ref +1 -0
- package/.env.dev +7 -0
- package/.github/workflows/linux-app-release.yml +78 -0
- package/.github/workflows/mac-app-release.yml +161 -0
- package/.github/workflows/windows-exe-release.yml +105 -0
- package/.kiro/steering/dev-workflow.md +6 -6
- package/AGENTS.md +30 -2
- package/CLAUDE.md +609 -162
- package/CLAUDE_HANDOFF.md +168 -0
- package/DESIGN.md +66 -0
- package/DOCKER.md +12 -12
- package/Dockerfile +2 -2
- package/README.md +331 -720
- package/bin/cicy-desktop +862 -0
- package/bin/cicy-rpc +13 -0
- package/build/icon.icns +0 -0
- package/build/icon.ico +0 -0
- package/build/icon.png +0 -0
- package/build/icon.svg +22 -0
- package/build/icons/icon-1024.png +0 -0
- package/build/icons/icon-128.png +0 -0
- package/build/icons/icon-16.png +0 -0
- package/build/icons/icon-24.png +0 -0
- package/build/icons/icon-256.png +0 -0
- package/build/icons/icon-32.png +0 -0
- package/build/icons/icon-48.png +0 -0
- package/build/icons/icon-512.png +0 -0
- package/build/icons/icon-64.png +0 -0
- package/build/icons/icon-96.png +0 -0
- package/build/icons/trayTemplate-16.png +0 -0
- package/build/icons/trayTemplate-16@2x.png +0 -0
- package/build/icons/trayTemplate-22.png +0 -0
- package/build/icons/trayTemplate-22@2x.png +0 -0
- package/build/icons/trayTemplate-32.png +0 -0
- package/build/icons/trayTemplate-32@2x.png +0 -0
- package/build/trayTemplate.png +0 -0
- package/build/trayTemplate.svg +13 -0
- package/build/trayTemplate@2x.png +0 -0
- package/cicy-dektop.command +51 -0
- package/copy-to-desktop.sh +4 -4
- package/dev-app-update.yml +3 -0
- package/docs/AUTOMATION-API.md +2 -2
- package/docs/REQUEST_MONITORING.md +1 -1
- package/docs/REST-API-FEATURE.md +2 -2
- package/docs/REST-API.md +276 -319
- package/docs/backend-selector-design.md +204 -0
- package/docs/chrome-proxy.md +142 -0
- package/docs/cicy-desktop-current-execution-bridge.md +509 -0
- package/docs/feature-distributed-multi-agent.md +11 -11
- package/docs/worklog-2026-03-27.md +108 -0
- package/docs/yaml.md +1 -1
- package/generate-openapi.js +159 -158
- package/package.json +80 -12
- package/scripts/prepare-cicy-code-sidecar.js +116 -0
- package/service.sh +5 -5
- package/src/app-updater.js +131 -0
- package/src/backends/auth-loopback.js +141 -0
- package/src/backends/homepage-preload.js +283 -0
- package/src/backends/homepage-react/assets/index-B8FrtpTX.js +49 -0
- package/src/backends/homepage-react/assets/index-CNVsvsZX.css +1 -0
- package/src/backends/homepage-react/index.html +13 -0
- package/src/backends/homepage-window.js +104 -0
- package/src/backends/homepage.html +1127 -0
- package/src/backends/ipc.js +220 -0
- package/src/backends/local-teams.js +621 -0
- package/src/backends/poller.js +63 -0
- package/src/backends/registry.js +141 -0
- package/src/backends/sidecar-ipc.js +186 -0
- package/src/backends/updater.js +71 -0
- package/src/backends/webview-preload.js +60 -0
- package/src/backends/window-manager.js +172 -0
- package/src/backends/window-tracker.js +50 -0
- package/src/chrome/chrome-cdp-client.js +80 -0
- package/src/chrome/chrome-launcher.js +229 -0
- package/src/chrome/debugger-port-resolver.js +44 -0
- package/src/chrome/runtime-registry.js +83 -0
- package/src/cli/rpc.js +356 -0
- package/src/cluster/artifact-registry.js +61 -0
- package/src/cluster/local-agent-registry.js +40 -0
- package/src/cluster/remote-executor.js +20 -0
- package/src/cluster/types.js +31 -0
- package/src/cluster/worker-client.js +74 -0
- package/src/cluster/worker-identity.js +25 -0
- package/src/i18n/index.js +56 -0
- package/src/i18n/locales/en.json +81 -0
- package/src/i18n/locales/fr.json +81 -0
- package/src/i18n/locales/ja.json +81 -0
- package/src/i18n/locales/zh-CN.json +81 -0
- package/src/main-old.js +7 -7
- package/src/main.js +840 -272
- package/src/master/agent-index.js +24 -0
- package/src/master/chrome-config.js +97 -0
- package/src/master/master-admin-routes.js +68 -0
- package/src/master/master-admin.html +359 -0
- package/src/master/master-main.js +103 -0
- package/src/master/master-metrics.js +145 -0
- package/src/master/master-routes.js +241 -0
- package/src/master/master-token-manager.js +46 -0
- package/src/master/session-affinity-store.js +36 -0
- package/src/master/task-scheduler.js +150 -0
- package/src/master/task-store.js +53 -0
- package/src/master/worker-inventory.js +267 -0
- package/src/master/worker-registry.js +74 -0
- package/src/server/args-parser.js +57 -2
- package/src/server/chrome-management-routes.js +145 -0
- package/src/server/chrome-proxy-routes.js +121 -0
- package/src/server/express-app.js +24 -5
- package/src/server/logging.js +1 -1
- package/src/server/mcp-server.js +1 -1
- package/src/server/tool-catalog.js +46 -0
- package/src/server/tool-executor.js +22 -0
- package/src/server/tool-registry.js +81 -77
- package/src/server/worker-observability-routes.js +54 -0
- package/src/sidecar/cicy-code.js +126 -0
- package/src/sidecar/docker.js +113 -0
- package/src/sidecar/installer.js +672 -0
- package/src/sidecar/mirrors.js +67 -0
- package/src/sidecar/net-detect.js +50 -0
- package/src/sidecar/wsl.js +585 -0
- package/src/swagger-ui.html +1 -1
- package/src/tools/account-tools.js +86 -59
- package/src/tools/chrome-tools.js +770 -0
- package/src/tools/exec-tools.js +27 -6
- package/src/tools/file-tools.js +3 -3
- package/src/tools/index.js +2 -1
- package/src/tools/ping.js +63 -60
- package/src/tools/system-tools.js +6 -6
- package/src/tools/window-tools.js +29 -5
- package/src/tray.js +93 -0
- package/src/ui-react-dist/assets/index-IWkApOSk.css +1 -0
- package/src/ui-react-dist/assets/index-jGZoL6K1.js +154 -0
- package/src/ui-react-dist/index.html +13 -0
- package/src/utils/auth.js +48 -12
- package/src/utils/global-json.js +85 -0
- package/src/utils/snapshot-utils.js +1 -1
- package/src/utils/window-monitor.js +17 -7
- package/src/utils/window-utils.js +94 -30
- package/update-desktop.sh +3 -3
- package/workers/render/index.html +12 -0
- package/workers/render/package-lock.json +2438 -0
- package/workers/render/package.json +20 -0
- package/workers/render/src/App.css +631 -0
- package/workers/render/src/App.jsx +864 -0
- package/workers/render/src/main.jsx +20 -0
- package/workers/render/vite.config.js +10 -0
- package/workers/render/wrangler.toml +15 -0
- package/workers/render.bak.20260528-2338/DESIGN_v2.md +254 -0
- package/workers/render.bak.20260528-2338/index.html +12 -0
- package/workers/render.bak.20260528-2338/package-lock.json +827 -0
- package/workers/render.bak.20260528-2338/package.json +19 -0
- package/workers/render.bak.20260528-2338/public/_headers +5 -0
- package/workers/render.bak.20260528-2338/public/manifest.json +6 -0
- package/workers/render.bak.20260528-2338/src/App.css +224 -0
- package/workers/render.bak.20260528-2338/src/App.jsx +1028 -0
- package/workers/render.bak.20260528-2338/src/api.js +285 -0
- package/workers/render.bak.20260528-2338/src/cicycode-ops.js +222 -0
- package/workers/render.bak.20260528-2338/src/components/BackendCard.css +299 -0
- package/workers/render.bak.20260528-2338/src/components/BackendCard.jsx +133 -0
- package/workers/render.bak.20260528-2338/src/components/BackendModal.css +161 -0
- package/workers/render.bak.20260528-2338/src/components/BackendModal.jsx +199 -0
- package/workers/render.bak.20260528-2338/src/components/Button.css +72 -0
- package/workers/render.bak.20260528-2338/src/components/Button.jsx +37 -0
- package/workers/render.bak.20260528-2338/src/components/Card.css +42 -0
- package/workers/render.bak.20260528-2338/src/components/Card.jsx +21 -0
- package/workers/render.bak.20260528-2338/src/components/Icon.jsx +30 -0
- package/workers/render.bak.20260528-2338/src/components/Menu.css +55 -0
- package/workers/render.bak.20260528-2338/src/components/Menu.jsx +91 -0
- package/workers/render.bak.20260528-2338/src/components/SidecarBanner.css +79 -0
- package/workers/render.bak.20260528-2338/src/components/SidecarBanner.jsx +84 -0
- package/workers/render.bak.20260528-2338/src/components/StatusChip.css +19 -0
- package/workers/render.bak.20260528-2338/src/components/StatusChip.jsx +31 -0
- package/workers/render.bak.20260528-2338/src/components/Toast.css +31 -0
- package/workers/render.bak.20260528-2338/src/components/Toast.jsx +23 -0
- package/workers/render.bak.20260528-2338/src/components/WslSetupBanner.css +464 -0
- package/workers/render.bak.20260528-2338/src/components/WslSetupBanner.jsx +716 -0
- package/workers/render.bak.20260528-2338/src/dockerInstaller.js +0 -0
- package/workers/render.bak.20260528-2338/src/i18n/en.json +116 -0
- package/workers/render.bak.20260528-2338/src/i18n/fr.json +116 -0
- package/workers/render.bak.20260528-2338/src/i18n/index.js +69 -0
- package/workers/render.bak.20260528-2338/src/i18n/ja.json +116 -0
- package/workers/render.bak.20260528-2338/src/i18n/zh-CN.json +121 -0
- package/workers/render.bak.20260528-2338/src/main.js +475 -0
- package/workers/render.bak.20260528-2338/src/main.jsx +18 -0
- package/workers/render.bak.20260528-2338/src/style.css +275 -0
- package/workers/render.bak.20260528-2338/src/styles/base.css +98 -0
- package/workers/render.bak.20260528-2338/src/styles/tokens.css +90 -0
- package/workers/render.bak.20260528-2338/src/tos.js +72 -0
- package/workers/render.bak.20260528-2338/src/worker.js +40 -0
- package/workers/render.bak.20260528-2338/src/wslInstaller.js +1563 -0
- package/workers/render.bak.20260528-2338/vite.config.js +36 -0
- package/workers/render.bak.20260528-2338/wrangler.toml +17 -0
- package/.github/workflows/build.yml +0 -85
- package/bin/cicy +0 -176
- package/electron-mcp-fixed.command +0 -134
- package/electron-mcp-simple.command +0 -135
- 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/
|
|
45
|
-
git clone -b origin/main git@github.com:cicy-
|
|
46
|
-
sudo ln -s /<branch-name> ~/projects/
|
|
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
|
-
│ └──
|
|
148
|
-
└── projects/
|
|
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
|
-
**适用项目:
|
|
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 `~/
|
|
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 `~/
|
|
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
|