Commit Graph

5563 Commits

Author SHA1 Message Date
Allen Lau 7d9871c2e8
Fix deprecated Log4j2 package scanning warnings (#13902)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* fix: deprecated Log4j2 package scanning warnings

* fix: replace log4j2.version property with log4j.version in log4j2-adapter
2025-11-05 09:54:02 +08:00
hexsmith 7e7da4efbd
importToolsFromMcp api support streamable protocol server (#13911)
* importToolsFromMcp api support streamable protocol server

* format code
2025-11-05 09:53:24 +08:00
Eric Wang 24cc2166a0
optimize: update checkStyle version (#13914)
Code Coverage / ci (17, ubuntu-latest) (push) Waiting to run Details
PUSH-CI / Build dist tar (push) Waiting to run Details
PUSH-CI / Docker images (centos, 17) (push) Blocked by required conditions Details
PUSH-CI / Deploy nacos (push) Blocked by required conditions Details
PUSH-CI / Java e2e Test (push) Blocked by required conditions Details
PUSH-CI / GO E2E Test (push) Blocked by required conditions Details
PUSH-CI / Cpp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Csharp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Nodejs E2E Test (push) Blocked by required conditions Details
PUSH-CI / Python E2E Test (push) Blocked by required conditions Details
PUSH-CI / Clean (push) Blocked by required conditions Details
* optimize: update checkStyle version

* optimize: update checkStyle version

* optimize: update checkStyle version

* optimize: update checkStyle version
2025-11-04 13:39:07 +08:00
方圆 39a5548291
[ISSUE #13822]: separation of responsibilities of client executor and login scheduled executor (#13878)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* [ISSUE #13822]: separation of responsibilities of client executor and login scheduled executor
2025-10-14 10:59:55 +08:00
jujiale ef652b95f9
feat:add overrideExisting endpoint when update mcpserver (#13874)
Code Coverage / ci (17, ubuntu-latest) (push) Waiting to run Details
PUSH-CI / Build dist tar (push) Waiting to run Details
PUSH-CI / Docker images (centos, 17) (push) Blocked by required conditions Details
PUSH-CI / Deploy nacos (push) Blocked by required conditions Details
PUSH-CI / Java e2e Test (push) Blocked by required conditions Details
PUSH-CI / GO E2E Test (push) Blocked by required conditions Details
PUSH-CI / Cpp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Csharp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Nodejs E2E Test (push) Blocked by required conditions Details
PUSH-CI / Python E2E Test (push) Blocked by required conditions Details
PUSH-CI / Clean (push) Blocked by required conditions Details
* feat:add overrideExisting endpoint when update mcpserver

* fix:modify the test case for delete

* fix:remove the unused test case

* fix:add param in test
2025-10-13 11:48:57 +08:00
Wanna d964cd7870
Fix: Correct synchronization lock and add volatile for tpsControlManager in GrpcConnection (#13882) 2025-10-13 10:54:03 +08:00
杨翊 SionYang de331370cb
Develop add ut api (#13881)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* Add unit tests for api module ai package.

Change-Id: I5a2a03e321d783d684384e9d23cdfe5badbf7282

* Add unit tests for api module model and remote package.

Change-Id: I5a1de50e8dd07c78cd09188e2a44d54fc99bacad

* Add unit tests for api module naming package.

Change-Id: I88f4bf0c085a9f66b6d65c7ff1faea6b1a2dac18

* Add unit tests for api module lock package.

Change-Id: I290e5f5b54a2a29756018832c421cacdcef819a0

* Add unit tests for api module config package.

Change-Id: I144ccb5331cf0162466490e2ea2b72b7ca646d71

* Add unit tests for api module.

Change-Id: I921be2f812a5b4ec9672b541071c92f80c38aaa7
2025-10-11 18:01:38 +08:00
杨翊 SionYang 31869e2587
Add ut for ai (#13879)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
* Add some unit test for ai module.

Change-Id: I36c23706202368aa1f86d29e8635f81c528dbadc

* Add todo common for McpServerTransformService

Change-Id: I011dfe76ce29ed9e69cd446dd5901eb4e4313188
2025-10-10 10:48:01 +08:00
hexsmith 37068cf44d
fix McpRemoteHandler namespaceId issue (#13877)
* fix McpRemoteHandler namespaceId issue

* fix ci issue
2025-10-10 09:46:24 +08:00
码匠君 48104438cb
[ISSUE #13869] fix Error creating bean with name 'consoleHealthController' (#13872)
Code Coverage / ci (17, ubuntu-latest) (push) Has been cancelled Details
PUSH-CI / Build dist tar (push) Has been cancelled Details
PUSH-CI / Docker images (centos, 17) (push) Has been cancelled Details
PUSH-CI / Deploy nacos (push) Has been cancelled Details
PUSH-CI / Java e2e Test (push) Has been cancelled Details
PUSH-CI / GO E2E Test (push) Has been cancelled Details
PUSH-CI / Cpp E2E Test (push) Has been cancelled Details
PUSH-CI / Csharp E2E Test (push) Has been cancelled Details
PUSH-CI / Nodejs E2E Test (push) Has been cancelled Details
PUSH-CI / Python E2E Test (push) Has been cancelled Details
PUSH-CI / Clean (push) Has been cancelled Details
2025-09-30 17:52:03 +08:00
杨翊 SionYang 03e98934d4
Add some unit test for ai module. (#13873)
Change-Id: I466335abb694620be66b650666b15f96d090f524
2025-09-30 17:00:03 +08:00
luhuabin 08da133e55
fix: service NullPointerException when getSpec() (#13868)
Code Coverage / ci (17, ubuntu-latest) (push) Waiting to run Details
PUSH-CI / Build dist tar (push) Waiting to run Details
PUSH-CI / Docker images (centos, 17) (push) Blocked by required conditions Details
PUSH-CI / Deploy nacos (push) Blocked by required conditions Details
PUSH-CI / Java e2e Test (push) Blocked by required conditions Details
PUSH-CI / GO E2E Test (push) Blocked by required conditions Details
PUSH-CI / Cpp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Csharp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Nodejs E2E Test (push) Blocked by required conditions Details
PUSH-CI / Python E2E Test (push) Blocked by required conditions Details
PUSH-CI / Clean (push) Blocked by required conditions Details
2025-09-29 17:08:58 +08:00
five111 e80c6baf6f
fix null point exception (#13861)
Code Coverage / ci (17, ubuntu-latest) (push) Waiting to run Details
PUSH-CI / Build dist tar (push) Waiting to run Details
PUSH-CI / Docker images (centos, 17) (push) Blocked by required conditions Details
PUSH-CI / Deploy nacos (push) Blocked by required conditions Details
PUSH-CI / Java e2e Test (push) Blocked by required conditions Details
PUSH-CI / GO E2E Test (push) Blocked by required conditions Details
PUSH-CI / Cpp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Csharp E2E Test (push) Blocked by required conditions Details
PUSH-CI / Nodejs E2E Test (push) Blocked by required conditions Details
PUSH-CI / Python E2E Test (push) Blocked by required conditions Details
PUSH-CI / Clean (push) Blocked by required conditions Details
when configdata src_user is empty , there might be a risk of null pointer.
2025-09-29 09:54:30 +08:00
Alioth Null fcf61998d6
For #13863, make multiple pids into a single line in shutdown.sh (#13864) 2025-09-29 09:46:16 +08:00
bee.yu 17338d5aeb
[ISSUE #13857] Flaky test in EmbeddedConfigInfoPersistServiceImplTest due to JSON field order (#13858)
* Fix flaky test testInsertOrUpdateCasOfInsertConfigSuccess

* chore: change the line format

* fix: import argThat

* chore: remove the function
2025-09-26 14:04:29 +08:00
Xin Luo a8e9f19de8
adapt to new registry api (#13849) 2025-09-23 15:36:33 +08:00
cxhello 2b9bfd4c07
fix: update startup.cmd (https://github.com/alibaba/nacos/issues/13790) (#13844) 2025-09-23 09:52:48 +08:00
杨翊 SionYang 2cbe8ae611
Upgrade version to 3.1.0. (#13839) 2025-09-22 10:56:34 +08:00
Matthew 804fac3c6e
[ISSUE#13322] Add unit test for agent registration. (#13836) 2025-09-22 09:51:53 +08:00
cxhello f71257e390
fix: Upgrade jraft to 1.3.15.bugfix (#13831)
* fix: Upgrade jraft to 1.3.15 (https://github.com/alibaba/nacos/issues/13825)

* fix: Upgrade jraft to 1.3.15.bugfix (https://github.com/alibaba/nacos/issues/13825)
2025-09-19 10:19:11 +08:00
杨翊 SionYang 032d655b93
Block change: Fix blur search may contain unexpected results. (#13832) 2025-09-18 19:01:30 +08:00
杨翊 SionYang 7bda02731a
Fix agentCard subscribe judgement problem. (#13830) 2025-09-18 16:30:40 +08:00
杨翊 SionYang 2a8585c731
Enhance the hint when publish duplicate name of agent. (#13829) 2025-09-18 14:36:02 +08:00
hongye 006ffca559
fix(auth): add AI gRPC resource parser and enable auth for MCP/Agent requests (#13827)
Resolves #13824

This commit adds support for authentication of AI-related gRPC requests
(AbstractMcpRequest and AbstractAgentRequest) in the Nacos auth module.

Key changes:
- Implement AiGrpcResourceParser to extract namespace, group and resource name
  from AI protocol requests.
- Register AiGrpcResourceParser under SignType.AI in GrpcProtocolAuthService.
- Add comprehensive unit tests using parameterized testing to cover both
  MCP and Agent request types, including edge cases (null/empty fields).
- Fix missing security token refresh in AiGrpcClient by initializing
  SecurityProxy with scheduled login task.

Ensures that all incoming AI gRPC requests are properly authenticated
when security is enabled, closing a previous authorization gap.
2025-09-18 10:14:34 +08:00
杨翊 SionYang f1af11a50f
Add a2a api auth resource parser. (#13826) 2025-09-17 17:37:45 +08:00
杨翊 SionYang 4ddbc4317c
Auto fill some required fields default values in agent card. (#13823) 2025-09-17 15:04:37 +08:00
Sunrisea 1858ef38d3
配置元数据变更接口 POST 改 PUT 方法 (#13817) 2025-09-17 09:50:54 +08:00
杨翊 SionYang 0de941c330
Develop 3.1.0 beta (#13815)
* Rebuild ui.

* Upgrade version to 3.1.0-BETA.
2025-09-16 16:18:50 +08:00
Xin Luo 136e8d40cb
Support official mcp registry protocol (#13808)
* support official mcp registry api

* fix official api

* fix format

* Delete test-result.txt

* fix test
2025-09-16 13:55:33 +08:00
Sunrisea 110ccde8e5
[ISSUE #13810] 修复配置发布时 Derby 和 MySQL 数据库表现不一致的Bug (#13812)
* 修复配置发布时 Derby 和 MySQL 数据库表现不一致的bug

* fix unit test
2025-09-16 09:59:09 +08:00
cxhello eda2fabb5b
feat: remove deployment type config (#13807)
* feat: deployemnt type merged load nacos console path tip filter

* feat: deployemnt type merged load nacos console path tip filter

* feat: remove nacos.deployment.type config (https://github.com/alibaba/nacos/issues/13790)
2025-09-15 20:13:51 +08:00
Xin Luo 2bec72f492
Support prompt encypt for mcp tools (#13813)
* support erncrypt mcp tool info

* support encrypted tool description
2025-09-15 19:54:42 +08:00
Sunrisea 8a09f9703e
[#ISSUE 13801]修复 Mcp 控制台 解析 Openapi 文件 url 时某些情况下会乱码的bug (#13803)
* 修复 Mcp 控制台 openapi文件解析的bug

* 修复 Mcp 控制台 openapi文件解析的bug
2025-09-12 16:36:13 +08:00
杨翊 SionYang ebe6f30231
[ISSUE#13322] Enhance A2A registry console page. (#13802)
* Enhance Agent card create and update page.

* Enhance Agent card query detail page.

* Enhance Agent card list page.
2025-09-12 15:50:30 +08:00
杨翊 SionYang 1e1287d728
A2a client support subscribe agentcard. (#13800) 2025-09-12 10:11:17 +08:00
杨翊 SionYang 9df5bcc1ed
[ISSUE#13322] Refactor a2a registry implementation (#13794)
* Support a2a client api.

* Support query agent card with service type agent card.

* Refactor agent name encode to id by AgentIdCodec.

* Rename admin/console api parameter name -> agentName.

* Support agent name check.

* Fix pmd

* Fix unit test.

* Fix unit test.
2025-09-11 16:05:11 +08:00
Eric Wang 2163a6b337
[ISSUE #13543] Add MCP server import functionality with registry support (#13667)
* feat: Add MCP server import functionality with registry support

- Add comprehensive MCP server import request/response models
- Implement McpServerTransformService for JSON format transformation
- Add McpServerValidationService for import validation
- Support MCP Registry format with packages and environment variables
- Enhance McpServerOperationService with import operations
- Add validation models for import result tracking

* feat: Add security improvements for MCP server import

- Add proper exception logging in executeImport method
- Implement URL validation to prevent malicious URLs (javascript:, data:, file:)
- Add protocol-specific URL validation for HTTP, STDIO, and Dubbo
- Add comprehensive test coverage for URL validation scenarios
- Improve error handling and security for MCP server imports

* feat: Add HTTP API endpoints for MCP server import functionality

This commit addresses PR feedback and implements complete HTTP API layer for MCP import functionality:

**Architecture improvements:**
- Extract McpServerImportService from McpServerOperationService for better separation of concerns
- Add comprehensive unit tests for all import-related API models
- Remove duplicate classes and use existing model classes (Package, Argument, etc.)

**HTTP API endpoints:**
- POST /v3/console/ai/mcp/import/validate - Validate import data
- POST /v3/console/ai/mcp/import/execute - Execute import operation

**Implementation details:**
- ConsoleMcpController: Added validateImport() and executeImport() endpoints
- McpProxy: Added proxy methods for import operations
- McpHandler interface: Extended with import method declarations
- Handler implementations: Added import support for inner, noop, and remote handlers
- Form validation: Leverages existing McpImportForm for request validation

**Code quality:**
- Added comprehensive unit tests for McpServerImportRequest, Response, Result, etc.
- Enhanced NamedArgument and PositionalArgument with missing fields for compatibility
- Updated method signatures and property access patterns after removing duplicates
- Fixed checkstyle violations and compilation errors

**Security and permissions:**
- Uses ActionTypes.WRITE and ApiType.CONSOLE_API for proper access control
- Maintains consistent error handling and response patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Replace misleading URL parsing with explicit UnsupportedOperationException

* fix: code style

* fix: check style

* fix: check style

* fix: UT failed

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-11 15:37:35 +08:00
LTuiz 10cb933f28
[issue #13777] Fix improper exception handling and some other basic coding issues (#13782)
* style(core): 优化日志信息和代码格式

- 修改"un registered"为"unregistered",规范日志信息表述
- 修改错误的变量定义

* refactor(namespace): 重构命名空间存在性检查逻辑

- NamespaceOperationService将检查命名空间是否存在方法抽离出来,存在返回true,不存在返回false,使代码更加清晰。
- 修正一些因此修改产生变化的代码逻辑

* refactor(namespace): 重构命名空间校验逻辑

- 优化了 NamespaceOperationService 类中的namespaceExists方法异常打印内容
- 改进了 NamespaceValidationRequestFilter 中的命名空间存在性检查逻辑,将原先逻辑删除,在filter方法里直接调用namespaceOperationService.namespaceExists方法即可

* style(core): 优化代码格式和命名规范

- 调整代码缩进和空格,与原来保持一致

* style(core): 优化代码格式和命名规范

- 调整代码缩进和空格,与原来保持一致

* refactor and test(core): 优化命名空间存在性验证逻辑并增加单元测试
- 重构 namespaceExists 方法,try-catch包裹默认namespace判断逻辑
- 将原先在NamespaceValidationRequestFilterTest类中的在校验命名空间时报错测试,改到NamespaceOperationServiceTest,因为现在异常处理和NamespaceValidationRequest类无关,和NamespaceOperationService类有关
- 在改到NamespaceOperationServiceTest类中增加异常处理测试用例,验证数据库查询失败时的返回结果
- 在NamespaceOperationServiceTest类中添加默认命名空间和非默认命名空间存在性验证的测试用例

* test:优化了测试用例,避免了不必要的异常处理

- 删除了 checkNamespaceIdExistWithException 测试方法。因为判断命名空间是否存在的逻辑已经发生改变,namespaceInnerHandler.checkNamespaceIdExist此方法无需再捕获NacosApiException异常来设置true或false,所以此测试方法可以直接删除
2025-09-11 15:36:03 +08:00
杨翊 SionYang 85dd00eb15
[ISSUE#13322] Refactor a2a admin and console api implementation. (#13793)
* Refactor a2a admin api impl.

* Refactor a2a console api impl.
2025-09-10 11:11:13 +08:00
Sunrisea 39f24eb7a3
修复 Mcp 控制台 openapi文件解析的bug (#13788) 2025-09-10 09:39:43 +08:00
杨翊 SionYang 668fddc713
Merge pull request #13786 from alibaba/summer-ospp#13322
Merge ospp#13322 into develop
2025-09-09 16:21:16 +08:00
KomachiSion 71415e4185 Ignore pmd AvoidComplexConditionRule in ParamUtils 2025-09-09 16:00:34 +08:00
KomachiSion 7ad0c67bd7 Refactor agent name to config data-id encode logic. 2025-09-09 15:51:39 +08:00
KomachiSion 94abf91680 Merge remote-tracking branch 'refs/remotes/upstream/develop' into summer-ospp#13322
# Conflicts:
#	ai/src/main/java/com/alibaba/nacos/ai/service/A2aServerOperationService.java
2025-09-09 15:41:05 +08:00
Matthew 09dc67a5e2
[ISSUE#13322] Add agent name codec. (#13785) 2025-09-09 15:33:51 +08:00
Sunrisea 12e305fb2e
feat: Add config metadata update admin api (#13783)
* add config metadata update admin api

* fix code style
2025-09-09 15:32:55 +08:00
杨翊 SionYang 06ba2ab090
Merge pull request #13784 from KomachiSion/develop-a2a-support
[#13322] Refactor A2A registry
2025-09-09 13:32:37 +08:00
杨翊 SionYang 879b36f703
Merge pull request #13781 from alibaba/summer-ospp#13322
Merge Summer ospp#13322 to develop
2025-09-08 16:44:38 +08:00
杨翊 SionYang eff87587d4
Merge pull request #13780 from KomachiSion/summer-ospp#13322-sync-develop
Summer ospp#13322 sync develop
2025-09-08 16:20:59 +08:00
KomachiSion 6d2f28bb7a Rebuild UI. 2025-09-08 16:16:37 +08:00