/** * Account names share the URL root with app pages (`/settings`, `/explore`, …), so these can never be * claimed. The list covers every current top-level route plus pages a forge commonly adds later. */ const RESERVED = [ // current routes and raw handlers "api", "assets", "attachments", "auth", "avatars", "explore", "scratch", "sites", "forgot-password", "login", "logout", "new", "notifications", "orgs", "projects", "reset-password", "search", "settings", "signup", "verify-email", // auth and accounts "account", "accounts", "join", "oauth", "register", "saml", "session", "sessions", "signin", "signout", "sso", "user", "users", "org", "organization", "organizations", "team", "teams", // product and marketing pages "about", "blog", "careers", "changelog", "community", "contact", "customers", "docs", "enterprise", "features", "help", "home", "jobs", "legal", "news", "press", "pricing", "privacy", "roadmap", "security", "status", "support", "terms", "tos", // forge features "actions", "admin", "administrator", "apps", "archive", "codespaces", "collections", "dashboard", "discussions", "download", "downloads", "events", "gist", "gists", "graphql", "hooks", "integrations", "issues", "marketplace", "packages", "pages", "pull", "pulls", "raw", "releases", "repos", "repositories", "runners", "sponsors", "stars", "topics", "trending", "watching", "webhooks", "wiki", // infrastructure and special values "cdn", "static", "public", "uploads", "images", "img", "media", "files", "git", "mail", "www", "favicon.ico", "robots.txt", "sitemap.xml", "humans.txt", "security.txt", "manifest.json", "site.webmanifest", "gitfor", "gitfor-bot", "bot", "bots", "ghost", "system", "root", "anonymous", "null", "undefined", "nobody", "everyone", "here", "me", "you", "self", "edit", "create", "delete", "index", ] as const; const RESERVED_SET: ReadonlySet = new Set(RESERVED); export function isReservedName(name: string): boolean { const lower = name.toLowerCase(); return RESERVED_SET.has(lower) || lower.startsWith(".") || lower.startsWith("_"); }