Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix: 明确提示 macOS 远程 Host 安装包尚未提供

geng yueeb5850d53b99
diff --git a/apps/desktop/src/lib/remote-host-errors.ts b/apps/desktop/src/lib/remote-host-errors.ts
index 7616e3aa8..aaf50e232 100644
--- a/apps/desktop/src/lib/remote-host-errors.ts
+++ b/apps/desktop/src/lib/remote-host-errors.ts
@@ -8,7 +8,14 @@ export function remoteHostErrorKey(error: unknown): string {
case "REMOTE_PATH_NOT_FOUND": return "remote:pathUnavailable";
case "REMOTE_PATH_FORBIDDEN": return "remote:pathForbidden";
case "HOST_VERSION_MISMATCH": return "remote:upgradeRequired";
- case "HOST_BOOTSTRAP_FAILED": return "remote:hostBootstrapFailed";
+ case "HOST_BOOTSTRAP_FAILED": {
+ const details = error && typeof error === "object" && "details" in error ? error.details : undefined;
+ if (details && typeof details === "object" && "target" in details &&
+ (details.target === "darwin-x64" || details.target === "darwin-arm64")) {
+ return "remote:hostPlatformUnsupported";
+ }
+ return "remote:hostBootstrapFailed";
+ }
case "HOST_AUTH_FAILED":
case "SSH_AUTH_FAILED":
case "TOKEN_INVALID":
diff --git a/apps/desktop/src/locales/remote.ts b/apps/desktop/src/locales/remote.ts
index 1ac341dbd..047780b8b 100644
--- a/apps/desktop/src/locales/remote.ts
+++ b/apps/desktop/src/locales/remote.ts
@@ -18,6 +18,7 @@ export const remoteEn = {
authenticationRequired: "Authentication failed. Check SSH access or pair the Host again.",
connectionUnavailable: "The remote Host is unavailable. Check the connection and try again.",
hostBootstrapFailed: "Installing or starting the remote Host over SSH failed. Check connectivity, credentials, and that the remote machine meets the Host's requirements, then try again.",
+ hostPlatformUnsupported: "Remote Host bundles are currently available for Linux x64 and arm64 only. macOS remote Hosts are not supported by this release.",
operationFailed: "The remote operation failed. Check the Host connection and try again.",
mutationUncertain: "The connection was interrupted; the remote change may have completed. Check the files before retrying.",
empty: "No remote conversations yet.",
@@ -74,6 +75,7 @@ export const remoteZh: typeof remoteEn = {
authenticationRequired: "认证失败,请检查 SSH 登录或重新配对主机。",
connectionUnavailable: "远程主机不可用,请检查连接后重试。",
hostBootstrapFailed: "通过 SSH 安装或启动远程 Host 失败,请检查网络连通性、登录凭据以及远程机器是否满足 Host 的运行要求后重试。",
+ hostPlatformUnsupported: "当前版本只提供 Linux x64 和 arm64 远程 Host 安装包,尚不支持 macOS 远程 Host。",
operationFailed: "远程操作失败,请检查主机连接后重试。",
mutationUncertain: "连接已中断,远程修改可能已完成。请先检查文件,不要直接重试。",
empty: "暂无远程会话。", project: "远程项目", selectProject: "选择远程项目",
diff --git a/apps/desktop/test/remote-host-errors.test.mjs b/apps/desktop/test/remote-host-errors.test.mjs
index 729cb18b9..b2e1b662a 100644
--- a/apps/desktop/test/remote-host-errors.test.mjs
+++ b/apps/desktop/test/remote-host-errors.test.mjs
@@ -21,6 +21,17 @@ test("remoteHostErrorKey falls back to the generic message for an unmapped code"
assert.equal(remoteHostErrorKey(error), "remote:operationFailed");
});
+test("only an explicit unpublished macOS target gets the platform explanation", () => {
+ for (const target of ["darwin-x64", "darwin-arm64"]) {
+ assert.equal(remoteHostErrorKey({ code: "HOST_BOOTSTRAP_FAILED", details: { target } }), "remote:hostPlatformUnsupported");
+ }
+ for (const target of ["linux-x64", "unknown", null]) {
+ assert.equal(remoteHostErrorKey({ code: "HOST_BOOTSTRAP_FAILED", details: { target } }), "remote:hostBootstrapFailed");
+ }
+ assert.match(remoteEn.hostPlatformUnsupported, /Linux/);
+ assert.match(remoteZh.hostPlatformUnsupported, /macOS/);
+});
+
test("hostBootstrapFailed has an English and Chinese translation distinct from the generic fallback", () => {
assert.equal(typeof remoteEn.hostBootstrapFailed, "string");
assert.equal(typeof remoteZh.hostBootstrapFailed, "string");
diff --git a/apps/desktop/test/remote-host-ssh-bootstrap.test.mjs b/apps/desktop/test/remote-host-ssh-bootstrap.test.mjs
index 649866b46..0f34d868b 100644
--- a/apps/desktop/test/remote-host-ssh-bootstrap.test.mjs
+++ b/apps/desktop/test/remote-host-ssh-bootstrap.test.mjs
@@ -179,6 +179,8 @@ test("an unpublished target fails without downloading anything", async () => {
const error = await catchError(() => bootstrap.bootstrap(request()));
assert.equal(error.errorCode, "HOST_BOOTSTRAP_FAILED");
assert.equal(error.target, "darwin-x64");
+ const { remoteHostErrorKey } = await import("../src/lib/remote-host-errors.ts");
+ assert.equal(remoteHostErrorKey({ code: error.errorCode, details: { target: error.target } }), "remote:hostPlatformUnsupported");
assert.deepEqual(fetched, [], "no checksum request for a bundle that does not exist");
assert.deepEqual(transport.calls.uploads, []);
});
diff --git a/docs/spec/02-architecture/05-remote-agent-control.md b/docs/spec/02-architecture/05-remote-agent-control.md
index ea4e58f0c..25ae350e0 100644
--- a/docs/spec/02-architecture/05-remote-agent-control.md
+++ b/docs/spec/02-architecture/05-remote-agent-control.md
@@ -593,3 +593,7 @@ fix the Gateway identity source to the PI account service.
D385 (2026-09-10) made remote control user-local by construction: no
project-operated identity or account service, Host-issued device credentials
everywhere, and a Gateway only as a self-hosted relay.
+
+### Unpublished SSH target feedback (#1707)
+
+When SSH uname identifies an unpublished macOS target, the bootstrap refuses before downloading and Settings explains that this release publishes Linux x64/arm64 Host bundles only. Other install/authentication failures retain their own messages. Desktop macOS packaging is separate from remote Host support.
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 12473a3dc..28bd535a6 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -20399,3 +20399,7 @@ While a checkpoint estimate supplies context occupancy, use its recorded provide
- Specs: `03-runtime/02-agent-runtime.md`, Session job controls.
- Acceptance: wait, report re-read and running-delegate cancellation complete
through the real tool loop. Milestone: maintenance. Status: automated.
+
+#### E2E-ISSUE-1707
+
+Use synthetic Darwin x64/arm64 uname responses through production SSH bootstrap, serialize its code/details as IPC does, and resolve the renderer error. The platform explanation appears, no checksum or upload occurs. Linux and other bootstrap failures keep existing messages. Coverage: remote-host-ssh-bootstrap.test.mjs and remote-host-errors.test.mjs.
diff --git a/docs/zh-CN/spec/02-architecture/05-remote-agent-control.md b/docs/zh-CN/spec/02-architecture/05-remote-agent-control.md
index 9b6c6b9f9..f1ba695bb 100644
--- a/docs/zh-CN/spec/02-architecture/05-remote-agent-control.md
+++ b/docs/zh-CN/spec/02-architecture/05-remote-agent-control.md
@@ -191,3 +191,7 @@ D375)。SSH 隧道里程碑再加两件东西而不改线上契约:`pi-host`
所有已发布绑定的一致性测试必须通过;无头模块的测试不依赖 Electron。
详见英文源规格中的完整组件归属、迁移边界和验收条款。
+
+### SSH 未发布平台提示(#1707)
+
+探测到未提供安装包的 macOS 目标时,下载前拒绝,设置明确显示当前仅发布 Linux x64/arm64 远程 Host。其他安装和认证失败保留各自提示,桌面 macOS 包不等于远程 Host 支持。
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 918e091b6..8aa688af3 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -10420,3 +10420,7 @@ Electron 一侧——工具自动签发、指示器、"停止"中止轮次、绘
#### E2E-ISSUE-2164
压缩估算作为占用时使用检查点模型容量,旧检查点使用当前会话完整绑定;历史请求用量不变,未知容量标记估算。验证 20,619 / 1,000,000 为 2%、未知路由、旧记录及新请求恢复。
+
+#### E2E-ISSUE-1707
+
+生产 SSH 引导使用合成 Darwin 目标,按 IPC 形态传递错误并解析界面提示:显示 Linux 安装包范围,不下载或上传。Linux 及其他安装失败提示保持原行为。