feat(nacos): For #293, add Nacos integration for AgentScope A2A registry and discovery.#387
Merged
AlbumenJ merged 15 commits intoagentscope-ai:mainfrom Dec 29, 2025
Merged
Conversation
…scovery. Change-Id: I3e8692df314b43644cbd1988eefee90ca84f18ea
Change-Id: I3a92f0873f2c1f5aa2d0d1c4d8178821fbf0a491
Change-Id: I91a05ab385175fa41dcee650bb562b5a6adc15fb
Change-Id: I10f2d81220ed54cfcbf18137a2ca4f65e33a6ce8
Change-Id: I378a0369e8e0eb20a8fbe63e7636b2ffc522f7c8
Change-Id: Iff904e9c4db93af147b0e84d57fd4920c6bf1c6f
Change-Id: I02799f9c84929af9ec2ae0305f6d7c46f2460309
Change-Id: I7ae17587c31f0db5d39934a30ad96a16886b1d00
Change-Id: Ib6ec38d117e46517aea0e8dc18552ba77f8f623a
Change-Id: Ibc287a66d42ba79af53fb7631d3dac8e2c5f185f
Change-Id: I4ae71ff498e1b7722572ddb47c3d02f1e2cce6a6
Change-Id: I5dc973e431d82b494364539bba6bec56449fb7bd
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Nacos integration for AgentScope's A2A (Agent-to-Agent) protocol, enabling automatic service registry and discovery functionality. The implementation follows established patterns and includes comprehensive test coverage.
Key Changes
- Nacos-based service discovery through
NacosAgentCardResolverfor client-side agent card resolution - Nacos-based service registry through
NacosAgentRegistryandNacosA2aRegistryfor server-side agent registration - Environment variable-based transport configuration with automatic parsing
- Bidirectional conversion utilities between Nacos and A2A specification formats
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/zh/task/a2a.md | Added Chinese documentation for Nacos integration usage examples and configuration |
| docs/en/task/a2a.md | Added English documentation for Nacos integration usage examples and configuration |
| agentscope-extensions/pom.xml | Added Nacos extension module to parent POM |
| agentscope-extensions/agentscope-extensions-nacos/pom.xml | Created parent POM for Nacos extensions |
| agentscope-extensions/agentscope-extensions-nacos/agentscope-extensions-nacos-a2a/pom.xml | Configured A2A Nacos extension dependencies including nacos-client |
| agentscope-dependencies-bom/pom.xml | Added nacos-client version 3.1.1 to dependency management |
| NacosAgentCardResolver.java | Implements AgentCardResolver for retrieving agent cards from Nacos with caching and subscription |
| NacosAgentRegistry.java | Implements AgentRegistry for registering agent cards and endpoints to Nacos |
| NacosA2aRegistry.java | Core registry implementation handling Nacos API interactions |
| AgentCardConverterUtil.java | Utility for bidirectional conversion between Nacos and A2A spec AgentCard formats |
| NacosA2aTransportPropertiesEnvParser.java | Parses environment variables for transport configuration overrides |
| NacosA2aRegistryTransportProperties.java | Properties record for transport endpoint configuration |
| NacosA2aRegistryProperties.java | Properties record for A2A registry configuration |
| Constants.java | Defines constants and enums for transport attributes and environment variable prefixes |
| Test files | Comprehensive unit tests with good coverage of edge cases and error scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/io/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java
Outdated
Show resolved
Hide resolved
Change-Id: I9f4e4e6332e77ef5b257eb5187e44cdb3402c812
Change-Id: Ifbbdcd1212cd0cafe232d21a95f5855885e9d1ea
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
AlbumenJ
approved these changes
Dec 29, 2025
Open
7 tasks
JGoP-L
pushed a commit
to JGoP-L/agentscope-java
that referenced
this pull request
Dec 29, 2025
…ope A2A registry and discovery. (agentscope-ai#387)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
AgentScope-Java Version
1.0.5
Description
For #293 .
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)