Skip to content

plugins: Open in Orca install links (orca://plugins/...) - #34345

Closed
nwparker wants to merge 2 commits into
nwparker/plugins-v2-16-ship-hardeningfrom
nwparker/plugins-v2-17-deeplinks
Closed

nwparker wants to merge 2 commits into
nwparker/plugins-v2-16-ship-hardeningfrom
nwparker/plugins-v2-17-deeplinks

Conversation

@nwparker

@nwparker nwparker commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​468 $\color{#cf222e}{\Huge{\mathbf{−}}}$​62 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​406
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​451 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​434

ELI5

A plugin author can now put an "Open in Orca" link in their README. When someone clicks it, Orca opens and shows that plugin's page in Settings → Plugins. The link never installs anything: the user still reads the page and presses Install.

What Changed

Link format. orca://plugins/<publisher>.<id>?catalog=<official | community | catalog Git URL>. Leave out catalog to use the official catalog. community points at https://github.com/stablyai/orca-community-plugins.git. Any other value must be an HTTPS or SSH Git URL of at most 512 characters, with no password or token in it, and it is read at main. Browsers often block custom schemes, so the docs tell authors to link to https://onorca.dev/plugins/<publisher>.<id>?catalog=<same value>. That page is a separate piece of work: it will try the orca:// link and show install steps if Orca isn't installed. This PR only documents its URL shape.

What the user sees

  • Before: nothing happened. Orca ignored orca://plugins/....
  • After, valid link: Orca comes forward and opens Settings → Plugins at that plugin's page with the normal Install button.
    • If plugins are off, the user first sees Turn on plugins. After they press it, the plugin's page opens.
    • If the catalog is one the user hasn't added (community included), Orca first asks Add catalog github.com/acme? and shows the full URL. Nothing is downloaded until they press Add catalog. Cancel does nothing.
  • After, malformed link: Orca shows one small "That plugin link isn't valid." toast and does nothing else.

How it works

  • Shared parser (src/shared/plugins/catalog/plugin-install-link.ts). It caps the link at 2048 characters. The id must be <publisher>.<id> and pass the existing plugin-id checks. It rejects any query parameter other than one catalog, and rejects fragments. Catalog URLs go through the existing isAllowedPluginGitUrl, so only HTTPS or SSH URLs without credentials get through. A reserved publisher such as stablyai is accepted only with the official catalog. The installer already enforces this, so an attacker can't use a lookalike catalog to make a fake page.

  • Main process reuses the existing skill-share deep-link path:

    • macOS open-url
    • Windows and Linux second-instance argv, plus cold-start argv
    • the hand-off from the background helper process to the desktop app
    • the push-plus-pull delivery to the window, so a link that arrives before the window is ready isn't lost

    SkillShareDeepLinkState became a small generic PendingDeepLinkState, which both link types now use. It ignores the same link repeated within 3 seconds and allows at most 5 links in that window.

  • Bringing the window forward. This goes through the existing desktop-activation gate, which already raises the window only for real user launches and never for background or test launches.

  • Windows registration. electron-builder writes orca:// into the macOS app bundle and the Linux desktop entry, but the Windows installer does not register it. Packaged Windows desktop launches now call setAsDefaultProtocolClient('orca') once. Dev, test, serve and background launches never call it.

  • Renderer. The parsed link waits in the existing plugin page-request store, the same one file-type suggestions use. The plugin catalog view picks it up once its catalogs have loaded, so a link that arrives while plugins are off is kept until they're turned on. A new dialog handles the unknown-catalog question.

Docs. There is a new "Install links" section in docs/reference/plugin-catalog.md, generated from plugin-schema-policy-notes.ts. It covers the format, the rules, the https page shape and a README snippet you can copy.

Why

  • Reuse over a new path. Orca already had a working, tested deep-link path for skill shares, covering macOS, the second-instance case, the background-helper hand-off and delivery to the window. Extending it is a small diff and gives both link types the same delivery and dedupe.
  • Page, not install. Opening the plugin page keeps the existing approval flow as the only way to install, so a link can never install a plugin on its own.
  • Ask before fetching. The confirm step means a link can't make Orca contact a server the user never chose.
  • Validation lives in shared code. The parser runs in the renderer, which acts on the link. Main only checks the link's prefix and enforces the length cap, so a malformed link still reaches the error toast.

Linked Issue

N/A (maintainer stack)

Visual Proof

Plugins off, after clicking a link (the earlier malformed link left its toast in the corner):
plugins off

The plugin page after Turn on plugins. Nothing is installed:
plugin page

A link that names an unknown catalog:
add catalog prompt

The screenshots come from a hidden window in the e2e test below.

Testing

  • Unit tests:

    • plugin-install-link.test.ts: parsing, the length, charset, credential and reserved-publisher checks, and Windows/Linux argv.
    • plugin-install-link-state.test.ts: repeat and burst dedupe, cold-start and second-instance capture, and which URLs macOS open-url claims.
    • orca-protocol-registration.test.ts: registers only on packaged Windows desktop launches.
    • use-plugin-install-link.test.tsx: routing to the page, keeping the link while plugins are off, the unknown-catalog confirm and cancel, and a check that installMarketplacePlugin is never called.
    • macos-desktop-handoff.test.ts: the hand-off now carries the plugin link.
  • Hidden e2e, tests/e2e/plugin-install-link.spec.ts. It delivers the link by emitting main's open-url event, so no protocol is registered on the test machine, and it runs with ORCA_BACKGROUND_LAUNCH=1. It covers the malformed-link toast, plugins off then Turn on then the plugin page, no install, the unknown-catalog prompt, and that Cancel adds no catalog. plugin-file-type-suggestion.spec.ts still passes after its catalog fixture moved into a shared helper.

  • pnpm tc, oxlint, check:code-quality:changed and the localization sync and coverage checks all pass.

  • Tested on macOS only. Windows protocol registration and second-instance argv are covered by unit tests only.

  • I manually tested these changes locally

  • 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

  • SSH/remote. The link is handled by the local desktop app. The plugin page and the catalog it adds go through the same plugin API that Settings → Plugins already uses. The web client gets no-op stubs.
  • Older and newer clients. These are new optional IPC channels on the same machine, with no wire change between clients and hosts.
  • Skill-share links now get the same 3-second repeat dedupe.

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)

@nwparker
nwparker force-pushed the nwparker/plugins-v2-16-ship-hardening branch from 3fb174f to 66f6cb3 Compare October 28, 2026 04:59
@nwparker
nwparker force-pushed the nwparker/plugins-v2-17-deeplinks branch from e65190d to cf38620 Compare October 28, 2026 04:59
@nwparker
nwparker force-pushed the nwparker/plugins-v2-16-ship-hardening branch from 66f6cb3 to dca9872 Compare October 28, 2026 05:31
@nwparker
nwparker force-pushed the nwparker/plugins-v2-17-deeplinks branch from cf38620 to 8d70df3 Compare October 28, 2026 05:32
@nwparker
nwparker force-pushed the nwparker/plugins-v2-16-ship-hardening branch from dca9872 to c58df2c Compare October 28, 2026 05:46
@nwparker
nwparker force-pushed the nwparker/plugins-v2-17-deeplinks branch from 8d70df3 to 6d821a4 Compare October 28, 2026 05:46
nwparker and others added 2 commits October 28, 2026 03:45
orca://plugins/<publisher.id>?catalog=<official|community|git URL> opens
Settings -> Plugins at that plugin; it never installs. Plugins off shows
Turn on plugins first, an unknown catalog asks before it is fetched, and a
malformed link only toasts. Reuses the skill-share deep-link path (open-url,
second-instance argv, sidecar handoff) with repeat/burst dedupe, and
registers orca:// on packaged Windows, which NSIS leaves unregistered.

Co-Authored-By: Claude <[email protected]>
@nwparker
nwparker force-pushed the nwparker/plugins-v2-16-ship-hardening branch from c58df2c to 67b5e44 Compare October 28, 2026 10:53
@nwparker
nwparker force-pushed the nwparker/plugins-v2-17-deeplinks branch from 6d821a4 to 5618bc4 Compare October 28, 2026 10:53
@nwparker
nwparker marked this pull request as ready for review October 28, 2026 12:38
@nwparker nwparker mentioned this pull request Oct 28, 2026
7 of 9 tasks
@nwparker

Copy link
Copy Markdown
Contributor Author

Folded into #35470 (Plugin Alpha), which lands the rest of the plugin stack in one PR.

@nwparker nwparker closed this Oct 28, 2026
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