Spaces:
Sleeping
Sleeping
Compliance: Hardened A2A Discovery with Absolute URLs
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)):
|