Propagate user profile to LLM context via current_user_info ContextVar
- Extend User model: username, first_name, last_name, phone, birth_date,
  country, city, locale (all from gnexus-auth profile)
- navi_users DDL: add new profile columns
- auth/deps + auth/callback: populate new fields on upsert
- /auth/me: return all profile fields
- Add current_user_info ContextVar for full user profile propagation
- websocket + messages: set current_user_info before agent.run()
- run_ephemeral: inherit and restore current_user_info
- ContextBuilder: _user_context_msg() injects [User context] with name,
  email, location, locale, role into LLM system messages
- _security_policy_msg: reads user_id/role from ContextVar directly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent db0261b commit bba283f35e6a00e08f471e36c1371e3964a290ef
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 8 May
Showing 9 changed files
View
navi/api/routes/auth.py
View
navi/api/routes/messages.py
View
navi/api/websocket.py
View
navi/auth/__init__.py
View
navi/auth/_ddl.py
View
navi/auth/deps.py
View
navi/core/agent.py
View
navi/core/context_builder.py
View
navi/tools/base.py