Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
Merge upstream main into fix/branch-completed-reply-while-running
github-actions[bot]63d355e7a069
diff --cc docs/spec/06-delivery/04-e2e-test-plan.mdindex 2e575c4fc,619103d4d..52f2de58f--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@@ -8,22 -8,33 +8,49 @@@## 1. Goals+### E2E-CHAT-fork-completed-reply-while-running++- **Preconditions:** Isolated real desktop profile, configured model, two turns+ in one Desktop conversation; the first assistant reply has completed.+- **Steps:** Send the second prompt. While it is still running, click **Branch+ from this reply** on the first reply. Continue chatting in the child, then+ return to the parent.+- **Expected:** The child contains only history through the first reply, can+ continue independently, and starts with no running turn. The parent keeps+ running and retains its second prompt and reply. No live tail is overwritten.+ A whole-session fork and a fork within the active tool loop remain rejected.+ A navigation during the fork response records the child without stealing focus.+- **Coverage:** Host fork regression, renderer session-fork-running tests,+ session IPC contract tests, and real-model desktop acceptance. A local model+ fixture or mocked component result is not real-model acceptance evidence.++ ### E2E-IMAGES-provider-save-feedback++ - **Preconditions:** Image configuration UI fixture; English and Chinese.+ - **Steps:** Mark image models and save the provider; choose a different image+ default from its summary; then unmark the sole image model and save.+ - **Expected:** Provider edits confirm the provider update, including after+ clearing the image selection. Explicit default selection keeps its specific+ image-selection confirmation. Persisted bindings retain their existing behavior.+ - **Specs:** 03-runtime/21-image-generation. **Acceptance:** B.+ - **Milestone:** Maintenance. **Status:** Automated by+ ### E2E-IMAGES-remove-configured-model++ - **Preconditions:** API-boundary fixture with an image-marked model and another+ configured model on its provider; repeat with legacy single binding and with+ another image candidate on another provider.+ - **Steps:** Remove the marked model in the provider editor without toggling its+ image checkbox. Cancel once, repeat and Save, then reopen settings and editor.+ - **Expected:** Cancel preserves both configurations. Save removes the model and+ its image candidate and clears the image default, even when another image+ candidate remains on this or another provider. The settings summary therefore+ shows the unavailable state until the user explicitly chooses a new default.+ An unaffected chat default stays unchanged; a removed chat default still falls+ back to the first configured model. Reload preserves results.+ - **Specs:** 03-runtime/21-image-generation. **Acceptance:** B.+ - **Milestone:** Maintenance. **Status:** Automated in English and Chinese by+ `scripts/e2e-image-generation-ui.mjs`.+### E2E-IMAGES-desktop-conversation- **Preconditions:** Isolated desktop profile and workspace, built image feature,diff --cc docs/zh-CN/spec/06-delivery/04-e2e-test-plan.mdindex 2126ddf7a,c1fd8ba41..724ce28df--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md@@@ -8675,18 -8760,38 +8760,54 @@@ the latest destination. These assertion**证据:** 记录构建和测试退出码、基线 SHA、依赖版本、产物标识及独立评审,报告位于`docs/project/hosted-search-contract-verification.md`。不得记录真实会话或凭据。未执行明确标为 NOT RUN,不得标为 PASS。+### E2E-CHAT-fork-completed-reply-while-running++- **Preconditions:** Isolated real desktop profile, configured model, two turns+ in one Desktop conversation; the first assistant reply has completed.+- **Steps:** Send the second prompt. While it is still running, click **Branch+ from this reply** on the first reply. Continue chatting in the child, then+ return to the parent.+- **Expected:** The child contains only history through the first reply, can+ continue independently, and starts with no running turn. The parent keeps+ running and retains its second prompt and reply. No live tail is overwritten.+ A whole-session fork and a fork within the active tool loop remain rejected.+ A navigation during the fork response records the child without stealing focus.+- **Coverage:** Host fork regression, renderer session-fork-running tests,+ session IPC contract tests, and real-model desktop acceptance. A local model+ fixture or mocked component result is not real-model acceptance evidence.+++ ### E2E-HOOKS-cancel-and-dispose++ - **#816 扩展验收:** 命令弹窗显示期间 Stop,真实渲染层移除弹窗,后续弹窗和 exec+ 不再发生,下一命令或回合正常。Electron 驱动通过 CDP 检查 DOM;Runner 测试覆盖+ 长命令、上下文等待取消、工具进度退役及头部副本;进程测试通过就绪信号同步真实父子进程。++ - **前置条件:** 隔离 Desktop 配置、本地确定性模型,以及含等待型请求前处理器的可信插件。+ - **步骤:** 发送消息,在处理器等待时停止,释放旧处理器后再次发送。另测等待时销毁+ Runtime,并加载启动/关闭挂起以及注册未接通事件的夹具。+ - **预期:** 被停止或销毁的请求不调用模型,后续消息正常完成。迟到结果不能重启工作。+ 关闭只执行一次,各处理器等待有界,未接通事件产生诊断但不禁用正常处理器。+ - **规范:** 07-plugins/16 §6。+ - **验收:** 取消及时生效,扩展生命周期等待有界。+ - **里程碑:** Hooks P0。+ - **状态:** Runner 与真实 Runtime/本地 HTTP 集成通过+ `extensions/runner.test.ts`、`extensions/runtime-lifecycle.test.ts` 自动验证。+ 可信扩展 Electron 驱动通过 CDP 在真实渲染层执行 Stop 路径,并记录弹窗显示和+ 退役后的状态。+ ## Composer 指令源、手动压缩与空记录读取(#795)++ **范围:** composer 的斜杠分发、手动压缩 RPC,以及渲染层的持久化记录读取。不调用真实模型或+ 提供商。++ | 场景 | 必须观察到的结果 |+ | --- | --- |+ | `composer/commands` 失败时输入 `/compact` | 提交被拒绝并显示 `chat.slashCommandSourceUnavailable`,草稿保留,没有任何提示词进入会话。失败的读取不入缓存,因此下一次发送会重试。 |+ | 指令源缓存仍热 | 内置指令仍在本地分发;模板与未知别名仍走提示词路径。 |+ | 手动压缩超过其传输超时 | 宿主重新读取持久化压缩记录:发现新检查点已落盘就报告成功并记录该不一致,未落盘则原样抛出超时。sidecar 自己报告的判定绝不被改写。 |+ | 有历史的会话读到空记录窗口 | 选择流程再读一次,随后保留用户已有的快照,否则显示 `chat.sessionTranscriptEmpty`;这类空页绝不入缓存,因此悬停预取不会反复提供它。 |++ **自动化:** `node --test apps/desktop/test/slash-command-source.test.mjs`、+ `node --test apps/desktop/test/session-transcript-empty-read.test.mjs`、+ `node --test apps/desktop/test/plugin-timeout-budgets.test.mjs`、+ `pnpm --filter @pi-desktop/shared test`、`pnpm --filter @pi-desktop/host-runtime test`。+