cicy-desktop 2.1.342 → 2.1.357

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 (48) hide show
  1. package/package.json +1 -1
  2. package/scripts/build-homepage.cjs +16 -1
  3. package/src/app-updater.js +6 -0
  4. package/src/backends/homepage-preload.js +3 -1
  5. package/src/backends/homepage-react/assets/index-Buyk0RlW.js +655 -0
  6. package/src/backends/homepage-react/assets/index-CVk0uc2g.css +1 -0
  7. package/src/backends/homepage-react/index.html +5 -3
  8. package/src/backends/homepage-react/panel/facebook-matrix.html +305 -87
  9. package/src/backends/homepage-react/panel/ipcheck.html +112 -0
  10. package/src/backends/homepage-react/panel/matrix.html +595 -0
  11. package/src/backends/homepage-react/panel/telegram-matrix.html +96 -22
  12. package/src/backends/homepage-react/panel/tiktok-matrix.html +599 -0
  13. package/src/backends/hub-client.js +108 -2
  14. package/src/backends/sidecar-ipc.js +33 -6
  15. package/src/main.js +67 -11
  16. package/src/sidecar/host-mihomo.js +47 -2
  17. package/src/tabbrowser/facebook-identity.js +12 -1
  18. package/src/tabbrowser/facebook-matrix.html +305 -87
  19. package/src/tabbrowser/fb-login.js +115 -0
  20. package/src/tabbrowser/newtab-protocol.js +6 -1
  21. package/src/tabbrowser/panel-cells.js +9 -1
  22. package/src/tabbrowser/telegram-matrix.html +96 -22
  23. package/src/tabbrowser/telegram-web-preferences.js +5 -1
  24. package/src/tabbrowser/tiktok-matrix.html +305 -87
  25. package/src/tools/tab-browser-tools.js +21 -100
  26. package/src/tray.js +22 -0
  27. package/test/bootstrap-failure-reporting.test.js +1 -1
  28. package/test/facebook-identity.test.js +3 -1
  29. package/test/facebook-matrix.test.js +2 -1
  30. package/test/telegram-matrix.test.js +2 -2
  31. package/test/tiktok-matrix.test.js +2 -1
  32. package/tools/arm-fblogin.js +32 -0
  33. package/tools/wsd-ws +114 -0
  34. package/workers/render/index.html +3 -1
  35. package/workers/render/package.json +2 -3
  36. package/workers/render/public/panel/facebook-matrix.html +305 -87
  37. package/workers/render/public/panel/ipcheck.html +112 -0
  38. package/workers/render/public/panel/matrix.html +595 -0
  39. package/workers/render/public/panel/telegram-matrix.html +96 -22
  40. package/workers/render/public/panel/tiktok-matrix.html +599 -0
  41. package/workers/render/src/App.css +4 -0
  42. package/workers/render/src/App.jsx +917 -52
  43. package/workers/render/stamp-panel-version.mjs +16 -0
  44. package/workers/render/worker.js +1 -1
  45. package/src/backends/homepage-react/assets/index-C6Zrdgc0.css +0 -1
  46. package/src/backends/homepage-react/assets/index-OG6JB73F.js +0 -411
  47. package/src/tabbrowser/cicy-code-tab-restore.js +0 -10
  48. package/test/cicy-code-tab-restore.test.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.342",
3
+ "version": "2.1.357",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -39,6 +39,7 @@ const PANEL_PAGES = [
39
39
  "telegram-matrix.html",
40
40
  "redroid-matrix.html",
41
41
  "facebook-matrix.html",
42
+ "tiktok-matrix.html",
42
43
  "split-panel.html",
43
44
  ];
44
45
  fs.rmSync(PANEL_OUT, { recursive: true, force: true });
@@ -46,7 +47,21 @@ fs.mkdirSync(PANEL_OUT, { recursive: true });
46
47
  for (const page of PANEL_PAGES) {
47
48
  fs.copyFileSync(path.join(PANEL_SRC, page), path.join(PANEL_OUT, page));
48
49
  }
49
- console.log(`[build-homepage] panel pages synced: ${PANEL_PAGES.join(", ")}`);
50
+ // 兼容已发布的 v2.1.355:那一版把三个矩阵 preset 全解析成 preset=matrix,
51
+ // 而面板 tab 的地址就是 `/panel/<preset>`,所以它只会去请求 /panel/matrix。
52
+ // 合并页已被 f5b6e3a 回退删掉,这个地址要是不存在,机器上「矩阵」菜单点开
53
+ // 拿到的是 SPA 首页 —— 全队面板直接点空(实测 2026-09-11)。
54
+ // 在下一个版本铺开之前,这里放一份 Telegram 矩阵页顶上,菜单行为和回退前一致。
55
+ // 等车队都升到含 f5b6e3a 的版本后,这段可以删。
56
+ fs.copyFileSync(path.join(PANEL_SRC, "telegram-matrix.html"), path.join(PANEL_OUT, "matrix.html"));
57
+ // ipcheck.html 只在 homepage-react/panel 下手工维护(src/tabbrowser 里没有),
58
+ // 但上面 rmSync 会把整个 PANEL_OUT 清空 —— 不显式保住它,每次构建都会被删,
59
+ // 格子头那个 🌐 按钮点开就是 SPA 首页(实测 2026-09-11)。
60
+ {
61
+ const extra = path.join(__dirname, "..", "src", "backends", "homepage-react", "panel", "ipcheck.html");
62
+ if (fs.existsSync(extra)) fs.copyFileSync(extra, path.join(PANEL_OUT, "ipcheck.html"));
63
+ }
64
+ console.log(`[build-homepage] panel pages synced: ${PANEL_PAGES.join(", ")} (+ matrix.html 兼容 v2.1.355)`);
50
65
 
51
66
  // 1) build the SPA from source (install deps on a cold runner)
52
67
  if (!fs.existsSync(path.join(RENDER, "node_modules"))) {
@@ -404,6 +404,12 @@ function installWindows(installer) {
404
404
  const dir = path.join(process.env.LOCALAPPDATA || os.homedir(), "cicy-desktop");
405
405
  fs.mkdirSync(dir, { recursive: true });
406
406
  const vbs = path.join(dir, "update-install.vbs");
407
+ // Stand the 1-min watchdog DOWN for the install window: it would otherwise see
408
+ // the app gone (installer closed it), relaunch it, lock the exe, fail the
409
+ // replace, and leave the version unchanged — the exact loop that made a node
410
+ // "总被关". The watchdog skips its relaunch while this flag is < 180s old;
411
+ // mtime-expiry is the fail-safe so a crashed install can't wedge it forever.
412
+ try { fs.writeFileSync(path.join(dir, "updating.flag"), String(Date.now())); } catch { /* best effort */ }
407
413
  // VBS escapes a double quote by doubling it. cmd waits for the installer (no
408
414
  // `start` on that leg), then the pause lets Windows release the replaced
409
415
  // files before the new exe runs hidden.
@@ -331,7 +331,9 @@ contextBridge.exposeInMainWorld("cicy", {
331
331
  loginCode: (code) => logInvoke("hub:login-code", code),
332
332
  cancel: () => logInvoke("hub:cancel"),
333
333
  instances: () => logInvoke("hub:instances"),
334
- open: (id, title, port) => logInvoke("hub:open", { id, title, port }),
334
+ // `next` = a path (+ hash route) inside the node's UI, e.g. "/#/project/x".
335
+ open: (id, title, port, next) => logInvoke("hub:open", { id, title, port, next }),
336
+ projects: (id) => logInvoke("hub:projects", { id }),
335
337
  logout: () => logInvoke("hub:logout"),
336
338
  onComplete: (cb) => {
337
339
  const handler = (_e, payload) => cb(payload);