cicy-desktop 2.1.156 → 2.1.157

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.156",
3
+ "version": "2.1.157",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -100,6 +100,23 @@ async function startFromRuntime({ logPath, port }) {
100
100
  async function start({ logPath, port = DEFAULT_PORT, force = false, version = null } = {}) {
101
101
  if (child && !force) return child;
102
102
 
103
+ // macOS: DOCKER-ONLY (主人指令: native 退役). The native sidecar runs cicy-code
104
+ // directly on the host → it can touch the user's real files with no isolation.
105
+ // The container persists everything in a named docker volume instead, so user
106
+ // data is isolated. Delegate to the docker sidecar: it adopts a healthy :8008,
107
+ // else runs the cicy-code image with -p ${port}:8008 (Docker Desktop / colima
108
+ // auto-forward -p to the Mac's localhost, so no --network host needed). Returns
109
+ // null when docker isn't up yet → the homepage docker card guides the user.
110
+ if (process.platform === "darwin") {
111
+ try {
112
+ const docker = require("./docker");
113
+ const r = await docker.start({ port });
114
+ if (r) console.log(`[cicy-code-sidecar] docker cicy-code on :${port} (${r.adopted ? "adopted" : r.id || "started"})`);
115
+ else console.warn("[cicy-code-sidecar] docker not ready — homepage docker card will guide install");
116
+ } catch (e) { console.warn(`[cicy-code-sidecar] docker start failed: ${e.message}`); }
117
+ return null; // no native child on mac
118
+ }
119
+
103
120
  if (!force && await probeExisting(port)) {
104
121
  console.log(`[cicy-code-sidecar] existing instance on :${port}, reusing`);
105
122
  return null;