6279 Commits

Author SHA1 Message Date
杨翊 SionYang 2979345f22 [ISSUE #14804] Add RAD publication and subscription capacity gates (#15769)
* feat(ai): add RAD client capacity gates

Assisted-by: Claude Code

* test(ai): stabilize RAD capacity integration test

Assisted-by: Claude Code
2026-08-24 18:20:35 +08:00
杨翊 SionYang d96a812de3 [ISSUE #15761] Define MCP AI resource lifecycle migration (#15770)
Assisted-by: Claude Code
2026-08-24 18:19:34 +08:00
Gerard b43b3581a7 fix: reject IPv6 mixed addresses with more than six 16-bit blocks (#15764)
In the IPv6 mixed notation the IPv6 part holds at most 96 bits, that is
six 16-bit blocks, because the trailing IPv4 part occupies the remaining
32 bits. IPV6_MIXED_COMPRESSED_REGEX uses a * quantifier after '::', so
the number of blocks was unbounded and addresses longer than 128 bits
were reported as valid.

Keep the regexes unchanged and reject the IPv6 part when it holds more
than six blocks.

Fixes: #15763

Co-authored-by: GerardGao <213731635+GerardGao@users.noreply.github.com>
2026-08-24 16:13:28 +08:00
shalk(xiao kun) 4a42e580e8 docs: align pre-submission checks with spotless/checkstyle in AGENTS.md and PR template (#15766)
The PR template checklist and AGENTS.md's PR Convention section were missing
checkstyle:check and spotless:check, unlike the CI pipeline and CONTRIBUTING.md
which already enforce/document them. Bring both in line so contributors are
told to format and check before submitting.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 14:52:52 +08:00
杨翊 SionYang fe250521a8 test(ai): add live ARD shared search coverage (#15762)
Assisted-by: Claude Code
2026-08-24 13:31:35 +08:00
杨翊 SionYang ddb96f1409 [ISSUE #14804] Return partial AI search results before readiness (#15759)
Treat shared Search readiness as a completeness signal so RAD, ARD, generic, and resource-specific client searches immediately return the current snapshot with rate-limited diagnostics.

Assisted-by: Claude Code
2026-08-24 11:36:14 +08:00
dependabot[bot] 7911b3d8f4 Bump org.apache.logging.log4j:log4j-api from 2.25.4 to 2.25.5 (#15707)
Bumps org.apache.logging.log4j:log4j-api from 2.25.4 to 2.25.5.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-24 10:04:39 +08:00
杨翊 SionYang 812f49f67e Secure MCP tool import endpoint access (#15746)
Allow public MCP endpoints by default while blocking private and local targets unless an operator-managed IP or CIDR rule permits them. Add a global switch, explicit UI feedback, specifications, unit tests, and OpenAPI coverage.

Assisted-by: Claude Code
2026-08-21 17:15:00 +08:00
杨翊 SionYang 605a3fd2e4 [ISSUE #14804] Add shared AI resource search APIs (#15745)
* [ISSUE #14804] Add shared AI resource search APIs

Expose generic and resource-specific client search APIs backed by the shared AI Resource Search Core, with auth routing, specifications, and integration coverage.

Assisted-by: Claude Code

* [ISSUE #14804] Cover AI search authorization scenarios

Register the generic resource search and MCP client controllers in the authorization integration-test matrix.

Assisted-by: Claude Code
2026-08-21 13:39:28 +08:00
杨翊 SionYang e8f107e18b [ISSUE #14804] Add Agent artifacts and AgentSpec search indexing (#15741)
* [ISSUE #14804] Add Agent artifacts and AgentSpec search indexing

Complete deterministic ARD Agent representations and exact artifact resolution, then integrate the latest online AgentSpec with the shared AI Resource Search index and durable lifecycle maintenance.

Assisted-by: Claude Code

* Fix ARD artifact web isolation test

Update the mocked artifact lookup to match the representation-aware controller contract used by the backend closure.

Assisted-by: Claude Code
2026-08-20 19:09:10 +08:00
杨翊 SionYang ba35d1fdee fix(console): forward caller identity to remote server (#15742)
Assisted-by: Claude Code
2026-08-20 19:08:07 +08:00
杨翊 SionYang ccfaee8845 [ISSUE #15475] Fix standalone console auth plugin initialization (#15740)
Initialize configurable auth plugins with static and default configuration in independent Console deployments, preserve restart-only selection semantics, and cover the real Console Spring context lifecycle.

Assisted-by: Claude Code
2026-08-20 16:18:56 +08:00
陈浩 Nineteen 6ab0f690ae 补充单测 (#15732) 2026-08-20 11:59:42 +08:00
吴世元 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 004e787c58 feat(ai): cut over RAD Agent search to shared index (#15738)
Add AUTO, INDEX, and SCAN routing with readiness-aware cutover, preserve legacy scan semantics, and extend unit/OpenAPI/Java SDK coverage.

Assisted-by: Claude Code
2026-08-19 14:18:24 +08:00
杨翊 SionYang ea5c7ccedc [ISSUE #15476] Fix Prompt visibility checks for read APIs (#15737)
* fix(ai): enforce prompt visibility on reads

Apply visibility query advice to Prompt lists and hide denied single-resource reads as not found. Add focused tests and update API IT coverage documentation.

Assisted-by: Claude Code

* test(ai): isolate prompt visibility context

Clear the thread-local request context around Prompt service tests so visibility query assertions do not inherit identities from unrelated module tests.

Assisted-by: Claude Code
2026-08-19 13:29:25 +08:00
杨翊 SionYang 9e2e6cfdb4 Merge pull request #15736 from KomachiSion/codex/rad-agent-search-index
feat(ai): add canonical Agent search indexing
2026-08-18 23:41:18 +08:00
杨翊 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 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
sai 01cc133735 [ISSUE #15705] Fix AI storage cleanup consistency (#15706)
* fix: clean up removed Skill draft files

Delete resource files omitted by draft update or upload overwrite before persisting the replacement storage descriptor, so cleanup failures remain retryable.

Assisted-by: Claude Code

* fix(ai): support legacy storage descriptors on deletion

Assisted-by: Claude Code

* fix(ai): clean up removed AgentSpec draft files

Delete resource files omitted by AgentSpec draft updates and upload overwrites before persisting the replacement manifest and descriptor.

Assisted-by: Claude Code

* add console static resources

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

* test: align AgentSpec concurrent save reflection signature
2026-08-18 14:48:25 +08:00
杨翊 SionYang e0c41575cf docs(ai): define shared RAD search contracts (#15731)
Assisted-by: Claude Code
2026-08-18 13:52:27 +08:00
杨翊 SionYang 8c4b2f6d88 refactor(ai): introduce shared resource search handlers (#15730)
Extract protocol-neutral index projections and resource type handlers, then route Skill, Prompt, and MCP indexing, backfill, enhancement, and currentness validation through the shared boundary without changing external behavior.

Assisted-by: Claude Code
2026-08-18 12:32:20 +08:00
Zhengcy05 bb8c699304 [PR #nacos-plugin/pull/167] Fix legacy skills.sh importer state key migration (#15703)
* fix: legacy skills.sh importer state key migration

* fix: spotless
2026-08-18 11:18:31 +08:00
杨翊 SionYang 9a0f108f31 [ISSUE #15695] Optimize configuration page layouts (#15729)
Assisted-by: Claude Code
2026-08-17 19:10:02 +08:00
sai 504c14bf04 feat(ai): auto-publish first uploaded skill version (#15721) 2026-08-17 17:06:01 +08:00
杨翊 SionYang bd68fcfd35 Merge pull request #15725 from KomachiSion/codex/fix-15560-mcp-auth
[ISSUE #15560] Fix MCP tool passthrough authentication persistence
2026-08-17 16:45:54 +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
杨翊 SionYang c19f283dca fix(core): align legacy context path URI parsing (#15714)
Parse legacy resolver request paths and context paths consistently so encoded context paths can be stripped during controller method lookup.

Assisted-by: Claude Code
2026-08-14 15:07:11 +08:00
杨翊 SionYang 9890c67ee3 Fix active health check target address validation (#15712)
Validate active health check hosts before processor dispatch and isolate MySQL JDBC properties from target construction.

Assisted-by: OpenAI Codex
2026-08-14 14:20:54 +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
laomei 524e4b2105 [ISSUE #15675] Support nullable MCP tool output schemas (#15698)
Assisted-by: Claude Code
2026-08-13 15:33:51 +08:00
Lukman Fateh 17e2e142e7 [ISSUE #15660]: Resolve missing ConfigCloneSourceReadPermissionChecker bean in console standalone mode (#15676)
* [ISSUE #15660]: Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console

* [ISSUE #15660] Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console

Remove the direct dependency of ConfigProxy on ConfigCloneSourceReadPermissionChecker
and eliminate the redundant permission check, since ConfigCloneService.cloneConfig()
already performs this check server-side.

Also reverts the scanBasePackages addition to NacosConsole which created tight coupling
between console and config server modules.

Assisted-by: Claude Code
Signed-off-by: elnafateh <elnafatehh@gmail.com>

* [ISSUE #15660] Keep clone source read permission check in console proxy via declared bean

---------

Signed-off-by: elnafateh <elnafatehh@gmail.com>
2026-08-12 16:13:22 +08:00
sai 4730901958 [ISSUE #15658] Keep AI resource storage provider routing stable (#15659)
* Fix Skill storage provider routing

Honor the provider persisted with each Skill version for read and delete operations while keeping nacos_config as the legacy fallback.

Assisted-by: Claude Code

* Add global AI storage provider selection

Keep resource-specific provider properties as compatibility overrides and clarify optional storage builder discovery.

Assisted-by: Claude Code

* Keep AI resource storage routing stable

Use each persisted version provider for reads, draft replacements, and deletes, and skip existing Prompt versions before migration writes.

Assisted-by: Claude Code

* test: align AgentSpec concurrent save reflection

Pass the persisted storage provider argument when invoking the concurrent AgentSpec save helper from tests.

Assisted-by: Claude Code

* test: complete Prompt storage descriptor fixture

Include the persisted file list required by the strict storage cleanup path after rebasing the provider routing changes.

Assisted-by: Claude Code
2026-08-12 15:44:53 +08:00
吴世元 f286262d58 [ISSUE #11890] Check instance existence before removing expired instance metadata (#15691)
The metadata id of an instance is derived from ip:port:cluster and does not
contain the client id, so the same instance can be re-registered by a different
client. When a Nacos node is restarted, the client reconnects to another node
with a new client id while the stale client is still held by the remaining
nodes. Once that stale client expires, ClientDisconnectEvent marks the instance
metadata expired even though the instance is still registered, and
ExpiredMetadataCleaner deletes it after the expiration window. Operational
metadata such as the console "offline" state is then silently lost.

ExpiredMetadataCleaner now confirms that the instance is no longer registered in
its service before deleting instance metadata, and stops tracking the expired
record when the instance is still registered. The instance is matched by
rebuilding the metadata id from each published instance instead of parsing the
expired metadata id back into ip/port/cluster, so IPv6 addresses containing
colons are handled correctly. Service metadata cleanup is unchanged.

Assisted-by: Claude Code

Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
2026-08-11 16:08:14 +08:00
sai c44f47f700 [ISSUE #15642] Fix AI resource deletion storage cleanup (#15657)
Clean every persisted version storage object before deleting resource metadata, and retain retry descriptors when cleanup fails.

Assisted-by: Claude Code
2026-08-11 14:30:46 +08:00
杨翊 SionYang 352127ff51 test: expand authorization integration coverage (#15692)
Assisted-by: Claude Code
2026-08-11 14:19:30 +08:00
sai e332bc9151 [ISSUE #15689] Fix Jackson 3 serialization for Config storage IDs (#15690)
Use a Jackson 2/3 compatible annotation to preserve Config persistence IDs as JSON strings. Add dual-mapper regression tests, OpenAPI contract assertions, and matching specifications.

Assisted-by: Claude Code
2026-08-11 09:39:28 +08:00
杨翊 SionYang cb944211ef feat: add authentication for JRaft gRPC requests (#15687)
Assisted-by: Claude Code
2026-08-10 19:15:15 +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
cyforkk 3a508ca047 1. ConfigCacheService.getGrayLastModifiedTs: add null guard for item (#15626)
to match sibling methods (getContentGrayMd5, getGrayRule) and prevent
   NPE when groupKey is not in CACHE.

2. ConfigDiskServiceFactory.configDiskService: add `volatile` to fix
   the broken double-checked locking idiom (safe publication requires
   volatile since Java 5).

Assisted-by: Claude Code
2026-08-10 16:02:44 +08:00
杨翊 SionYang 6074e9bc02 Move visibility plugin runtime to core (#15678)
Assisted-by: Codex
2026-08-10 12:12:33 +08:00
cyforkk e403aa0af8 [ISSUE #15625] Add volatile to Connection.abandon for cross-thread visibility (#15631) 2026-08-10 11:39:36 +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
陈浩 Nineteen 470aae61c9 fix https://github.com/alibaba/nacos/issues/15625 (#15666)
* fix https://github.com/alibaba/nacos/issues/15625

* 补充单测
2026-08-10 10:16:41 +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
fudian ffc8693815 [ISSUE #12557] Retry config dump through keyed tasks (#15646)
Retry config cache write-lock acquisition consistently with the read path. Route embedded dump events through the existing keyed DumpTask pipeline so retries reload the latest persisted state instead of replaying stale event snapshots.

Assisted-by: Claude Code

Signed-off-by: 付典 <fudianchn@gmail.com>
2026-08-05 15:13:15 +08:00
Lukman Fateh 89d37ec627 [ISSUE #15603] Correct QueryAdvisor conversion when AuthorizedResourc… (#15632)
* [ISSUE #15603] Correct QueryAdvisor conversion when AuthorizedResources is non-empty

* [ISSUE #15603] Address review: fix OWNER blank-identity resolution, complete test matrix, update specs
2026-08-05 14:40:35 +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
杨翊 SionYang 62575c381e [ISSUE #14804] Route legacy A2A endpoints to RAD runtime (#15648)
* [ISSUE #14804] Route legacy A2A endpoints to RAD runtime

Keep the legacy endpoint implementation available while routing canonical mode through exact-version RAD runtime publishers.

Assisted-by: Claude Code

* [ISSUE #14804] Stabilize AI subscription integration tests

Wait for the AI SDK connection to become usable before scenarios start, and use bounded waits for asynchronous current-value callbacks.

Assisted-by: Claude Code
2026-08-04 20:47:29 +08:00