cicy-desktop 2.1.159 → 2.1.160
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 +1 -1
- package/src/backends/sidecar-ipc.js +2 -4
- package/src/main.js +3 -5
- package/src/sidecar/cicy-code.js +3 -7
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ const PORT = Number(process.env.CICY_CODE_PORT || 8008);
|
|
|
45
45
|
// existing daemon/reconcile/ensureDockerTeam/appOpts machinery below just retargets to 8008
|
|
46
46
|
// — independent cloud team key, named-volume isolation, auto-start all come for free.
|
|
47
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 ||
|
|
48
|
+
const APP_PORT = Number(process.env.CICY_DOCKER_APP_PORT || 8008); // native 退役:原 :8009 Docker-版就是唯一的 :8008 cicy-code
|
|
49
49
|
// container / volume 名都带上 port —— 一台机可以跑多个 docker(不同端口),各自
|
|
50
50
|
// 独立容器 + 独立 volume(数据隔离)+ 独立云端 team。docker-teams.json 也按 volume
|
|
51
51
|
// (含 port)区分。
|
|
@@ -83,9 +83,7 @@ const DOCKER_TEAMS_FILE = path.join(os.homedir(), "cicy-ai", "db", "docker-teams
|
|
|
83
83
|
function readDockerTeams() { try { return JSON.parse(fs.readFileSync(DOCKER_TEAMS_FILE, "utf8")) || {}; } catch { return {}; } }
|
|
84
84
|
function writeDockerTeams(obj) { try { fs.mkdirSync(path.dirname(DOCKER_TEAMS_FILE), { recursive: true }); fs.writeFileSync(DOCKER_TEAMS_FILE, JSON.stringify(obj, null, 2)); } catch {} }
|
|
85
85
|
let dockerTeamReg = null; // { teamId, title, apiKey } — 缓存,appOpts 读它
|
|
86
|
-
|
|
87
|
-
// 「Docker 团队」(那是第二实例 :8009 用的)。docker-only 下它是唯一/主团队。
|
|
88
|
-
const APP_TEAM_TITLE = (APP_PORT === PORT) ? "本地团队" : "Docker 团队";
|
|
86
|
+
const APP_TEAM_TITLE = "本地团队"; // 只有一个 cicy-code(:8008)= 本地团队
|
|
89
87
|
|
|
90
88
|
// 确保这个 docker(按 volume)有独立云端 team;返回 { teamId, title, apiKey } 或 null。
|
|
91
89
|
async function ensureDockerTeam() {
|
package/src/main.js
CHANGED
|
@@ -817,11 +817,9 @@ X-GNOME-Autostart-enabled=true
|
|
|
817
817
|
let _sidecarWatchdogTimer = null;
|
|
818
818
|
function startSidecarWatchdog({ intervalMs = 30_000 } = {}) {
|
|
819
819
|
if (_sidecarWatchdogTimer) return;
|
|
820
|
-
//
|
|
821
|
-
//
|
|
822
|
-
|
|
823
|
-
// would just spam "sidecar unreachable → restart" every tick. Skip it entirely on darwin.
|
|
824
|
-
if (process.platform === "darwin") return;
|
|
820
|
+
// 主人: native 退役,全平台只有 docker。:8008 由 docker daemon(sidecar-ipc reconcile)
|
|
821
|
+
// + 容器 --restart 保活,没有 native 要 watchdog 去检查/重启。直接不跑。
|
|
822
|
+
return;
|
|
825
823
|
let consecutiveFailures = 0;
|
|
826
824
|
let restartInFlight = false;
|
|
827
825
|
|
package/src/sidecar/cicy-code.js
CHANGED
|
@@ -100,13 +100,9 @@ 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
|
-
//
|
|
104
|
-
//
|
|
105
|
-
|
|
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;
|
|
103
|
+
// 主人: native 退役,全平台 docker-only。cicy-code 只在 docker 容器里跑(:8008,命名卷
|
|
104
|
+
// 隔离,sidecar-ipc 的 docker daemon 负责拉起 + 保活)。这里不再起任何 native。
|
|
105
|
+
return null;
|
|
110
106
|
|
|
111
107
|
if (!force && await probeExisting(port)) {
|
|
112
108
|
console.log(`[cicy-code-sidecar] existing instance on :${port}, reusing`);
|