const USER_FILE_MUTABLE_ROOTS = new Set(['uploads', 'outputs', 'shared', 'tasks']);

export function canMutateUserFilesPath(path: string): boolean {
  const cleaned = path.trim().replace(/^\/+|\/+$/g, '');
  if (!cleaned) return false;
  const [root] = cleaned.split('/');
  return USER_FILE_MUTABLE_ROOTS.has(root);
}
