cicy-desktop 2.1.216 → 2.1.217

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.216",
3
+ "version": "2.1.217",
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": "(2026-06 回调): mac/linux 改回 native cicy-code(:8008,colima 在 16G mac 上压垮内存)→ 重新内置 cicy-code-<plat> / cicy-mihomo-<plat>,localbin.fromBundle 零网络 seed(npm 仅作更新通道,带 npmmirror→npmjs 回退)。这些由 scripts/sync-runtime-deps.cjs 在 tag-push 时同步到最新版。npm 的 os/cpu 字段保证每个平台只装自己那份。Windows 仍走 docker(WSL :8009),它那份 cicy-code-windows 用不到但 bundle 着无害。",
141
141
  "optionalDependencies": {
142
142
  "electron": "41.0.3",
143
- "cicy-code-darwin-x64": "2.3.98",
144
- "cicy-code-darwin-arm64": "2.3.98",
145
- "cicy-code-linux-x64": "2.3.98",
146
- "cicy-code-linux-arm64": "2.3.98",
147
- "cicy-code-windows-x64": "2.3.98",
143
+ "cicy-code-darwin-x64": "2.3.135",
144
+ "cicy-code-darwin-arm64": "2.3.135",
145
+ "cicy-code-linux-x64": "2.3.135",
146
+ "cicy-code-linux-arm64": "2.3.135",
147
+ "cicy-code-windows-x64": "2.3.135",
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",
@@ -177,7 +177,14 @@ function register({ sidecarLogPath } = {}) {
177
177
  return _dockerStatusCache;
178
178
  }
179
179
  function startDockerStatusDaemon() {
180
- if (!APP_DOCKER_SUPPORTED) return; // mac/linux: native cicy-code,不跑 docker reconcile(否则 colima 反复重试)
180
+ if (!APP_DOCKER_SUPPORTED) {
181
+ // mac/linux: native cicy-code, no docker reconcile. But macOS builds
182
+ // upgraded from the old Colima era still carry a login LaunchAgent that
183
+ // boots an unused `cicy-code` VM every login → tear that leftover down
184
+ // once (no-op when the plist doesn't exist, i.e. fresh/native installs).
185
+ if (process.platform === "darwin") colimaDocker.removeAutostart().catch(() => {});
186
+ return;
187
+ }
181
188
  setTimeout(() => { reconcileDocker().catch(() => {}); }, 2000); // shortly after startup
182
189
  setInterval(() => { reconcileDocker().catch(() => {}); }, 60000); // keep fresh + self-heal
183
190
  }
@@ -415,6 +415,25 @@ async function ensureAutostart() {
415
415
  } catch {}
416
416
  }
417
417
 
418
+ // Undo ensureAutostart. macOS moved from Colima to native cicy-code (colima
419
+ // crushed memory on 16G Macs), but builds upgraded from the old Colima era still
420
+ // carry the login LaunchAgent, which starts an unused `cicy-code` VM every boot.
421
+ // Called once on darwin startup to tear that leftover down. Gated on the plist
422
+ // actually existing so fresh/native-only installs never invoke colima at all.
423
+ async function removeAutostart() {
424
+ if (process.platform !== "darwin") return;
425
+ try {
426
+ const label = `com.cicy.colima.${PROFILE}`;
427
+ const plist = path.join(os.homedir(), "Library", "LaunchAgents", `${label}.plist`);
428
+ if (!fs.existsSync(plist)) return; // no leftover → don't touch colima
429
+ try { await sh(`launchctl unload ${JSON.stringify(plist)} 2>/dev/null; true`, { timeout: 15000 }); } catch {}
430
+ try { fs.rmSync(plist, { force: true }); } catch {}
431
+ // Stop ONLY our profile's VM (never the user's default colima). Keep the VM
432
+ // image (no delete) so a rollback to a Colima build can restart it.
433
+ try { await sh(`export PATH=${BREW_PATHS}:$PATH; colima stop -p ${PROFILE} 2>/dev/null; true`, { timeout: 60000 }); } catch {}
434
+ } catch {}
435
+ }
436
+
418
437
  // 桌面文件入口:Mac 上 /home/cicy 是 docker named volume(数据在 Colima VM 内,
419
438
  // 不在 Mac 文件系统上),Finder 没法像 WSL 的 \\wsl$ 那样直接浏览。所以 Mac 端
420
439
  // 暂不放桌面快捷方式(放了也是死链)。要看文件用 `colima ssh -p cicy-code` 进 VM,
@@ -601,5 +620,5 @@ async function readMihomoConfig(container = "cicy-code-docker-8008") {
601
620
  module.exports = {
602
621
  bootstrap, status, restart, stop, dockerRestart, recreate, update, upgrade, runContainer, readContainerToken,
603
622
  vmExists, colimaInstalled, dockerCliInstalled, engineUp, imagePresent, probeHealth, hasGatewayKey, authorizeHostSsh,
604
- readMihomoConfig,
623
+ readMihomoConfig, removeAutostart,
605
624
  };