import type { CanonicalHousekeepingHref } from "../contracts"; export const HOUSEKEEPING_ROOT = "/ase" as const; export function toHousekeepingHref( href: CanonicalHousekeepingHref, ): CanonicalHousekeepingHref { if (href !== HOUSEKEEPING_ROOT && !href.startsWith(`${HOUSEKEEPING_ROOT}/`)) { throw new Error(`invalid canonical housekeeping href: ${href}`); } return href; }