cicy-desktop 2.1.302 → 2.1.303

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.302",
3
+ "version": "2.1.303",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -144,10 +144,10 @@
144
144
  "//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 着无害。",
145
145
  "optionalDependencies": {
146
146
  "electron": "41.0.3",
147
- "cicy-code-darwin-x64": "2.3.570",
148
- "cicy-code-darwin-arm64": "2.3.570",
149
- "cicy-code-linux-x64": "2.3.570",
150
- "cicy-code-linux-arm64": "2.3.570",
147
+ "cicy-code-darwin-x64": "2.3.574",
148
+ "cicy-code-darwin-arm64": "2.3.574",
149
+ "cicy-code-linux-x64": "2.3.574",
150
+ "cicy-code-linux-arm64": "2.3.574",
151
151
  "cicy-code-windows-x64": "2.3.193",
152
152
  "cicy-mihomo-darwin-x64": "1.10.4",
153
153
  "cicy-mihomo-darwin-arm64": "1.10.4",
@@ -640,9 +640,12 @@ async function wslMissing() {
640
640
  // wsl.exe 不存在(ENOENT):功能刚启用但还没重启 Windows 时就是这样 —— 按「缺失」处理,
641
641
  // 让 ensureWsl 走 needsReboot,而不是当成已就绪去 --import 然后 spawn ENOENT。
642
642
  if (err && (err.code === "ENOENT" || /ENOENT/.test(err.message || ""))) return resolve(true);
643
- // 旧版内置 wsl.exe 存根:任何子命令都只打印用法帮助("wsl.exe [Argument]" / "--install")。
644
- // 功能刚启用还没重启时就是这个状态 按缺失处理(ensureWsl needsReboot)。
645
- if (/未安装|not installed|--install|\[Argument\]|\[参数\]/i.test(s)) return resolve(true);
643
+ // 用法帮助有两种来源:(a) 功能刚启用还没重启的存根 wsl.exe —— 任何子命令都只打印帮助;
644
+ // (b) 老版 Win10(19042 等)的内置 wsl.exe 根本不认识 `--status`,也打印帮助,但 WSL 本身
645
+ // 完全可用。只看帮助文本区分不了 再用 `wsl -l -v` 功能探测:能列出/说"没有发行版"就是可用。
646
+ if (/未安装|not installed|--install|\[Argument\]|\[参数\]/i.test(s)) {
647
+ return wslFunctional().then((ok) => resolve(!ok));
648
+ }
646
649
  if (err && (err.killed || err.signal || err.code === "ETIMEDOUT")) return resolve(null); // timed out → unknown
647
650
  resolve(false); // wsl present (errored for another reason → assume OK)
648
651
  });
@@ -107,3 +107,9 @@ test("broken WSL localhost relay (healthy inside, unreachable from Windows) is r
107
107
  assert.match(ipc, /_relayMisses >= 2 && !_relayResetDone/);
108
108
  assert.match(ipc, /docker:self-heal-localhost-relay/);
109
109
  });
110
+
111
+ test("wsl --status printing usage (old inbox wsl.exe) is not 'missing' when wsl -l works", () => {
112
+ const d = read("src/sidecar/docker.js");
113
+ const i = d.indexOf("async function wslMissing()");
114
+ assert.match(d.slice(i, i + 2000), /return wslFunctional\(\)\.then\(\(ok\) => resolve\(!ok\)\);/);
115
+ });