export type PermissionResult = { allowed: boolean; reason?: string; }; export function parseIdList(raw: string | undefined): Set { if (!raw) return new Set(); return new Set( raw .split(",") .map((s) => s.trim()) .filter(Boolean), ); }