diff --git a/.gitignore b/.gitignore
index 41eee24..a40d227 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,6 @@ node_modules/
out/
-*.vsix
\ No newline at end of file
+*.vsix
+
+plan
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index 3bdc5f8..82653dd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,6 +2,23 @@
# It is not intended for manual editing.
version = 4
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
[[package]]
name = "ahash"
version = "0.8.12"
@@ -9,6 +26,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
+ "getrandom 0.3.4",
"once_cell",
"version_check",
"zerocopy",
@@ -130,14 +148,14 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "axum"
-version = "0.7.9"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
+checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8"
dependencies = [
- "async-trait",
"axum-core",
"base64",
"bytes",
+ "form_urlencoded",
"futures-util",
"http",
"http-body",
@@ -150,15 +168,14 @@ dependencies = [
"mime",
"percent-encoding",
"pin-project-lite",
- "rustversion",
- "serde",
+ "serde_core",
"serde_json",
"serde_path_to_error",
"serde_urlencoded",
"sha1",
"sync_wrapper",
"tokio",
- "tokio-tungstenite 0.24.0",
+ "tokio-tungstenite",
"tower 0.5.3",
"tower-layer",
"tower-service",
@@ -167,19 +184,17 @@ dependencies = [
[[package]]
name = "axum-core"
-version = "0.4.5"
+version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
+checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1"
dependencies = [
- "async-trait",
"bytes",
- "futures-util",
+ "futures-core",
"http",
"http-body",
"http-body-util",
"mime",
"pin-project-lite",
- "rustversion",
"sync_wrapper",
"tower-layer",
"tower-service",
@@ -250,6 +265,15 @@ version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
+[[package]]
+name = "bzip2"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"
+dependencies = [
+ "libbz2-rs-sys",
+]
+
[[package]]
name = "cc"
version = "1.2.55"
@@ -282,6 +306,16 @@ dependencies = [
"windows-link",
]
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
[[package]]
name = "clap"
version = "4.5.57"
@@ -328,6 +362,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+[[package]]
+name = "constant_time_eq"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
+
[[package]]
name = "convert_case"
version = "0.10.0"
@@ -352,6 +392,30 @@ dependencies = [
"libc",
]
+[[package]]
+name = "crc"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "crc32fast"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+dependencies = [
+ "cfg-if",
+]
+
[[package]]
name = "crossbeam-channel"
version = "0.5.15"
@@ -491,6 +555,12 @@ version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
+[[package]]
+name = "deflate64"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204"
+
[[package]]
name = "deranged"
version = "0.5.5"
@@ -530,6 +600,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
+ "subtle",
]
[[package]]
@@ -630,6 +701,25 @@ version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
+[[package]]
+name = "flate2"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
+dependencies = [
+ "miniz_oxide",
+ "zlib-rs",
+]
+
+[[package]]
+name = "fluent-uri"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
[[package]]
name = "fnv"
version = "1.0.7"
@@ -782,6 +872,21 @@ dependencies = [
"wasip2",
]
+[[package]]
+name = "getrandom"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "r-efi",
+ "wasip2",
+ "wasip3",
+ "wasm-bindgen",
+]
+
[[package]]
name = "globset"
version = "0.4.18"
@@ -827,6 +932,15 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
[[package]]
name = "http"
version = "1.4.0"
@@ -1013,6 +1127,12 @@ dependencies = [
"zerovec",
]
+[[package]]
+name = "id-arena"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
+
[[package]]
name = "ident_case"
version = "1.0.1"
@@ -1088,6 +1208,15 @@ dependencies = [
"libc",
]
+[[package]]
+name = "inout"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
+dependencies = [
+ "generic-array",
+]
+
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
@@ -1166,6 +1295,18 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+[[package]]
+name = "leb128fmt"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
+
+[[package]]
+name = "libbz2-rs-sys"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7"
+
[[package]]
name = "libc"
version = "0.2.180"
@@ -1238,6 +1379,29 @@ dependencies = [
"url",
]
+[[package]]
+name = "lsp-types"
+version = "0.97.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53353550a17c04ac46c585feb189c2db82154fc84b79c7a66c96c2c644f66071"
+dependencies = [
+ "bitflags 1.3.2",
+ "fluent-uri",
+ "serde",
+ "serde_json",
+ "serde_repr",
+]
+
+[[package]]
+name = "lzma-rust2"
+version = "0.16.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d673a11333485e7d8b93d62a9a5b07b22daf5e8a8655a44c1bb18aa4bf3d1524"
+dependencies = [
+ "crc",
+ "sha2",
+]
+
[[package]]
name = "matchers"
version = "0.2.0"
@@ -1249,15 +1413,24 @@ dependencies = [
[[package]]
name = "matchit"
-version = "0.7.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
+checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
[[package]]
name = "memchr"
-version = "2.7.6"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
+checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+
+[[package]]
+name = "memmap2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490"
+dependencies = [
+ "libc",
+]
[[package]]
name = "mimalloc"
@@ -1274,6 +1447,16 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+[[package]]
+name = "miniz_oxide"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
[[package]]
name = "mio"
version = "1.1.1"
@@ -1288,19 +1471,19 @@ dependencies = [
[[package]]
name = "naviscope-api"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"async-trait",
"lasso",
"schemars",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror",
]
[[package]]
name = "naviscope-cli"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"clap",
"dirs",
@@ -1324,15 +1507,17 @@ dependencies = [
[[package]]
name = "naviscope-core"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"async-trait",
"dashmap 6.1.0",
+ "dirs",
"ignore",
"lasso",
"log",
- "lsp-types",
+ "lsp-types 0.97.0",
"naviscope-api",
+ "naviscope-java",
"naviscope-plugin",
"notify",
"once_cell",
@@ -1342,9 +1527,10 @@ dependencies = [
"rmp-serde",
"schemars",
"serde",
+ "serde_bytes",
"serde_json",
"tempfile",
- "thiserror 2.0.18",
+ "thiserror",
"tokio",
"tokio-util",
"tracing",
@@ -1360,9 +1546,11 @@ dependencies = [
[[package]]
name = "naviscope-gradle"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
+ "dirs",
"lasso",
+ "lsp-types 0.97.0",
"naviscope-api",
"naviscope-core",
"naviscope-plugin",
@@ -1371,32 +1559,41 @@ dependencies = [
"rmp-serde",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "tempfile",
+ "thiserror",
"tree-sitter",
"tree-sitter-groovy",
+ "walkdir",
]
[[package]]
name = "naviscope-java"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
+ "dirs",
"lasso",
- "lsp-types",
+ "lsp-types 0.97.0",
"naviscope-api",
"naviscope-core",
"naviscope-plugin",
"petgraph",
+ "regex",
+ "ristretto_classfile",
+ "ristretto_jimage",
"rmp-serde",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "tempfile",
+ "thiserror",
+ "tokio",
"tree-sitter",
"tree-sitter-java",
+ "zip",
]
[[package]]
name = "naviscope-lsp"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"dashmap 6.1.0",
"naviscope-api",
@@ -1413,7 +1610,7 @@ dependencies = [
[[package]]
name = "naviscope-mcp"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"anyhow",
"axum",
@@ -1424,7 +1621,7 @@ dependencies = [
"serde",
"serde_json",
"tokio",
- "tokio-tungstenite 0.28.0",
+ "tokio-tungstenite",
"tokio-util",
"tower-lsp",
"tracing",
@@ -1433,20 +1630,21 @@ dependencies = [
[[package]]
name = "naviscope-plugin"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"async-trait",
- "lsp-types",
+ "lsp-types 0.97.0",
"naviscope-api",
"serde",
+ "serde_bytes",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror",
"tree-sitter",
]
[[package]]
name = "naviscope-runtime"
-version = "0.5.5"
+version = "0.7.0"
dependencies = [
"naviscope-api",
"naviscope-core",
@@ -1564,6 +1762,16 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b867cad97c0791bbd3aaa6472142568c6c9e8f71937e98379f584cfb0cf35bec"
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
[[package]]
name = "percent-encoding"
version = "2.3.2"
@@ -1636,6 +1844,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+[[package]]
+name = "ppmd-rust"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24"
+
[[package]]
name = "ppv-lite86"
version = "0.2.21"
@@ -1645,6 +1859,16 @@ dependencies = [
"zerocopy",
]
+[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
+
[[package]]
name = "proc-macro-error-attr2"
version = "2.0.0"
@@ -1691,35 +1915,14 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
-[[package]]
-name = "rand"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
-dependencies = [
- "libc",
- "rand_chacha 0.3.1",
- "rand_core 0.6.4",
-]
-
[[package]]
name = "rand"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
dependencies = [
- "rand_chacha 0.9.0",
- "rand_core 0.9.5",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
-dependencies = [
- "ppv-lite86",
- "rand_core 0.6.4",
+ "rand_chacha",
+ "rand_core",
]
[[package]]
@@ -1729,16 +1932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
- "rand_core 0.9.5",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
-dependencies = [
- "getrandom 0.2.17",
+ "rand_core",
]
[[package]]
@@ -1787,7 +1981,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
dependencies = [
"getrandom 0.2.17",
"libredox",
- "thiserror 2.0.18",
+ "thiserror",
]
[[package]]
@@ -1805,7 +1999,7 @@ dependencies = [
"strip-ansi-escapes",
"strum",
"strum_macros",
- "thiserror 2.0.18",
+ "thiserror",
"unicase",
"unicode-segmentation",
"unicode-width",
@@ -1860,11 +2054,36 @@ version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
+[[package]]
+name = "ristretto_classfile"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce028b4c8fd5d7d8363ad78154324eb31576ac464a2f8c77910066573510c7c3"
+dependencies = [
+ "ahash",
+ "bitflags 2.10.0",
+ "byteorder",
+ "indexmap",
+ "thiserror",
+]
+
+[[package]]
+name = "ristretto_jimage"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e049dd1c0f2ffafb0ac0a7f82558d59fb0690ac388c3f834558ed0fd416e59cd"
+dependencies = [
+ "byteorder",
+ "memchr",
+ "memmap2",
+ "thiserror",
+]
+
[[package]]
name = "rmcp"
-version = "0.13.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1815dbc06c414d720f8bc1951eccd66bc99efc6376331f1e7093a119b3eb508"
+checksum = "1bef41ebc9ebed2c1b1d90203e9d1756091e8a00bbc3107676151f39868ca0ee"
dependencies = [
"async-trait",
"base64",
@@ -1876,7 +2095,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror",
"tokio",
"tokio-util",
"tracing",
@@ -1884,9 +2103,9 @@ dependencies = [
[[package]]
name = "rmcp-macros"
-version = "0.13.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11f0bc7008fa102e771a76c6d2c9b253be3f2baa5964e060464d038ae1cbc573"
+checksum = "0e88ad84b8b6237a934534a62b379a5be6388915663c0cc598ceb9b3292bbbfe"
dependencies = [
"darling",
"proc-macro2",
@@ -2005,6 +2224,16 @@ dependencies = [
"serde_derive",
]
+[[package]]
+name = "serde_bytes"
+version = "0.11.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
+dependencies = [
+ "serde",
+ "serde_core",
+]
+
[[package]]
name = "serde_core"
version = "1.0.228"
@@ -2095,6 +2324,17 @@ dependencies = [
"digest",
]
+[[package]]
+name = "sha2"
+version = "0.10.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
[[package]]
name = "sharded-slab"
version = "0.1.7"
@@ -2141,6 +2381,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "simd-adler32"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
+
[[package]]
name = "slab"
version = "0.4.12"
@@ -2209,6 +2455,12 @@ dependencies = [
"syn",
]
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
[[package]]
name = "syn"
version = "2.0.114"
@@ -2283,33 +2535,13 @@ dependencies = [
"unicode-width",
]
-[[package]]
-name = "thiserror"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
-dependencies = [
- "thiserror-impl 1.0.69",
-]
-
[[package]]
name = "thiserror"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
- "thiserror-impl 2.0.18",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
+ "thiserror-impl",
]
[[package]]
@@ -2334,12 +2566,13 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.46"
+version = "0.3.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5"
+checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
dependencies = [
"deranged",
"itoa",
+ "js-sys",
"num-conv",
"powerfmt",
"serde_core",
@@ -2355,9 +2588,9 @@ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
[[package]]
name = "time-macros"
-version = "0.2.26"
+version = "0.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4"
+checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
dependencies = [
"num-conv",
"time-core",
@@ -2400,18 +2633,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "tokio-tungstenite"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
-dependencies = [
- "futures-util",
- "log",
- "tokio",
- "tungstenite 0.24.0",
-]
-
[[package]]
name = "tokio-tungstenite"
version = "0.28.0"
@@ -2421,7 +2642,7 @@ dependencies = [
"futures-util",
"log",
"tokio",
- "tungstenite 0.28.0",
+ "tungstenite",
]
[[package]]
@@ -2485,7 +2706,7 @@ dependencies = [
"dashmap 5.5.3",
"futures",
"httparse",
- "lsp-types",
+ "lsp-types 0.94.1",
"memchr",
"serde",
"serde_json",
@@ -2532,7 +2753,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf"
dependencies = [
"crossbeam-channel",
- "thiserror 2.0.18",
+ "thiserror",
"time",
"tracing-subscriber",
]
@@ -2629,38 +2850,26 @@ checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
[[package]]
name = "tungstenite"
-version = "0.24.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
+checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442"
dependencies = [
- "byteorder",
"bytes",
"data-encoding",
"http",
"httparse",
"log",
- "rand 0.8.5",
+ "rand",
"sha1",
- "thiserror 1.0.69",
+ "thiserror",
"utf-8",
]
[[package]]
-name = "tungstenite"
-version = "0.28.0"
+name = "typed-path"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442"
-dependencies = [
- "bytes",
- "data-encoding",
- "http",
- "httparse",
- "log",
- "rand 0.9.2",
- "sha1",
- "thiserror 2.0.18",
- "utf-8",
-]
+checksum = "3015e6ce46d5ad8751e4a772543a30c7511468070e98e64e20165f8f81155b64"
[[package]]
name = "typenum"
@@ -2692,6 +2901,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+[[package]]
+name = "unicode-xid"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+
[[package]]
name = "url"
version = "2.5.8"
@@ -2769,6 +2984,15 @@ dependencies = [
"wit-bindgen",
]
+[[package]]
+name = "wasip3"
+version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
+dependencies = [
+ "wit-bindgen",
+]
+
[[package]]
name = "wasm-bindgen"
version = "0.2.108"
@@ -2814,6 +3038,40 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "wasm-encoder"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
+dependencies = [
+ "leb128fmt",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasm-metadata"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
+dependencies = [
+ "anyhow",
+ "indexmap",
+ "wasm-encoder",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasmparser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
+dependencies = [
+ "bitflags 2.10.0",
+ "hashbrown 0.15.5",
+ "indexmap",
+ "semver",
+]
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -3065,6 +3323,88 @@ name = "wit-bindgen"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+dependencies = [
+ "wit-bindgen-rust-macro",
+]
+
+[[package]]
+name = "wit-bindgen-core"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
+dependencies = [
+ "anyhow",
+ "heck",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-bindgen-rust"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
+dependencies = [
+ "anyhow",
+ "heck",
+ "indexmap",
+ "prettyplease",
+ "syn",
+ "wasm-metadata",
+ "wit-bindgen-core",
+ "wit-component",
+]
+
+[[package]]
+name = "wit-bindgen-rust-macro"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
+dependencies = [
+ "anyhow",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wit-bindgen-core",
+ "wit-bindgen-rust",
+]
+
+[[package]]
+name = "wit-component"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
+dependencies = [
+ "anyhow",
+ "bitflags 2.10.0",
+ "indexmap",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "wasm-encoder",
+ "wasm-metadata",
+ "wasmparser",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-parser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
+dependencies = [
+ "anyhow",
+ "id-arena",
+ "indexmap",
+ "log",
+ "semver",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "unicode-xid",
+ "wasmparser",
+]
[[package]]
name = "writeable"
@@ -3142,6 +3482,26 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zeroize"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "zerotrie"
version = "0.2.3"
@@ -3175,12 +3535,57 @@ dependencies = [
"syn",
]
+[[package]]
+name = "zip"
+version = "8.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79b32dd4ad3aca14ae109f8cce0495ac1c57f6f4f00ad459a40e582f89440d97"
+dependencies = [
+ "aes",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "deflate64",
+ "flate2",
+ "getrandom 0.4.1",
+ "hmac",
+ "indexmap",
+ "lzma-rust2",
+ "memchr",
+ "pbkdf2",
+ "ppmd-rust",
+ "sha1",
+ "time",
+ "typed-path",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zlib-rs"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7948af682ccbc3342b6e9420e8c51c1fe5d7bf7756002b4a3c6cabfe96a7e3c"
+
[[package]]
name = "zmij"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
+[[package]]
+name = "zopfli"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "log",
+ "simd-adler32",
+]
+
[[package]]
name = "zstd"
version = "0.13.3"
diff --git a/Cargo.toml b/Cargo.toml
index 84526ff..55f91c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,11 +26,11 @@ petgraph = { version = "0.8", features = ["serde-1"] }
tree-sitter = "0.26"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
+serde_bytes = "0.11.19"
thiserror = "2.0"
walkdir = "2.5"
log = "0.4"
ignore = "0.4.25"
-rayon = "1.11.0"
notify = "8.2.0"
xxhash-rust = { version = "0.8.15", features = ["xxh3"] }
regex = "1.11.1"
@@ -42,7 +42,7 @@ tracing-appender = "0.2.4"
rmp-serde = "1.3.1"
once_cell = "1.20"
tower-lsp = "0.20"
-lsp-types = "0.94"
+lsp-types = "0.97"
cc = "1.2"
dashmap = "6.1.0"
tokio-util = "0.7.18"
@@ -54,15 +54,19 @@ nu-ansi-term = "0.50.3"
shlex = "1.3.0"
tabled = "0.20.0"
indexmap = { version = "2.1.0", features = ["serde"] }
-axum = { version = "0.7.5", features = ["ws"] }
+axum = { version = "0.8.8", features = ["ws"] }
futures = "0.3.31"
tokio-tungstenite = "0.28.0"
-rmcp = { version = "0.13.0", features = ["macros", "server", "transport-io"] }
+rmcp = { version = "0.15.0", features = ["macros", "server", "transport-io"] }
lasso = { version = "0.7", features = ["serialize", "multi-threaded"] }
zstd = "0.13"
async-trait = "0.1"
url = "2.5.8"
+rayon = "1.10.0"
tree-sitter-java = "0.23.5"
tree-sitter-groovy = "0.1.2"
mimalloc = "0.1"
tempfile = "3.10"
+zip = "8.0.0"
+ristretto_jimage = "0.29.0"
+ristretto_classfile = "0.29.0"
diff --git a/README.md b/README.md
index 43ccf7d..5c4a5d5 100644
--- a/README.md
+++ b/README.md
@@ -106,12 +106,74 @@ Naviscope is built on a **layered crate architecture** that separates concerns a
- **Interface Layer** (`naviscope-cli`, `naviscope-lsp`, `naviscope-mcp`): Entry points for different use cases (CLI shell, LSP for editors, MCP for AI agents).
- **Runtime Layer** (`naviscope-runtime`): Orchestrates the engine assembly, registering language plugins and providing a unified factory.
- **Language Layer** (`naviscope-java`, `naviscope-gradle`): Language-specific implementations that implement the standard plugin contracts.
-- **Plugin Layer** (`naviscope-plugin`): Defines the standard contracts and traits (`LanguagePlugin`, `BuildToolPlugin`, `Resolver`) effectively decoupling the core engine from specific language logic.
+- **Plugin Layer** (`naviscope-plugin`): Defines capability traits (parse/indexing/runtime/asset/presentation/metadata) that decouple Core from language-specific implementations.
- **Core Layer** (`naviscope-core`): The heart of the system - graph storage, indexing, file scanning, and persistence. It consumes the plugin traits to process files.
- **API Layer** (`naviscope-api`): Common traits and models shared across all crates, ensuring a consistent interface.
The core is a language-agnostic graph structure populated by language-specific strategies (currently Java/Gradle via Tree-sitter), exposing a unified query engine to both AI agents and developer tools.
+### Trait Organization
+
+Naviscope's trait design is split into two layers: engine-facing API traits (`naviscope-api`) and language capability traits (`naviscope-plugin`).
+
+```mermaid
+graph TB
+ subgraph A["Layer 1: Engine API (`naviscope-api`)"]
+ APIComposite["API Composite
NaviscopeEngine"]
+ APIServices["API Services
GraphService | NavigationService
SymbolNavigator | ReferenceAnalyzer
CallHierarchyAnalyzer | SymbolInfoProvider
EngineLifecycle | StubCacheManager"]
+ end
+
+ subgraph B["Layer 2: Runtime Semantics (`naviscope-plugin`)"]
+ RuntimeSemantic["Runtime Semantic Cap
SemanticCap"]
+ RuntimeServices["Semantic Services
SymbolResolveService | SymbolQueryService
LspSyntaxService | ReferenceCheckService"]
+ end
+
+ subgraph C["Layer 3: Parse & Index (`naviscope-plugin`)"]
+ ParseCap["Parse Cap
FileMatcherCap | LanguageParseCap | BuildParseCap"]
+ IndexCap["Index Cap
SourceIndexCap | BuildIndexCap | ProjectContext"]
+ end
+
+ subgraph D["Layer 4: Asset & Output (`naviscope-plugin`)"]
+ AssetCap["Asset Cap"]
+ PresentationCap["Presentation Cap"]
+ MetadataCodecCap["Metadata Codec Cap"]
+ end
+
+ APIComposite --> APIServices
+ APIServices --> RuntimeSemantic
+ RuntimeSemantic --> RuntimeServices
+
+ RuntimeServices --> ParseCap
+ RuntimeServices --> IndexCap
+ ParseCap --> IndexCap
+
+ IndexCap --> AssetCap
+ RuntimeServices --> PresentationCap
+ RuntimeServices --> MetadataCodecCap
+```
+
+#### `naviscope-api` service traits
+
+- `GraphService`: graph query, stats, and node display retrieval.
+- `NavigationService`: CLI-style path resolution and completion.
+- `SymbolNavigator`: resolve/go-to-definition/type-definition/implementation/highlights.
+- `ReferenceAnalyzer`: find references.
+- `CallHierarchyAnalyzer`: incoming/outgoing calls.
+- `SymbolInfoProvider`: symbol info, document symbols, language detection.
+- `EngineLifecycle`: rebuild/load/save/refresh/watch/clear.
+- `StubCacheManager`: cache stats/scan/inspect/clear.
+- `NaviscopeEngine`: composite trait that bundles all service traits above.
+
+#### `naviscope-plugin` capability traits
+
+- File routing and parsing: `FileMatcherCap`, `LanguageParseCap`, `BuildParseCap`.
+- Indexing: `SourceIndexCap`, `BuildIndexCap`.
+- Runtime semantics: `SymbolResolveService`, `SymbolQueryService`, `LspSyntaxService`, `ReferenceCheckService` (grouped by `SemanticCap`).
+- Asset integration: `AssetCap` (discover/index/source-locate/stub-generate).
+- Output shaping: `PresentationCap`, `MetadataCodecCap`.
+
+This split keeps runtime interfaces stable for clients while allowing per-language capability composition internally.
+
### 🔍 Reference Discovery Strategy
Naviscope uses a **two-phase reference discovery** approach for optimal performance:
diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml
index b5df7de..58e062d 100644
--- a/crates/api/Cargo.toml
+++ b/crates/api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "naviscope-api"
-version = "0.5.5"
+version = "0.7.0"
edition = "2024"
[dependencies]
diff --git a/crates/api/src/cache.rs b/crates/api/src/cache.rs
new file mode 100644
index 0000000..e5820b0
--- /dev/null
+++ b/crates/api/src/cache.rs
@@ -0,0 +1,46 @@
+use crate::ApiResult;
+use serde::{Deserialize, Serialize};
+use std::collections::HashMap;
+use std::path::PathBuf;
+
+/// Summary of a cached asset
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CachedAssetSummary {
+ pub hash: String,
+ pub path: String,
+ pub size_bytes: u64,
+ pub stub_count: usize,
+ pub version: u32,
+ pub created_at: u64,
+}
+
+/// Detailed inspection result for a cached asset
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CacheInspectResult {
+ pub summary: CachedAssetSummary,
+ pub metadata_distribution: HashMap,
+ pub sample_entries: Vec,
+}
+
+/// Statistics for the global stub cache
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CacheStats {
+ pub total_assets: usize,
+ pub total_entries: usize,
+ pub cache_dir: PathBuf,
+}
+
+/// Service interface for managing the global stub cache
+pub trait StubCacheManager: Send + Sync {
+ /// Get cache statistics
+ fn stats(&self) -> CacheStats;
+
+ /// Scan all cached assets returning their summaries
+ fn scan_assets(&self) -> Vec;
+
+ /// Inspect a specific cached asset by hash (full or prefix)
+ fn inspect_asset(&self, hash_prefix: &str) -> Option;
+
+ /// Clear all cached data
+ fn clear(&self) -> ApiResult<()>;
+}
diff --git a/crates/api/src/error.rs b/crates/api/src/error.rs
new file mode 100644
index 0000000..680a953
--- /dev/null
+++ b/crates/api/src/error.rs
@@ -0,0 +1,16 @@
+#[derive(Debug, thiserror::Error)]
+pub enum ApiError {
+ #[error("Unsupported capability: {capability} for language {language}")]
+ UnsupportedCapability {
+ capability: &'static str,
+ language: String,
+ },
+ #[error("Not found: {0}")]
+ NotFound(String),
+ #[error("Invalid argument: {0}")]
+ InvalidArgument(String),
+ #[error("Internal error: {0}")]
+ Internal(String),
+}
+
+pub type ApiResult = std::result::Result;
diff --git a/crates/api/src/graph.rs b/crates/api/src/graph.rs
index 424bbf2..85fb53a 100644
--- a/crates/api/src/graph.rs
+++ b/crates/api/src/graph.rs
@@ -1,14 +1,7 @@
+use crate::ApiResult;
pub use crate::models::graph::{GraphQuery, QueryResult};
use async_trait::async_trait;
-#[derive(Debug, thiserror::Error)]
-pub enum GraphError {
- #[error("Internal error: {0}")]
- Internal(String),
-}
-
-pub type Result = std::result::Result;
-
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct GraphStats {
pub node_count: usize,
@@ -17,9 +10,12 @@ pub struct GraphStats {
#[async_trait]
pub trait GraphService: Send + Sync {
- async fn query(&self, query: &GraphQuery) -> Result;
- async fn get_stats(&self) -> Result;
+ async fn query(&self, query: &GraphQuery) -> ApiResult;
+ async fn get_stats(&self) -> ApiResult;
/// Get a fully hydrated display node by its FQN.
- async fn get_node_display(&self, fqn: &str) -> Result