MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _find_role_entry_by_user_id

Function _find_role_entry_by_user_id

agents/coldstart-agent/main.py:245–250  ·  view source on GitHub ↗

Find the role entry that belongs to a given profile user.

(meta: Dict[str, Any], user_id: str)

Source from the content-addressed store, hash-verified

243
244
245def _find_role_entry_by_user_id(meta: Dict[str, Any], user_id: str) -> Optional[tuple[str, Dict[str, Any]]]:
246 """Find the role entry that belongs to a given profile user."""
247 for role_name, role_info in (meta.get("roles") or {}).items():
248 if str(role_info.get("user_id") or "").strip() == str(user_id or "").strip():
249 return role_name, role_info
250 return None
251
252
253def _direction_to_seed_phrase(direction_key: str) -> str:

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected