-
Notifications
You must be signed in to change notification settings - Fork 41
feat: Separate well-known agent card endpoint from MapA2A method #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: brandonh-msft <[email protected]>
|
@copilot don't use aspnet testhost; it's not net8 compatible |
Co-authored-by: brandonh-msft <[email protected]>
Fixed in commit 19c718b. Removed all usage of |
brandonh-msft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved roslyn analyzer issues & tested locally w/ the Echo sample. the /echo/v1/card still gives back the card, but /.well-known/agent.json does not.
Do we want the /v1/card to be dead unless we map well-known as well, @darrelmiller ?
darrelmiller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thanks.
# Conflicts: # A2A.slnx
This PR makes the
.well-known/agent-card.jsonURL optional when hosting an A2A agent by separating it from the core JSON-RPC functionality.Problem
Previously, the
MapA2Amethod automatically mapped both the JSON-RPC endpoint and the well-known agent discovery endpoint:This forced all A2A agents to expose discovery information, even when it wasn't desired for security or architectural reasons.
Solution
Split the functionality into two separate extension methods:
Changes Made
MapA2A: Removed the well-known endpoint mapping, now only handles JSON-RPCMapWellKnownAgentCard: New extension method that maps only the/.well-known/agent.jsonendpointBenefits
This approach follows the pattern used by other A2A implementations and provides the granular control requested in the issue.
Fixes #105.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.