registryServices
uses process
The services a visitor's browser uses, and the registry reads follows from ($TCM_APPVIEW, else Bluesky's).
import { directory } from "#codebase/tcmts/atproto"; import type { RegistryServices } from "#codebase/tcmts/registry"; export async function registryServices(): Promise<RegistryServices> { const dir = directory(); return { appview: process.env.TCM_APPVIEW?.replace(/\/+$/, "") || dir || "https://public.api.bsky.app", plc: dir || "https://plc.directory", }; }