Review in Change Stack →Review in Change Stack →
Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: 829ee9723c66e27234ef82a6091712bbd76d2422
- Latest commit, not reviewed: d8f21aaeb6ebb76b6c723c6517e9042748c84b19
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
Walkthrough
The pull request adds server-side plugin installation and execution, plugin tools, settings, actions, events, and views, with web and mobile interfaces. It also adds contribution-status reporting, run-finalization events, desktop navigation checks for plugin views, and a typed web side-panel registry.
Changes: Plugin platform
Layer / File(s) Summary Plugin contracts and server services
packages/contracts/src/plugin*.ts,apps/server/src/plugins/*,apps/server/src/persistence/Migrations/*Adds plugin contracts, installation and process management, settings and storage, actions, tools, views, npm package handling, and event delivery. Adds persistence migrations and RPC/MCP integration. Plugin client features
packages/client-runtime/src/state/plugin*.ts,apps/web/src/components/settings/*,apps/web/src/panels/pluginView/*,apps/mobile/src/features/plugins/*,apps/mobile/src/features/settings/SettingsPluginsRouteScreen.tsxAdds capability-gated client state, plugin management and settings screens, action entry points, and plugin-view panels. Web panel registry and navigation
apps/web/src/panels/*,apps/web/src/components/ChatView.tsx,apps/web/src/components/RightPanelTabs.tsx,apps/desktop/src/window/*Adds typed lazy panel registration and shared panel context, connects plugin views to right-panel surfaces, and vetoes selected subframe navigations from plugin views. Contribution status
Layer / File(s) Summary Status contract, storage, and RPC
packages/contracts/src/contributionStatus.ts,packages/provider-core/src/server/ContributionStatusStore.ts,apps/server/src/contributions/*,apps/server/src/ws.tsAdds contribution-status schemas, bounded in-memory storage, and an authorized subscription RPC. Status producers and displays
packages/provider-pi/src/server/adapter.ts,packages/client-runtime/src/state/contributionStatus.ts,apps/web/src/components/chat/ThreadContributionStatus*,apps/mobile/src/features/threads/ThreadContributionStatusStrip.tsxRoutes Pi extension status into the store and displays status items in web and mobile thread views. Run finalization
Layer / File(s) Summary Finalization events and service
packages/contracts/src/orchestrationV2.ts,apps/server/src/orchestration-v2/RunFinalized.ts,apps/server/src/orchestration-v2/RunFinalizationService.ts,apps/server/src/orchestration-v2/EventSink.tsAdds finalized and finalization-failed events, replayable checkpoint capture and workspace refresh, and lease-checked failure recording. Worker, projections, and validation
apps/server/src/orchestration-v2/EffectWorker.ts,apps/server/src/orchestration-v2/ProjectionStore.ts,apps/server/src/orchestration-v2/RunFinalized.test.ts,packages/client-runtime/src/state/orchestrationV2Projection.tsAdds terminal failure handling and retry backoff. Projection paths ignore finalization milestones, with tests for retries, cancellation, and recovery. Estimated code review effort: 5 (Critical) | ~120 minutes
Merge Risk: External image Low · previous review 829ee
The plugin platform is broadly guarded, but several small correctness issues remain: plugin-view tabs can have ambiguous IDs, and Pi status bindings can be ordered incorrectly. The PR is mergeable with follow-up on these narrow cases.
Security Architecture Review
Security architecture risk: 🟡 Moderate · up to
829eePlugins add administrator-approved code execution with access to resources available to the server account. Administrative permission checks, source approval, isolated views, and process-lifetime cleanup provide meaningful controls. No security bypass was established in the inspected paths, but desktop navigation behavior and some downstream recovery paths remain incompletely verified.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
- inferred — A malicious administrator-approved plugin can affect resources accessible to the server OS account, including accessible project data, credential files, and network destinations. Host capabilities and process resource limits do not establish tenant, filesystem, or network confinement. The environment allowlist reduces direct inheritance of unrelated environment variables but does not remove OS-user authority.
Trust Boundaries and Controls
- observed — WebSocket authentication produces the session whose scopes authorize RPC execution. Plugin code-selection, consent, settings mutation, and npm management require administrative access-write authority; already-enabled action and view handlers require orchestration-operate authority. The inspected client permission overrides do not replace these plugin scope assignments. Catalogue consent binds approval to inspected bytes and capabilities.
- observed — Plugin views use nested script-enabled sandboxed srcdoc frames without same-origin permission. The host bridge checks the current view window and binds calls to the selected installation, generation, and view. Desktop navigation additionally vetoes non-srcdoc navigation inside recognized view ancestry unless initiated by the main frame. Runtime provenance of the frame metadata remains unresolved; no metadata-forgery or sandbox escape was demonstrated.
Hardening Proposals
- proposed — Add an Electron integration check for nested sandboxed srcdoc navigation, including missing frame metadata, initiator-token identity, and host-initiated mounting. This would validate the runtime assumptions behind the navigation predicate; it is not evidence of an existing bypass.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description is detailed and covers the problem, implementation, verification evidence, limitations, UI evidence, and agent attribution. However, it does not provide the required explicit maintaine… Add an explicit maintainer approval comment or link for the plugin-system scope and direction, or document why this focused change qualifies for the approval exemption. Update Verification with checks and UI evidence performed at the curren… Passed Passed checks: 3 passed
Check name Status Explanation Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Title check Passed The title clearly identifies the primary change: allowing plugins to show statuses on threads.
Full details: Description check
Explanation
The description is detailed and covers the problem, implementation, verification evidence, limitations, UI evidence, and agent attribution. However, it does not provide the required explicit maintainer approval for the plugin-system scope; it states that approval remains outstanding. The verification evidence is also largely historical and notes that current integrated web, desktop, and native-client verification was not performed.
Resolution
Add an explicit maintainer approval comment or link for the plugin-system scope and direction, or document why this focused change qualifies for the approval exemption. Update Verification with checks and UI evidence performed at the current head, or clearly identify the remaining verification as a blocking limitation.
Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts