Skip to content

Dualmode#870

Draft
ehsavoie wants to merge 2 commits into
a2aproject:mainfrom
ehsavoie:dualmode
Draft

Dualmode#870
ehsavoie wants to merge 2 commits into
a2aproject:mainfrom
ehsavoie:dualmode

Conversation

@ehsavoie
Copy link
Copy Markdown
Collaborator

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • Ensure the tests pass
  • Appropriate READMEs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

kabir and others added 2 commits May 11, 2026 18:31
Multi-mode means both the 1.0 and the 0.3 TCK server is provisioned
with the 'other' protocol version to make sure having both does
not interfere

Needs temporary AgentCard producers for the 'other' version.
…patibility

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces backward compatibility for v1.0 agent cards within the v0.3 client and updates the core AgentCard specification. Key changes include the addition of 'url' and 'preferredTransport' fields to the AgentCard record, an update to JSONRPCUtils to support ignoring unknown fields during parsing, and the introduction of 'multi-mode' build profiles in the TCK to facilitate cross-version testing. Feedback was provided regarding an inconsistency in the AgentCard record, where the 'preferredTransport' field was marked as nullable despite the builder providing a non-null default value; it is recommended to remove the @nullable annotation to clarify the API contract.

@Nullable List<AgentCardSignature> signatures) {
@Nullable List<AgentCardSignature> signatures,
@Nullable String url,
@Nullable String preferredTransport) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The preferredTransport field is annotated with @Nullable, but the Builder.build() method ensures it is never null by providing a default value (TransportProtocol.JSONRPC.name()). This inconsistency can be misleading and should be corrected to make the contract of AgentCard clear.

To enforce this non-null contract, the @Nullable annotation should be removed. You might also consider adding a null check in the compact constructor to ensure any direct instantiation of the record also respects this contract.

Suggested change
@Nullable String preferredTransport) {
String preferredTransport) {
References
  1. Rely on class invariants established by constructors; avoid redundant null checks for fields that are guaranteed to be non-null by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants