Skip to content

feat(catalog): publish what each plugin declares it binds - #72

Merged
rmyndharis merged 1 commit into
mainfrom
feat/publish-what-each-plugin-declares
Aug 8, 2026
Merged

feat(catalog): publish what each plugin declares it binds#72
rmyndharis merged 1 commit into
mainfrom
feat/publish-what-each-plugin-declares

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

What

The generated catalog carried 17 keys and not one of them said what a plugin binds — no capability permissions, no network allowlist, no ingress routes.

That catalog is the data source the in-dashboard marketplace reads. So the repository's own guidance — install only plugins you trust — had no in-product evidence behind it: an operator had to come here and open the manifest.

Four fields are published now:

Field What it carries
permissions the manifest's capability permissions
net the manifest net block, or null
ingress [{ route, methods, signature }] per declared route, or null
sessionScoped whether activation is per-session

Core's CatalogEntry declares [key: string]: unknown with the comment "Extra fields are tolerated", so this needs no gateway change and older instances ignore it.

Why the ingress shapes earn their place most

A provisioned ingress route is a @Public() endpoint. Which routes a plugin opens — and whether they are signed — is exactly the thing worth knowing before an install rather than after one.

The caveat is the point, not a footnote

docs/30-plugin-sandboxing.md says it in bold: a worker_thread is a separate V8 context in the same OS process, under the same user — not an OS-level sandbox. A plugin keeps require('fs'), process and raw sockets whatever it declares here, and net.allow gates the host-mediated ctx.net.fetch, not the plugin's own outbound traffic.

So an empty permissions array means the plugin binds no mediated capability. It does not mean the plugin can do nothing.

PLUGIN-STANDARD.md now carries that paragraph directly beside the field list. Publishing these fields without it would be worse than not publishing them — a reader would take an allowlist for a constraint, and act on a guarantee that does not exist. That is the whole reason this change is shaped as "declarations of intent, documented as such" rather than a security panel.

Tests

Two: the published fields must match the manifests they are generated from, and every plugin publishing an ingress route must say whether it is signed.

Mutation-checked — emptying one plugin's published permissions fails the first and nothing else.

Verification

550 tests passing; node scripts/catalog.mjs --check reports the catalog up to date.

The catalog carried 17 keys and none of them said anything about what a plugin
binds — not its capability permissions, not its network allowlist, not its
ingress routes. It is the data source the in-dashboard marketplace reads, so
"install only plugins you trust" had no in-product evidence to work from: an
operator had to open the manifest in this repository to see any of it.

Four fields are published now: permissions, net, the ingress route shapes
(route, methods, whether signed) and sessionScoped. Core tolerates unknown
catalog keys by design, so this needs no gateway change and older instances
ignore it.

The ingress shapes are the part that earns its place. A provisioned ingress
route is a @public() endpoint, so which routes a plugin opens — and whether they
are signed — is worth knowing before the install rather than after.

They are documented as declarations of intent, not as an enforcement boundary,
and the standard now carries that caveat in bold next to the field list. The
sandboxing doc is explicit that a worker_thread is not an OS-level sandbox: a
plugin keeps require('fs'), process and raw sockets whatever it declares, and
net.allow gates the host-mediated ctx.net.fetch rather than the plugin's own
traffic. An empty permissions array means no mediated capability is bound — not
that the plugin can do nothing.

Publishing this without that paragraph would be worse than not publishing it,
because a reader would take an allowlist for a constraint.

Two tests hold the published fields to the manifests they are generated from.
@rmyndharis
rmyndharis merged commit 4c086f3 into main Aug 8, 2026
1 check passed
@rmyndharis
rmyndharis deleted the feat/publish-what-each-plugin-declares branch August 8, 2026 07:01
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