"""Agent card — how the orchestrator discovers this service (it routes by `name`).""" from fastapi import APIRouter from app.config import get_settings router = APIRouter() def agent_card() -> dict: return { "name": "matchmaking-service", # keep — orchestrator page/action maps target this name "description": "On-demand opportunity matching: live board search → white-box ranking → auto-apply with proof.", "url": get_settings().AGENT_URL, "version": "2.0.0", "capabilities": {"streaming": False, "pushNotifications": False}, "skills": [ # ── existing contract (keeps the current orchestrator routing working) ── {"id": "get_feed", "name": "Personalized Feed", "description": "Return the ranked opportunity feed for a seeker."}, {"id": "sync_preferences", "name": "Sync Preferences", "description": "Persist the seeker's search preferences."}, {"id": "record_feedback", "name": "Record Feedback", "description": "Record SAVE / DISMISS / APPLY feedback (training labels)."}, {"id": "get_opportunity_detail", "name": "Opportunity Detail", "description": "Opportunity detail with the match-score breakdown."}, # ── NEW in v2 (stubbed; each needs an orchestrator action-map entry + frontend wiring) ── {"id": "run_search", "name": "On-demand Search", "description": "Fetch live listings (Apify) + rank against the seeker now."}, {"id": "tailor_resume", "name": "Tailor Resume", "description": "Tailor the resume to a chosen role (resume-builder)."}, {"id": "submit_application", "name": "Submit Application", "description": "Auto-apply via the master-key engine (tier-aware)."}, {"id": "get_apply_proof", "name": "Apply Proof", "description": "Return captured confirmation screenshots for submitted applications."}, ], "authentication": {"schemes": ["bearer"]}, } @router.get("/.well-known/agent.json") @router.get("/.well-known/agent-card.json") async def get_agent_card(): return agent_card()