Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(config-sync): expose Cloud sync to every user
vastsae777e7cacfcf
diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.tsindex a2363c088..87b34295a 100644--- a/apps/desktop/src/lib/settings-search.ts+++ b/apps/desktop/src/lib/settings-search.ts@@ -282,8 +282,6 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [labelKey: "settings.nav.sync",titleKey: "settings.configSync.title",group: "system",- developerOnly: true,- developmentOnly: true,experimentalBadgeKey: "settings.configSync.experimental",keywordKeys: ["settings.configSync.connectionTitle",diff --git a/apps/desktop/test/settings-developer-only-destinations.test.mjs b/apps/desktop/test/settings-developer-only-destinations.test.mjsindex 400a2af15..defd8d084 100644--- a/apps/desktop/test/settings-developer-only-destinations.test.mjs+++ b/apps/desktop/test/settings-developer-only-destinations.test.mjs@@ -1,7 +1,9 @@/**- * Experimental settings destinations are retained in development builds but- * omitted from packaged builds. Navigation, search, and stale-page handling- * must all honor the same build visibility.+ * Developer-only settings destinations are retained in development builds+ * but omitted from packaged builds. Cloud sync is a public Experimental+ * destination: it is visible in every build without developer mode.+ * Navigation, search, and stale-page handling must all honor the same+ * visibility rules.*/import assert from "node:assert/strict";import { readFileSync } from "node:fs";@@ -43,7 +45,7 @@ const settingsPrimitives = readFileSync();const identity = (key) => key;-const experimentalIds = ["sync", "remoteHosts"];+const developerOnlyIds = ["remoteHosts"];test("Live Voice is reachable in every build without developer mode", () => {for (const developerMode of [false, true]) {@@ -72,57 +74,95 @@ test("Live Voice is reachable in every build without developer mode", () => {);});-test("developer mode retains the experimental destinations in development", () => {+test("Cloud sync is reachable in every build without developer mode", () => {+ for (const developerMode of [false, true]) {+ for (const includeDevelopmentOnly of [false, true]) {+ assert.ok(visibleSettingsNav(developerMode, includeDevelopmentOnly)+ .some((entry) => entry.id === "sync"));+ assert.equal(isSettingsDestinationHidden("sync", developerMode, includeDevelopmentOnly), false);+ for (const query of [+ "configSync.connectionTitle",+ "configSync.endpoint",+ "configSync.syncNow",+ ]) {+ assert.ok(searchSettings(query, identity, { developerMode, includeDevelopmentOnly })+ .some((hit) => hit.tab === "sync"));+ }+ }+ }+ // Cloud sync is public but still Experimental: the rail row and page title+ // keep the badge, and no developer or build gate remains.+ const sync = SETTINGS_NAV.find((entry) => entry.id === "sync");+ assert.equal(sync?.developerOnly, undefined);+ assert.equal(sync?.developmentOnly, undefined);+ assert.equal(sync?.experimentalBadgeKey, "settings.configSync.experimental");+});++test("developer mode retains the developer-only destinations in development", () => {const off = visibleSettingsNav(false).map((entry) => entry.id);const on = visibleSettingsNav(true).map((entry) => entry.id);- for (const id of experimentalIds) {+ for (const id of developerOnlyIds) {assert.equal(off.includes(id), false);assert.equal(on.includes(id), true);}- assert.deepEqual(off, on.filter((id) => !experimentalIds.includes(id)));+ assert.deepEqual(off, on.filter((id) => !developerOnlyIds.includes(id)));assert.deepEqual(SETTINGS_NAV.filter((entry) => entry.developerOnly === true).map((entry) => entry.id),- experimentalIds,+ developerOnlyIds,);assert.ok(SETTINGS_NAV.filter((entry) => entry.developerOnly === true).every((entry) => entry.experimentalBadgeKey),);+ assert.equal(off.includes("sync"), true);});-test("packaged builds still hide cloud sync and remote hosts", () => {+test("packaged builds still hide the developer-only remote hosts", () => {const packaged = visibleSettingsNav(true, false).map((entry) => entry.id);- for (const id of experimentalIds) {+ for (const id of developerOnlyIds) {assert.equal(packaged.includes(id), false);assert.equal(isSettingsDestinationHidden(id, true, false), true);}+ assert.equal(packaged.includes("sync"), true);+ assert.equal(isSettingsDestinationHidden("sync", true, false), false);+ assert.equal(isSettingsDestinationHidden("sync", false, false), false);assert.equal(isSettingsDestinationHidden("general", true, false), false);});test("settings search mirrors developer and packaged visibility", () => {- assert.deepEqual(- searchSettings("configSync.connectionTitle", identity, { developerMode: false }),- [],- );- assert.ok(- searchSettings("configSync.connectionTitle", identity, { developerMode: true })- .some((hit) => hit.tab === "sync"),- );-- for (const query of ["configSync.connectionTitle", "remotehosts"]) {+ for (const options of [+ { developerMode: false },+ { developerMode: true },+ { developerMode: false, includeDevelopmentOnly: false },+ { developerMode: true, includeDevelopmentOnly: false },+ ]) {assert.ok(- searchSettings(query, identity, { developerMode: true })- .some((hit) => experimentalIds.includes(hit.tab)),+ searchSettings("configSync.connectionTitle", identity, options)+ .some((hit) => hit.tab === "sync"),);- assert.deepEqual(- searchSettings(query, identity, {- developerMode: true,- includeDevelopmentOnly: false,- }),- [],+ }++ for (const options of [+ { developerMode: false },+ { developerMode: false, includeDevelopmentOnly: false },+ ]) {+ assert.ok(+ searchSettings("remotehosts", identity, options)+ .every((hit) => hit.tab !== "remoteHosts"),);}+ assert.ok(+ searchSettings("remotehosts", identity, { developerMode: true })+ .some((hit) => hit.tab === "remoteHosts"),+ );+ assert.deepEqual(+ searchSettings("remotehosts", identity, {+ developerMode: true,+ includeDevelopmentOnly: false,+ }),+ [],+ );assert.equal(searchSettings("settings", identity, { limit: 2 }).length, 2);});diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.mdindex 85cdba3af..b07027f23 100644--- a/docs/spec/04-ux/06-settings-ia.md+++ b/docs/spec/04-ux/06-settings-ia.md@@ -55,7 +55,7 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (8. **Subagents / 子智能体** — Lucide `Bot` (built-in and personal parallel agents)9. **Import / 导入** — Lucide `Download` (bring sessions and model configuration in from other tools)10. **Projects / 项目** — Lucide `Archive` (durable project index)- 11. **Cloud sync / 云同步** — Lucide `CloudDownload` (encrypted portable configuration backup and bidirectional sync; developer mode only)+ 11. **Cloud sync / 云同步** — Lucide `CloudDownload` (encrypted portable configuration backup and bidirectional sync)12. **Remote Hosts / 远程主机** — Lucide `Globe` (SSH bootstrap and pairing inventory; developer mode only)13. **Info / 信息** — Lucide `Info` (versions, logs, updates, developer)Icons are decorative (`aria-hidden` via the SVG default) and stay monochrome@@ -65,7 +65,7 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (`Preferences` / `偏好` (General, AI, Shortcuts), `Agent` / `智能体`(Instructions, Models, Skills, MCP, Subagents), `Workspace` / `工作区`(Import, Projects), and `System` / `系统` (Cloud sync, Remote Hosts, Info;- Cloud sync and Remote Hosts are developer-only). Headings are+ Remote Hosts is developer-only). Headings aremuted, non-interactive labels and use whitespace for separation; no dividerlines are rendered. These are visual landmarks only, not a second navigationlevel.@@ -75,12 +75,12 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (requirement. Its rail row, page, search hits, and idle Composer entry areavailable to all users.It is the only place to enable Live Voice. See the Voice section below.-- **Cloud sync / 云同步** is a developer-only, Experimental destination: its- rail row, page, and settings-search hits exist only while- `AppSettings.developerMode` is `true`. With developer mode off the row is- absent rather than disabled, settings search returns no hit for it, and a- rail position left on it falls back to General. The row and page title carry- the Experimental badge (`settings.configSync.experimental`)+- **Cloud sync / 云同步** is a regular `System` / `系统` destination+ available to every user in every build: its rail row, page, and+ settings-search hits never depend on developer mode and never fall back to+ General. It is still Experimental, so the rail row and page title carry the+ Experimental badge (`settings.configSync.experimental`). Nothing about the+ sync behavior itself changes.- **Remote Hosts / 远程主机** is a developer-only, Experimental destination: itsrail row, its page, and its settings-search hits exist only while`AppSettings.developerMode` is `true`. With developer mode off the row is@@ -799,7 +799,7 @@ system while preserving their different data ownership:- the developer mode switch unlocks the Open console button, F12 on everyplatform, Ctrl+Shift+I on Windows/Linux, the macOS View-menu developertools item, Copy conversation ID / Open session path on the conversation- overflow menu, and the Cloud sync / Remote Hosts destinations on the rail+ overflow menu, and the Remote Hosts destination on the rail- disabling developer mode closes an open console and disables or removesevery entry point; Settings search indexes the card, switch, and consoleaction@@ -832,8 +832,8 @@ system while preserving their different data ownership:- Back to app returns to chat shell from the rail's pinned footer action- Developer-only destinations join and leave the rail, the page, and settingssearch as one unit: while developer mode is off the rail omits the row,- settings search returns no hit for it, and an open Cloud sync or Remote Hosts- page returns to General+ settings search returns no hit for it, and an open Remote Hosts page returns+ to General. Cloud sync is a regular destination and always stays reachable## 4. Acceptance@@ -842,8 +842,8 @@ system while preserving their different data ownership:foot on the main sidebar's footer icon line, and exactly General / 常规, AI,Shortcuts / 快捷键, Instructions / 指令, Models / 模型, Skills / 技能, MCP,Subagents / 子智能体, Import / 导入, Projects / 项目, Cloud sync / 云同步,- Remote Hosts / 远程主机, and Info / 信息 in that order. Cloud sync / 云同步- and Remote Hosts / 远程主机 appear only while developer mode is on. Voice+ Remote Hosts / 远程主机, and Info / 信息 in that order. Cloud sync / 云同步 is+ available to every user; Remote Hosts appears only in developer mode. Voiceappears between AI and Shortcuts only in development builds with developermode on. The rows are grouped under Preferences / 偏好,Agent / 智能体, Workspace / 工作区, and System / 系统. There is nodiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex a2bcb592b..641ed74cb 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -9220,16 +9220,16 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.### E2E-CONFIG-SYNC-webdav-portable-configuration-- **Preconditions:** A built task candidate, isolated host profile with- developer mode initially off, and a local- WebDAV fixture that supports strong ETags and conditional PUT, plus a fixture- variant that ignores conditional headers but supports `PROPFIND` directory- listing. No real WebDAV account, provider, or production desktop.+- **Preconditions:** A built task candidate, an isolated host profile, and a+ local WebDAV fixture that supports strong ETags and conditional PUT, plus a+ fixture variant that ignores conditional headers but supports `PROPFIND`+ directory listing. No real WebDAV account, provider, or production desktop.+ Developer mode starts off so the public destination is exercised as shipped.- **Steps:** 1) Open Settings with developer mode off; confirm Cloud sync is- absent from the rail and settings search returns no Cloud sync result. 2) Open- Settings → Info → Developer, enable developer mode, and confirm Cloud sync- appears in the rail and settings search. Open it and confirm the Experimental- badge appears beside the rail row and page title. 3) Enter the fixture URL,+ present in the rail and returned by settings search, then open it and+ confirm the Experimental badge appears beside the rail row and page title.+ 2) Toggle developer mode on and off and confirm the destination stays+ reachable either way. 3) Enter the fixture URL,device label, directory, and backup password. 4) Run the capability test andconfirm it uses temporary objects. 5) Select provider/MCP/skill categorieswhile leaving credentials and memory off; enable credentials in a second@@ -9253,9 +9253,10 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.refreshes in the background. Confirm a configured endpoint reuses its storedWebDAV app password, while password fields themselves remain blank and novault password is written to renderer storage.-- **Expected:** With developer mode off, Cloud sync is absent from the rail and- settings search; enabling developer mode reveals the destination and its- Experimental badges without changing sync behavior. Strict mode refuses+- **Expected:** Cloud sync is reachable in every build without developer mode,+ keeps its Experimental badge beside the rail row and page title, and+ neither its availability nor its behavior changes when developer mode is+ toggled. Strict mode refusesunreliable conditional writes. The explicitcompatibility mode accepts only a server that proves bounded directorylisting, explains that it is not atomic CAS, and retains per-device tips for@@ -9279,9 +9280,9 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.- **Milestone:** M6+.- **Status:** Draft; merge/crypto, in-process WebDAV conditional-writecoverage, and the two-device host/WebDAV path are automated by- `pnpm test:e2e:config-sync`. The Settings visibility gate is automated by- `pnpm test:e2e:settings-scroll`; full renderer-driven password persistence- assertions and checkpoint-level local recovery fault injection remain.+ `pnpm test:e2e:config-sync`. Public Cloud sync visibility without developer+ mode is asserted by `settings-developer-only-destinations.test.mjs`; full+ renderer-driven persistence and checkpoint recovery fault injection remain.**E2E-CHAT-session-todo-checklist: TodoWrite to session-aware TodoDock**@@ -16255,9 +16256,9 @@ the latest destination. These assertions measure work counts, not device FPS.- Automated coverage: `pnpm test:e2e:settings-scroll` mounts the productionSettingsPage, store, translations, and built CSS in isolated Electron. Onlypreload data is stubbed; search navigation uses SearchDialog's public store- entry points. It also checks the Cloud sync developer-mode gate, Experimental- badges, and fallback to General. This covers renderer interaction, not host- persistence or the full global-search dialog.+ entry points. It also checks Cloud sync visibility without developer mode,+ the Experimental badges, and the fallback to General. This covers renderer+ interaction, not host persistence or the full global-search dialog.### E2E-SCHEDULED-dispatchdiff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.mdindex 495d26d40..957024645 100644--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@ -36,6 +36,7 @@ This log freezes previously open questions into concrete decisions.| D639 | models.dev owns published chat-model metadata | **Supersede D136 / D266 and ADR `pi-ai-core-0991-authority` for chat metadata: the bundled and explicitly refreshed models.dev catalog supplies published chat-model limits, modalities, reasoning metadata, names, and prices. Prefer the selected official publisher; when it has no record, accept another publisher only for a safe, unambiguous match, otherwise keep generic metadata. The checked-in preset identities are the priority set; do not assert an unsupported fixed count of 39. Live endpoint/OAuth discovery still owns selectable IDs. Pi remains responsible for OAuth, wire identity, transport and typed non-chat operations, but never supplies sibling chat limits, reasoning or prices. Explicit user binding overrides remain authoritative. No credentials are sent to models.dev; no host schema/protocol or persistence change. See ADR `models-dev-catalog-authority` and E2E-162 / E2E-MODEL-catalog-window-correction-reaches-saved-bindings.** | A Pi sibling default assigned a 272,000-token window to GPT models whose selected models.dev records publish 1,050,000 tokens, changing the Settings display and runtime context budget. || D640 | User MCP tools keep the normal approval path | **`mcp_<serverId>_<tool>` calls are `medium` risk in host-core: under `ask` and `accept-edits` each call shows the approval card ("MCP server tool requires approval"), allow-once and allow-session keep their usual scope (one call / that exact tool name in that session), `auto` runs without a card, and Plan/Goal still deny. Annotations or risk values the MCP server declares about its own tools are ignored and never lower the path. Dispatch, read-only-mode handling and the `mcp_` namespace are unchanged; no host protocol or persistence change. See ADR `mcp-tool-approval-risk` and E2E-MCP-tool-requires-approval.** | MCP tools were auto-allowed as `low` risk, so a configured server could write files, call networks or run commands without any prompt under `ask`. Configuring a server is consent to launch it, not to every action its opaque tools take. || D641 | Custom endpoint API style precedence | **A custom endpoint uses the saved provider-row `apiStyle` ahead of a model catalog's adapter API. Named and OAuth providers can continue to use a model-level wire API pin where their published configuration requires a different transport. This keeps a user's explicit endpoint choice stable without removing model-specific routing such as OpenCode Go Responses models. No persisted format or protocol change. See E2E-005E and issue #1313.** | A publisher's adapter default must not silently redirect a custom gateway whose user-selected API format is different. |+| D642 | Cloud sync is a public Experimental destination | **Remove the developer-mode and packaged-build gates from the Settings `sync` destination: its rail row, page, and settings-search hits exist for every user in every build, and a saved `sync` tab no longer falls back to General. Remote Hosts keeps both gates and its own badge. The destination keeps its Experimental badge on the rail row and page title; sync behavior, protocol, host schema, and persisted data are unchanged. See `04-ux/06-settings-ia.md` and E2E-CONFIG-SYNC-webdav-portable-configuration.** | Encrypted WebDAV backup is the app's only multi-device configuration path, and a developer-mode gate left it undiscoverable for the users who need it. || D450 | Signed macOS GitHub Releases | **Amend D078 / ADR 0022: GitHub tag releases Developer ID-sign, notarize (`notarytool` via electron-builder 26), staple, and Gatekeeper-verify macOS DMG/ZIP before upload, using identity `Developer ID Application: XingYu Liu (DUV63RKYTW)` / team `DUV63RKYTW` from Actions secrets (`CSC_LINK`, `CSC_KEY_PASSWORD`, `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, `APPLE_TEAM_ID`). Missing secrets fail the job. Local unsigned packaging without a certificate remains. `workflow_dispatch` may set `sign_macos: false` only for unsigned debug artifacts. Packaged macOS uses in-app `electron-updater` (ZIP + merged `latest-mac.yml`); Linux deb/rpm and Windows portable ZIP stay notify-and-link. No afterPack/afterSign adhoc codesign (ADR 0278).** | Production DMGs must open without a Gatekeeper warning, and signed macOS installs can download and restart into a new tag. See ADR 0289, E2E-196c, E2E-067A. |## B. Secondary implementation defaults@@ -7410,3 +7411,15 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.- Dispatch over `plugins.execute`, read-only-mode handling and the `mcp_`namespace are unchanged. See ADR `mcp-tool-approval-risk` andE2E-MCP-tool-requires-approval.++## 2026-10-04 — Cloud sync is a public Experimental destination (D642)++- D642 removes the developer-mode and packaged-build gates from the Settings+ `sync` destination: its rail row, page, and settings-search hits are+ available to every user in every build, and a saved `sync` tab no longer+ falls back to General. Remote Hosts keeps both gates.+- The destination keeps its Experimental badge on the rail row and page title,+ and sync behavior, protocol, host schema, and persisted data are unchanged.+- Covered by `apps/desktop/test/settings-developer-only-destinations.test.mjs`+ and the Cloud sync probe in `pnpm test:e2e:settings-scroll`. See+ `04-ux/06-settings-ia.md` and E2E-CONFIG-SYNC-webdav-portable-configuration.diff --git a/docs/zh-CN/spec/04-ux/06-settings-ia.md b/docs/zh-CN/spec/04-ux/06-settings-ia.mdindex 0430f8c72..f8697e797 100644--- a/docs/zh-CN/spec/04-ux/06-settings-ia.md+++ b/docs/zh-CN/spec/04-ux/06-settings-ia.md@@ -35,20 +35,20 @@8. **子智能体** — Lucide `Bot`(内置与自建的并行工作智能体)9. **导入** — Lucide `Download`(从其他工具引入会话和模型配置)10. **项目** — Lucide `Archive`(持久项目索引)- 11. **云同步** — Lucide `CloudDownload`(加密的可移植配置备份与双向同步;仅开发者模式)+ 11. **云同步** — Lucide `CloudDownload`(加密的可移植配置备份与双向同步)12. **远程主机** — Lucide `Globe`(SSH 引导与配对清单;仅开发者模式)13. **信息** — Lucide `Info`(版本、日志、更新、开发人员)图标具有装饰性(通过 SVG 默认设置为 `aria-hidden`)并保持单色带有导轨标签;不要在此处重复使用 refresh/rotate 字形。- 目录仍是保持相同顺序的可搜索扁平列表。为便于扫描,目的地分为四个带标题的视觉分组:“偏好”(常规、AI、快捷键)、“智能体”(指令、模型、技能、- MCP、子智能体)、“工作区”(导入、项目)和“系统”(云同步、远程主机、信息;前两项仅开发者模式可见)。标题使用柔和+ MCP、子智能体)、“工作区”(导入、项目)和“系统”(云同步、远程主机、信息;远程主机仅开发者模式可见)。标题使用柔和的非交互文字,分组之间只使用留白,不绘制分割线;搜索过滤后,空分组及其标题一并隐藏。-- **云同步**是仅开发者可用的实验性目的地:其导轨行、页面和设置搜索命中仅在- `AppSettings.developerMode` 为 `true` 时存在。开发者模式关闭时该行是缺失而不是- 禁用,设置搜索不会返回它的命中,导轨位置停在该项时会回落到常规。该行和页面标题- 都带有实验性徽章(`settings.configSync.experimental`)+- **云同步**是面向所有用户、在任何构建中都可见的常规「系统」目的地:其导轨行、页面+ 和设置搜索命中从不依赖开发者模式,也不会回落到常规。它仍是实验性功能,+ 导轨行和页面标题继续带有实验性徽章(`settings.configSync.experimental`)。+ 同步行为本身没有任何变化。- **远程主机**是仅开发者可用的实验性目的地:其导轨行、页面和设置搜索命中仅在`AppSettings.developerMode` 为 `true` 时存在。开发者模式关闭时该行是缺失而不是禁用,设置搜索不会返回它的命中,导轨位置停在该项时会回落到常规。该行和页面标题@@ -329,7 +329,7 @@ Token 用量**不是设置目的地**(D335 / ADR 0173)。已完成回合历`AppSettings.developerMode` 值是 `true`- 开发者模式开关解锁“打开控制台”按钮,每个按钮上按 F12平台、Windows/Linux 上的 Ctrl+Shift+I 以及 macOS 查看菜单开发人员-工具项,以及导轨上的云同步和远程主机目的地+工具项,以及导轨上的远程主机目的地- 禁用开发者模式会关闭打开的控制台并禁用或删除每个入口点;设置搜索索引卡、交换机和控制台行动@@ -358,14 +358,14 @@ Token 用量**不是设置目的地**(D335 / ADR 0173)。已完成回合历- 返回应用程序从导轨固定的底部操作返回聊天外壳- 仅开发者可用的目的地作为一个整体加入导轨、页面和设置搜索,也同样一起离开:开发者模式关闭时导轨省略该行,设置搜索不返回它的命中,打开的远程主机页面会- 返回到常规;打开的云同步页面也会返回到常规+ 返回到常规;云同步是常规目的地,始终可以打开## 4. 验收1.打开设置隐藏编码应用侧边栏(全页接管)2. 导轨顶部显示搜索药丸,底部固定返回应用程序操作并与主侧边栏底部图标行同一条线,并精确显示常规、AI、快捷键、指令、模型、技能、MCP、- 子智能体、导入、项目和信息(开发者模式开启时,云同步与远程主机依次位于项目与信息之间),+ 子智能体、导入、项目、云同步、远程主机和信息(远程主机仅在开发者模式开启时显示),并按偏好、智能体、工作区、系统分组。没有用量设置目的地。3.外观是常规的一部分,没有独立的导轨目的地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.mdindex 32825b2b4..a79d1ae50 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@@ -8827,13 +8827,13 @@ the latest destination. These assertions measure work counts, not device FPS.### E2E-CONFIG-SYNC-webdav-portable-configuration-- **前提:** 已构建的任务候选版本、默认关闭开发者模式的隔离 Host 配置,以及支持 strong ETag 和条件 PUT 的本地 WebDAV fixture。不使用真实 WebDAV 账户、provider 或生产桌面。-- **步骤:** 1)开发者模式关闭时打开设置,确认导轨没有“云同步”,搜索也没有云同步结果。2)打开“设置 → 信息 → 开发者”,启用开发者模式,确认“云同步”出现在导轨和设置搜索中;打开该页,确认导轨行和页面标题均显示“实验性”徽章。3)填写 fixture URL、设备标签、目录和备份密码。4)运行能力测试,确认使用临时对象。5)选择 provider/MCP/skill 类别,保持凭据和 memory 未选中;在第二次预览中启用凭据,确认只显示脱敏计数。6)配置设备 A,创建 user provider 和 MCP 定义并同步。7)让设备 B 连接同一 vault,同步后检查待激活/映射,并验证审批前不会运行命令或任务。8)批准一个变更后的安全实体,拒绝一个暂存实体,在两台设备上编辑不相交设置并再次同步。9)测试并发 head writer、错误密码、weak ETag、密文损坏、redirect、归档路径穿越和网络中断。10)使用回环/私有地址的 fixture 勾选“允许在受信任的内网地址使用 HTTP”,确认刷新状态后仍保留;即使勾选,公网 HTTP 地址也必须被拒绝。-- **预期:** 开发者模式关闭时,云同步页面及其设置搜索结果不可见;启用后入口可见并标记为实验性,云同步行为保持不变。测试拒绝不可靠的条件写入。HTTP 默认关闭,仅允许 localhost、`.local` 或私有/链路本地地址;公网 HTTP 地址会被拒绝,界面会提示凭据暴露风险。若 fixture 探测到该 endpoint 对不存在对象返回 502,后续只兼容该 endpoint 的这一行为;忽略条件头的服务器仍必须标记为不受支持。WebDAV 只能看到已认证的密文和不透明对象名;原始秘密不会出现在 Renderer 状态或日志中。相同和不相交的编辑会收敛,冲突保持可审查,明确删除使用 tombstone,类别退出不是删除,可执行导入在本地审批和映射前保持不激活。恢复不会暴露部分应用的本地配置。+- **前提:** 已构建的任务候选版本、隔离的 Host 配置(开发者模式默认关闭,用来验证公开入口),以及支持 strong ETag 和条件 PUT 的本地 WebDAV fixture,另有忽略条件头但支持 `PROPFIND` 目录列举的 fixture 变体。不使用真实 WebDAV 账户、provider 或生产桌面。+- **步骤:** 1)在开发者模式关闭的情况下打开设置,确认“云同步”出现在导轨中且设置搜索能命中它;打开该页,确认导轨行和页面标题均显示“实验性”徽章。2)开关一次开发者模式,确认该目的地始终可用且可见性不变。3)填写 fixture URL、设备标签、目录和备份密码。4)运行能力测试,确认使用临时对象。5)选择 provider/MCP/skill 类别,保持凭据和 memory 未选中;在第二次预览中启用凭据,确认只显示脱敏计数。6)配置设备 A,创建 user provider 和 MCP 定义并同步。7)让设备 B 连接同一 vault,同步后检查待激活/映射,并验证审批前不会运行命令或任务。8)批准一个变更后的安全实体,拒绝一个暂存实体,在两台设备上编辑不相交设置并再次同步。9)测试并发 head writer、错误密码、weak ETag、密文损坏、redirect、归档路径穿越和网络中断。10)使用回环/私有地址的 fixture 勾选“允许在受信任的内网地址使用 HTTP”,确认刷新状态后仍保留;即使勾选,公网 HTTP 地址也必须被拒绝。+- **预期:** 云同步在任何构建、任何开发者模式设置下都可访问,并保留“实验性”徽章;开关开发者模式既不改变入口可见性也不改变同步行为。测试拒绝不可靠的条件写入。HTTP 默认关闭,仅允许 localhost、`.local` 或私有/链路本地地址;公网 HTTP 地址会被拒绝,界面会提示凭据暴露风险。若 fixture 探测到该 endpoint 对不存在对象返回 502,后续只兼容该 endpoint 的这一行为;忽略条件头的服务器仍必须标记为不受支持。WebDAV 只能看到已认证的密文和不透明对象名;原始秘密不会出现在 Renderer 状态或日志中。相同和不相交的编辑会收敛,冲突保持可审查,明确删除使用 tombstone,类别退出不是删除,可执行导入在本地审批和映射前保持不激活。恢复不会暴露部分应用的本地配置。- **规格:** `04-ux/06-settings-ia.md`、`03-runtime/22-config-sync.md`、`03-runtime/14-secrets-storage.md`、`05-security/01-security.md`、ADR 0300。- **验收:** F(持久化)、Security、Quality。- **里程碑:** M6+。-- **状态:** Draft;合并/密码学和进程内 WebDAV 条件写入覆盖已存在。云同步设置入口的开发者模式门控由 `pnpm test:e2e:settings-scroll` 自动验证;完整双设备进程路径和逐检查点本地恢复故障注入仍待自动化。+- **状态:** Draft;合并/密码学和进程内 WebDAV 条件写入覆盖已存在。云同步入口对所有用户可见(不再受开发者模式门控)由 `apps/desktop/test/settings-developer-only-destinations.test.mjs` 断言;完整双设备进程路径和逐检查点本地恢复故障注入仍待自动化。### E2E-DIALOG-long-text-boundariesdiff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.mdindex 2ca32a549..15f601c99 100644--- a/docs/zh-CN/spec/08-meta/decisions-log.md+++ b/docs/zh-CN/spec/08-meta/decisions-log.md@@ -5213,3 +5213,14 @@ Markdown 源码,不是 `text/html` 负载;对禁用行内 HTML 的外部编服务器对自身工具声明的风险标注不被信任,绝不降低审批路径。- 通过 `plugins.execute` 的分发、只读模式处理与 `mcp_` 命名空间不变。见 ADR`mcp-tool-approval-risk` 与 E2E-MCP-tool-requires-approval。++## 2026-10-04 —— 云同步是对所有用户开放的实验性目的地(D642)++- D642 移除设置中 `sync` 目的地的开发者模式与打包构建门控:其导轨行、页面和设置搜索+ 命中在任何构建中对所有用户可用,已保存的 `sync` 标签页也不再回落到常规。远程主机+ 保留这两道门控。+- 该目的地继续在导轨行和页面标题上保留实验性徽章;同步行为、协议、Host schema 与+ 持久化数据均不变。+- 由 `apps/desktop/test/settings-developer-only-destinations.test.mjs` 与+ `pnpm test:e2e:settings-scroll` 的云同步探针覆盖。见 `04-ux/06-settings-ia.md` 与+ E2E-CONFIG-SYNC-webdav-portable-configuration。diff --git a/scripts/e2e/settings-scroll.jsx b/scripts/e2e/settings-scroll.jsxindex 7f504a092..cecaaf2ca 100644--- a/scripts/e2e/settings-scroll.jsx+++ b/scripts/e2e/settings-scroll.jsx@@ -120,26 +120,51 @@ async function setSettingsSearch(value) {await settle();}async function checkCloudSyncVisibility() {+ // Cloud sync is a public Experimental destination: no developer mode needed.await setSettingsSearch("Cloud sync");- assert(!navButton("Cloud sync"), "Cloud sync must be absent from search without developer mode");+ const syncButton = navButton("Cloud sync");+ assert(syncButton, "Cloud sync must appear in settings search without developer mode");+ assert(+ syncButton.querySelector(".settings-nav-experimental")?.textContent?.trim() === "Experimental",+ "Cloud sync's rail entry must stay marked Experimental",+ );++ flushSync(() => syncButton.click());+ await settle();+ assert(+ useAppStore.getState().settingsTab === "sync",+ "Cloud sync must open its page without developer mode",+ );+ assert(+ document.querySelector(".settings-section-title")?.textContent?.includes("Experimental"),+ "Cloud sync's page title must stay marked Experimental",+ );await setSettingsSearch("");+ // Developer mode no longer gates this destination, so it cannot hide the page.settings = { ...settings, developerMode: true };flushSync(() => useAppStore.setState({ settings }));await settle();- await setSettingsSearch("Cloud sync");- const syncButton = navButton("Cloud sync");- assert(syncButton, "Cloud sync must appear in settings search with developer mode");+ assert(navButton("Cloud sync"), "Cloud sync must stay in the rail with developer mode on");++ settings = { ...settings, developerMode: false };+ flushSync(() => useAppStore.setState({ settings }));+ await settle();assert(- syncButton.querySelector(".settings-nav-experimental")?.textContent?.trim() === "Experimental",- "Cloud sync's rail entry must be marked Experimental",+ useAppStore.getState().settingsTab === "sync",+ "Cloud sync must not fall back to General when developer mode changes",);+ assert(navButton("Cloud sync"), "Cloud sync must stay in the rail without developer mode");+ await setSettingsSearch("");- flushSync(() => syncButton.click());+ // Remote hosts keeps the developer-mode gate, including the page fallback.+ settings = { ...settings, developerMode: true };+ flushSync(() => useAppStore.setState({ settings }));await settle();+ await select("Remote hosts");assert(- document.querySelector(".settings-section-title")?.textContent?.includes("Experimental"),- "Cloud sync's page title must be marked Experimental",+ useAppStore.getState().settingsTab === "remoteHosts",+ "Remote hosts must open while developer mode is on",);settings = { ...settings, developerMode: false };@@ -147,10 +172,9 @@ async function checkCloudSyncVisibility() {await settle();assert(useAppStore.getState().settingsTab === "general",- "A Cloud sync page hidden by developer mode must return to General",+ "A Remote hosts page hidden by developer mode must return to General",);- assert(!navButton("Cloud sync"), "Cloud sync must leave the rail when developer mode is off");- await setSettingsSearch("");+ assert(!navButton("Remote hosts"), "Remote hosts must leave the rail when developer mode is off");}async function scroll() {pane().scrollTop = 220;