Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
docs(spec): sweep the remaining artifact-opened Review claims
Tioit-Wang0a2082e067d3
diff --git a/apps/desktop/electron/main/plugin-view-host.ts b/apps/desktop/electron/main/plugin-view-host.tsindex 31fb264e4..394ef9726 100644--- a/apps/desktop/electron/main/plugin-view-host.ts+++ b/apps/desktop/electron/main/plugin-view-host.ts@@ -58,7 +58,9 @@ export type PluginViewOpenRequest = {* What this view should show, when the opener knows (D320 follow-up).** A work-panel view is opened either from the tool launcher, which has no- * specific subject, or from a chat file reference, which does. The value is+ * specific subject, from a chat file reference, which does, or by a plan or+ * goal approval artifact, whose host-chosen view receives the artifact path+ * (D452). The value is* opaque to the host: it travels as the entry URL's `piViewOpen` query* parameter on creation and as the `view:open` event afterwards, and the* plugin decides what it means. `pi.browser` uses its own chrome channeldiff --git a/docs/adr/0019-work-panel-subsystems.md b/docs/adr/0019-work-panel-subsystems.mdindex 062502acf..e1a4eb80a 100644--- a/docs/adr/0019-work-panel-subsystems.md+++ b/docs/adr/0019-work-panel-subsystems.md@@ -25,7 +25,8 @@ The retained work-panel subsystems are:navigation policy, permission denial, external popup handling, andmeasured bounds clamp.2. **Review.** Message-owned review snapshots and guarded rollback remain- host-integrated surfaces opened by successful workspace Write/Edit artifacts.+ host-integrated; Review opens only on explicit user action and never from a+ tool result (D451).3. **Files.** Project browsing is supplied by the bundled `pi.files` plugin overthe public contributed-view and filesystem APIs.4. **Transcript resources.** File and URL artifacts remain session-scoped tabsdiff --git a/docs/adr/0042-message-scoped-inline-review-cards.md b/docs/adr/0042-message-scoped-inline-review-cards.mdindex 1aba30149..87a4bba50 100644--- a/docs/adr/0042-message-scoped-inline-review-cards.md+++ b/docs/adr/0042-message-scoped-inline-review-cards.md@@ -33,8 +33,8 @@ second renderer-owned diff or durable ownership map.3. Failed, denied, scratch, clean, non-Git, and missing-workspace results do notrender cards. A background session's card remains attached to its owntranscript and never appears in the currently visible session. The full- Review tab remains available as the all-files current-worktree view and- continues to open from successful workspace artifacts.+ Review tab remains available as the all-files current-worktree view; it+ opens only on explicit user action and never from a tool result (D451).4. Remove the session-to-workspace review ownership map. Inline card presenceis derived from the transcript message, the active workspace, and theshared workspace diff; no review-specific persistence or protocol field isdiff --git a/docs/adr/0068-work-panel-keyboard-entry.md b/docs/adr/0068-work-panel-keyboard-entry.mdindex 7a5407d20..2fce7a546 100644--- a/docs/adr/0068-work-panel-keyboard-entry.md+++ b/docs/adr/0068-work-panel-keyboard-entry.md@@ -31,10 +31,11 @@ the missing capability is panel entry rather than a new resource protocol.panel context to open at its committed width without creating or activating aresource tab. Existing tabs, active resource, and Browser resource remainunchanged.-3. The empty panel header remains the manual resource chooser for Browser- and in-scope plugin views. Artifact triggers continue to create and activate- resources atomically, and background-session artifacts cannot open the- visible panel.+3. The empty panel header remains the manual resource chooser for the Review+ row, Browser, and in-scope plugin views. Review opens only on explicit user+ action (D451), while a plan or goal approval artifact still creates or+ activates a tab in its originating session (D452); background-session+ artifacts cannot open the visible panel.4. The shortcut is ignored while Settings is active and is a no-op without anactive session. No host protocol, IPC channel, or native application-menucommand is added.diff --git a/docs/adr/0105-files-as-a-bundled-plugin.md b/docs/adr/0105-files-as-a-bundled-plugin.mdindex 43a415626..6c302361f 100644--- a/docs/adr/0105-files-as-a-bundled-plugin.md+++ b/docs/adr/0105-files-as-a-bundled-plugin.md@@ -30,8 +30,9 @@ has a different ownership boundary.2. The bundled plugin is enabled by default, cannot be uninstalled, and can bedisabled by the user. Its filesystem access uses the public permission-gatedread APIs.-3. Only the Files *tool* migrates. Transcript-owned `file:<path>` resources and- Review artifacts remain host-rendered and message/session scoped.+3. Only the Files *tool* migrates. Transcript-owned `file:<path>` resources+ stay as they are. Review remains the user-opened surface over the same+ transcript-owned evidence and is never opened by a tool result (D451).4. Browser chrome and agent CDP ship as bundled plugin `pi.browser` (ADR 0170).The guest `WebContentsView` and debugger remain host window machinery,reached only through the public `pi.browser.*` API.@@ -43,8 +44,9 @@ has a different ownership boundary.- The shipped plugin is a real consumer of the public contributed-view andfilesystem APIs; gaps in those APIs are caught by a first-party feature.-- The launcher lists Browser and active plugin views. Review and file resources- are opened by conversation artifacts.+- The launcher lists the Review row plus Browser and in-scope plugin views.+ File resources are opened by conversation artifacts; Review opens only on+ explicit user action (D451).- The plugin trust boundary stays unchanged: no plugin permission can spawn aninteractive shell.diff --git a/docs/adr/0108-remove-built-in-interactive-terminal.md b/docs/adr/0108-remove-built-in-interactive-terminal.mdindex fcf43ccc5..2b55c672d 100644--- a/docs/adr/0108-remove-built-in-interactive-terminal.md+++ b/docs/adr/0108-remove-built-in-interactive-terminal.md@@ -29,7 +29,8 @@ invocations and bounded output remain visible in the conversation.1. Remove the work-panel interactive terminal. The panel retainsplugin-contributed views including the bundled Files and Browser views- (ADR 0170), and Review/file tabs opened by conversation artifacts.+ (ADR 0170), file tabs opened by conversation artifacts, and the Review tab+ the user opens themselves (D451).2. Keep Agent Bash unchanged. It remains a permission-aware, non-interactiveagent tool whose command, output, status, copy behavior, and `IconTerminal`presentation stay in the transcript. Generic lifecycle values such as@@ -48,7 +49,7 @@ invocations and bounded output remain visible in the conversation.## Consequences- The work panel has no interactive shell tab or terminal launcher, and its- empty state lists Browser and in-scope plugin views only.+ empty state lists the Review row, Browser, and in-scope plugin views.- Desktop packaging no longer carries the PTY native module or terminalrenderer dependencies, reducing native build and release surface.- Interactive shell workflows require an external terminal. Agent Bash remainsdiff --git a/docs/guide/screenshots.md b/docs/guide/screenshots.mdindex 0bf081780..bd2e76272 100644--- a/docs/guide/screenshots.md+++ b/docs/guide/screenshots.md@@ -46,9 +46,10 @@ composer, `/` opens the command menu and `@` opens the file reference menu.## Work panels-The work panel opens beside the conversation when the agent produces an-artifact. The frames below are the panels without an active workspace, which is-the state a conversation starts in.+An agent Write/Edit never opens the panel. The panel appears when the user opens+it, or when a file, URL, browser-preview, or plan-approval artifact opens its+tab. The frames below are the panels without an active workspace, which is the+state a conversation starts in.diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex 557a97838..9b7f2447f 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -3285,11 +3285,12 @@ identify the platform validation still needed.interactive shell is opened in the user's external terminal instead of thework panel. 5) Build/package the desktop app and inspect the dependency andunpacked-resource lists.-- **Expected**: The work panel offers Browser and in-scope plugin views plus- transcript-opened Review/file resources; no PTY is created and no terminal- tab can be opened. Agent Bash remains non-interactive and fully visible in- the transcript. Interactive shell work is performed by the external- terminal. Desktop packaging has no PTY/xterm dependency, terminal-specific+- **Expected**: The work panel offers the Review launcher row plus Browser and+ in-scope plugin views; Review opens on explicit user action and file resources+ are transcript-opened; no PTY is created and no terminal tab can be opened.+ Agent Bash remains non-interactive and fully visible in the transcript.+ Interactive shell work is performed by the external terminal. Desktop+ packaging has no PTY/xterm dependency, terminal-specificIPC, or native terminal payload, while generic lifecycle `terminal` valuescontinue to work.- **Specs linked**: `02-architecture/02-tech-stack.md`,@@ -5433,8 +5434,10 @@ identify the platform validation still needed.- **Steps**: 1) Let the Agent call `SubmitPlan` with fixed title, Markdown, andquestion. 2) Inspect the new `.pi/plan/*.md` file byte-for-byte and the`plan_approvals` row. 3) Inspect the card's title and artifact opener; confirm- the question/description, validity/deadline, and status are absent and only- Approve and Reject are offered. 4) Open the approval mode menu, choose Auto,+ the opener uses the bundled file view when it is launchable and the host+ file tab otherwise (D452), and that the question/description,+ validity/deadline, and status are absent with only Approve and Reject+ offered. 4) Open the approval mode menu, choose Auto,and verify the next approval defaults to Auto. 5) Reject theproposal. 6) Confirm durable mode is Plan, live state is editable `planning`,the approval gate is cleared, and a later prompt is accepted. 7) Let thediff --git a/docs/zh-CN/guide/screenshots.md b/docs/zh-CN/guide/screenshots.mdindex c6d184e37..edb69049b 100644--- a/docs/zh-CN/guide/screenshots.md+++ b/docs/zh-CN/guide/screenshots.md@@ -40,7 +40,8 @@ Composer 的模型 × 推理芯片切换当前会话使用的模型。在输入## 工作面板-当智能体产出工作产物时,工作面板在对话旁边打开。下面几张是尚未打开工作区时的面板+成功的工作区 Write/Edit 永远不会打开工作面板。面板在用户主动打开时出现,或在文件、+URL、浏览器预览或计划审批工件打开自己的选项卡时出现。下面几张是尚未打开工作区时的面板状态,也就是一次新对话的起点。diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.mdindex 06a15a18c..29179e42f 100644--- a/docs/zh-CN/spec/04-ux/08-component-spec.md+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md@@ -651,11 +651,11 @@ expanded/collapsed 侧边栏仍为 20px/18px 且启动画面为 64 像素。### 5.1 目的-停靠右侧工作栏,用于检查和引导座席的工作空间。可主动启动的表面是插件视图-(ADR 0104),包括 vendor 进来的文件管理器 `pi.file-manager`(项目浏览与编辑)+停靠右侧工作栏,用于检查和引导座席的工作空间。可主动启动的表面是宿主 Review 行与+插件视图(ADR 0104),包括 vendor 进来的文件管理器 `pi.file-manager`(项目浏览与编辑)和随应用打包的 `pi.browser`-(工作面板浏览器 chrome;访客页仍由宿主拥有,ADR 0170)。审阅与 `file:<path>` 属于-**产物**表面:由宿主渲染,但由对话打开,因此不出现在工具列表中。+(工作面板浏览器 chrome;访客页仍由宿主拥有,ADR 0170)。`file:<path>` 属于+**产物**表面:由宿主渲染,但由对话打开,因此不出现在启动器中。应用不再提供交互式终端;Agent Bash 输出保留在对话中。### 5.2 解剖学diff --git a/docs/zh-CN/spec/04-ux/10-workbuddy-benchmark-ux.md b/docs/zh-CN/spec/04-ux/10-workbuddy-benchmark-ux.mdindex a9a86f5eb..d5bbccf49 100644--- a/docs/zh-CN/spec/04-ux/10-workbuddy-benchmark-ux.md+++ b/docs/zh-CN/spec/04-ux/10-workbuddy-benchmark-ux.md@@ -145,8 +145,9 @@ WorkBuddy 永远不会交付完全空的状态:自动化和项目都是配对### 3. 7 工件视图(来自我的文件)会话生成的文件用户稍后无法在不滚动的情况下找到成绩单。 **采用 D128 中的第一步**:单击文件工件会创建一个-路径键控、可关闭的工作面板选项卡和成功的工作区 Write/Edit-工件打开审查。 **在 D179 中采用**:转录本还放置了一个+路径键控、可关闭的工作面板选项卡;它的后半部分——成功的+工作区 Write/Edit 自动打开审阅——已由 D451 撤回,审阅现在+只在用户主动操作时打开。 **在 D179 中采用**:转录本还放置了一个每次成功的文件修改后立即显示消息范围的审查卡;它的状态、+/- 总计和可扩展块保持附加到该工具行,而不是而不是成为全局页脚条目。这些渲染器选项卡和卡片是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 2c303dd45..15a0f541a 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@@ -2113,8 +2113,9 @@ MainChat 弥补了缺口。 Maximized/fullscreen 调用保留最新的已完成的 Bash 行仍显示命令、输出、状态和复制操作,并保留终端图标。4) 确认交互式 shell 由用户的外部终端承担,而不是由工作面板打开。5) 构建/打包桌面应用并检查依赖项和解压资源列表。-- **预期**:工作面板只提供浏览器、当前范围内的插件视图以及对话打开的审阅/文件资源;- 不创建 PTY,也无法打开终端选项卡。Agent Bash 仍是非交互式的,完整显示在对话中。+- **预期**:工作面板提供审阅启动器行、浏览器和当前范围内的插件视图;审阅只在用户+ 主动打开时出现,文件资源由对话打开;不创建 PTY,也无法打开终端选项卡。+ Agent Bash 仍是非交互式的,完整显示在对话中。打包结果不含 PTY/xterm 依赖、终端 IPC 或终端原生负载。- **链接规格**:`02-architecture/02-tech-stack.md`、`03-runtime/01-ipc-protocol.md`、`04-ux/08-component-spec.md` §5、ADR 0108@@ -3742,9 +3743,10 @@ IPC 请求无法关闭。创造。- **步骤**: 1) 让 Agent 使用固定标题、Markdown 和问题。 2) 逐字节检查新的 `.pi/plan/*.md` 文件和- `plan_approvals` 行。 3)检查卡牌的标题和神器开启者;确认- question/description、validity/deadline 和状态不存在且仅- 提供批准和拒绝。 4) 打开审批模式菜单,选择自动,+ `plan_approvals` 行。 3)检查卡牌的标题和神器开启者;确认开启者在内置文件+ 视图中打开(该视图不可启动时回退到宿主机文件标签,D452),且+ question/description、validity/deadline 和状态不存在且仅提供批准和拒绝。+ 4) 打开审批模式菜单,选择自动,并验证下一个批准默认为自动。 5) 拒绝提案。 6) 确认持久模式为Plan,实时状态为可编辑`planning`,批准门已清除,并接受稍后的提示。 7)让