feat(moshpit): batch-register the profullstack TLDs and expose alias controls - #76
Merged
Conversation
…controls Registers the requested namespace to anthony@profullstack.com and gives operators a UI for the alias/exemption APIs, which until now existed only as endpoints. Only TLDs are registered, because only TLDs exist: "the operator of that TLD then owns everything under it". Claiming .yeah is what delivers fuck.yeah — there is no second-level registration to perform. The second-level names are recorded in the script so the intent stays readable, and are asserted to parse under the TLD claimed for them rather than being claimed themselves. .yeah carries fuck.yeah .oranges carries chovy.oranges, california.oranges .agent carries profullstack.agent .profullstack (reserved — deliberate bypass, see below) .sploof carries original.sploof .agentic registered so it can point at .agent .profullstack sits on RESERVED_TLDS under "ours: the network's own names are not for sale". That list exists to stop *other people* claiming it, and assigning one of our own names to us is the single case it is meant to yield to, so the script passes allowReserved for that entry alone. It stays unreachable from the public API. The script is idempotent — an already-held TLD is left exactly as it is, and a TLD held by a different owner is reported rather than touched, so a re-run can never quietly reassign a name. --dry-run reads the live registry and writes nothing. .agentic -> .agent is applied via the existing setAlias, which already requires the same account to hold both ends; aliasing a name you do not own would otherwise let one claim absorb a dozen unregistered ones. The operator-facing half was the actual gap: alias and exemption had working PUT/DELETE routes and no interface, making them operator-only in the sense of "operator who writes curl". A Moshpit TLDs tab now lists what you hold, claims new endings, points one TLD at another, clears the redirect, and manages the names held back from it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registers the requested namespace to
anthony@profullstack.com, and gives operators a UI for the alias/exemption APIs that until now existed only as endpoints.Only TLDs get registered — that's the whole model
registerTldis the only registration there is: "the operator of that TLD then owns everything under it" (PRD 0001). Claiming.yeahis what deliversfuck.yeah. There is no second-level row to write, and nomoshpit_namestable — I checked the schema.So the 11 names in the request are 6 TLD claims:
.yeahfuck.yeah.orangeschovy.oranges,california.oranges.agentprofullstack.agent.profullstack.splooforiginal.sploof.agentic.agent)The second-level names are kept in the script so the intent stays readable, and are asserted to parse under the TLD claimed for them — not claimed separately.
.profullstackis reserved, on purposeIt sits on
RESERVED_TLDSunder "ours: the network's own names are not for sale". That list exists to stop other people claiming it; assigning one of our own names to us is the single case it's meant to yield to — exactly whatseed-moshpit-tld.tsalready does for.moshpit. The script passesallowReservedfor that one entry, and it stays unreachable from the public API.Idempotent
An already-held TLD is left exactly as it is. A TLD held by a different owner is reported and skipped, never reassigned.
--dry-runreads the live registry and writes nothing.Needs
TURSO_DATABASE_URL/TURSO_AUTH_TOKEN, which is why it ships as a script rather than being run from here — I have no production credentials, and registration through the API is session-cookie authenticated..agentic→.agentApplied through the existing
setAlias, which already requires the same account to hold both ends — aliasing a name you don't own would let one claim absorb a dozen unregistered ones. Resolution carries the label across, sofoo.agentic→foo.agent.The operator UI was the real gap
PUT/DELETE /api/moshpit/tlds/:tld/aliasand the exemption routes worked fine and had no interface anywhere —grep -rln alias app --include=*.tsxreturned nothing. That made "customizable by operators" true only for operators who write curl.New Moshpit TLDs tab in
/dashboard: lists what you hold, claims new endings, points one TLD at another, clears the redirect, and manages the names held back from it (exemptions), which is how you keepkeep.agenticwhere it is while the rest of.agenticredirects.Tests
tests/moshpit-seed-names.test.mjspins the assumptions the batch rests on: every requested name is a legal TLD, each second-level name really falls under the TLD claimed for it, the alias pair are both present, and.profullstackis still reserved — if that assertion ever flips, the name became publicly claimable andallowReservedstopped protecting anything.69 tests pass, clean
tsc --noEmit.Note
app.moshcode.sh/pitcurrently returns 404, whilepit.moshcode.sh/dashboardreturns 200. If those are meant to be the same surface, that redirect is missing — out of scope here, flagging it.🤖 Generated with Claude Code