[dotnet-port-api] Forward A2A request config to hosted agents - #999
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change set is cohesive and tested, with only a minor non-blocking performance nit (redundant map cloning) noted.
Pull request overview
Ports the hosted-A2A request configuration forwarding behavior so Go hosted agents can observe inbound message/send configuration and request metadata via agent run options, aligning with upstream .NET behavior.
Changes:
- Added
agent.WithAdditionalPropertiesto carry provider/protocol-specific request metadata into an agent run. - Introduced
a2aprovider.NewHandleranda2aprovider.WithRequestConfigForwarding()to forward inbound A2A configuration into hosted-agent run options undera2aprovider.RequestConfigurationPropertyKey. - Updated hosted A2A tests, the end-to-end hosted A2A example, and parity docs to reflect the new handler helper and forwarding behavior.
File summaries
| File | Description |
|---|---|
| agent/options.go | Adds WithAdditionalProperties option for passing request metadata into agent runs. |
| provider/a2aprovider/executor.go | Forwards request metadata into hosted-agent run options. |
| provider/a2aprovider/handler.go | New helper handler + interceptor to inject request config into metadata under a stable key. |
| provider/a2aprovider/hosting_test.go | Adds coverage for metadata/config forwarding and run-mode preservation. |
| examples/05-end-to-end/a2a_client_server/a2a_server/main.go | Migrates sample to a2aprovider.NewHandler. |
| docs/dotnet-go-sdk-feature-comparison.md | Updates feature parity notes for hosted A2A forwarding behavior. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Copilot resolve merge conflicts and address PR feedback |
…pi-a2a-config-forwarding-20260729-7f85380fc8eff07b # Conflicts: # agent/options.go # docs/dotnet-go-sdk-feature-comparison.md # provider/a2aprovider/executor.go # provider/a2aprovider/hosting_test.go Co-authored-by: michelle-clayton-work <262183035+michelle-clayton-work@users.noreply.github.com>
Co-authored-by: michelle-clayton-work <262183035+michelle-clayton-work@users.noreply.github.com>
|
Scope: public API, user-visible behavior, examples Changed Go contract:
Upstream evidence reviewed:
Result: aligned The Go port's default-on config forwarding via Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
Summary
Ported the .NET hosted-A2A request-configuration forwarding behavior so Go hosted agents can observe inbound
message/sendconfiguration. This addsagent.WithAdditionalProperties, addsa2aprovider.NewHandlerplusa2aprovider.WithRequestConfigForwarding(), forwards request metadata/config into hosted-agent run options undera2aprovider.RequestConfigurationPropertyKey, and updates the hosted A2A example and parity docs.Ported .NET PRs
MessageSendParams.configurationto hosted agents2694120383be5e9e152b36b02e27b79b379970cfBreaking Changes
No.
Tests and Examples
go test ./agent ./provider/a2aprovider ./examples/05-end-to-end/a2a_client_server/a2a_serverexamples/05-end-to-end/a2a_client_server/a2a_server/main.goto usea2aprovider.NewHandlerNotes
a2aprovider.NewHandlerenables request-config forwarding by default for hosted A2A handlers.a2asrv.NewHandler(a2aprovider.NewExecutor(...))can opt in explicitly witha2aprovider.WithRequestConfigForwarding().Closes #765