Imported from NanYinIU/nacos-search (
AGENTS.md). Install upstream withnpx skills add NanYinIU/nacos-search. Copyright stays with the author.
AGENTS.md
This repository is Nacos Search, an IntelliJ IDEA Community plugin (Kotlin + Gradle). For a full architecture and command overview, see CLAUDE.md and README.md.
Gradle
AI agents and automation must use the repository wrapper (./gradlew) for every build, test, verification, and IDE task; never invoke the system gradle command directly. The wrapper distribution is declared in gradle/wrapper/gradle-wrapper.properties; inspect the current version with ./gradlew --version. A separately installed Gradle may build with a different version and create version-specific caches under ~/.gradle/caches/ and ~/.gradle/daemon/.
Codegraph
Prefer codegraph for symbol, call-path, and blast-radius retrieval. Gate readiness first for this workspace root (worktrees each need their own .codegraph/): codegraph init when not initialized, codegraph sync when it already is, then pass that root as projectPath. Full steps: docs/agents/codegraph.md.
Cursor Cloud specific instructions
Services / components
This is a client-side IDE plugin — it has no backend of its own. The only external system it talks to is a Nacos server. All standard commands live in CLAUDE.md (build/compile/test/runIde/verifyPlugin); prefer those instead of duplicating them.
JDK / toolchain (non-obvious)
- The Gradle Kotlin/Java toolchain targets JDK 17 (
jvmToolchain(17)inbuild.gradle.kts), but the machine defaultjavais JDK 21. - You do not need to set
JAVA_HOME. Gradle runs its daemon on JDK 21 (fine for Gradle 9) and auto-detects the installed JDK 17 (/usr/lib/jvm/java-17-openjdk-amd64) for the toolchain via thefoojay-resolverplugin../gradlew test/compileKotlin/buildPluginall work out of the box. - JDK 17 is installed in the VM snapshot; it is not (re)installed by the update script.
Running the app (./gradlew runIde)
- Requires a display; the cloud VM provides
DISPLAY=:1, sorunIdeopens a real sandbox IDE window there. - First launch shows the JetBrains User Agreement and a Data Sharing prompt — accept/dismiss them before you reach the Welcome screen.
runIdestarts with no project open. The "Nacos Search" tool window only appears inside a project window, so create/open a project first (e.g. an Empty Project).runIdeis long-running; start it in a tmux session and drive the GUI via computer use.
End-to-end testing against a real Nacos (no Docker needed)
- There is no Docker in this environment. To get a real backend, download the Nacos standalone tarball and run it with the JDK, e.g.
nacos-server-2.5.3→bash bin/startup.sh -m standalone(listens onhttp://localhost:8848). Seed configs via the Open API (POST /nacos/v1/cs/configs). - Standalone Nacos has auth disabled by default, so in the plugin's settings (Settings > Tools > Nacos Search) set the server's Authentication mode to
ANONYMOUS(default isTOKEN) or connections/reads will fail. - The gated
LiveSmokeTestruns against a real server only whenNACOS_LIVE_V1_ENDPOINT/NACOS_LIVE_V3_ENDPOINTare set (otherwise it self-skips): e.g.NACOS_LIVE_V1_ENDPOINT=http://localhost:8848 ./gradlew test --tests "com.nanyin.nacos.search.services.operations.LiveSmokeTest.V1*".