* [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
* 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
Aggregate compatible runtime endpoints across online Agent versions by default while preserving explicit latest-only discovery.
Assisted-by: Claude Code
Expose generic Agent definition publication over HTTP and gRPC with optional ordinary auto-submit semantics.
Complete A2A client multi-version endpoint redo and exact/latest polling subscription recovery, with specifications, unit tests, and standalone integration coverage.
Assisted-by: Claude Code
* [ISSUE #15606] Return per-item Skill batch upload results
Return one structured result for each Skill or candidate directory and align errorCode with upload precheck business codes.
Assisted-by: Claude Code
* [ISSUE #15606] Preserve Skill batch upload response compatibility
* [ISSUE #15606] Read wrapped Skill batch results in console
Honor provider order before first-wins registration, align built-in plugin routers with the same conflict policy, and remove datasource fallback to an unrelated dialect.
Make standard configuration keys authoritative by presence and enable AI resource import unless explicitly disabled. Update bilingual plugin specs and tests accordingly.
Assisted-by: Claude Code
* [ISSUE #14804] Add Agent resource metadata foundations
Add the typed Agent resource extension codec, strict version ordering, derived online catalog builder, and protocol search tokens.
Assisted-by: Claude Code
* [ISSUE #14804] Add Agent persistence orchestration
Persist Agent resources and their initial draft versions across AI Resource and AI Storage with idempotent recovery and verified content descriptors. Keep public tags separate from protocol discovery, clarify RAD protocol filtering, and rename JSON conversion helpers as serializers.
Assisted-by: Claude Code
* 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
Introduce protocol-neutral Agent management and RAD discovery models, deterministic endpoint and version utilities, validators, and comprehensive tests.
Assisted-by: OpenAI Codex
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
Complete unified plugin state enforcement for runtime-routed plugin families.
Add static configuration refresh snapshots, source resolver registry, restart-only field isolation, and shared plugin type capabilities before production plugins adopt PluginConfigSpec.
Assisted-by: Claude Code
Reject blank instance IP through the Java SDK naming validation path and the server-side gRPC instance registration handler.
Add unit coverage, update Java SDK IT coverage for the blank-IP contract, and fix existing tests that intentionally need valid instance identities.
Assisted-by: Claude Code
Remove the leftover unused pipeline resource SQL constant.
Mark IConfigRequest#getConfigContext as deprecated for compatibility.
Assisted-by: Claude Code
Remove confirmed unused Java methods and classes across AI, common, config, naming, persistence, copilot, CMDB, and client modules.
Mark preserved compatibility candidates as deprecated instead of removing them.
Assisted-by: Claude Code
* feat(ai): optimize upload skill with precheck, uploadAction and commitMsg support
- Add precheck endpoint for upload validation before actual upload
- Support uploadAction parameter (create_draft/overwrite_draft/create_version)
- Support commitMsg parameter for version commit messages
- Add SkillUploadPrecheckRequest/Result models in API module
- Refactor SkillOperationServiceImpl upload flow with UploadVersionCandidate
- Update SkillZipParser to extract version from skillMd front-matter
- Add upload precheck support to Console/Admin/Maintainer layers
- Update skill-spec documentation for new upload workflow
- Add integration tests for upload precheck scenarios
* feat(ui): upload skill dialog with precheck and conflict resolution
- Refactor UploadSkillDialog to use precheck-then-upload two-step flow
- Add client-side ZIP parsing with skillUploadParser utility
- Show parsed skill info (name, version, description) before upload
- Handle conflict scenarios: version exists, no permission, etc.
- Add uploadAction selection UI for overwrite/create options
- Support commitMsg input for version publishing
- Update locales (en-US, zh-CN) with new upload dialog strings
- Add unit tests for skillUploadParser
* chore(ui): rebuild console-ui-next static assets
Regenerated from source changes in the previous commit.
# Conflicts:
# console/src/main/resources/static/next/js/main.js
* Strip wrapper directory from skill resources
* Update console static skill upload assets
* test: align skill upload precheck path
* test: align skill upload precheck path
Migrate HealthCheckerFactory to the neutral JsonUtils subtype registry and serialization facade. Replace ConfigBasicInfo databind serializer usage with annotation-only formatting, and move api Jackson core/databind dependencies to test scope while keeping annotations compile-scoped.
Assisted-by: Claude Code
* feat(lock): implement distributed reentrant/non-reentrant lock with watchdog, wait queue and gRPC push notification
Phase 1 of the Nacos distributed lock system:
- Reentrant and non-reentrant lock types with owner-based identity
- Watchdog auto-renewal mechanism (30s timeout, 10s renewal interval)
- Wait queue with FIFO semantics and gRPC server-push notifications
- Raft consensus integration for strong consistency across cluster
- Connection disconnect detection with automatic lock release via Raft
- Lock expiration scanner with Raft-path release
- Defensive copy for waitQueue access and null-owner guard in scanner
- Client SDK implementing JUC Lock interface (lock/tryLock/unlock)
- 44 unit tests + 35 integration tests covering core flows and edge cases
* feat(lock): implement distributed reentrant/non-reentrant lock with watchdog, wait queue and gRPC push notification
Phase 1 of the Nacos distributed lock system:
- Reentrant and non-reentrant lock types with owner-based identity
- Watchdog auto-renewal mechanism (30s timeout, 10s renewal interval)
- Wait queue with FIFO semantics and gRPC server-push notifications
- Raft consensus integration for strong consistency across cluster
- Connection disconnect detection with automatic lock release via Raft
- Lock expiration scanner with Raft-path release
- Defensive copy for waitQueue access and null-owner guard in scanner
- Client SDK implementing JUC Lock interface (lock/tryLock/unlock)
- 44 unit tests + 35 integration tests covering core flows and edge cases
* fix(lock): prevent self-deadlock on non-reentrant lock reentry from same thread
Non-reentrant lock reentry on the same thread previously sent the request to
the server, which rejected it and placed the thread in the wait queue, causing
self-deadlock (thread waits for itself to release the lock). Add a client-side
guard (checkReentrantGuard) that throws IllegalMonitorStateException before any
network call when the current thread already holds the lock.
* fix(lock): connection disconnect fully releases reentrant locks via force release
releaseLocksByConnection() previously called unLock() once per lock, which only
decremented reentrantCount by 1. For locks acquired N times, the dead connection
held the lock with count N-1 until expiry.
Add forceRelease flag to MutexLockRequest. When set, onApply calls
forceRelease() which clears reentrantCount/owner/expiry in a single Raft
round-trip. releaseLocksByConnection() now uses this path.
* fix(lock): enforce FIFO wait queue semantics to prevent queue-jumping
Previously, acquireLock() allowed any new request to acquire a released
lock even when waiters were queued, breaking FIFO ordering. This fix:
- Add waiterRetry flag (LockInstance/LockInfo) so the server can
distinguish queue re-entries from new requests
- Force-release and re-enqueue new requests when the wait queue is
non-empty, preventing queue-jumping
- Change pollFirstWaiter() to peekFirstWaiter() on unlock/expire so
entries stay in the queue until the waiter actually re-acquires
- Add removeStaleWaiter() for cleaning up entries on non-head retry
- Add FIFO integration tests (JUC-021, JUC-022)
Fixes: FIFO wait queue semantics not enforced in acquireLock()
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(lock): deduplicate wait queue entries by owner and connection
addWaiter() now checks for an existing entry with the same
owner+connectionId before inserting. If found, it updates the
deadline instead of adding a duplicate. This prevents queue
bloat when LockGrpcClient retries ACQUIRE during notification
wait, and avoids duplicate notifications for the same waiter.
Fixes: blocking lock retry causes duplicate entries in wait queue
* test(lock): add unit tests for distributed lock module
- NonReentrantAtomicLockTest: lock/unlock, reentry rejection, forceRelease, autoExpire
- AbstractAtomicLockTest: renew, isClear, hasWaiters, removeStaleWaiter, drainAllWaiters, removeExpiredWaiters, peekFirstWaiter with expired entries, null input handling, dedup
- MutexAtomicLockTest: migrateFromLegacy (FULL/EMPTY/null/idempotent)
- LockOperationServiceImplTest: acquireLock FIFO enforcement, releaseLock normal/force, renewLock, expireLock
- WaitEntryTest: isExpired, constructor, setters
- LockKeyTest: equals, hashCode, toString, getters/setters
- LockService: add @Since("3.3.0") to renew method
* fix(lock): use Raft CLEANUP_CONNECTION for connection disconnect cleanup
Replace direct forceUnLock with a Raft-consensus CLEANUP_CONNECTION
operation to ensure cluster-wide consistency for lock releases and
wait queue cleanup when a connection disconnects.
Also async-ize pushWithoutAck calls via notificationExecutor to avoid
blocking the Raft FSM thread on push failures.
* fix(lock): fix doUnLock semantics, endTime NPE risk, and showLocks encapsulation
- ReentrantAtomicLock/MutexAtomicLock/NonReentrantAtomicLock: doUnLock
now returns false when the lock is not held, instead of silently
succeeding and corrupting state
- LockInfo.endTime: Long → long to eliminate auto-unboxing NPE in
AbstractAtomicLock.renew()
- LockManager.showLocks() returns Collections.unmodifiableMap();
NacosLockManager.getRawLockMap() added for snapshot internals
- NacosLockSnapshotOperation uses getRawLockMap() for putAll()
- Add test for unlocking an unheld lock (null-owner bypass path)
* fix(lock): remove unused import, fix Javadoc placement, and add missing license header
* fix(lock): fix FIFO notification gap, ThreadLocal leak, batch cleanup, and metrics
- Add notifyFirstWaiter() after FIFO force-enqueue in acquireLock()
- Clean up ThreadLocal entries in NacosLock.unlock() when reentrantCount reaches 0
- Batch connection cleanup into single Raft consensus instead of N separate writes
- Add RENEW metrics (grpcRenewSuccess/grpcRenewTotal) to LockMetricsMonitor
- Add LockNotificationType enum replacing raw strings for notification types
- Add try-catch in async push callbacks for consistent error handling
- Copy lock map before snapshot serialization to avoid UnmodifiableMap issues
- Add owner null check in LockExpireScanner to reduce unnecessary Raft submissions
* fix(lock): enforce strict FIFO in acquireLock by skipping tryLock when queue has waiters
New requests no longer acquire-then-forceRelease when the wait queue is
non-empty. Instead, acquireLock() checks hasWaiters() before calling
tryLock(), and directly enqueues non-retry requests behind existing
waiters. This eliminates the unnecessary acquire-release dance while
maintaining strict FIFO ordering.
* test(lock): add cluster JUC lock concurrency stability IT
* Format distributed lock code
* test(lock): add lock waiter retry reproduction tests
Add lock-test coverage for non-head waiterRetry acquisition and stale waiter behavior.
* fix(lock): fix lock wait queue cancellation handling
Add server-side wait cancellation for interrupted lock acquisition and cover FIFO retry/cancel paths.
* fix(lock): improve stability and edge case handling for distributed lock
- Fix ThreadLocal leak in unlock() when server exception occurs
- Fix tryLock(time,unit) interrupt/timeout server queue cleanup
- Add null-safe response parsing in LockGrpcClient
- Add closed-state guard in NacosLockService and LockGrpcClient
- Add setResultCode in LockOperationResponse factory methods
- Clear stale state on LockResult.setSuccess(true)
- Remove empty shell locks in LockExpireScanner
- Remove HashMap copy in LockExpireScanner iteration
* fix(lock): improve lock stability, fix bugs, and add unit tests
- Remove redundant lock acquisition in AbstractAtomicLock subclass methods
- Fix deadline reset bug in tryLockAsQueueHead that prevented waiter expiration
- Fix watchdog NacosException not triggering unregister
- Change LockInstance.expiredTime from Long to long to avoid NPE risk
- Fix forceRelease not clearing connectionId field
- Add unit tests for AbstractAtomicLock, LockRequestHandler, LockExpireScanner,
LockInfo, NacosLockWatchdog, NacosLock, and NacosLockInterrupt
* Fix CI failures - spotless formatting
* fix(lock): change lock model fields from primitive to boxed types and rename waitTimeMs to waitTime
LockInstance: expiredTime long→Long, waitTimeMs→waitTime Long
LockInfo: endTime long→Long, waitTimeMs→waitTime Long
Update all callers and unit tests accordingly.
* test: improve lock coverage
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* feat(ai): refactor AgentSpec and Skill client to HTTP polling with 304
- Replace ConfigService push subscription with periodic HTTP polling on
AgentSpec and Skill cache holders, using ETag/MD5 conditional query
(304 Not Modified) to avoid full content transfers when unchanged
- Add server-side support for 304 conditional response on AgentSpec and
Skill query endpoints (SkillClientController, AgentSpecClientController,
query result + digest utils)
- Introduce SkillQueryResponse / AgentSpecQueryResponse on the client and
corresponding query result types on the server
- Add NacosSkillEvent, AbstractNacosSkillListener, SkillChangedEvent,
SkillListenerInvoker for skill listener notification on the client
- Fix double-event bug on initial subscribe: NacosAgentSpecCacheHolder
and NacosSkillCacheHolder no longer publish event during initial
subscribe; the first listener notification is delivered synchronously
by NacosAiService to avoid racing with NotifyCenter async dispatch
- Update unit tests to reflect the new single-channel notification
semantics on initial subscribe
- Add AgentSpecExample and SkillExample under example/ for end-to-end
integration testing against a real Nacos server
- Update agentspec-spec and skill-spec (en + zh-cn) accordingly
* fix(ai): fix CI failures - spotless formatting and test compilation errors
- Fix spotless violations in AgentSpecExample.java and SkillExample.java (blank line indentation)
- Fix SkillClientControllerTest to use SkillClientOperationService (matches controller constructor)
- Add missing updateStorageMd5 override in AgentSpecTypeIsolationTest and AgentSpecDeletionTest
- Refactor controllers to use result.isNotModified() instead of exception-based control flow
- Add notModified field to SkillQueryResult and AgentSpecQueryResult for clean 304 handling
* 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
* [ISSUE #15183] Add AI resource import SPI models
Add the AI resource import plugin type, public import API DTOs, and plugin importer SPI/model contracts for source-based search, validate, and execute flows.
Assisted-by: Claude Code
* [ISSUE #15183] Refine AI resource import models
Remove the unsupported dependency import abstraction from the initial API and SPI contract, align importer models with Spotless formatting, and add JSON serialization coverage for the public import DTOs.
Assisted-by: Claude Code
* feat(console): support drag-and-drop zip upload in skill management
Add HTML5 drag-and-drop support to both console-ui (legacy) and
console-ui-next frontends, allowing users to drag .zip files directly
onto the skill management page for upload. Key changes:
- Add page-level drag overlay with visual feedback
- Add drag event handlers with dropEffect='copy' to prevent browser
default file-open behavior
- Add drag-and-drop to UploadSkillDialog drop zone
- Add batchUpload API method calling /upload/batch endpoint
- Show per-skill colored results (green success / red failure) in toast
- Add i18n strings for drag hints and batch upload results
* feat(ai): support batch upload skills from multi-skill zip archive
Add batch upload endpoint that accepts a zip containing multiple skill
subdirectories (each with its own SKILL.md). Returns per-skill results
with succeeded/failed lists.
- Add BatchUploadResult model in api module for cross-module access
- Add /v3/console/ai/skills/upload/batch endpoint
- Add parseMultipleSkillsFromZip to SkillZipParser
- Wire batch upload through console handler chain and maintainer-client
- Add unit tests for multi-skill zip parsing
* refactor(console): simplify batch upload toast to show per-skill results
Show a one-line summary (succeeded/failed counts) as the toast title,
with per-skill details below: green checkmarks for succeeded skills and
red crosses with failure reasons for failed ones.
* fix(ai): align resolveUploadVersion call with updated method signature
Add missing third parameter to resolveUploadVersion in batch upload path
to match the method signature change.
* feat(console): update frontend static assets for skill management UI
Rebuild console static resources with latest skill management changes
including UI refinements and removal of unused BizTagEditDialog.
* refactor(ai): improve batch upload resilience and deduplicate upload logic
- Extract doUploadSingleSkill to eliminate duplicate logic between
uploadSkillFromZip and batchUploadSkillsFromZip
- Make parseMultipleSkillsFromZip return MultiSkillParseResult carrying
both parsed skills and parse failures, so invalid folders don't block
the entire batch and failures are reported to the user
- Detect sibling folders missing SKILL.md and report them as warnings
in the batch upload result (showing only the folder name)
- Silently ignore well-known non-skill directories (.git, __MACOSX, etc.)
* style(maintainer-client): apply spotless formatting to skill upload sources
Assisted-by: Claude Code
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* style(maintainer-client): apply spotless formatting
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
- Change lineWrappingIndentation from 0 to 4 to match continuation_indentation=1
- Change arrayInitIndent from 8 to 4 to match continuation_indentation_for_array_initializer=1
- Remove all // @formatter:off/on workarounds (no longer needed)
- Re-format modules affected by continuation_indentation_for_array_initializer change
- Add checkstyle:check and spotless:check to CI check step
Signed-off-by: cxhello <caixiaohuichn@gmail.com>