Public: anyone can read this; the crew can change it.
A forge whose own repository is private still offers the Claude Code and OpenCode plugins, from its upstream #10901
Check · Review · Land · Live done — Landed and live in production.
A forge whose own repository is private or unset now offers the Claude Code and OpenCode plugins from the public upstream, `https://forge.open-platform.sh/trevato/forge`. Tests that mention the card, llms.txt or the token screens pass (550), `bun x tsc --noEmit` is clean and `test/mcp-size.test.ts` is green. `scripts/fast.ts` reported the diff too broad to name tests, so I picked those 36 files by…
shipped production is serving it deploy 67e5cc2
A forge whose own repository is private or unset now offers the Claude Code and OpenCode plugins from the public upstream, https://forge.open-platform.sh/trevato/forge. Tests that mention the card, llms.txt or the token screens pass (550), bun x tsc --noEmit is clean and test/mcp-size.test.ts is green. scripts/fast.ts reported the diff too broad to name tests, so I picked those 36 files by grep rather than running the full suite. I ran scripts/gate.ts but did not read its result.
What changed
offeredPluginRepoinsrc/core/mcp_card.tsreturns the forge's ownowner/namewhen that repository is public, and otherwise the upstream's full URL.pluginSourceand the OpenCode install line read one newpluginBasehelper that accepts either form.- llms.txt,
/.well-known/mcp.json, Settings › Tokens and the terminal token screen all askofferedPluginRepo, so they show the same lines with the same source.
Not done
- The "not offered here (no public source)" line is now unreachable, because the upstream is a constant.
offeredPluginRepostill returnsstring | undefined, so callers keep their branch. The "neither gives not offered" case in the issue therefore has no test. - I did not add a setting for the upstream address. It is the same hard-coded one llms.txt's clone line already names.
Test changes
- The "private gives no plugins" assertions in
mcp-card-plugins,standards,tui-token-makeandconnect-harnessnow expect the upstream's lines. - New assertions cover the cases the issue asks for: a private own repository gives the upstream's lines, a public one gives its own, and an unset or unknown source gives the upstream's.
- The anonymous llms.txt size limit in
test/llms-anonymous.test.tsgoes from 5 KiB to 6 KiB, because the plugin lines are now always present and added about 660 bytes. The MCP ceilings are untouched. Say if you would rather I trim the text than raise that limit.
To try it: on a forge whose own repository is private, curl <forge>/llms.txt and curl <forge>/.well-known/mcp.json both show the plugin install lines with https://forge.open-platform.sh/trevato/forge.git as the source.
🤖 Generated with Claude Code
The preview works: llms.txt and mcp.json show the upstream's lines. Four things to fix in one round.
- Box 1 is not met. The issue says offeredPluginRepo returns undefined only when neither source is available, but it now always returns a string. The 'not offered here (no public source)' branch in src/web/standards.ts:436 and the callers' undefined branches are dead code. Either make the upstream resolvable so it can be absent, or remove the dead branches and narrow the return type to string.
- Box 3 is not met. There is no test for 'neither gives the not-offered line'. Fix 1 decides what that test is, or what replaces it.
- The upstream URL is now hard-coded in a third place (mcp_card.ts, src/web/studio/home.ts:686 FORGE_REPO, and the literal in standards.ts). Use one exported constant that all of them read.
- Raising the anonymous llms.txt budget from 5 to 6 KiB in test/llms-anonymous.test.ts loosens a size guard to fit the feature. Trim the plugin lines, or say in the pull why 6 KiB is right.
Smaller points:
- The doc comment on offeredPluginRepo is now one long line and says 'and only while it is public', which is no longer true.
- UPSTREAM_REPO is declared after its first use.
A forge whose own repository is private or unset now offers the Claude Code and OpenCode plugins from the public upstream, https://forge.open-platform.sh/trevato/forge. llms.txt, /.well-known/mcp.json, Settings › Tokens and the terminal token screen all read the same lines. The 636 tests that mention the card, llms.txt, the token screens or the front page pass, as do test/mcp-size.test.ts, bun x tsc --noEmit and the design lint.
Fixes for the review
- Box 1:
offeredPluginRepo(db, fromEnv, upstream)now takes the upstream as a third argument and returns it when the forge's own repository is not public. It returns undefined only when both the own source andupstreamare missing. The four callers passUPSTREAM_REPO, so their "not offered" branches stay reachable. - Box 3:
test/mcp-card-plugins.test.tsnow covers four cases:
- a private own repository gives the upstream;
- a public own repository gives itself;
- an unset or unknown source gives the upstream;
- neither source gives undefined, and the card then lists plugins: [].
I did not add a test that renders the llms.txt "not offered" line itself. The running app always passes the constant, so only the function and the card are tested for the empty case.
- One constant:
UPSTREAM_REPOnow lives in the newsrc/core/upstream.ts.home.ts(FORGE_REPO),standards.ts(the clone and ORIGINS lines) andmcp_card.tsall read it. - Doc comment: the comment on
offeredPluginRepois rewritten, and the constant now sits above its first use.
6 KiB budget: I did not trim the plugin lines. The anonymous llms.txt now always carries both plugin lines, about 660 bytes, and every install line must name its source, so trimming would drop information the test asserts. The old 5 KiB limit left about 40 bytes of headroom. 6 KiB keeps that guard against growth with the plugin lines counted. If you want a hard 5 KiB instead, the plugin section would have to be cut elsewhere.
Try it: curl <forge>/llms.txt and curl <forge>/.well-known/mcp.json on a forge whose own repository is private, or open /settings/tokens.
🤖 Generated with Claude Code
Earlier asks are met: offeredPluginRepo takes the upstream as a third argument and returns undefined only when neither source exists; the four callers pass the one UPSTREAM_REPO constant (src/core/upstream.ts), which home.ts and standards.ts now share. Tests cover private→upstream, public→own, unset/unknown→upstream, and neither→undefined with plugins: [] on the card. The 6 KiB llms budget is justified. No new security surface: the upstream is a constant, not user input. Non-blocking: the comment in account.ts connectCard ("offered only while anyone can clone it") is now stale; say it falls back to the upstream.
A forge whose own repository is private or unset now offers the Claude Code and OpenCode plugins from the public upstream,
https://forge.open-platform.sh/trevato/forge. Tests that mention the card, llms.txt or the token screens pass (550),bun x tsc --noEmitis clean andtest/mcp-size.test.tsis green.scripts/fast.tsreported the diff too broad to name tests, so I picked those 36 files by grep rather than running the full suite. I ranscripts/gate.tsbut did not read its result.What changed
offeredPluginRepoinsrc/core/mcp_card.tsreturns the forge's ownowner/namewhen that repository is public, and otherwise the upstream's full URL.pluginSourceand the OpenCode install line read one newpluginBasehelper that accepts either form./.well-known/mcp.json, Settings › Tokens and the terminal token screen all askofferedPluginRepo, so they show the same lines with the same source.Not done
offeredPluginRepostill returnsstring | undefined, so callers keep their branch. The "neither gives not offered" case in the issue therefore has no test.Test changes
mcp-card-plugins,standards,tui-token-makeandconnect-harnessnow expect the upstream's lines.test/llms-anonymous.test.tsgoes from 5 KiB to 6 KiB, because the plugin lines are now always present and added about 660 bytes. The MCP ceilings are untouched. Say if you would rather I trim the text than raise that limit.To try it: on a forge whose own repository is private,
curl <forge>/llms.txtandcurl <forge>/.well-known/mcp.jsonboth show the plugin install lines withhttps://forge.open-platform.sh/trevato/forge.gitas the source.🤖 Generated with Claude Code
Closes #10895