|
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> |
|---|
|
|
| navi/api/routes/auth.py |
|---|
| navi/api/routes/messages.py |
|---|
| navi/api/websocket.py |
|---|
| navi/auth/__init__.py |
|---|
| navi/auth/_ddl.py |
|---|
| navi/auth/deps.py |
|---|
| navi/core/agent.py |
|---|
| navi/core/context_builder.py |
|---|
| navi/tools/base.py |
|---|