cicy-desktop 2.1.156 → 2.1.158
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
|
@@ -39,7 +39,13 @@ const PORT = Number(process.env.CICY_CODE_PORT || 8008);
|
|
|
39
39
|
// Desktop is missing the card installs it first (installer downloads to the
|
|
40
40
|
// user's Desktop). The whole cicy home is persisted to a named volume so the
|
|
41
41
|
// entire container state survives recreation (主人: "把整个 docker 挂出来").
|
|
42
|
-
|
|
42
|
+
// macOS is DOCKER-ONLY (主人指令: native 退役 — native 跑在宿主机无隔离会动用户数据).
|
|
43
|
+
// So on darwin the docker cicy-code IS the PRIMARY on :8008 (the slot the rest of the app
|
|
44
|
+
// already talks to; native no longer spawns there — see src/sidecar/cicy-code.js). The
|
|
45
|
+
// existing daemon/reconcile/ensureDockerTeam/appOpts machinery below just retargets to 8008
|
|
46
|
+
// — independent cloud team key, named-volume isolation, auto-start all come for free.
|
|
47
|
+
// win32 keeps the Docker-版 as an optional 2nd instance on :8009 alongside native :8008 (next).
|
|
48
|
+
const APP_PORT = Number(process.env.CICY_DOCKER_APP_PORT || (process.platform === "darwin" ? 8008 : 8009));
|
|
43
49
|
// container / volume 名都带上 port —— 一台机可以跑多个 docker(不同端口),各自
|
|
44
50
|
// 独立容器 + 独立 volume(数据隔离)+ 独立云端 team。docker-teams.json 也按 volume
|
|
45
51
|
// (含 port)区分。
|
package/src/sidecar/cicy-code.js
CHANGED
|
@@ -100,6 +100,14 @@ 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 daemon runs cicy-code directly
|
|
104
|
+
// on the host with full access to the user's real files — no isolation. On darwin we no
|
|
105
|
+
// longer spawn it; the docker cicy-code (Colima container, named-volume isolated) IS the
|
|
106
|
+
// primary on :8008, brought up + kept alive by the docker daemon in src/backends/
|
|
107
|
+
// sidecar-ipc.js (APP_PORT=8008 on darwin). probeExisting()/watchdog still work — they
|
|
108
|
+
// just observe the container's :8008. Returning null here = "no native child".
|
|
109
|
+
if (process.platform === "darwin") return null;
|
|
110
|
+
|
|
103
111
|
if (!force && await probeExisting(port)) {
|
|
104
112
|
console.log(`[cicy-code-sidecar] existing instance on :${port}, reusing`);
|
|
105
113
|
return null;
|