43 Commits

Author SHA1 Message Date
杨翊 SionYang 86c284aa81 [ISSUE #14817] Disable deprecated AI APIs by default (#15734)
* Disable deprecated AI APIs by default

Assisted-by: Claude Code

* Preserve pipeline detail not-found errors

Assisted-by: Claude Code
2026-08-18 20:15:06 +08:00
杨翊 SionYang b7a122e481 Refactor controller method resolution with Spring MVC (#15686)
Reuse the active RequestMappingHandlerMapping for authorization method lookup, retain a deprecated legacy fallback, and add auth-enabled integration coverage for module permissions and ambiguous URI forms.

Assisted-by: Claude Code
2026-08-10 18:32:25 +08:00
sai 07a0ff15f8 [ISSUE #15541] Add Agentic Resource Discovery support (#15542)
* Add ARD search API contract

* Implement local ARD search service

* Add ARD search service tests

* Implement ARD P0 persistent indexing

* Add ARD PostgreSQL schema and cursor pagination

* Add ARD skill content and LLM index enhancement

* Rebuild latest ARD index on skill version changes

* Support dedicated ARD pgvector storage

# Conflicts:
#	plugin-default-impl/nacos-default-datasource-plugin/nacos-datasource-plugin-mysql/src/main/resources/META-INF/mysql-schema.sql

* Improve ARD search ranking

* Limit ARD pgvector search in SQL

* Make ARD pgvector embeddings extensible

* Enhance ARD source content for prompt and MCP

* Align ARD search protocol response

* Expose ARD resource artifact URLs

* Support ARD field path filters

* Add ARD agents endpoint

* Add ARD explore endpoint

* Add internal ARD catalog endpoint

* Add ARD catalog list explore DTOs

* Complete local ARD protocol endpoints

* Cover ARD catalog list explore artifacts

* Extract ARD index enhancement prompt

* Make ARD catalog host metadata configurable

* Add ARD vector index SPI

* Add default PostgreSQL ARD vector plugin

* Route ARD vector indexing through plugins

# Conflicts:
#	api/src/main/java/com/alibaba/nacos/api/plugin/PluginType.java

* Extract ARD index enhancement prompt

* refactor: flatten ARD enhancement search phrases

* refactor: split ARD enhancement search chunks

* feat: return complete skill packages from ARD

* test: cover ARD skill package URLs

* Add ARD well-known catalog endpoint

* Simplify ARD catalog base URL configuration

* Tighten ARD catalog base URL semantics

* Align ARD well-known catalog semantics

* Fix ARD namespace authorization parsing

* Clean up ARD index content storage

* Add ARD index backfill

* Add ARD global feature switch

* Move ARD protocol contracts to registry adaptor

* Align ARD vector plugin with unified loading

* Document ARD protocol adaptor ownership

* Decouple ARD protocol and storage concerns

* Fix AI vector plugin discovery

* Fix ARD endpoint authentication

* Fix PostgreSQL ARD vector schema isolation

* Fix ARD protocol compatibility and artifact routing

Pin the upstream ARD contract, align response and error models, and serve complete Skill artifacts from the adaptor web context.

* Move ARD discovery logic into AI module

* Make ARD index maintenance durable

Persist coalesced resource-level index tasks with leased retry, make relational and default PostgreSQL vector replacement transactional, and reconcile stale or orphaned indexes periodically.

* Fix ARD schema fixture RAT exclusion

Use a module-independent path pattern so the pinned upstream JSON Schema is excluded when RAT runs from either the repository root or the adaptor module.

* Refine ARD search architecture and compatibility

* Fix ARD release blockers

Align ARD authentication, catalog URLs and identifiers with the pinned protocol contract. Bound discovery/index queries, complete namespace catalogs, and document the three-table migration path.

* Fix ARD authentication in adaptor context

* Fix PluginType spotless formatting
2026-07-29 09:49:47 +08:00
杨翊 SionYang 30c1398ab9 [ISSUE #15475] Standardize plugin state and AI pipeline lifecycle (#15537)
Centralize plugin execution capabilities and separate core module gates from plugin state. Migrate AI pipeline services to direct PluginConfigSpec lifecycle management with unified runtime ordering and legacy configuration compatibility.

Assisted-by: Claude Code
2026-07-20 17:51:59 +08:00
杨翊 SionYang c5b1fe9429 [ISSUE #15475] Standardize datasource module configuration (#15524)
Add canonical nacos.plugin.datasource.db.* keys while retaining legacy aliases.

Assisted-by: Claude Code
2026-07-17 09:48:28 +08:00
杨翊 SionYang 41b6c5ad58 [ISSUE #15475] Integrate visibility and AI storage plugin management (#15523)
* [ISSUE #15475] Integrate visibility plugin state

Assisted-by: Claude Code

* [ISSUE #15475] Clarify AI storage plugin state

Assisted-by: Claude Code
2026-07-16 18:54:03 +08:00
杨翊 SionYang 2ee2855ab1 [ISSUE #15475] Integrate OIDC auth plugin configuration (#15514)
Move OIDC settings into PluginConfigSpec with immutable plugin-owned runtime state, standard keys, legacy aliases, specs, and API coverage.

Assisted-by: Claude Code
2026-07-15 19:50:42 +08:00
杨翊 SionYang 504afcf865 [ISSUE #15475] Integrate LDAP auth plugin configuration (#15512)
Assisted-by: Claude Code
2026-07-15 16:29:49 +08:00
杨翊 SionYang 73c89c37f6 [ISSUE #15475] Integrate Nacos auth plugin configuration (#15511)
Assisted-by: Claude Code
2026-07-15 13:33:27 +08:00
Guimu 682b877d9d [ISSUE #15164] Make skill ZIP entry and size limits configurable (#15169)
* [ISSUE #15164] Make skill ZIP entry and size limits configurable

The hard-coded 500-entry and 50 MB caps in SkillZipParser were originally
introduced as Zip-Bomb hardening, but they also reject legitimate large
skill uploads — particularly skills with many small asset files. Expose
both bounds via existing EnvUtil properties so operators can raise them
without code changes:

  - nacos.ai.skill.zip.max-entries           (default 500)
  - nacos.ai.skill.zip.max-uncompressed-size-mb  (default 50)

Non-positive overrides are ignored and fall back to the default to keep
the security guard intact, and SkillZipParser still operates correctly
when the Nacos environment has not been initialized (e.g. unit tests),
preserving existing call sites.

* [ISSUE #15164] Sharpen SkillZipParser limits tests and dedupe resolver helpers

Self-review follow-up for the previous commit:

  - Replace the previous "raised limit" parseSkillFromZip test, whose
    catch clause only checked for the absence of a specific message, with
    a direct invocation of unzipToEntries that asserts all 601 entries
    are returned when the configured cap is above the input size. The
    old form silently passed even if parseSkillFromZip succeeded for an
    unrelated reason.
  - Add a parallel "environment missing" fallback test for the
    uncompressed-size resolver to match the coverage of the entry-count
    resolver.
  - Extract resolvePositiveIntProperty(...) so resolveMaxZipEntries and
    resolveMaxUncompressedBytes share one implementation of "env-aware,
    non-positive-rejected" property reading.

* [ISSUE #15164] Make skill ZIP upload-size limit configurable

Address the remaining hard-coded skill upload caps surfaced in the
issue triage (Sunrisea's #3 / #4): the 10 MB MAX_UPLOAD_ZIP_BYTES guard
applied at both the controller entrance (SkillRequestUtil) and the
parser entrance (SkillZipParser parseSkillFromZip /
parseMultipleSkillsFromZip). Without this knob, raising the entry-count
and uncompressed-size caps was not enough to actually let a large skill
through — the request was rejected before either guard ran.

  - Introduce nacos.ai.skill.zip.max-upload-size-mb (default 10 MB) and
    SkillZipParser#resolveMaxUploadBytes(), reusing the existing
    resolvePositiveIntProperty helper so the three configurable knobs
    share one implementation.
  - Route SkillRequestUtil#validateAndExtractZipBytes,
    SkillZipParser#parseSkillFromZip, and
    SkillZipParser#parseMultipleSkillsFromZip through the new resolver.
  - Keep Constants.Skills#MAX_UPLOAD_ZIP_BYTES as the documented default
    for backward compatibility; the Javadoc now points runtime callers
    at the resolver.
  - Document the new property next to the other ai.skill.zip knobs in
    application.properties, including a reminder that the Spring
    multipart cap (spring.servlet.multipart.max-file-size) must be
    raised in lockstep — Tomcat rejects oversize uploads first.
  - Add five tests in SkillZipParserLimitsConfigTest covering default,
    positive override, non-positive fallback, missing-environment
    fallback, and an end-to-end parseSkillFromZip rejection driven by
    an incompressible 2 MB payload against a 1 MB configured cap.

* [ISSUE #15164] Align upload-size default with Constants and Random import style

Two small follow-ups from a second pass on the previous commit:

  - Derive DEFAULT_MAX_UPLOAD_SIZE_MB from Constants.Skills#MAX_UPLOAD_ZIP_BYTES
    so the public constant stays the single source of truth. Previously the
    default lived as a literal 10 in SkillZipParser and a literal 10L * 1024 * 1024
    in Constants, which could drift if one was updated without the other.
  - Use a top-level import for java.util.Random in the limits-config test to
    match the import style used elsewhere in the codebase (every other test
    uses the short name with an import rather than a fully qualified one).

* [ISSUE #15164] Make AgentSpec ZIP limits configurable, mirroring skill

Mirrors the SkillZipParser changes from this PR onto AgentSpecZipParser
in response to maintainer review feedback ("Can add agentspec zip
entries and bytes size configurable together?"). The three hard-coded
caps applied at the controller entrance (AgentSpecRequestUtil) and the
parser entrance (AgentSpecZipParser parseAgentSpecFromZip) are now
overridable via EnvUtil properties, with defaults unchanged so existing
deployments behave identically:

  - nacos.ai.agentspec.zip.max-upload-size-mb        (default 50 MB,
    derived from Constants.AgentSpecs#MAX_UPLOAD_ZIP_BYTES so the public
    constant remains the single source of truth)
  - nacos.ai.agentspec.zip.max-entries               (default 500)
  - nacos.ai.agentspec.zip.max-uncompressed-size-mb  (default 50)

The resolver helpers and resolvePositiveIntProperty implementation are
direct copies of the SkillZipParser pattern from earlier commits on
this PR so the two parsers stay symmetric. Non-positive overrides are
rejected and fall back to the default to keep the Zip-Bomb / DoS guards
intact. AgentSpecZipParserLimitsConfigTest mirrors
SkillZipParserLimitsConfigTest with 16 cases: per-resolver defaults,
positive override accepted, non-positive override ignored,
missing-environment fallback, and end-to-end parseAgentSpecFromZip
rejections driven by the configured caps (including an incompressible
2 MB payload against a 1 MB configured upload cap).
2026-05-19 10:01:50 +08:00
Guimu f781491874 [ISSUE #15038] docs(auth): clarify SDK and admin auth scopes (#15134)
* [ISSUE #15038] docs(auth): clarify SDK and admin auth scopes

Assisted-by: Claude Code

* [ISSUE #15038] docs(auth): clarify console.enabled scope

Mirror the same hint already added for auth.enabled and auth.admin.enabled:
nacos.core.auth.console.enabled controls /v3/console/* HTTP request
authentication only.

Addresses review feedback from @KomachiSion on PR #15134.

Assisted-by: Claude Code
2026-05-12 18:34:24 +08:00
cxhello f085e06392 [ISSUE #14815] build(style): apply Spotless formatting to small modules (#15111)
Modules: logger-adapter-impl, cmdb, address, prometheus, server, example, bootstrap

Signed-off-by: cxhello <caixiaohuichn@gmail.com>
2026-05-09 18:02:12 +08:00
PIGCLOUD d91b339cc2 feat(console): support disabling AI registry
Expose nacos.extension.ai.enabled in console module state and use it to hide AI registry routes and sidebar entries in the new console.

Disable remote AI console handlers when the AI extension switch is off.

Assisted-by: Claude Code
2026-04-27 16:16:40 +08:00
杨翊 SionYang dff1617660 Add config option to enable or disable visibility plugin (#14873)
* feat(visibility): add support to enable or disable visibility plugin via config.

* feat(visibility): add support to enable or disable visibility plugin via config.
2026-04-07 20:54:56 +08:00
sai fd9012ced7 Rename mcp-registry module to ai-registry and separate enable switches (#14797)
* [ai-registry-adaptor] Rename mcp-registry module to ai-registry

* [ai-registry-adaptor] Update unit tests for ai-registry rename

* [bootstrap] Separate mcp/skill registry enable switches and migrate port config

* fix: correct license comment indentation in AbstractNacosRestTemplate
2026-03-31 09:57:47 +08:00
码匠君 21ef3d38c2 fix #14775 The application.properties file is missing OIDC-related configurations (#14776) 2026-03-30 09:40:07 +08:00
Sunrisea c35538f21a [ISSUE #14652] Support dual UI switching between new and legacy console with contextPath adaptation (#14653)
* feat(console): support dual UI switching between new and legacy console

- Add ConsoleRedirectController to redirect root `/` to default UI based on
  `nacos.console.ui.default` config (defaults to "next")
- Add `console_ui_default` field to server state API
- Move old UI build output to `/legacy/` path, new UI to `/next/` path
- Fix new UI API baseURL to work correctly under `/next/` sub-path
- Fix old UI API baseURL and resource paths to use absolute references
- Add UI version switch buttons to both consoles (bottom-right corner)
- Update security ignore URLs for `/next/**` and `/legacy/**`
- Add build copy scripts for both UIs

🤖 Generated with [Qoder][https://qoder.com]

* fix(console): add forward mappings for /next/ and /legacy/ directory URLs

Spring Boot static resource handler does not serve index.html for
subdirectory URLs. Add explicit forward rules so /next/ and /legacy/
resolve to their respective index.html files.

🤖 Generated with [Qoder][https://qoder.com]

* feat(console-ui): adapt contextPath for both new and legacy UIs

- Use relative paths (./, ../) instead of absolute paths for all static
  assets, API URLs, SSE endpoints, and UI switching links
- New UI: change Vite base to './', use import.meta.env.BASE_URL for
  image paths, compute API baseURL dynamically from window.location
- Legacy UI: change webpack contextPath to relative, fix font paths,
  add dynamic contextPath for SSE URLs, fix Monaco editor path
- Fix 17 TypeScript errors (unused imports, React 19 type strictness)
- Add Namespace.namespaceDesc field to match API response
- Update README.md for both UIs with build & deploy instructions
- Deploy build artifacts to console static resource directories

🤖 Generated with [Qoder][https://qoder.com]

* feat(console-ui-next): redesign settings center and reorder sidebar

- Remove Studio-related settings (studioUrl, studioProject) from settings center
- Redesign settings page with improved visual hierarchy:
  - Add page description and section description text
  - Use icon badge with colored background for section header
  - Move API key hint from tooltip to inline helper text
  - Integrate save button inside card with border separator
  - Follow space-y-2.5 form spacing convention
- Reorder sidebar: AI Registry moved to top, children reordered to
  Skill > Prompt > Agent > MCP, default expanded
- Update i18n files (en-US, zh-CN) accordingly
- Deploy updated build artifacts to static/next/

🤖 Generated with [Qoder][https://qoder.com]

* docs: translate README files to English for both UIs

🤖 Generated with [Qoder][https://qoder.com]
2026-03-20 09:32:42 +08:00
杨翊 SionYang dd381f5443 Refactor database plugins and update CI report paths (#14640)
* refactor(plugin): Refactor default database plugin, split database plugins and move depend jdbc to plugins dir.

* fix(ci): update JaCoCo report paths for datasource plugins in CI workflow

* fix(pom): update maven-antrun-plugin version and correct task tags
2026-03-19 16:19:23 +08:00
shiyiyue1102 69997eef7b Merge branch 'develop' into develop-skill-registry-with-copolit 2026-03-04 20:20:02 +08:00
杨翊 SionYang cabddd3438 refactor(server): unify component scanning with custom package exclude filters. (#14468)
Change-Id: Ibe550441195d3171d3a96664830c152ebb98ad7c
2026-02-25 10:18:30 +08:00
qiacheng7 d40267cfc7 Modify skill functions and display (#14465)
* Enhance MainLayout: Add language change handling to fetch notices on update (#14210)

添加 componentDidUpdate 生命周期方法,监听语言变化并重新获取公告

* fix(startup): add JVM --add-opens options for JDK 17+ compatibility (#14307)

Add --add-opens JVM options to startup scripts for Java 9+ to resolve
JRaft reflection issues when running on JDK 17+.

Added options:
- --add-opens=java.base/java.lang=ALL-UNNAMED
- --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
- --add-opens=java.base/java.util=ALL-UNNAMED

Closes #14122

Signed-off-by: cxhello <caixiaohuichn@gmail.com>

* feat(github): add anti-spam protection for GitHub Issues (#14333)

- Add config.yml to disable blank issues and guide users to proper channels
- Add anti-spam.yml GitHub Actions workflow with:
  - Keyword-based spam detection (airline names, multi-language terms)
  - New account detection (< 7 days)
  - Auto-close, label, and lock spam issues
- Remove deprecated old-issue-template.md

This addresses the recent spam bot attacks targeting the repository.

Signed-off-by: cxhello <caixiaohuichn@gmail.com>

* chore: fix some typos in comments (#14263)

Signed-off-by: slightsharp <slightsharp@outlook.com>

* fix(github): improve anti-spam detection accuracy (#14356)

- Fix account age detection by fetching user data via GitHub API
  (issue.user.created_at is not available in webhook payload)
- Add more airline names (Swiss Air, Austrian Airlines, TAP Portugal, etc.)
- Add French spam keywords (billet, réservation, vol, etc.)
- Add phone number pattern detection (2+ phone numbers triggers spam)
- Improve logging for debugging

This fixes the issue where spam from new accounts was not being detected.

Signed-off-by: cxhello <caixiaohuichn@gmail.com>

* test(auth): improve readability of LDAP auth integration test (#14357)

* fix run bugs

* 修改skill展示为文件夹形式

* skill ai优化更新

* 修复上传skill压缩包限制10M

* 创新skill填写名称限制提示

* skill文件夹多层次结构

* 优化前端页面

* auth open

* auth open

* delete .github

* delete .github

* Delete .github/ISSUE_TEMPLATE directory

* delete .github

---------

Signed-off-by: cxhello <caixiaohuichn@gmail.com>
Signed-off-by: slightsharp <slightsharp@outlook.com>
Co-authored-by: 潘祤麒 <91871324+lvren1485@users.noreply.github.com>
Co-authored-by: cxhello <49056040+cxhello@users.noreply.github.com>
Co-authored-by: slightsharp <slightsharp@outlook.com>
Co-authored-by: Zihan <zzh18189368647@gmail.com>
2026-02-12 14:01:08 +08:00
杨翊 SionYang d7d4e31c04 refactor(api-legacy-adapter): Remove api-legacy-adapter module (moved to nacos-group/nacos-api-legacy-adapter). (#14467)
Change-Id: I11e2c6659de0749866f9863355f66b23f3a3d28e
2026-02-11 10:34:21 +08:00
杨翊 SionYang ef1cf275b2 [ISSUE#14050] Extract and Refactor /v1 and /v2 HTTP APIs to Submodules (#14463)
* refactor(config): remove deprecated v1 and v2 controllers and move to api-legacy-adapter module.

Change-Id: Ie82daa287199fec8013f83cceb7cf43213c2c48c

* chore(api-legacy-adapter): cleanup legacy API compatibility and console integration.

Change-Id: Id39f6a953f6ba176a342b7cd11410c4a0d8aa39a

* refactor(auth-plugin): remove deprecated v1 role and permission controllers.

Change-Id: I096ab1f9bb904cc9b6be3e00db696e94e4f96fd6

* chore(legacy-adapter): enhance legacy auth adapter configuration and logging.

Change-Id: I217720a1aa7f2ec350fa9150d9e4963bdbde7a20

* fix(nacos-default-plugin-all): enable default-auth-plugin dependency.

Change-Id: Id4b663cdbddf2519fb51e360822060d63ac70e64

* chore(api-legacy-adapter): add legacy API adapter module and update bootstrap dependencies.

Change-Id: I787aebe11400128797109d90b006933e3ea74033

* test(exception): fix mock method in GlobalExceptionHandlerTest.

Change-Id: I97a1a7909697b0bf2f0764967a624bac5e406bb1
2026-02-10 11:25:33 +08:00
Eric Wang e970395936 [ISSUE #14122] Activate dev profile by default for plugin dependencies (#14125)
* feat(build): activate dev profile by default for plugin dependencies

* feat: Support JDK 17+ and macOS ARM64, update dependencies
- [istio] Upgrade os-maven-plugin to 1.7.1 for macOS ARM64 support.
- [istio] Split protobuf-maven-plugin executions to prevent file locking issues.
- [bootstrap] Add dev profile to include default plugins for development.
2026-02-06 15:13:54 +08:00
shiyiyue1102 a7bf9bada0 skills registry and nacos copolit (#14245)
support skill registry and nacos copilot
2026-01-23 13:44:07 +08:00
Eric Wang 7d48d1605b [ISSUE #14048] Refactor datasource plugins structure and enhance PostgreSQL capabilities (#14056)
* feat(plugin): centralize datasource plugin management

* feat(plugin): Migrate datasource dialect and enum implementations to plugin-default-impl
 - Migrate DatabaseDialect implementations (5 files) using git mv
 - Migrate Enum classes (5 files) using git mv
 - Migrate related tests (19 files) using git mv
 - Update DatabaseDialectManager to use SPI-loaded dialects
 - Update SPI service file paths
 - Update import statements in mapper implementations
 - Preserve git history for all migrated files

* fix: Fix missing SPI registration and test compilation issues

* fix(console): decouple console module from nacos-default-auth-plugin

* feat(datasource): add PostgreSQL schema and dependency integration

- Add PostgreSQL schema file `pg-schema.sql` with initial table structures and constraints.
- Include PostgreSQL JDBC dependency in project and module `pom.xml` files.

* fix(test): resolve core-test compilation failure after auth plugin migration

* fix(test): mock MapperManager in NamespacePersistService tests

* fix(test): add test scope dependency

* feat(datasource): implement PostgreSQL datasource mappers and schema

1. Schema Support:
   - Update PostgreSQL table schema in pg-schema.sql.

2. Mapper Implementations:
   - Implement GroupCapacityMapperByPostgresql and TenantCapacityMapperByPostgresql.
   - Implement ConfigTagsRelationMapperByPostgresql with fuzzy search support.
   - Add ConfigInfoGrayMapperByPostgresql and ConfigMigrateMapperByPostgresql.
   - Register new mappers in META-INF/services SPI file.
2025-12-29 11:12:54 +08:00
Heng Zhao 3e3beb063f [ISSUE #13964] Fix when nacos.extension.ai.enabled is false, nacos start fa… (#13965)
* fix(ai): Fix when nacos.extension.ai.enabled is false, nacos start failed.

* fix(ai): Fix when nacos.extension.ai.enabled is false, nacos start failed.
2025-11-26 09:56:40 +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
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
Xin Luo 90ddd25c2b Support registry details and opt mcp consol ui (#13668)
* add more mcp registry data structure support and use jackson annotation for properties alias

* add more mcp registry data structure support and use jackson annotation for properties alias

* rename package name to packageInfo

* correct registry name in maven module

* add ui support

* add remote headers support

* remote examples

* disable test for package
2025-08-06 16:51:14 +08:00
杨翊 SionYang 91084e5099 Default disabled mcp registry (#13409)
* Default disabled mcp registry feature.

* Rebuild nacos console ui.
2025-05-21 18:01:55 +08:00
Xin Luo f099783ab7 disable edit when edit old version and add namespace suuport for ai m… (#13406)
* disable edit when edit old version and add namespace suuport for ai maintainer sdk

* fix style errors

* fix ut for console api
2025-05-21 17:19:34 +08:00
杨翊 SionYang c49d5bcd60 For #13377, merge mcp registry and mcp api changed to develop. (#13398)
* Feat support mcp registry api (#13376)

* Support tag fuzzy search  (#13387)

* support tag fuzzy search

* support tag fuzzy search

* Merge pull request #13391 from luoxiner/support-mcp-multi-version

Feat Support Mcp Registry

* Add copyright for mcp-adapter pom.

* Support version in ai maintainer sdk and fix some errors when build (#13401)

* add version for ai maintainer sdk and support display mcp server config

* fix pmd errors

* fix empty endpoint

* remote publish api

* fix tag fuzzy search sql unit test (#13402)

* Fix unit test.

---------

Co-authored-by: Xin Luo <65529035+luoxiner@users.noreply.github.com>
Co-authored-by: Sunrisea <49605583+Sunrisea@users.noreply.github.com>
Co-authored-by: luoxin.luo <luoxin.luo@alibaba-inc.com>
2025-05-21 15:27:33 +08:00
杨翊 SionYang 29f9562e89 [ISSUE#13321] Fix prometheus metrics api can't accept. (#13388)
* Fix prometheus metrics api can't accept.

* Fix unit test problem.

* Fix unit test problem.

* Fix unit test problem.

* Fix unit test problem.
2025-05-19 19:39:18 +08:00
KomachiSion 67313bfe50 Merge remote-tracking branch 'refs/remotes/upstream/develop' into v3.0-develop-sync-develop
# Conflicts:
#	api/src/main/java/com/alibaba/nacos/api/model/v2/ErrorCode.java
#	bootstrap/src/main/resources/application.properties
#	client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
#	client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java
#	config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java
#	config/src/main/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspect.java
#	config/src/main/java/com/alibaba/nacos/config/server/aspect/RequestLogAspect.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java
#	config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigRemoveRequestHandler.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/ConfigGrayModelMigrateService.java
#	config/src/test/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspectTest.java
#	config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigControllerTest.java
#	config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java
#	config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java
#	core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcBiStreamRequestAcceptor.java
#	naming/src/main/java/com/alibaba/nacos/naming/controllers/v2/ClientInfoControllerV2.java
#	naming/src/test/java/com/alibaba/nacos/naming/controllers/ServiceControllerTest.java
#	plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/impl/mysql/GroupCapacityMapperByMysqlTest.java
#	pom.xml
#	sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilTest.java
2025-03-10 10:16:34 +08:00
杨翊 SionYang 2c025e20ec V3.0 develop console mode (#13134)
* Use Page to replace List result for some maintainer api.

* Support namespace page.

* uniform Namespace model to api。

* Support console get server state from nacos-server

* Fix update namespace invalid problem.

* console support setting admin password.

* Add Console maintainer client auth plugin to support identity request.

* Support Nacos Console get users info from nacos server.

* Support Nacos Console get role and permission info from nacos server.

* Fix NPE by AuthConfig loading Circular Dependencies.
2025-02-25 18:27:01 +08:00
杨翊 SionYang 8de4e36d7e Support nacos console deployment independent: PR 1 (#13072)
* Support start up with console only mode: step1 - basic start up.

* Support start up with console only mode: step2 - solve server state to fix console ui loading.
2025-01-24 17:53:53 +08:00
杨翊 SionYang 1775037721 Fix some 3.0 admin api problem. (#13049)
* Fix v3 admin api list instances problem.

* Fix admin api auth failed.
2025-01-17 11:42:37 +08:00
shiyiyue1102 a8fa559f95 fuzzy watch optimize and test case coverage (#13043)
fuzzy watch optimize and test case coverage
2025-01-16 15:17:52 +08:00
杨翊 SionYang f54edabedb V3.0 develop enhancement configuration file and fix deploy problem (#13009)
* Sort and enhance nacos application.properties.

* fix deploy and compile problem.
2025-01-02 17:04:34 +08:00
杨翊 SionYang 05362b0b90 V3.0 develop starting listening enhance & fix console auth invalid problem. (#13001)
* Enhance StartingApplicationListener to reduce duplicate operation.

* Fix console auth invalid problem.
2024-12-30 17:51:49 +08:00
杨翊 SionYang 8478fd7204 Enhance to reuse duplicate spring beans to reduce memory usage. (#12990) 2024-12-25 15:17:06 +08:00
杨翊 SionYang 1609df97df [Nacos 3.0] Nacos support console and server start with different web container and port. (#12959)
* Support console and server api with depend port.

* enhance banners and support only start server mode.
2024-12-17 15:33:47 +08:00