Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0019: Work panel subsystems (embedded browser, git review, file browsing)
Context
The work panel docks workspace review, browser preview, file browsing, and, once, an interactive shell beside the conversation. The sandboxed renderer cannot do workspace or window work itself, so each surface needs a host-owned boundary.
Decision
- Browser. Bundled plugin
pi.browserprovides Chrome and agent CDP (ADR 0170); Electron Main owns the guestWebContentsView, navigation and popup policy, permission denial, and bounds clamping. - Review. Review snapshots and guarded rollback open only on explicit user action, never from a tool result (D451).
- Files. Project browsing is the bundled
pi.filesplugin over the public contributed-view and filesystem APIs. - Transcript resources. File and URL artifacts stay session-scoped tabs.
The interactive terminal is gone (ADR 0108); Agent Bash is an independent non-interactive tool.
Consequences
- Native surfaces keep their bounds rules and the renderer stays sandboxed.
- Review and artifacts keep conversation ownership; browsing is a plugin.
Alternatives considered
- Every surface as an agent tool: rejected; browsing and review would inherit agent permissions.
- Private host capabilities for bundled plugins: rejected; it bypasses the public plugin boundary.