233 Commits

Author SHA1 Message Date
吴世元 4e5e0133ea [ISSUE #15718] Escape every LIKE predicate in the embedded role search (#15719)
* [ISSUE #15718] Escape every LIKE predicate in the embedded role search

The embedded role search appended ESCAPE '\' once, after both LIKE predicates
had been built. ESCAPE qualifies only the predicate it immediately follows, so
the clause applied to the role filter alone and the username filter was left
without one. generateLikeArgument had already rewritten _ into \_, so Derby
matched the backslash literally and the query returned no row whenever both
filters were combined and the username contained an underscore.

Append the clause to each LIKE predicate instead, matching how the user and
permission searches in the same module already build theirs.

Add a Derby test that executes the generated SQL with the bound parameters,
since asserting the SQL text alone cannot prove which predicate the clause
qualifies, and document the rule in the default auth plugin spec.

Assisted-by: Claude Code
Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>

* [ISSUE #15718] Escape the auth name searches like the paged searches

findRolesLikeRoleName and findUserLikeUsername bound "%" + value + "%"
directly, while findRolesLike4Page and findUsersLike4Page routed the same
value through generateLikeArgument. An underscore therefore stayed a
wildcard in the name searches backing the console autocompletion and was a
literal character in the paged searches, so one keyword selected different
rows depending on which control the operator used. Searching ro_le matched
both ro_le and roXle in the dropdown and only ro_le in the table.

Route the argument through generateLikeArgument in all four services. The
embedded SQL already declared ESCAPE '\' on these predicates, so it now
qualifies an argument that actually carries the escape; the external SQL
keeps relying on the backslash that MySQL and PostgreSQL default to, exactly
as its own paged search does.

Extend the Derby test to execute the name search against the real database,
since asserting the bound argument alone cannot prove the underscore stops
matching, and state the parity rule in the default auth plugin spec.

Assisted-by: Claude Code
Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>

---------

Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>
2026-08-20 11:29:15 +08:00
杨翊 SionYang c5b6b195c5 feat(ai): enable shared resource search runtime (#15733)
Activate AI Resource Search independently from ARD, add typed predicates and stable numbered pagination, and align built-in datasource indexes with resource-key scanning.

Assisted-by: Claude Code
2026-08-18 18:04:49 +08:00
杨翊 SionYang 9a0f108f31 [ISSUE #15695] Optimize configuration page layouts (#15729)
Assisted-by: Claude Code
2026-08-17 19:10:02 +08:00
杨翊 SionYang f171667ea4 [ISSUE #15682] Prevent username enumeration during login (#15717)
* fix: prevent username enumeration during login

Assisted-by: Claude Code

* fix: avoid password hashing for unknown users

Assisted-by: Claude Code

* fix: preserve login failure response contract

Assisted-by: Claude Code
2026-08-17 13:29:22 +08:00
吴世元 7bc723f1c7 [ISSUE #15710] Declare the LIKE escape clause for dialects without a default escape character (#15711)
* [ISSUE #15710] Declare the LIKE escape clause for dialects without a default escape character

Fuzzy search parameters escape the _ wildcard with a backslash, which only
works on a database treating the backslash as the default LIKE escape
character. Derby and Oracle have no such default, so the predicate matches
the backslash literally and silently returns no row.

Report the clause through the new Mapper#getLikeEscapeClause() dialect hook,
override it for Derby and Oracle, and append it to every LIKE bound to such a
parameter, in both the shared mapper defaults and the Oracle overrides. MySQL
and PostgreSQL keep an empty clause, so their SQL is unchanged.

Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>

* [ISSUE #15710] Escape the LIKE escape character in fuzzy search arguments

Declaring ESCAPE '\' on the LIKE predicates also constrains the bound
parameter: generateLikeArgument escaped the _ wildcard but left a literal
backslash in the search value untouched, so a value such as C:\path formed
the invalid escape sequence \p. Oracle rejects it with ORA-01424 and Derby
with SQLSTATE 22025, and a value such as a\_b silently kept _ as a wildcard.

Escape the escape character itself before escaping _, keeping the Config and
AI implementations consistent, and document the required order in the
datasource dialect spec.

Add a Derby test that executes the SQL generated by the mapper with the bound
parameter, since asserting the SQL text alone cannot detect an invalid escape
sequence in the argument.

Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>

---------

Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
2026-08-17 10:36:27 +08:00
吴世元 9b989acdf1 [ISSUE #15701] Fix history config next-record query for Derby and gray configs (#15702)
HistoryConfigInfoMapper#getNextHistoryInfo backs the config history
detail/diff lookup for UPDATE records. It had two defects.

The interface default SQL ends with 'ORDER BY nid LIMIT 1'. LIMIT is
MySQL/PostgreSQL syntax, and HistoryConfigInfoMapperByDerby overrode the
other row-limiting queries but not this one, so Derby inherited it and
the query failed with a syntax error. Derby is the standalone default
datasource. Add the missing Derby override using FETCH FIRST 1 ROWS
ONLY, matching the existing Oracle override.

The gray filter read grayName through getContextParameter, while both
repository implementations publish it with putWhereParameter and
MapperContext keeps those maps separate. 'AND gray_name = ?' was
therefore never emitted and gray history records of one config were not
separated by gray version. Read grayName from the where parameters and
derive both the predicate and its bound parameter from a single guard,
which also removes the isBlank/isEmpty mismatch that could emit a
placeholder without its predicate.

The existing default-mapper test only passed because it wrote grayName
into both maps; it now uses the where parameters alone, as production
does.

Assisted-by: Claude Code

Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
2026-08-13 16:13:52 +08:00
sai 9c47f22b1a [ISSUE #15663] Fix AI resource search MySQL collation (#15664)
Keep derived resource identity and task comparisons case-sensitive while retaining keyword case folding in query normalization.

Assisted-by: Claude Code
2026-08-10 10:17:57 +08:00
杨翊 SionYang e9b1b81edb Harden distributed database query result resolution (#15661)
Validate SelectRequest result targets and eagerly register distributed row mappers.

Assisted-by: Claude Code
2026-08-06 16:14:29 +08:00
sai db7abe35b6 [ISSUE #15541] Improve ARD search index consistency (#15615)
* Fix ARD filter compatibility

* Remove ARD naming from AI search internals

* Document durable AI resource index enhancement

Assisted-by: Claude Code

* Extend AI resource index task schemas

Assisted-by: Claude Code

* Make AI resource index enhancement durable

Assisted-by: Claude Code

* Fix AI resource index task consumer injection

Assisted-by: Claude Code

* Refactor durable AI resource task model

Generalize the durable search-index task contract with versioned payload and result data while preserving lease, retry, and revision fencing semantics.

Assisted-by: Claude Code

* Update AI resource task schemas

Replace the search-index-specific task table with the generic AI resource task schema across supported databases and align Derby persistence test resources.

Assisted-by: Claude Code

* Use epoch millis for AI resource task scheduling

Assisted-by: Claude Code

* Improve AI resource index convergence

Harden task fencing, lease handling, reconciliation, vector readiness, and ARD filter compatibility.

Assisted-by: Claude Code

* fix: use latest published MCP version by default

Resolve omitted MCP versions through latestPublishedVersion so draft versions do not trigger repeated index reconciliation. Add unit and Admin API regression coverage.

Assisted-by: Claude Code

* fix: fence AI resource task leases

Preserve active leases across coalesced lifecycle schedules and use a monotonic lease token to fence stale workers from renewing, completing, retrying, or releasing newer work.

Assisted-by: Claude Code

* test: align MCP latest published version lookup

Assisted-by: Claude Code
2026-08-05 14:22:10 +08:00
Zhengcy05 5e952c8d07 [ISSUE #15604] Add visibility permission management for AI resources (#15623)
* feat: add console-ui

* feat: add visibility permission management for AI resources

* feat: support standalone Console deployment

* feat: 1.Avoid losing the existing read permission during r → rw upgrade
2.Repeated revoke didn't report error

* spotless

* fix: ci
2026-08-04 14:33:26 +08:00
杨翊 SionYang 645f9a13ef Deprecate legacy plugin compatibility paths (#15614)
Continuous Integration / ci (push) Has been cancelled
Frontend Continuous Integration / frontend-ci (push) Has been cancelled
Frontend Continuous Integration / check-min-release-age (push) Has been cancelled
Assisted-by: Claude Code
2026-07-30 15:18:06 +08:00
Zhengcy05 6e6c904a45 [ISSUE #15476] Add plugin-owned visibility grant API (#15513)
* feat: ai-visibility grant api

* fix: add User existence verification and fix test

* fix: Modify naming to remove AI semantics

* feat: retain at most one visibility role

* feat: keep the authorization chain as identity -> role -> permission

* feat: expand 'resource' to 512

* feat: mark the new visibility APIs as ADMIN_API

* feat: remove list api

* feat: Complete the 512-character schema and upgrade delivery

* feat: Align the API contract  and specifications

* feat: complete focused tests for the new authorization model

* feat: remove the grant-list-only indexes

* feat: fix md

* feat: revert the role-wide cache reload changes

* fix: add @NacosApi

* fix: codecov

* fix: add EnvUtil MockEnvironment

---------

Co-authored-by: 杨翊 SionYang <xiweng.yy@alibaba-inc.com>
2026-07-29 16:00:36 +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 cfa255148d [ISSUE #15475] Integrate AI resource importer plugin configuration (#15589)
* [ISSUE #15475] Integrate AI resource importer plugin configuration

Unify AI resource importer builders with plugin configuration management and remove the redundant source abstraction.

Assisted-by: Claude Code

* [ISSUE #15475] Align AI importer OpenAPI error assertions

Update the focused admin and console API integration tests to match the unified plugin lookup error message.\n\nAssisted-by: Claude Code
2026-07-27 15:20:54 +08:00
杨翊 SionYang cecde03072 [ISSUE #14804] Implement Agent draft persistence (#15573)
* Align AI resource description column sizes

Align Derby, PostgreSQL, and Oracle AI resource description columns with the existing MySQL and Agent contract limit, and cover Derby's 2048-character boundary.

Assisted-by: Claude Code

* Implement Agent draft persistence

Persist complete Agent draft replacements through the existing AI Resource update flow while preserving stable storage pointers and enforcing the current-draft lifecycle contract.

Assisted-by: Claude Code
2026-07-24 17:50:44 +08:00
杨翊 SionYang 27d24e55e4 Integrate control plugin with unified configuration (#15572)
Assisted-by: Claude Code
2026-07-24 15:54:07 +08:00
sai b6895e5503 [ISSUE #15561] Unify Skill upload precheck with ZIP validation (#15562)
* Enhance skill upload precheck result

# Conflicts:
#	console/src/main/resources/static/next/js/client.js

# Conflicts:
#	ai/src/test/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImplTest.java

* Enhance skill upload permission owner reporting

 Conflicts:
	ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java
	ai/src/test/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImplTest.java

* Support ZIP-based skill batch precheck

* [ISSUE #15486] Simplify Skill upload precheck contract

Return a compact single-code precheck result and expose the maximum published version across online and offline versions.

Assisted-by: Claude Code

* [ISSUE #15486] Adapt console UI to compact Skill precheck

Handle precheckCode directly and display the highest published version together with the version after upload.

Assisted-by: Claude Code

* [ISSUE #15486] Rebuild console next UI assets

* [ISSUE #15486] Unify Skill ZIP precheck API

Replace the unpublished metadata precheck contract with multipart ZIP precheck across Admin, Console, and Maintainer APIs. Return invalid ZIP entries with explicit precheck codes and cover the unified contract in specs and tests.\n\nAssisted-by: Claude Code

* [ISSUE #15486] Use server-side ZIP precheck in console UI

Send the original ZIP to the unified precheck endpoint, render server precheck codes, and keep full invalid-entry paths in tooltips while showing concise folder names.\n\nAssisted-by: Claude Code

* [ISSUE #15486] Refresh console assets for ZIP precheck

Regenerate the bundled Console Next assets after adopting the unified server-side Skill ZIP precheck flow.\n\nAssisted-by: Claude Code

* Stabilize OIDC authorization client test timeout
2026-07-23 11:07:31 +08:00
杨翊 SionYang 324a02602f refactor(auth): add ApiType.ADMIN_API to secured annotations. (#15563)
Co-authored-by: sai <mosong.lp@alibaba-inc.com>
2026-07-22 20:26:56 +08:00
yijie zhao b46aae5484 [ISSUE #15510] Reject invalid credential before anonymous fallback (#15526)
* fix: reject invalid credential before anonymous fallback

* fix: harden anonymous auth fallback

* style: format identity context api

* style: format auth filter test

* style: apply spotless formatting
2026-07-22 19:31:05 +08:00
Sunrisea c3232baa95 fix(mysql): use case-sensitive table collation (#15544) 2026-07-21 14:57:40 +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
吴世元 b9654f635f [ISSUE #15468] Recognize PostgreSQL unique_violation in the datasource dialect duplicate-key hook (#15531)
Follow-up to #15509: override DatabaseDialect#isDuplicateKeyException in
PostgresqlDatabaseDialect so the PostgreSQL plugin classifies a unique_violation
(SQLState 23505) as a duplicate-key conflict. Spring's exception translation can
surface such a conflict as a BadSqlGrammarException that the database-agnostic
default cannot recognize; the dialect inspects the original driver exception in the
cause chain to close that gap.

The override first delegates to the default (Spring DuplicateKeyException detection)
and then walks the cause chain for a SQLException whose SQLState is 23505. Other
SQLStates and non-SQL throwables remain non-duplicates.

Add unit tests for the unique_violation, wrapped unique_violation, other-SQLState,
and non-SQL cases.

Related issue: #15468
Related PRs: #15509, #15465

Assisted-by: Claude Code

Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
2026-07-20 10:31:46 +08:00
杨翊 SionYang 4ee0d5d28a [ISSUE #15475] Integrate SkillSpector plugin configuration (#15521)
Assisted-by: Claude Code
2026-07-16 11:55:46 +08:00
杨翊 SionYang b95ca8903f [ISSUE #15475] Integrate skill scanner plugin configuration (#15519)
Assisted-by: Claude Code
2026-07-16 10:20:20 +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
吴世元 b1724c2871 [ISSUE #15468] Route duplicate-key classification through the datasource dialect SPI (#15509)
Make DatabaseDialect#isDuplicateKeyException(Throwable) the single entry point for
classifying duplicate unique-key conflicts, per the direction agreed in the issue.
The interface default walks the throwable cause chain and recognizes Spring's
DuplicateKeyException, matched by class name so the datasource plugin modules keep
their Spring-free dependency footprint. This reproduces the former database-agnostic
classification as the safe baseline and deliberately does not treat a raw vendor
SQLState such as 23505 as a duplicate on its own, preserving the #15465 rethrow
contract.

ExternalConfigInfoPersistServiceImpl now delegates duplicate-key judgement to the
active dialect, and only falls back to the inline Spring DuplicateKeyException check
when no dialect can be resolved (for example before datasource plugins are loaded).
Vendor dialects can override the SPI default to additionally inspect the original
driver exception (SQLState or vendor error code) via DatabaseDialect.super.

Update the datasource dialect plugin spec (en + zh-cn) and add regression tests: the
plugin-base default rejects non-Spring exceptions and raw SQLState, and the config
module verifies the default recognizes a wrapped Spring DuplicateKeyException.

Related issue: #15468
Related PRs: #15465, #15272, #15278

Assisted-by: Claude Code

Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
2026-07-15 15:27:51 +08:00
杨翊 SionYang 73c89c37f6 [ISSUE #15475] Integrate Nacos auth plugin configuration (#15511)
Assisted-by: Claude Code
2026-07-15 13:33:27 +08:00
杨翊 SionYang 007fe68cb2 Fix config namespace isolation for ID-based operations (#15498)
* Fix config namespace isolation for delete and export

Scope config export-by-ids and batch delete-by-ids to the requested namespace across admin, console, and maintainer SDK paths.

Update specs and IT scenario coverage for namespace-scoped storage ID operations.

Assisted-by: Claude Code

* Document config storage ID selector deprecation

Assisted-by: Claude Code

* Fix config clone namespace isolation

Ensure config clone resolves source IDs within the requested source namespace before writing to the target namespace. Update console and maintainer SDK paths plus API/SDK test specs.

Assisted-by: Claude Code

* Refine config clone service coverage

Extract shared clone logic into ConfigCloneService and move clone behavior coverage from controller tests into service-level tests.

Assisted-by: Claude Code

* Refine config clone source authorization

Add source namespace READ authorization for config clone paths and keep auth identity/resource context available for diagnostics.

Assisted-by: Claude Code

* Refresh legacy console clone namespace assets

Assisted-by: Claude Code

* Fix datasource export namespace isolation tests

* Cover datasource export namespace isolation tests

* Fix auth admin filter test header stubbing

* Stabilize clone source auth checker tests

* Apply spotless to clone auth checker
2026-07-13 15:31:00 +08:00
Charlie Chen aa0da8c9fa fix:Skill-scanner pipeline report shows mojibake for Chinese text on Windows (#15490) (#15491) 2026-07-10 11:41:36 +08:00
sai 9effbd626a [ISSUE #15471] feat(ai): support SkillSpector publish pipeline (#15474)
* feat: support configurable ai pipeline order

* feat: add SkillSpector ai pipeline

* feat: add SkillSpector runner wrapper

* feat: require built-in SkillSpector runtime

* docs: document SkillSpector runtime layout

* docs: move SkillSpector runtime install to nacos-setup

* feat: add pipeline result copy action

* refactor: move SkillSpector runtime under runtimes

* style: refine pipeline result copy action layout

* style: move pipeline copy action after timestamp

* refactor: remove SkillSpector bundled runtime fallback

* refactor: remove unused runtime assembly entries

* chore: rebuild console pipeline assets

* feat: enable skill-spector default lookup

* refactor: remove implicit pipeline default types

* feat: log skill-spector runtime output

* feat: configure skill-spector log level
2026-07-09 14:30:33 +08:00
hutiefang76 b886636f32 [ISSUE #12585] Fix pagination parameter binding (#15407)
* [ISSUE #12585] Fix pagination parameter binding

* style: apply spotless formatting

* test: align gray dump pagination parameters
2026-07-01 13:33:12 +08:00
杨翊 SionYang 1f9f6ccc8e Remove confirmed unused Java code (#15358)
* Remove confirmed unused Java code

Remove validated unused helpers, constants, classes, and matching dedicated tests across Java modules.

Deprecate currently unused datasource mapper methods so downstream plugin usage can be confirmed before removal.

Validation:

- mvn spotless:check

- mvn -B clean compile apache-rat:check checkstyle:check spotbugs:check spotless:check -DskipTests

- mvn -B '-Prelease-nacos,!dev' clean install -Drat.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -DskipTests=false

- mvn -B clean install -Prelease-nacos -DskipTests=true

- mvn -B clean verify -Pintegration-test

- mvn -B -pl test/java-sdk-test clean verify -Pjava-sdk-integration-test -DskipTests=false

- mvn -B -pl test/maintainer-sdk-test clean verify -Pmaintainer-sdk-integration-test -DskipTests=false

Assisted-by: Codex

* Fix flaky unit test setup

Reuse the same version 0.2.0 tar.gz fixture bytes for digest validation and HTTP response payloads, and initialize EnvUtil in GlobalExecutorTest when the test runs without suite-level environment setup.

Assisted-by: Codex

* Fix config test isolation

Assisted-by: Claude Code

* Fix flaky failover reactor test

Assisted-by: Claude Code
2026-06-16 00:12:23 +08:00
徐晓伟 4bec8b06c5 chore(deps): spring-boot upgrade from 3.5.14 to 4.0.6 (#14945)
* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5

* chore(deps): micrometer upgrade from 1.12.8 to 1.13.0

* chore(deps): replace javax.annotation with jakarta.annotation

* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5

* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5: fix controller response

* chore(deps): spring-boot upgrade from 4.0.5 to 4.0.6

* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Restore blank line indentation whitespace to match develop

Blank lines adjacent to @Mock → @MockitoBean changes lost their
indentation spaces (e.g., 4 spaces became empty). Restore the
original whitespace to minimize unrelated diff noise.

* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Remove duplicate micrometer version override in pom.xml

The old 1.13.0 override was superseded by 1.15.10 (for Spring Boot
upgrade compatibility, see #15033). Having two definitions is
confusing; only the latter takes effect in Maven.

* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Restore blank line indentation whitespace to match develop

* style: apply spotless formatting fixes

Assisted-by: Claude Code

* Merge branch 'develop' into xuxiaowei/spring-boot-4

# Conflicts:
#	.github/workflows/it-new.yml
#	config/src/test/java/com/alibaba/nacos/config/server/controller/v3/ConfigOpsControllerV3Test.java
#	config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java
#	config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java

* style: apply spotless formatting

* chore(build): bump MCP SDK from 0.17.0 to 0.18.2

Assisted-by: Claude Code

* Remove spring-boot-starter-ldap-test dependency from console module

* Apply spotless formatting to ConfigOpenApiITCase

* Update TomcatConnectorCustomizer import for Spring Boot 4 compatibility

Assisted-by: Claude Code

* Replace ObjectNode with Map<String, Object> in ClientService API for Spring Boot 4 compatibility

* Remove redundant dependencies from test aggregator POM for Spring Boot 4 compatibility

* Makefile: Enhance Makefile for local dev workflow: add auth-disabled args, release-nacos profile, and IT test targets

* Makefile: Extract auth-disabled JVM args into standalone AUTH_DISABLED_ARGS variable

* Makefile: Add missing IT test targets to .PHONY declaration

Assisted-by: Claude Code

* build(deps): Refactor LDAP dependency: move spring-boot-starter-ldap to nacos-ldap-auth-plugin only

* build(deps): Add nacos-ldap-auth-plugin dependency to nacos-server module

* build(deps): Add nacos-ldap-auth-plugin dependency to nacos-console module

* build(deps): Remove nacos-ldap-auth-plugin dependency and LdapAutoConfiguration exclusion

* build(deps): Remove nacos-ldap-auth-plugin dependency and LdapAutoConfiguration exclusion

* Remove ConfigInfoBetaPersistService references and fix formatting in tests

Assisted-by: Claude Code

* Migrate javax.annotation to jakarta.annotation for Spring Boot 4 compatibility

Replace javax.annotation.{PostConstruct,PreDestroy,Resource} imports and
native-image reflect-config entries with jakarta.annotation equivalents.

* Add issue link for Makefile usage guide (#15338)

* Add test, check-maven, build-maven-test targets to Makefile (#15338)

---------

Co-authored-by: 杨翊 SionYang <xiweng.yy@alibaba-inc.com>
2026-06-10 10:08:48 +08:00
杨翊 SionYang 386f98f740 [ISSUE #15322] Remove config migration persistence layer (#15329)
Remove legacy config namespace migration persistence services, beta/tag table mappers, datasource SPI registrations, and old fresh-install test schema definitions.

Assisted-by: Claude Code
2026-06-09 09:42:26 +08:00
杨翊 SionYang 1ef18a94a8 Add AI registry unit coverage (#15294)
Add unit tests for ai-registry-adaptor and the default AI importer plugin so both modules reach 100% JaCoCo line coverage.

Assisted-by: Claude Code
2026-06-02 18:51:19 +08:00
LiuCanyu 60f8797493 [ISSUE #15275] Copy pg-upgrade-null-tenant-id.sql to distribution/conf (#15286)
The pg-upgrade-null-tenant-id.sql migration script, introduced in #15150,
was not being copied to the distribution/conf directory during the Maven
build, making it inaccessible to Docker users upgrading from 3.2.1 with
PostgreSQL. Add the copy step alongside the existing PostgreSQL schema
SQL files so the migration script is available in the distribution.
2026-06-02 10:37:52 +08:00
杨翊 SionYang cdf4e1b6aa [ISSUE #14122] Skip unsupported skills.sh sources (#15271)
Skip skills.sh search results whose source cannot be resolved as an owner/repo repository before turning them into import candidates.

Fetch at least the default skills.sh page size before local filtering so unsupported sources do not underfill the requested result page.

Assisted-by: Claude Code
2026-05-29 14:26:27 +08:00
杨翊 SionYang fe962a65ca Stabilize auth and agent spec cache tests (#15270)
Guard RemoteServerUtil static initialization when EnvUtil has no Spring environment, and isolate AgentSpec cache test events by using per-test names.

Assisted-by: OpenAI Codex
2026-05-29 10:05:20 +08:00
杨翊 SionYang 9299084cbf [ISSUE #15087] Upgrade safe dependencies and enable default AI importers (#15268)
Enable the built-in official MCP and skills.sh import sources by default, upgrade safe dependency patch versions, and add missing v3 API @Since metadata.

Assisted-by: OpenAI Codex
2026-05-28 20:32:33 +08:00
杨翊 SionYang 9136e9864f Add @Since annotations for public APIs (#15266)
* chore(build): bump project revision from 3.2.1 to 3.2.2.

* Add since annotation requirements to API specs

* Add API since annotation

* Add since annotations to SDK service APIs

* Add since annotations to core APIs

* Add since annotations to config and naming APIs

* Add since annotations to AI and lock APIs

* Add since annotations to console and plugin APIs

* Add since annotations to address APIs
2026-05-28 15:40:04 +08:00
杨翊 SionYang 67c4ca93fb [ISSUE #15183] Add secure HTTP client for AI importers (#15237)
Assisted-by: Claude Code
2026-05-25 14:03:32 +08:00
杨翊 SionYang 3c523016f5 [ISSUE #15183] Harden AI importer source endpoints (#15223)
Assisted-by: Claude Code
2026-05-25 11:45:55 +08:00
sai b8fe1c2039 [ISSUE #15221] Route AI resource trace logs through trace events (#15222)
* Refactor AI resource trace logging to subscriber

Assisted-by: Claude Code

* Ignore codegraph metadata

Assisted-by: Claude Code

* Exclude codegraph metadata from RAT checks

* Move AI trace log to default plugin

# Conflicts:
#	plugin-default-impl/nacos-default-plugin-all/pom.xml
#	plugin-default-impl/pom.xml

* Document default AI trace plugin
2026-05-25 09:47:41 +08:00
杨翊 SionYang cbf7ad32bd [ISSUE #15183] Add built-in AI importer presets (#15218)
* [ISSUE #15183] Add AI importer config examples

Add commented default AI importer plugin configuration examples to distribution application.properties.\n\nAssisted-by: Claude Code

* [ISSUE #15183] Add built-in skills.sh importer

Add a default skills.sh import source preset and importer implementation that searches skills.sh, fetches selected Skill snapshots, and packages them as Skill ZIP artifacts.

Update importer specs, sample configuration comments, and unit tests for the new preset.

Assisted-by: Claude Code

* [ISSUE #15183] Fix skills.sh empty search query

Default blank skills.sh searches to skill and reject one-character queries locally before calling the upstream API.

Update importer specs and unit tests for the query boundary behavior.

Assisted-by: Claude Code

* [ISSUE #15183] Improve AI import selection behavior

Do not select import candidates by default in the shared AI import dialog. Add explicit select-all and clear controls, accumulate validated candidates across validation batches, and make import-all-valid execute the accumulated valid set.

Also update MCP and Skill import locale text, the AI import plugin spec, and regenerated console-next static assets.

Assisted-by: Claude Code
2026-05-22 17:25:05 +08:00
杨翊 SionYang eac920cd53 [ISSUE #15183] Move default AI importers to plugin-default-impl (#15217)
Move built-in MCP registry and Skill well-known importers into a default AI importer plugin.\n\nAdd source provider SPI and nacos.plugin.ai.importer preset configuration.\n\nUpdate import plugin specs and tests.\n\nAssisted-by: Claude Code
2026-05-22 12:04:58 +08:00
杨翊 SionYang 874533ef7a Plugin default impl unit coverage (#15203)
* test: improve ai pipeline plugin coverage

Assisted-by: Claude Code

* test: improve control plugin coverage

Assisted-by: Claude Code

* test: improve ldap auth plugin coverage

Assisted-by: Claude Code

* test: add oidc auth plugin coverage

Assisted-by: Claude Code

* test: improve datasource base plugin coverage

* test: improve postgresql datasource coverage

* test: improve mysql datasource coverage

* test: improve oracle datasource coverage

* test: improve derby datasource coverage

* test: complete ai pipeline coverage

* test: improve oidc auth plugin coverage

* test: improve default auth plugin coverage

* test: improve oidc auth plugin coverage

Assisted-by: Claude Code

* test: improve default auth plugin coverage

Assisted-by: Claude Code

* test: improve plugin default auth coverage

Assisted-by: Claude Code

* test: format plugin default impl tests

* docs: clarify spotless before commit
2026-05-21 15:09:01 +08:00
elnafateh 6279bc38fa [ISSUE #14911] build(plugin): verify LDAP packaging behavior (#15199)
Add packaging verification for the LDAP plugin distribution contract introduced by #15118.

Assert that nacos-ldap-auth-plugin is present in distribution/plugins after packaging, while spring-ldap-core is not copied by default.

Assisted-by: Codex
2026-05-20 20:30:30 +08:00
aias00 3c0e4afd06 Prevent PostgreSQL tenant nulls from turning config sync into row explosion (#15150)
* Resolve PostgreSQL tenant fix on top of current develop

This rebuilds the PR branch on top of the current develop branch to remove merge conflicts while preserving the intended PostgreSQL tenant safety fix.

The resulting patch keeps namespace normalization at the service entry layer, retains explicit PostgreSQL schema hardening, and adds an operator-run PostgreSQL migration SQL so existing deployments have an upgrade path before startup validation rejects incompatible schemas.

Constraint: PR must preserve namespace compatibility behavior while no longer pushing default-namespace semantics down into DAO or row-mapper layers
Constraint: Upstream develop advanced enough that the previous branch history became conflict-prone and noisy
Rejected: Rebase the historical branch commit-by-commit | earlier superseded commits and reverts caused low-value conflicts
Rejected: Drop PostgreSQL startup validation | would keep silent schema drift possible after MySQL-to-PostgreSQL imports
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: If this PR evolves further, keep the branch diff minimal and prefer rebuilding from current develop over reviving the old conflicting history
Tested: git diff --cached --check
Tested: ./mvnw -pl config -am -DskipITs -Dtest=ConfigOperationServiceTest -Dsurefire.failIfNoSpecifiedTests=false test
Tested: ./mvnw -pl persistence -am spotless:apply -DskipTests -DskipITs
Tested: ./mvnw -pl persistence -am -DskipITs -Dtest=ExternalDataSourceServiceImplTest -Dsurefire.failIfNoSpecifiedTests=false test
Not-tested: Full upstream CI rerun after force-pushing the rebuilt branch
Not-tested: Local full-reactor runs can intermittently fail in nacos-consistency protobuf temp cleanup on this machine
Assisted-by: Claude Code

* Resolve PostgreSQL tenant fix on top of current develop

This rebuilds the PostgreSQL tenant hardening patch on top of the current develop branch to remove merge conflicts while preserving the intended fix shape: service-layer namespace handling, PostgreSQL schema hardening, startup validation, and an operator-run migration SQL.

Constraint: The previous PR branch history became conflict-prone after develop advanced and contained superseded commits plus reverts
Constraint: CI must pass spotless before it even reaches the build/test stages
Rejected: Rebase the old history commit-by-commit | produced low-value conflicts through superseded commits
Rejected: Drop the PostgreSQL migration SQL | maintainer explicitly requested an upgrade path for existing deployments
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: If the branch conflicts again, prefer reconstructing the minimal final diff from current develop rather than reviving the old intermediate history
Tested: ./mvnw -pl config -am -DskipITs -Dtest=ConfigOperationServiceTest -Dsurefire.failIfNoSpecifiedTests=false test
Tested: ./mvnw -pl persistence -am spotless:apply -DskipTests -DskipITs
Tested: ./mvnw -pl persistence -am spotless:check -DskipTests -DskipITs
Tested: ./mvnw -pl persistence -am -DskipITs -Dtest=ExternalDataSourceServiceImplTest -Dsurefire.failIfNoSpecifiedTests=false test
Not-tested: Full upstream CI rerun after force-pushing the rebuilt branch
Not-tested: Local full-reactor validation remains noisy here because nacos-consistency protobuf temp cleanup is flaky in this environment
Assisted-by: Claude Code

* fix ci, mvn spotless:apply

* Align config operation tests with NamespaceUtil-based namespace handling

The service-layer namespace handling was adjusted manually to route namespaceId through NamespaceUtil.processNamespaceParameter, which changes the effective behavior for explicit empty namespace inputs from '' to the default namespace.

This commit updates the affected ConfigOperationService tests to match the new behavior without altering the manually changed production logic.

Constraint: Keep the manually updated ConfigOperationService behavior unchanged
Rejected: Revert the service-layer namespace handling change | user explicitly asked to preserve manual edits
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If namespace handling semantics change again, update the service tests together with the behavior change so CI failures remain diagnostic instead of noisy
Tested: git diff --check
Tested: ./mvnw -pl persistence -am spotless:check -DskipTests -DskipITs
Tested: ./mvnw -pl config -am -DskipITs -Dtest=ConfigOperationServiceTest -Dsurefire.failIfNoSpecifiedTests=false test
Not-tested: Full reactor build after the manual ConfigOperationService behavior change still fails earlier in nacos-api due to the existing easyj-maven-plugin simplify-pom issue
Assisted-by: Claude Code
2026-05-20 18:13:45 +08:00
elnafateh b5692f87dd [ISSUE #14911] refactor(plugin/auth): split LDAP into optional plugin and package LDAP plugin jar (#15118)
* [ISSUE #14911] Fix missing spring-ldap-core in default plugin distribution

Add spring-ldap-core to nacos-default-plugin-all and include it in the
plugin packaging copy list so LDAP auth runtime classes are present in
distribution/plugins.

Assisted-by: Codex

* [ISSUE #14911] refactor(plugin/auth): split LDAP into optional plugin

Move LDAP-specific auth code out of default-auth-plugin into a dedicated
nacos-ldap-auth-plugin module.

Add guarded LDAP auto-configuration and dependency precondition handling
so missing spring-ldap-core no longer causes startup classloading
failures. Instead, log a clear hint and install a fallback auth manager.

Keep the default plugin package minimal by removing spring-ldap-core and
LDAP packaging from nacos-default-plugin-all.

* feat: spring-ldap-core plugin refactor Impl

* refactor(plugin/auth): split LDAP into optional plugin and package LDAP plugin jar
2026-05-20 14:12:53 +08:00