Public: anyone can read this; the crew can change it.
Registry: MCP registry_search and registry_install, and a src/tui listing (#6009) #17193
Check · Review · Land · Live — Its check is queued.
This adds the MCP tools registrysearch and registryinstall and a terminal listing of the registry. They are the other doors of /r, which is on main now (the earlier decline predates it). A slice of #6009 (#17041).
-
Reviews
Changes requested — before the latest pushGating is right: MCP needs an admin-scope token, the action calls requireRepoAdmin, the terminal reads through canRead, and the registry is public. There are no new dependencies, and the README is untouched. One functional miss to fix:
- A closed, unmerged install pull blocks the item for good.
pullForBranchreturns the newest pull on the branch whatever its state.installRegistryItemtreats any unmerged pull asalready. So after someone closes the pull, every laterregistry_installanswersalreadywith a dead pull number, and the item can't be reinstalled at that version. Treat a closed pull as no pull, and open a new one. That needs a fresh branch name or a reuse of the old branch, so check whateditFilesdoes withnewBranchwhen the branch already exists. Add a test that closes the pull and then installs again. - Small: in
registry_items.tsthenot_foundbranch says "Installing is the app's admin's.", but the test for a stranger asserts "No such app", which comes from the canRead check. Test the non-admin reader path (a readable app, a non-admin user) so that message is covered. As written, deleting it would fail no test. - Small:
installBranch/test usesITEMS[1]after pressingj. That ties the test to the item order, so look the item up by name.
The gate's "one implementation?" notes (
visitagainstwithDependencies) are advisory and I'm not asking for a change there. - A closed, unmerged install pull blocks the item for good.
-
Checks
working queued to check deploy 451b076
Check queued 15m, place 11 of 27Check of 451b076fast tier: queued · full gate runs on land
Website spec: 25 findings (report only)
- /board http://127.0.0.1:38091/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:38091/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:38091/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:38091/review answered 303 — https://specification.website/
- /system http://127.0.0.1:38091/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:38091/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:38091/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:38091/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:38091/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:38091/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:38091/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:38091/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:38091/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:38091/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:38091/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:38091/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:38091/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:38091/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:38091/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /looks/missing http://127.0.0.1:38091/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:38091/looks/failed answered 500 — https://specification.website/
-
History
- Rewrap a comment (#17041) 451b076
- Registry: a closed, unmerged install pull no longer blocks the item; test the non-admin reader and look items up by name (#17041) 6989e74
- Name registry_install among the writes that do not ask first: it opens an undoable pull (#17041) c34a686
- Try: in a terminal, open the palette's Component registry, press / and type empty; or call registry_search with {"query":"empty"} over the MCP ee4588b
- Registry: a how-to for search and install (#17041) 47f657a
- Registry: reach the registry listing from an app's Registry items with a (#17041) b657d5c
- Registry: registry_search and registry_install over the MCP, and a terminal listing of the registry (#17041) 76c3db5
Look
9 pages beside main · 0 new to this pull
/apps
In the dark
at 451b076 ·
/changelog
In the dark
at 451b076 ·
/docs
In the dark
at 451b076 ·
/explore
In the dark
at 451b076 ·
/looks/failed
In the dark
at 451b076 ·
/looks/missing
In the dark
at 451b076 ·
/notes
In the dark
at 451b076 ·
/review
In the dark
at 451b076 ·
/security
In the dark
at 451b076 ·
2 earlier comments
This adds the MCP tools registry_search and registry_install and a terminal listing of the registry. They are the other doors of /r, which is on main now (the earlier decline predates it). A slice of #6009 (#17041).
registry_searchtakes{ query? }and returns the items whose name, title, description or type contain every word, name matches first. Each result has its version and what itdependsOn. An empty query lists all. It is read-only and is held for no scope.registry_installtakes{ repo, item }and opens a pull onregistry/install-<item>-<version>. The pull writes the item's files and those of the items it depends on, so the app owns the copy. Nothing lands until a person merges.- It needs an admin of the repository with an admin-scope token, the same gate as
app_registry. Anyone else gets "no such app". - Asked twice, it finds the first pull instead of opening another. Asked again after the merge, it notes the install, so the existing update pulls follow.
- It needs an admin of the repository with an admin-scope token, the same gate as
- Terminal: the palette's
Component registrylists the items./searches, andiasks for anowner/nameand runs the same install. An app'sRegistry itemsscreen reaches the listing witha. - Code and docs: the search and plan code is in
src/registry/search.ts, the install action insrc/actions/registry_install.ts, and the screen insrc/tui/screens/registry_items.ts. The how-to isdocs/features/registry-search.md, andcomponent-registry.mdlinks to it. - Tests:
test/registry-install.test.tscovers search, dependency order, the MCP scope and stranger refusals, the opened, already and merged outcomes, and the terminal screen. I also updated the expected rosters intest/palette-roster.test.tsandtest/mcp-forge-protocol.test.ts.
Checks: tsc is clean. gate.ts --explain read 32 rules with 0 fails. The unused-exports, palette-roster, MCP, own-source and feature-doors tests pass. I did not run the full suite; the forge's check runs it. After --fix the gate still prints three "one implementation?" notes: visit against withDependencies in search.ts, and the test's open helper against tui-report.test.ts's palette. They are advisory and I left them.
Left out:
- No API route, since the issue asked for MCP and terminal.
- No three-way merge of local edits.
- Private items and the gallery are still not built.
Try it: open the palette's Component registry in a terminal, press / and type empty, then press i and enter an app you admin. Or call registry_search with {"query":"empty"} over the MCP.
I fixed one of the five failures and pushed it. The other four fail for reasons that aren't in this pull.
What changed. I added registry_install to the NOT_ASKED list in test/conversation-confirm.test.ts. The tool is writes: true and appears on neither that list nor ASKING, which is what failed "every tool that writes asks first or is named as one that does not (#8230)". It opens a pull, so a person can still review or close it. That makes it the same kind of write as open_pull, which is already on the list. test/conversation-confirm.test.ts now passes, 27 of 27.
What I left alone.
- Page bytes and "falls to Live" in the talk-page tests: both fail the same way with my change stashed, and the check log says
talk-pageandtalk-pane-barare red on main too. - "fork flows" and "a writer's update names the agent and queues its run": I didn't reproduce either failure.
test/fork-flows.test.tspasses 11 of 11 locally, which suggests the check run was flaky rather than broken. I didn't run the "writer's update" test.
Gate. bun scripts/gate.ts --fix changed nothing. It still lists similarity warnings about withDependencies and visit in src/registry/search.ts, and about open in test/registry-install.test.ts. I left those. I didn't run bun x tsc --noEmit this turn.
Try it.
- In a terminal, open the palette's Component registry, press
/and typeempty. - Or call
registry_searchover the MCP with{"query":"empty"}.
🤖 Generated with Claude Code
This update fixes the closed-pull block from the review and covers the two smaller points. test/registry-install.test.ts passes and tsc --noEmit is clean. I ran no other tests locally; the forge runs the full check on the push.
- Closed pulls no longer block an item.
installRegistryItemnow treats a closed, unmerged pull as no pull. It opens the new pull on the next free branch,registry/install-<item>-<version>-2, then-3, and so on. I did this becauseeditFileswithnewBranchfails on a branch that already exists, so reusing the old name would have failed. A merged pull is stillmerged, and an open one is stillalready. The new test installs, closes the pull and installs again. That opens a different pull, and a third ask answersalreadywith the new number. - The non-admin reader path is covered. A new test has bob, who can read alice's public app, press
iin the terminal. It asserts "Installing is the app's admin's.", so deleting that branch now fails a test. - The terminal install test looks up
buttonby name. It filters to the item with/instead of pressingjand indexingITEMS[1].
The gate also asked for a "Replaces:" line on the two MCP tool files, so I added it to a commit message. A comment rewrap is committed too. I left the "one implementation?" notes alone, as you said, and the one for open in the test file too.
This adds the MCP tools
registry_searchandregistry_installand a terminal listing of the registry. They are the other doors of/r, which is onmainnow (the earlier decline predates it). A slice of #6009 (#17041).registry_searchtakes{ query? }and returns the items whose name, title, description or type contain every word, name matches first. Each result has its version and what itdependsOn. An empty query lists all. It is read-only and is held for no scope.registry_installtakes{ repo, item }and opens a pull onregistry/install-<item>-<version>. The pull writes the item's files and those of the items it depends on, so the app owns the copy. Nothing lands until a person merges.app_registry. Anyone else gets "no such app".Component registrylists the items./searches, andiasks for anowner/nameand runs the same install. An app'sRegistry itemsscreen reaches the listing witha.src/registry/search.ts, the install action insrc/actions/registry_install.ts, and the screen insrc/tui/screens/registry_items.ts. The how-to isdocs/features/registry-search.md, andcomponent-registry.mdlinks to it.test/registry-install.test.tscovers search, dependency order, the MCP scope and stranger refusals, the opened, already and merged outcomes, and the terminal screen. I also updated the expected rosters intest/palette-roster.test.tsandtest/mcp-forge-protocol.test.ts.Checks:
tscis clean.gate.ts --explainread 32 rules with 0 fails. The unused-exports, palette-roster, MCP, own-source and feature-doors tests pass. I did not run the full suite; the forge's check runs it. After--fixthe gate still prints three "one implementation?" notes:visitagainstwithDependenciesinsearch.ts, and the test'sopenhelper againsttui-report.test.ts'spalette. They are advisory and I left them.Left out:
Try it: open the palette's
Component registryin a terminal, press/and typeempty, then pressiand enter an app you admin. Or callregistry_searchwith{"query":"empty"}over the MCP.Closes #17041