-
Notifications
You must be signed in to change notification settings - Fork 0
Add Extended Agent Card support: provider, dispatcher, transports, and serializer #126
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
013572f
Decouple extended agent card from transports
MisterVVP 7c96d6e
Fix extended agent card build regressions
MisterVVP f19e398
Fix benchmark and extended card routing regressions
MisterVVP db021fd
refactor: add non-copyable helper base classes
MisterVVP 2308715
fix: clang fmt
83393bd
fix: propagate tenant to extended card provider
MisterVVP 799cd82
fix: propagate tenant to extended card provider
MisterVVP 2a1c2f0
fix: add tenant parameter to REST extended card handler
MisterVVP 2e61429
fix: route extended card discovery requests
MisterVVP a15590a
test: cover REST extended card discovery routes
MisterVVP 6d0489b
fix: clang fmt
9f97459
fix: use spec extended card discovery endpoint
MisterVVP ff93572
test: cover spec extended card discovery URL
MisterVVP 8029bf5
address review threads
b4ec4c2
fix: clang tidy optional access
MisterVVP 25b8866
fix: route tenant extended cards through mux
MisterVVP d752fe8
fix dispatcher
5773705
Refactor shared HTTP protocol constants (#127)
MisterVVP 7c1b72f
fix: accept extended agent card JSON-RPC alias
MisterVVP f92e3f6
add compatibility header
MisterVVP 408109d
clang fmt
22c09b6
fix: return extended card error info reason
9a86db9
fix: remove deprecated agent card builder shim
MisterVVP 00599ee
docs: document agent card builder include path removal
MisterVVP 7214233
docs: remove Conan packaging notes
MisterVVP af90825
fix: tune bm threshold
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Copyright 2026 Vladimir Pavlov <mistervvp@outlook.com> (https://github.com/MisterVVP) | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <optional> | ||
| #include <string> | ||
| #include <unordered_map> | ||
|
|
||
| #include "a2a/core/non_copyable.h" | ||
| #include "a2a/core/result.h" | ||
| #include "a2a/v1/a2a.pb.h" | ||
|
|
||
| namespace a2a::core { | ||
|
|
||
| struct AgentCardRequestContext final { | ||
| std::optional<std::string> remote_address; | ||
| std::unordered_map<std::string, std::string> client_headers; | ||
| std::unordered_map<std::string, std::string> auth_metadata; | ||
| }; | ||
|
|
||
| class AgentCardProvider : private NonCopyableOrMovable { | ||
| public: | ||
| AgentCardProvider() = default; | ||
| virtual ~AgentCardProvider() = default; | ||
|
|
||
| [[nodiscard]] virtual Result<lf::a2a::v1::AgentCard> GetExtendedAgentCard( | ||
| const AgentCardRequestContext& context) const = 0; | ||
| }; | ||
|
|
||
| class StaticAgentCardProvider final : public AgentCardProvider { | ||
| public: | ||
| StaticAgentCardProvider() = default; | ||
| explicit StaticAgentCardProvider(std::optional<lf::a2a::v1::AgentCard> extended_agent_card); | ||
|
|
||
| [[nodiscard]] Result<lf::a2a::v1::AgentCard> GetExtendedAgentCard( | ||
| const AgentCardRequestContext& context) const override; | ||
|
|
||
| private: | ||
| std::optional<lf::a2a::v1::AgentCard> extended_agent_card_; | ||
| }; | ||
|
|
||
| } // namespace a2a::core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Copyright 2026 Vladimir Pavlov <mistervvp@outlook.com> (https://github.com/MisterVVP) | ||
|
|
||
| #pragma once | ||
|
|
||
| namespace a2a::core { | ||
|
|
||
| class NonCopyable { | ||
| public: | ||
| NonCopyable(const NonCopyable&) = delete; | ||
| NonCopyable& operator=(const NonCopyable&) = delete; | ||
|
|
||
| protected: | ||
| constexpr NonCopyable() noexcept = default; | ||
| constexpr NonCopyable(NonCopyable&&) noexcept = default; | ||
| constexpr NonCopyable& operator=(NonCopyable&&) noexcept = default; | ||
| ~NonCopyable() = default; | ||
| }; | ||
|
|
||
| class NonCopyableOrMovable { | ||
| public: | ||
| NonCopyableOrMovable(const NonCopyableOrMovable&) = delete; | ||
| NonCopyableOrMovable& operator=(const NonCopyableOrMovable&) = delete; | ||
| NonCopyableOrMovable(NonCopyableOrMovable&&) = delete; | ||
| NonCopyableOrMovable& operator=(NonCopyableOrMovable&&) = delete; | ||
|
|
||
| protected: | ||
| constexpr NonCopyableOrMovable() noexcept = default; | ||
| ~NonCopyableOrMovable() = default; | ||
| }; | ||
|
|
||
| } // namespace a2a::core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Copyright 2026 Vladimir Pavlov <mistervvp@outlook.com> (https://github.com/MisterVVP) | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <google/protobuf/struct.pb.h> | ||
|
|
||
| #include "a2a/core/result.h" | ||
| #include "a2a/v1/a2a.pb.h" | ||
|
|
||
| namespace a2a::server { | ||
|
|
||
| [[nodiscard]] core::Result<google::protobuf::Struct> BuildNormalizedAgentCard(const lf::a2a::v1::AgentCard& agent_card, | ||
| bool include_legacy_transport_fields); | ||
|
|
||
| [[nodiscard]] core::Result<google::protobuf::Value> BuildAgentCardJsonValue(const lf::a2a::v1::AgentCard& agent_card, | ||
| bool include_legacy_transport_fields); | ||
|
|
||
| } // namespace a2a::server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.