Open
Conversation
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
Collaborator
|
@luoxiner please review this PR. |
Collaborator
|
@1lck ci未通过 |
- 在 AiGrpcClient 中添加资源规范参数到 releaseMcpServer 方法 - 更新 AiService 接口以支持资源规范参数 - 添加 MCP 资源常量定义和数据 ID 模板 - 在 McpAdminController 中集成资源规范解析和处理逻辑 - 扩展 McpDetailForm 表单以包含资源规范字段 - 实现 McpRequestUtil 中的资源规范解析功能 - 在 McpServerDetailInfo 中添加资源规范属性 - 更新 McpServerImportService 以处理导入的资源规范 - 扩展 McpServerOperationService 支持资源规范创建和更新操作 - 添加相应的单元测试验证资源规范功能
Contributor
Author
|
@KomachiSion 好了 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
KomachiSion
requested changes
Apr 8, 2026
ai/src/test/java/com/alibaba/nacos/ai/controller/McpAdminControllerTest.java
Show resolved
Hide resolved
ai/src/main/java/com/alibaba/nacos/ai/service/McpServerOperationService.java
Show resolved
Hide resolved
Contributor
Author
|
已根据 review 调整代码格式问题,并修复了后续 CI 暴露的测试串扰问题,最新提交如下:
麻烦帮忙再看下,谢谢。 |
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.
What is the purpose of the change
当前 MCP Server 的注册/导入流程只覆盖了服务本身和工具能力,
resourceSpecification在服务端没有真正打通,导致资源规范会被忽略,detail 查询拿不到资源信息,RESOURCE能力也无法自动推导。这个 PR 补齐了 MCP Resource Registry 链路,让 MCP Server 在发布、导入、查询、更新、删除时都能正确处理资源规范。
Brief changelog
releaseMcpServer增加资源规范参数透传AiService接口,支持资源规范McpAdminController中集成资源规范解析逻辑McpDetailForm和McpServerDetailInfo,支持返回资源规范McpRequestUtil中实现资源规范解析McpServerImportService,支持导入资源规范McpServerOperationService,支持资源规范的创建、更新、删除级联处理Verifying this change
已通过本地接口复现和定向测试验证:
resourceSpecification会被忽略,detail 中没有resourceSpec,capabilities中没有RESOURCEresourceSpecification可被存储,detail 中可返回resourceSpec,capabilities中可自动包含RESOURCE