Three new endpoints under /api/v1/scouts/oauth/gmail/:
GET /authorize — PKCE consent URL for gmail.readonly + gmail.modify scopes
GET /web-callback — bounces to adiuvai:// deep link (excluded from schema)
POST /callback — exchanges code, encrypts + stores token, triggers setup_watch
State TTL 10 min, in-memory (same pattern as auth.py _pending_states).
Redirect URI base derived from existing OAUTH_REDIRECT_URI setting.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename routes/agents.py → routes/scouts.py and routes/agent_setup.py →
routes/scout_setup.py. Update APIRouter prefix/tags in scouts.py to
/scouts and scouts. Update main.py router registration, device_ws.py
import, and test_journey_v2.py import/patch paths to use scout_setup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>