anil988 commited on
Commit
cf9223c
Β·
1 Parent(s): fc85e52

Compliance: Hardened A2A Discovery with Absolute URLs

Browse files
Files changed (1) hide show
  1. backend/main.py +12 -2
backend/main.py CHANGED
@@ -130,10 +130,20 @@ async def mcp_invoke(req: Request, x_gemini_key: str = Header(None)):
130
  }
131
  return {"jsonrpc": "2.0", "result": {}, "id": msg_id}
132
 
133
- # ── A2A Standard ──────────────────────────────────────────────────────────────
 
134
  @app.get("/.well-known/a2a-card.json")
135
  def get_a2a_card():
136
- return {"name": "CodeBlue", "capabilities": ["clinical_synthesis"], "endpoints": {"invoke": "/a2a/invoke"}}
 
 
 
 
 
 
 
 
 
137
 
138
  @app.post("/a2a/invoke")
139
  async def a2a_invoke(request: Dict[str, Any], x_gemini_key: str = Header(None)):
 
130
  }
131
  return {"jsonrpc": "2.0", "result": {}, "id": msg_id}
132
 
133
+ # ── A2A Standard (Hardened for Cross-Platform Discovery) ──────────────────
134
+
135
  @app.get("/.well-known/a2a-card.json")
136
  def get_a2a_card():
137
+ """Discovery card with Absolute URLs"""
138
+ return {
139
+ "name": "CodeBlue Context",
140
+ "version": "1.0.0",
141
+ "description": "ER Clinical Intelligence Synthesis Agent.",
142
+ "capabilities": ["clinical_synthesis"],
143
+ "endpoints": {
144
+ "invoke": "https://anil988-codeblue-context.hf.space/a2a/invoke"
145
+ }
146
+ }
147
 
148
  @app.post("/a2a/invoke")
149
  async def a2a_invoke(request: Dict[str, Any], x_gemini_key: str = Header(None)):