Skip to content

Curated known-registries list with pinned identity - #3865

Open
MattDHill wants to merge 3 commits into
masterfrom
feat/known-registries
Open

Curated known-registries list with pinned identity#3865
MattDHill wants to merge 3 commits into
masterfrom
feat/known-registries

Conversation

@MattDHill

Copy link
Copy Markdown
Member

Start9 publishes a manifest of alternative registries at marketplace.start9.com, pinning the name and icon each one is expected to present. Users pick from that list instead of only typing a URL, and the pin is what StartOS displays.

The manifest

projects/brochure-marketplace/well-known/startos/registries.json, copied to .well-known by an angular.json assets entry — the deploy rsyncs with --delete, so it has to come out of the build. It ships empty; nothing is listed until Start9 populates it.

Two readers, independently: the brochure fetches it same-origin, and StartOS fetches it through a new marketplace.known-registries RPC. Going through the backend keeps the request on the server's connection rather than adding a third-party request from the user's browser, and avoids a CORS header on a prod nginx none of us can change from here. Recorded as a coupled change in the root AGENTS.md, along with the wrinkle that the site answers an unknown path with index.html and a 200, so a stale path fails as a JSON parse error rather than a 404.

Identity pinning

registries$ resolves each entry through resolveIdentity rather than the name a registry reports. That closes a hole that exists today: updateRegistryName writes whatever registry.info returns straight into ui.registries, so a custom registry could label itself "Start9 Registry" and sit in the picker next to the real one. A live name colliding with a pinned one now renders as the host instead.

identityMatches gates the other direction — adding a listed registry whose live name or icon has drifted from the pin is refused. Icons compare as decoded bytes, since DataUrl formatting isn't stable enough for string equality. No registry currently sets an icon, so the icon half only engages once one does.

Start9's own five registries carry compiled-in pins (defaultIdentities) so the protection holds offline and on first boot, and so the manifest can stay purely additive.

Add dialog

"Add" now opens a dialog with two sections rather than a bare URL prompt: a select over the curated list (icon, name, URL), and the custom URL field. It carries a tuiNotification saying Start9 neither operates these registries nor supports their services.

That caveat previously fired as a dialog on every switch to a non-default registry, which is now removed. Worth a look before merging: that dialog was also the only warning for Community, Beta and Alpha, and none of those reach the new modal the way a listed or custom registry does — Community ships pre-installed and can't be deleted, so it is never "added". Community loses its "packaged by community members, contact the package developer" message, and Alpha/Beta lose "expected to contain bugs, could damage your system", which the new banner does not say since it is about operation and support rather than stability. Easy to keep registryWarning for just those three if you'd rather.

Drive-by

Three components style tui-notification — Taiga 4's element form, which matches nothing against v5's <div tuiNotification> host directive. All three were dead rules, which is why a dialog's banner sits flush against whatever follows it. One global rule in shared.scss replaces the two that were only about spacing.

Still broken and left alone: routes/metrics/time.component.ts has the same dead selector, and there it isn't cosmetic — the :host-context(tui-root._mobile) rule meant to swap the banner for an icon on mobile has never fired. Page component with visible mobile behavior, so it wants its own change.

Bindings

KnownRegistry.ts and its index.ts line are hand-written to match what ts-rs would emit. make start-core-ts-bindings does not fit on the machine this was written on, so Generated Artifacts is the first thing to compile marketplace.rs at all — if the Rust or the binding is wrong, that job is where it shows.

Not included

  • The publish-time drift check — a Start9-side job that re-fetches each listed registry and drops one whose identity moved. Ops, not repo code, and it needs a decision about where it runs. Without it the client-side refusal is the only guard, and a legitimate rename silently makes an entry unaddable until someone updates the manifest.
  • Signing the manifest. It is served from the same VPS as start9.com and docs.start9.com, so a compromise there could re-pin identities. registry/signer.rs already has the primitives; it needs a key-management decision.

Verification

npm run check across every project, check-i18n (all five dictionaries), web-format-check, start-core-format-check, and AOT builds of ui and brochure — the builds being the only thing that type-checks templates under strictTemplates. The Rust is unbuilt; see above.

🤖 Generated with Claude Code

@MattDHill MattDHill added StartOS brochure Brochure marketplace repo Repository maintenance labels Aug 28, 2026
MattDHill and others added 3 commits September 2, 2026 21:13
Start9 publishes a manifest of alternative registries at
marketplace.start9.com, pinning the name and icon each one is expected to
present. StartOS reads it through a new `marketplace.known-registries` RPC so
the fetch goes over the server's connection; the brochure reads the same file
same-origin.

Display resolves through the pin rather than what a registry reports, which
closes the impersonation hole: `updateRegistryName` writes whatever
`registry.info` returns into `ui.registries`, so a custom registry could
previously label itself "Start9 Registry" in the picker. A name that collides
with a pinned one now renders as the host instead, and adding a listed registry
whose live identity has drifted from the pin is refused.

The dialog behind "Add" replaces the bare URL prompt with two sections — a
select over the curated list, and the URL field — and carries the caveat that
Start9 neither operates these registries nor supports their services. That
caveat used to fire as a dialog on every registry switch, which is now dropped.

Also fixes a Taiga 4 leftover: three components style `tui-notification`, which
matches nothing against v5's host-directive form, leaving a dialog's banner
flush against whatever follows it. One global rule replaces them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Only the leaf was no_cli, so clap still saw an empty `marketplace`
subcommand and the man-page check wanted a page for it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
decodeURIComponent throws on bad percent-encoding, and it sat outside
the try, so a registry serving such an icon failed the add with a
URIError instead of the identity message.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@MattDHill
MattDHill force-pushed the feat/known-registries branch from b03057f to 038634c Compare September 3, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brochure Brochure marketplace repo Repository maintenance StartOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant