cicy-desktop 2.1.172 → 2.1.173

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.
@@ -53,18 +53,20 @@ jobs:
53
53
  EOF
54
54
  docker build -t cicy-wsl-base ctx
55
55
 
56
- - name: Pre-load cicy-code image into the rootfs
56
+ - name: Build WSL rootfs (Ubuntu + Docker, image NOT baked)
57
57
  run: |
58
+ # 主人: image NO LONGER baked into the rootfs. wsl-docker.bootstrap downloads +
59
+ # docker-loads cicy-code-latest.tar.gz at setup (像 mac/colima 那样) → WSL 也拿最新
60
+ # 烤制镜像,且镜像更新不必重下整个 rootfs(rootfs=Ubuntu+Docker 很少变,瘦了 ~169MB)。
58
61
  docker pull "${{ inputs.image }}"
62
+ # Still save the image so the SAME run republishes the macOS tarball (next step).
59
63
  docker save "${{ inputs.image }}" -o /tmp/cicy-image.tar
60
- # Run the base privileged, start an inner dockerd, load the image into
61
- # its /var/lib/docker (kept in the container fs, NOT a volume), then stop.
62
- cid=$(docker run -d --privileged -v /tmp/cicy-image.tar:/img.tar:ro cicy-wsl-base \
64
+ # Run the base privileged, start an inner dockerd ONCE then stop — purely to clear
65
+ # stale daemon runtime files so the FIRST dockerd in WSL2 starts clean. No image load.
66
+ cid=$(docker run -d --privileged cicy-wsl-base \
63
67
  bash -c '
64
68
  nohup dockerd >/var/log/dind.log 2>&1 &
65
69
  for i in $(seq 1 60); do docker info >/dev/null 2>&1 && break; sleep 1; done
66
- docker load -i /img.tar
67
- docker images
68
70
  pkill dockerd || true
69
71
  sleep 4
70
72
  # Drop stale daemon runtime files so the FIRST dockerd in WSL2 does
@@ -73,7 +75,7 @@ jobs:
73
75
  ')
74
76
  docker logs -f "$cid" || true
75
77
  rc=$(docker wait "$cid"); echo "inner exit=$rc"
76
- # Export the whole container filesystem (incl. /var/lib/docker) = the WSL rootfs.
78
+ # Export the container filesystem = the WSL rootfs (Ubuntu + Docker, no image).
77
79
  docker export "$cid" | gzip > cicy-wsl.tar.gz
78
80
  ls -lh cicy-wsl.tar.gz
79
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.172",
3
+ "version": "2.1.173",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -140,11 +140,11 @@
140
140
  "//optionalDependencies": "Runtime Bundle v1 (主人指令): platform binaries delivered by `npm i -g cicy-desktop` itself — npm installs only the current-platform subpackage (os/cpu pinned in each), so first start seeds the runtime store with ZERO network, ZERO npx. Windows packages are named *-windows-* (npm spam filter 403s new names containing win32). cicy-msys2 added once published.",
141
141
  "optionalDependencies": {
142
142
  "electron": "41.0.3",
143
- "cicy-code-darwin-x64": "2.3.20",
144
- "cicy-code-darwin-arm64": "2.3.20",
145
- "cicy-code-linux-x64": "2.3.20",
146
- "cicy-code-linux-arm64": "2.3.20",
147
- "cicy-code-windows-x64": "2.3.20",
143
+ "cicy-code-darwin-x64": "2.3.21",
144
+ "cicy-code-darwin-arm64": "2.3.21",
145
+ "cicy-code-linux-x64": "2.3.21",
146
+ "cicy-code-linux-arm64": "2.3.21",
147
+ "cicy-code-windows-x64": "2.3.21",
148
148
  "cicy-mihomo-darwin-x64": "1.10.4",
149
149
  "cicy-mihomo-darwin-arm64": "1.10.4",
150
150
  "cicy-mihomo-linux-x64": "1.10.4",
@@ -262,8 +262,12 @@ async function runContainer({ port = 8009, container = "cicy-code-docker-8009",
262
262
  .filter(([, v]) => v != null && v !== "")
263
263
  .map(([k, v]) => `-e ${k}='${String(v).replace(/'/g, "'\\''")}'`)
264
264
  .join(" ");
265
+ // 主人(A 方案): 映射 mihomo 的 per-Chrome-profile 监听口段(约定 20000+N)回主机回环。
266
+ // docker-only 后 mihomo 只在容器里,这些口不暴露则主机系统 Chrome 的代理 127.0.0.1:(20000+N)
267
+ // 连不上。默认 20001-20032(32 个 profile),CICY_CHROME_PROXY_PORTS 可调。
268
+ const CHROME_PROXY_PORTS = process.env.CICY_CHROME_PROXY_PORTS || "20001-20032";
265
269
  const cmd = `run -d --name ${container} --restart unless-stopped ${PLATFORM_FLAG} ` +
266
- `-p 127.0.0.1:${port}:8008 -e CICY_PUBLIC=1 -v ${volume}:/home/cicy ${shareMountArg()} ${envArgs} ${IMAGE}`;
270
+ `-p 127.0.0.1:${port}:8008 -p 127.0.0.1:${CHROME_PROXY_PORTS}:${CHROME_PROXY_PORTS} -e CICY_PUBLIC=1 -v ${volume}:/home/cicy ${shareMountArg()} ${envArgs} ${IMAGE}`;
267
271
  await dk(cmd, { timeout: 90000 });
268
272
  return { started: true };
269
273
  }
@@ -425,7 +425,10 @@ async function runContainer({ port = 8009, container = "cicy-code-docker", volum
425
425
  // bridge container → every lookup is EAI_AGAIN and cicy-code's startup `npm i`
426
426
  // crash-loops the container (:8009 never comes up). Pin public resolvers: Aliyun
427
427
  // 223.5.5.5 (CN-fast) first, Google 8.8.8.8 as the overseas fallback.
428
- const cmd = `docker run -d --name ${container} --restart unless-stopped --dns 223.5.5.5 --dns 8.8.8.8 -p 127.0.0.1:${port}:8008 -e CICY_PUBLIC=1 -v ${volume}:/home/cicy ${shareMountArg()} ${envArgs} ${IMAGE}`;
428
+ // 主人(A 方案): 映射 mihomo per-Chrome-profile 监听口段(约定 20000+N)回主机回环 —— docker-only
429
+ // 后这些口只在容器里,不暴露则主机系统 Chrome 的代理 127.0.0.1:(20000+N) 连不上. 默认 20001-20032.
430
+ const CHROME_PROXY_PORTS = process.env.CICY_CHROME_PROXY_PORTS || "20001-20032";
431
+ const cmd = `docker run -d --name ${container} --restart unless-stopped --dns 223.5.5.5 --dns 8.8.8.8 -p 127.0.0.1:${port}:8008 -p 127.0.0.1:${CHROME_PROXY_PORTS}:${CHROME_PROXY_PORTS} -e CICY_PUBLIC=1 -v ${volume}:/home/cicy ${shareMountArg()} ${envArgs} ${IMAGE}`;
429
432
  await wslRun(cmd, { timeout: 60000 });
430
433
  ensureDesktopShortcut(volume, port).catch(() => {});
431
434
  return { started: true };