On-demand Scout service (replaces the nightly aggregator): - FastAPI agent-mesh service; card name "matchmaking-service" (HTTP /a2a/tasks + Redis-stream worker matching the sibling-service pattern) - run_search: parallel multi-board sweep (Naukri/blackfalcondata + Foundit + LinkedIn), city-filtered at the board, cheapest-per-result first - per-board adapters + normalizers -> ScoutJob with rich read-only details and offsite apply links; recall mode + MVQ guard - result cache for dev replay ($0); per-board cost knobs; retry-on-5xx - research/: engine design, board cost economics, India-actor shortlist, POC
16 lines
613 B
Python
16 lines
613 B
Python
"""A2A (agent-to-agent) bearer auth — same scheme as the rest of the mesh."""
|
|
from fastapi import Request, HTTPException
|
|
|
|
from app.config import get_settings
|
|
|
|
|
|
async def verify_a2a_key(request: Request) -> str:
|
|
auth = request.headers.get("authorization", "")
|
|
if not auth.startswith("Bearer "):
|
|
raise HTTPException(status_code=401, detail="Missing A2A auth token")
|
|
token = auth[7:].strip()
|
|
allowed = [k.strip() for k in get_settings().A2A_ALLOWED_KEYS.split(",")]
|
|
if token not in allowed:
|
|
raise HTTPException(status_code=403, detail="Invalid A2A auth token")
|
|
return token
|