Skip to content

Catalog and install review for gated plugins and public endpoints (AS-03) - #1742

Closed
michielbdejong wants to merge 3 commits into
claude/manifest-v3-httpfrom
claude/catalog-gated-ui
Closed

michielbdejong wants to merge 3 commits into
claude/manifest-v3-httpfrom
claude/catalog-gated-ui

Conversation

@michielbdejong

@michielbdejong michielbdejong commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1713. Stacked on #1732 (which is on #1726).

What changes

Catalog (routes/IntegrationStore.tsx, chunks/Plugins/catalogGate.ts), from hostFeatures.pluginRoutes and each entry's requires (design 0.5):

  • If the build doesn't have plugin routes, or the server is from before Build and runtime gates for plugin public surfaces #1711 and sends no hostFeatures: gated plugins are hidden. One line at the end says "N plugins need server features this server doesn't have."
  • If the build has the feature but the level is too low, or a listener or sidecar isn't configured: the plugin is marked with a "Needs public endpoints" pill and the exact refusal text from hostFeatureMessage. The card fetches the release manifest to get that text, because requires doesn't list the surfaces.
  • If the gates are open, the plugin is listed as usual.

Install review (InstallationReviewDialog.tsx, new PublicEndpoints.tsx). This dialog is shared by the Store, the zip upload and the Installation page's update, so all three get:

  • A "Public endpoints" section. It lists each route (methods, path, who may call it, whose rights the plugin answers with, write targets, deliveries), well-known claims, write targets, keys, token stores, listeners and sidecars in plain language. It also shows the address that becomes the plugin's public identity, and the sentence "Anyone on the internet can call these endpoints; this plugin decides what they may see."
  • The gate level it needs (--plugin-routes read-only or higher / read-write).
  • When the node refuses, an inline banner with the server's own words, and Install is disabled. The refusal is either predicted with checkHostFeatures or thrown by the server as a HostFeatureUnavailableError (the 409). A generic toast is no longer shown for it. The dialog reads the node's gates itself when the caller hasn't passed them in (usePluginRoutesStatus).

Lib (plugin-manifest-http.ts):

  • requiresGate(requires) and checkGate(gate, node): checkHostFeatures is now checkGate(httpGate(http), node), so the catalog uses the same rules as an install.
  • parsePluginRoutesStatus(body).
  • InstallationReview.http.

Tests

  • lib: for every http-refusals.json case, the verdict from requires matches the verdict from the manifest. The hostFeatures parsing is tested too.
  • catalogGate.test.ts: plugins are hidden when the feature isn't compiled or the server is from before the gates. They are marked when the level is too low or a listener isn't bound, and listed when the gates are open.
  • PublicEndpoints.test.tsx: renders the endpoint list from v3-activitypub.json and the address under a routes origin. The review refuses up front when the level is too low. A thrown HostFeatureUnavailableError is shown inline and disables Install.

Screenshots

Taken against a server built from this branch with --features plugin-routes and started with --plugin-routes read-only. Two v3 releases were published to its catalog: "Public profile" (read-only, listed normally) and "Fediverse actor" (read-write, marked).

Screenshots are not attached yet: the gh CLI cannot upload images. Covered at desktop and mobile width: the catalog with the marked plugin, the review refusal banner with Install disabled, the gate level with the first routes, and the rest of the endpoint list.

Not in this PR

  • The issue's e2e test against a default build (hidden plugin, refused direct link). There is no direct per-plugin link in the Store yet; entries open the review dialog.
  • The upgrade review's diff of added, removed and widened surfaces. Installing through an Installation commit still refuses as plain text from the server; the dialog predicts that refusal before the commit.

🤖 Generated with Claude Code

…eview

The catalog reads `hostFeatures.pluginRoutes` and each entry's derived
`requires`: plugins that need plugin routes this build doesn't have are hidden,
with one line saying how many; plugins that need a higher level (or an unbound
listener or sidecar) are marked "Needs public endpoints" with the refusal text
of design 0.4. The install review lists every public surface in plain words,
the address that becomes the plugin's identity and the level it needs, and
disables Install with an inline banner when the node refuses, whether predicted
from the gates or thrown by the server as `host-feature-unavailable`.

The lib gains `requiresGate` and `checkGate`, so the catalog decides from
`requires` with the same rules the install uses, `parsePluginRoutesStatus`,
and `http` on `InstallationReview`.

Closes #1713

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michielbdejong pushed a commit that referenced this pull request Sep 24, 2026
Conflicts, both sides kept:
- routes/IntegrationStore.tsx: the drive-apps count in nothingToDiscover
  next to #1742's gated catalog (marked releases and their refusals).
- locales/en.po: the CatalogApps/FileImport/InstallationConnections
  entries next to #1742's PublicEndpoints entries; no duplicate msgids.
- browser/lib/src/index.ts: #1730's plugin-upload exports next to
  #1742's checkGate, parsePluginRoutesStatus and requiresGate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review dialog resets its refusal in an effect that depends on
`show`. The mock returned a new `show` on every render, so the effect
cleared the server's 409 refusal right after it was shown, and
'shows the server's 409 refusal' failed whenever the suite ran under
load (it passed on its own). The real hook's functions are stable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test.tsx

The pre-commit lint and format check were skipped when this branch was
committed with --no-verify.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michielbdejong

Copy link
Copy Markdown
Contributor Author

Merge note: claude/atomic-plugins-pin-candidate11 fixes React "unique key" warnings in the "Pinned to … from …" release line (the install review dialog and the Installation page's ReleaseSource), in be4cf7b and 16edb6e. The "from" part is now its own paragraph, with the link written inside the message, which matches develop's #1699. These commits exist only on the candidate. Whichever PR lands this code should take them; plugin.spec.ts's browser-diagnostics check fails without them.

@michielbdejong

Copy link
Copy Markdown
Contributor Author

Merge-risk triage (2026-09-28). This is a read-only review of this PR's own diff. The rule it applies: nothing that works today may break for existing users or clients, and new behaviour is added alongside the old. The stack is being rebased onto develop as one chain before merging, so line references are against the current stacked base.

Verdict: SAFE

UI only. requiresGate only reads plugin-routes:*, operator-listener:* and operator-sidecar:*, so ordinary plugins are never hidden or marked. The .po changes only add strings.

🤖 Generated with Claude Code

@michielbdejong

Copy link
Copy Markdown
Contributor Author

Closing as part of the plugin-host stack cleanup (Q-101): not needed by atomic-plugins now. See the inventory at #1726 (comment). The branch is kept, and pin candidates are unaffected. Closed by Claude (VPS coordinator) on behalf of Michiel.

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