Skip to content

feat(app): plugins that aren't built in can be browsed and installed from settings - #53

Merged
sean-brydon merged 1 commit into
mainfrom
feat/plugin-marketplace
Oct 11, 2026
Merged

sean-brydon merged 1 commit into
mainfrom
feat/plugin-marketplace

Conversation

@sean-brydon

Copy link
Copy Markdown
Collaborator

What you get

Settings → Plugins has a Browse group: plugins that are not built into the app, read from a listing on the site, each with Install, Update or Installed. An installed plugin shows under Installed, off, and the existing consent dialog is still what turns it on. Plugins installed this way can be removed from the same page. hello-ports is the first listing.

How it works

  • The listing is site/plugins/index.json plus each plugin's built files under site/plugins/<id>/<version>/, written by pnpm -C app build:marketplace from any plugins/<id>/ whose manifest says "marketplace": true, and committed like the demo. pnpm -C app check:marketplace fails when it is stale.
  • The laptop agent does the fetching (internal/agent/marketplace.go), because the app's CSP only lets the window talk to the agent: GET /v1/marketplace, POST /v1/marketplace/{id}/install, DELETE /v1/marketplace/{id}. BERTH_PLUGIN_REGISTRY points it at another listing.
  • Install verifies every file's size and SHA-256 against the listing, refuses paths that leave the plugin's folder and file URLs that are not on the registry's own address, stages beside plugins/ and swaps with rollback. It never enables a plugin. A folder you made by hand is replaced only after you confirm.
  • The checksum proves the files are the ones the listing describes, not who wrote the listing; the docs say so.

Before this is useful

The real app's Browse says it can't reach the listing until site/ is deployed with this change, since berthd.app/plugins/index.json does not exist yet.

How it was checked

By the agent that built it: go vet ./... && go test -race ./..., cargo check, the pnpm chain in app, npx tsc -p e2e, the docs build, marketplace.spec.ts 40 passes over 5 repeats, and an end-to-end run of the built berth agent with a throwaway home against site/ served locally (install, consent, load, remove).

Re-run by me before pushing: go vet and the marketplace Go tests, typecheck:plugins, check:marketplace, pnpm build, and marketplace.spec.ts (8 pass). I read the install and fetch code.

Known: settings-boxes in a11y.spec.ts fails here as it does on main (a list-markup violation in Settings → Boxes).

Next

A listing entry will gain a box-side helper for plugins that need one. Unknown listing fields are already ignored, and the same-host rule for file URLs will need loosening if a helper is hosted elsewhere.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
berth Ready Ready Preview Oct 11, 2026 9:33pm UTC
berth-docs Ready Ready Preview Oct 11, 2026 9:33pm UTC

Request Review

…from settings

Settings → Plugins has a Browse group: the plugins listed on the public
site, each with Install, Update or Installed. Installing puts a plugin in
~/.berth/plugins and never turns it on; the consent dialog still does, and
an update is asked about again.

- site/plugins/ is the listing, built and committed by
  `pnpm -C app build:marketplace` from every plugins/<id>/ that says
  "marketplace": true. hello-ports is the first.
- The laptop agent reads it (GET /v1/marketplace), since the app's page may
  talk only to the agent: https only, each file checked against the
  listing's size and SHA-256, written only inside the plugin's own folder,
  and swapped into place whole. It installs over a folder it didn't install
  only when asked, and removes only what it installed.
- Mock mode lists three synthetic plugins, one per state a row has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sean-brydon
sean-brydon force-pushed the feat/plugin-marketplace branch from b434d72 to d5c6442 Compare October 11, 2026 21:33
@sean-brydon
sean-brydon merged commit 321860a into main Oct 11, 2026
8 checks passed
@linear-code

linear-code Bot commented Oct 11, 2026

Copy link
Copy Markdown

ENG-5892

This branch was successfully deployed

2 active deployments
Preview – berth-docs — d5c6442f Deployed Oct 11, 2026 by vercel[bot]
Preview – berth — d5c6442f Deployed Oct 11, 2026 by vercel[bot]
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