Skip to content

plugins: Plugin Alpha - #35470

Merged
nwparker merged 260 commits into
mainfrom
nwparker/plugin-alpha
Oct 29, 2026
Merged

nwparker merged 260 commits into
mainfrom
nwparker/plugin-alpha

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 250 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15965 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2701 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13264
Prod 518 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31299 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7502 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23797

ELI5

This lands the rest of the plugin system in one go. Earlier pieces (sources, approval, app and terminal themes) are already in main. This adds what plugins can contribute (icon themes, syntax highlighting, custom editors), how people find and install them (one plugin list, one-step install, catalog suggestions, orca://plugins/... links), and the safety and schema work needed before plugins ship.

It combines these stacked PRs, which are closed in favor of this one:

What Changed

Before: plugins could only add app and terminal themes, and the install and settings flow was split across several screens.

After: plugins can also add file/folder icon themes, syntax packs (highlighted in a worker, live), and custom editors for file types Orca shows as binary or plain text. Settings → Plugins is one list with a page per plugin, one-step install with inline consent, and Update all. Opening a file Orca can't highlight suggests the matching official plugin. orca://plugins/<id> links open that plugin's page and never install anything. Manifests and catalogs share one documented, versioned schema (manifest v2 needs Orca 1.4.244), with errors that say what to fix.

Mechanism: the stack's commits rebased onto main as-is, plus small follow-ups for files main moved or added meanwhile (new language-pack coverage field, the panel-lifetime test's imports, the stale-panel-load fix ported into the shared frame opener). The review fixes from the stacked PRs are included (dotted icon extensions, default-black icons stay full color, failed icon loads drop old images, override clearing when adopting a theme's terminal colors).

Why

Merging 14 stacked PRs one at a time meant a full CI cycle and a rebase for each. The PRs were already reviewed in order, and GitHub's stack merge isn't set up for them. One PR lands the same commits with one CI run.

Linked Issue

Fixes #

N/A: internal plugin-system work tracked by the stacked PRs above.

Visual Proof

See the linked PRs; each has its own before/after. Nothing here changes UI beyond what they show.

Testing

  • I manually tested these changes locally: pnpm tc, plugin/i18n unit suites (221 files), ratchets, localization checks, plugin schema regeneration (no diff) and the changed-code quality gate, all on macOS.
  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 0/5

[High impact] The plugin changes reach plugin installation, access review, and several file-editing workflows.

Do not merge until repository identity checks, update opt-out checks, and the remaining disabled-plugin approval race are fixed.

Findings

  1. P1 Security Different repositories share approval ▶
  2. P1 Updates ignore a recent opt-out ▶
  3. P1 Security Updates restart disabled plugins ▶

Summary

This PR adds plugin catalogs, automatic updates, icon themes, syntax packs, custom editors, and install links.

  • Plugins can add file icons, syntax highlighting, editors, and new-file types.
  • Custom plugin editors work inside Orca's file tabs.
  • Settings brings plugin browsing, plugin pages, and installs into one flow.
  • Catalog installs and updates use pinned releases and access review.
  • Plugin authors can validate versioned manifests and catalog releases.
  • Orca links open the matching plugin page without installing it.

Diagram

sequenceDiagram
  participant User
  participant Updater
  participant Catalog
  participant Installer
  participant Consent
  Updater->>Catalog: Find and preview pinned release
  Updater->>Updater: Check added access and repository move
  User->>Updater: Turn automatic updates off
  Updater->>Installer: Install after pending requests finish
  Installer->>Consent: Carry previous approval
Loading

Reviews (9) · Last reviewed commit: "fix(plugins): drop syntax loads that lan..." · Reviewed by Greptile

Comment on lines +71 to +73
try {
await input.approve(next.pluginKey, next.consentFingerprint)
return true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Updates restart disabled plugins

An automatic update can turn a plugin back on after the user disables it. predecessor is captured before installation, but approval is carried afterward without checking for disablement during that wait. For worker and panel updates, changed content changes the fingerprint, so input.approve calls applyPluginConsent, which removes the plugin from disabledPlugins and starts its new code. Preserve the current disabled state when carrying approval, including across the approval call's own waits.

How this was verified: The update keeps its earlier approval decision across installation, then calls an approval path that removes the plugin from the current disabled list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: carrying approval now rechecks the live disabled list after the install and file reads, so an update never re-enables a plugin the user turned off meanwhile; test added.

@nwparker
nwparker force-pushed the nwparker/plugin-alpha branch from eb09072 to a4f1ddc Compare October 28, 2026 23:54
@nwparker
nwparker force-pushed the nwparker/plugin-alpha branch 2 times, most recently from ece4c4b to a79d2d3 Compare October 29, 2026 00:09
@nwparker
nwparker force-pushed the nwparker/plugin-alpha branch from a79d2d3 to 2b814f1 Compare October 29, 2026 00:29
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker force-pushed the nwparker/plugin-alpha branch 2 times, most recently from a21b788 to 4c11e5c Compare October 29, 2026 01:06
@nwparker
nwparker force-pushed the nwparker/plugin-alpha branch from 4c11e5c to 923c4f3 Compare October 29, 2026 01:49
if (!repository) {
return null
}
const path = [...segments.slice(0, -1), repository].join('/').toLowerCase()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Different repositories share approval

If a Git server treats repository paths as case-sensitive, team/Plugin.git and team/plugin.git can be different repositories. isSameGitRepository lowercases both paths, while Git fetches the original URL. A catalog can therefore switch repositories without setting repositoryMoved, allowing an automatic update to run the new repository’s code under the old approval.

Preserve path case unless the host is known to ignore it.

How this was verified: Git receives the unchanged source URL, while the update’s repository check compares lowercased paths before carrying approval.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving as is for this PR: only the catalog owner can change a listing's URL, and an update under a carried approval is still pinned to the catalog's commit and content hash and rechecked for new access. Case-preserving comparison for case-sensitive hosts is a follow-up.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. Given the catalog-owner control and the per-update commit/content-hash pinning and access checks, we can defer case-preserving repository comparison as a follow-up. I’ll leave this unchanged for the PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #35640: paths are now compared case-sensitively except on GitHub, GitLab.com and Bitbucket, so a self-hosted respelling counts as a moved repository and needs review.

Comment on lines +182 to +186
await refreshKillList()
const outcome: PluginCatalogInstallOutcome = await installCatalogReleaseWithApproval({
pluginKey: plugin.pluginKey,
pluginService,
install: () => installer.install(preview, { requireInstalled: true }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Updates ignore a recent opt-out

updateOne never checks isEnabled() again after its awaited work. If the user turns automatic updates off while the preview or safety-list request is pending, this code still installs the update and replaces the version they chose to keep. Stopping the timer does not stop the running pass.

Recheck the live policy before starting installation, and carry that check through any wait before publication.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving as is for this PR: the window is a single in-flight pass. Turning auto-update off stops every later pass, and the installed release is still the catalog-pinned, access-checked one. A recheck before install is a follow-up.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood—we’ll leave this unchanged for this PR. Turning auto-update off prevents later passes, but a pass already in flight can still install its pinned, access-checked release; adding a live-policy recheck before installation remains a follow-up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #35642: the install step itself rechecks the auto-update setting, so a pass in flight installs nothing once the user opts out.

@nwparker
nwparker merged commit edc0373 into main Oct 29, 2026
83 checks passed
ggrafhalfbrick added a commit to ggrafhalfbrick/orca that referenced this pull request Oct 29, 2026
Adapt task sources and plugin settings to Plugin Alpha (stablyai#35470):

- taskSources and settings move from reserved to real contribution
  points (Since 1.4.245), with policy entries: task sources need
  trusted-worker, settings are declarative; neither binds content or
  adds a catalog type. tasks:provide joins the capabilities.
- The worker channel uses upstream's req/res envelope: a new
  taskSource.invoke method beside command.invoke, sharing its id space,
  cancel-on-timeout and handler context. Ready reports taskSources.
- Plugin settings render as a Settings section on the plugin's page
  instead of a dialog from the old settings row.
- Task sources show in the page's Adds list; the reference docs and
  authoring guide describe both points; hello-tasks is a v2 manifest.
- Modules follow the new plugins/ layout (tasks/, contributions/,
  workers/); findApprovedPlugin replaces the PR's findStartablePlugin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
smwbev added a commit to smwbev/orca that referenced this pull request Oct 29, 2026
stablyai#35470 moved the allowlist to languages/ and the artifact test to
artifacts/, renamed the pane's `experimental` badge to `alpha`, and
dropped `hideLogs`, `restartCount`, `restarting` and `running` from the
installed row. Exempt `alpha` in place of `experimental`, drop the four
removed paths, import the allowlist from its new folder, and point the
refusal cases at trust copy the row and the install dialog still have:
`killListMessage`, `invalidPluginError`, `enableLabel`, and the dialog's
`description` and `gitHelp`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant