diff --git a/Cargo.lock b/Cargo.lock index e48268f5..aaaed5e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addr" version = "0.15.6" @@ -39,14 +29,17 @@ dependencies = [ [[package]] name = "affinitypool" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dde2a385b82232b559baeec740c37809051c596f9b56e7da0d0da2c8e8f54f6" +checksum = "7a58b64a64aecad4ba7f2ccf0f79115f5d2d184b1e55307f78c20be07adc6633" dependencies = [ - "async-channel", + "crossbeam", + "libc", "num_cpus", - "thiserror 1.0.69", + "parking_lot", + "thiserror 2.0.18", "tokio", + "winapi", ] [[package]] @@ -167,27 +160,12 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "any_ascii" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c6333e01ba7235575b6ab53e5af10f1c327927fd97c36462917e289557ea64" - [[package]] name = "anyhow" version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" -[[package]] -name = "approx" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" -dependencies = [ - "num-traits", -] - [[package]] name = "approx" version = "0.5.1" @@ -197,15 +175,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "ar_archive_writer" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a" -dependencies = [ - "object", -] - [[package]] name = "arbitrary" version = "1.4.2" @@ -217,9 +186,12 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6" +dependencies = [ + "rustversion", +] [[package]] name = "argon2" @@ -269,15 +241,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - [[package]] name = "async-channel" version = "2.5.0" @@ -290,91 +253,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-executor" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-graphql" -version = "7.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036618f842229ba0b89652ffe425f96c7c16a49f7e3cb23b56fca7f61fd74980" -dependencies = [ - "async-graphql-derive", - "async-graphql-parser", - "async-graphql-value", - "async-stream", - "async-trait", - "base64 0.22.1", - "bytes", - "fnv", - "futures-timer", - "futures-util", - "http", - "indexmap 2.12.1", - "mime", - "multer", - "num-traits", - "pin-project-lite", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "static_assertions_next", - "thiserror 1.0.69", -] - -[[package]] -name = "async-graphql-derive" -version = "7.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd45deb3dbe5da5cdb8d6a670a7736d735ba65b455328440f236dfb113727a3d" -dependencies = [ - "Inflector", - "async-graphql-parser", - "darling 0.20.11", - "proc-macro-crate", - "proc-macro2", - "quote", - "strum 0.26.3", - "syn 2.0.111", - "thiserror 1.0.69", -] - -[[package]] -name = "async-graphql-parser" -version = "7.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b7607e59424a35dadbc085b0d513aa54ec28160ee640cf79ec3b634eba66d3" -dependencies = [ - "async-graphql-value", - "pest", - "serde", - "serde_json", -] - -[[package]] -name = "async-graphql-value" -version = "7.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecdaff7c9cffa3614a9f9999bf9ee4c3078fe3ce4d6a6e161736b56febf2de" -dependencies = [ - "bytes", - "indexmap 2.12.1", - "serde", - "serde_json", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -397,12 +275,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.89" @@ -414,17 +286,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version", -] - [[package]] name = "atomic-polyfill" version = "1.0.3" @@ -491,7 +352,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "uuid", @@ -515,7 +376,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "uuid", @@ -565,13 +426,13 @@ dependencies = [ "futures", "getrandom 0.3.4", "log", - "reqwest", + "reqwest 0.12.26", "serde", "serde-wasm-bindgen", "serde_json", "strum 0.27.2", "strum_macros 0.27.2", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "ureq 3.1.4", @@ -592,13 +453,13 @@ dependencies = [ "futures", "getrandom 0.3.4", "log", - "reqwest", + "reqwest 0.12.26", "serde", "serde-wasm-bindgen", "serde_json", "strum 0.27.2", "strum_macros 0.27.2", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "ureq 3.1.4", @@ -612,6 +473,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-lc-rs" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa7e52a4c5c547c741610a2c6f123f3881e409b714cd27e6798ef020c514f0a" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "axum" version = "0.8.7" @@ -665,16 +549,16 @@ dependencies = [ ] [[package]] -name = "base64" -version = "0.13.1" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.21.7" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" @@ -690,13 +574,13 @@ checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" [[package]] name = "bcrypt" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65938ed058ef47d92cf8b346cc76ef48984572ade631927e9937b5ffc7662c7" +checksum = "9a0f5948f30df5f43ac29d310b7476793be97c50787e6ef4a63d960a0d0be827" dependencies = [ "base64 0.22.1", "blowfish", - "getrandom 0.2.16", + "getrandom 0.3.4", "subtle", "zeroize", ] @@ -804,15 +688,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", + "cpufeatures", ] [[package]] @@ -840,6 +725,12 @@ dependencies = [ "cipher", ] +[[package]] +name = "bnum" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f781dba93de3a5ef6dc5b17c9958b208f6f3f021623b360fb605ea51ce443f10" + [[package]] name = "bon" version = "2.3.0" @@ -886,6 +777,12 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "boxcar" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f64beae40a84da1b4b26ff2761a5b895c12adc41dc25aaee1c4f2bbfe97a6e" + [[package]] name = "bstr" version = "1.12.1" @@ -975,9 +872,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" dependencies = [ "serde", ] @@ -1082,61 +979,10 @@ dependencies = [ ] [[package]] -name = "cedar-policy" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d91e3b10a0f7f2911774d5e49713c4d25753466f9e11d1cd2ec627f8a2dc857" -dependencies = [ - "cedar-policy-core", - "cedar-policy-validator", - "itertools 0.10.5", - "lalrpop-util", - "ref-cast", - "serde", - "serde_json", - "smol_str", - "thiserror 1.0.69", -] - -[[package]] -name = "cedar-policy-core" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2315591c6b7e18f8038f0a0529f254235fd902b6c217aabc04f2459b0d9995" -dependencies = [ - "either", - "ipnet", - "itertools 0.10.5", - "lalrpop", - "lalrpop-util", - "lazy_static", - "miette", - "regex", - "rustc_lexer", - "serde", - "serde_json", - "serde_with", - "smol_str", - "stacker", - "thiserror 1.0.69", -] - -[[package]] -name = "cedar-policy-validator" -version = "2.4.2" +name = "cesu8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e756e1b2a5da742ed97e65199ad6d0893e9aa4bd6b34be1de9e70bd1e6adc7df" -dependencies = [ - "cedar-policy-core", - "itertools 0.10.5", - "serde", - "serde_json", - "serde_with", - "smol_str", - "stacker", - "thiserror 1.0.69", - "unicode-security", -] +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -1176,9 +1022,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "js-sys", @@ -1267,6 +1113,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + [[package]] name = "codegraph-ai" version = "1.0.0" @@ -1282,12 +1137,12 @@ dependencies = [ "num_cpus", "parking_lot", "prometheus", - "reqwest", - "schemars 1.1.0", + "reqwest 0.12.26", + "schemars", "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "uuid", @@ -1304,7 +1159,7 @@ dependencies = [ "crossbeam-skiplist", "crossbeam-utils", "loom", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "uuid", ] @@ -1326,7 +1181,7 @@ dependencies = [ "config", "criterion", "crossbeam-channel", - "dashmap 6.1.0", + "dashmap", "dirs 5.0.1", "dotenv", "futures", @@ -1341,14 +1196,14 @@ dependencies = [ "rand 0.9.2", "rkyv 0.8.12", "rustc-hash", - "schemars 1.1.0", + "schemars", "secrecy", "serde", "serde_json", "serde_yaml", "sha2", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tikv-jemallocator", "tokio", "tokio-test", @@ -1367,7 +1222,7 @@ dependencies = [ "async-trait", "chrono", "codegraph-core", - "dashmap 6.1.0", + "dashmap", "dotenvy", "serde", "serde_json", @@ -1397,24 +1252,24 @@ dependencies = [ "codegraph-parser", "codegraph-vector", "colored", - "dashmap 6.1.0", + "dashmap", "dirs 6.0.0", "dotenv", "fastrand", "futures", "glob-match", "indicatif 0.18.3", - "lru 0.16.2", + "lru", "nix", "notify", "num_cpus", "parking_lot", "rayon", "regex", - "reqwest", + "reqwest 0.12.26", "rmcp", "rustc-demangle", - "schemars 1.1.0", + "schemars", "semchunk-rs", "serde", "serde_json", @@ -1425,10 +1280,10 @@ dependencies = [ "symbolic-demangle", "syn 2.0.111", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokenizers", "tokio", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "toml", "tracing", "tracing-appender", @@ -1453,11 +1308,11 @@ dependencies = [ "codegraph-parser", "futures", "parking_lot", - "schemars 1.1.0", + "schemars", "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -1470,7 +1325,7 @@ dependencies = [ "async-trait", "chrono", "codegraph-core", - "dashmap 6.1.0", + "dashmap", "nix", "parking_lot", "regex", @@ -1478,9 +1333,9 @@ dependencies = [ "serde_json", "serial_test", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "toml", "tracing", "url", @@ -1503,7 +1358,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -1521,11 +1376,11 @@ dependencies = [ "codegraph-mcp-tools", "futures", "rig-core", - "schemars 1.1.0", + "schemars", "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -1559,12 +1414,12 @@ dependencies = [ "indicatif 0.18.3", "nix", "rmcp", - "schemars 1.1.0", + "schemars", "serde", "serde_json", "serde_yaml", "serial_test", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-util", "tower", @@ -1583,11 +1438,11 @@ dependencies = [ "codegraph-graph", "codegraph-mcp-core", "codegraph-vector", - "lru 0.16.2", + "lru", "parking_lot", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "tracing-subscriber", ] @@ -1602,7 +1457,7 @@ dependencies = [ "chrono", "codegraph-core", "crossbeam-channel", - "dashmap 6.1.0", + "dashmap", "futures", "globset", "ignore", @@ -1624,6 +1479,7 @@ dependencies = [ "tree-sitter-go", "tree-sitter-java", "tree-sitter-javascript", + "tree-sitter-pascal", "tree-sitter-php", "tree-sitter-python", "tree-sitter-ruby", @@ -1638,7 +1494,7 @@ name = "codegraph-vector" version = "1.0.0" dependencies = [ "anyhow", - "approx 0.5.1", + "approx", "async-trait", "bincode 2.0.1", "candle-core", @@ -1649,27 +1505,27 @@ dependencies = [ "codegraph-graph", "criterion", "crossbeam-channel", - "dashmap 6.1.0", + "dashmap", "dotenvy", "fastrand", "flate2", "futures", "fxhash", "hf-hub", - "lru 0.16.2", + "lru", "memmap2", "ndarray 0.16.1", "num_cpus", "ort", "parking_lot", "rayon", - "reqwest", + "reqwest 0.12.26", "semchunk-rs", "serde", "serde_json", "sha2", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokenizers", "tokio", "tokio-test", @@ -1691,7 +1547,7 @@ dependencies = [ "parking_lot", "rkyv 0.8.12", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -1710,6 +1566,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compact_str" version = "0.9.0" @@ -1763,7 +1629,7 @@ dependencies = [ "encode_unicode", "libc", "once_cell", - "unicode-width 0.2.2", + "unicode-width", "windows-sys 0.59.0", ] @@ -1776,10 +1642,16 @@ dependencies = [ "encode_unicode", "libc", "once_cell", - "unicode-width 0.2.2", + "unicode-width", "windows-sys 0.61.2", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const-random" version = "0.1.18" @@ -1802,9 +1674,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "convert_case" @@ -1835,7 +1707,7 @@ dependencies = [ "cookie", "document-features", "idna", - "indexmap 2.12.1", + "indexmap", "log", "serde", "serde_derive", @@ -1854,6 +1726,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -1867,7 +1749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "libc", ] @@ -1938,6 +1820,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1997,6 +1892,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -2017,7 +1924,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "phf", + "phf 0.11.3", "smallvec 1.15.1", ] @@ -2032,23 +1939,40 @@ dependencies = [ ] [[package]] -name = "darling" -version = "0.20.11" +name = "curve25519-dalek" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "darling_core 0.20.11", - "darling_macro 0.20.11", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] name = "darling" -version = "0.21.3" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", + "darling_core 0.20.11", + "darling_macro 0.20.11", ] [[package]] @@ -2075,20 +1999,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "darling_core" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.111", -] - [[package]] name = "darling_core" version = "0.23.0" @@ -2113,17 +2023,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "darling_macro" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" -dependencies = [ - "darling_core 0.21.3", - "quote", - "syn 2.0.111", -] - [[package]] name = "darling_macro" version = "0.23.0" @@ -2144,19 +2043,6 @@ dependencies = [ "serde", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "dashmap" version = "6.1.0" @@ -2192,6 +2078,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ + "const-oid", "pem-rfc7468", "zeroize", ] @@ -2203,7 +2090,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", - "serde_core", ] [[package]] @@ -2261,6 +2147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -2283,16 +2170,6 @@ dependencies = [ "dirs-sys 0.5.0", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -2314,18 +2191,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.59.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users 0.4.6", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -2379,12 +2245,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "double-ended-peekable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d05e1c0dbad51b52c38bda7adceef61b9efc2baf04acfe8726a8c4630a6f57" - [[package]] name = "dtoa" version = "1.0.10" @@ -2400,6 +2260,12 @@ dependencies = [ "dtoa", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -2442,6 +2308,44 @@ dependencies = [ "num-traits", ] +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.15.0" @@ -2452,12 +2356,24 @@ dependencies = [ ] [[package]] -name = "ena" -version = "0.14.3" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "log", + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array 0.14.7", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", ] [[package]] @@ -2477,9 +2393,9 @@ dependencies = [ [[package]] name = "endian-type" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +checksum = "869b0adbda23651a9c5c0c3d270aac9fcb52e8622a8f2b17e57802d7791962f2" [[package]] name = "enum-as-inner" @@ -2517,7 +2433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2605,12 +2521,39 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "fastnum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4089ab2dfd45d8ddc92febb5ca80644389d5ebb954f40231274a3f18341762e2" +dependencies = [ + "bnum", + "num-integer", + "num-traits", +] + [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" version = "0.2.26" @@ -2630,10 +2573,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] -name = "fixedbitset" -version = "0.4.2" +name = "flatbuffers" +version = "25.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" +dependencies = [ + "bitflags 2.10.0", + "rustc_version", + "serde", +] [[package]] name = "flate2" @@ -2720,6 +2668,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2799,19 +2753,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-lite" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -3125,8 +3066,8 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.1.3", - "windows-result 0.3.4", + "windows-link 0.2.1", + "windows-result 0.4.1", ] [[package]] @@ -3155,23 +3096,46 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "geo" -version = "0.28.0" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc1a1678e54befc9b4bcab6cd43b8e7f834ae8ea121118b0fd8c42747675b4a" +dependencies = [ + "earcutr", + "float_next_after", + "geo-types", + "geographiclib-rs", + "i_overlay", + "log", + "num-traits", + "robust", + "rstar 0.12.2", + "serde", + "spade", +] + +[[package]] +name = "geo" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f811f663912a69249fa620dcd2a005db7254529da2d8a0b23942e81f47084501" +checksum = "3f3901269ec6d4f6068d3f09e5f02f995bd076398dcd1dfec407cd230b02d11b" dependencies = [ "earcutr", "float_next_after", "geo-types", "geographiclib-rs", + "i_overlay", "log", "num-traits", + "rand 0.8.5", "robust", "rstar 0.12.2", "serde", + "sif-itree", "spade", ] @@ -3181,8 +3145,9 @@ version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24f8647af4005fa11da47cd56252c6ef030be8fa97bdbf355e7dfb6348f0a82c" dependencies = [ - "approx 0.5.1", + "approx", "num-traits", + "rayon", "rstar 0.10.0", "rstar 0.11.0", "rstar 0.12.2", @@ -3263,6 +3228,17 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.4.12" @@ -3275,7 +3251,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.12.1", + "indexmap", "slab", "tokio", "tokio-util", @@ -3388,6 +3364,30 @@ dependencies = [ "hashbrown 0.15.5", ] +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + [[package]] name = "heapless" version = "0.6.1" @@ -3465,15 +3465,24 @@ dependencies = [ "native-tls", "num_cpus", "rand 0.9.2", - "reqwest", + "reqwest 0.12.26", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "ureq 2.12.1", "windows-sys 0.60.2", ] +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -3582,7 +3591,19 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.4", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", ] [[package]] @@ -3627,6 +3648,49 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "i_float" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010025c2c532c8d82e42d0b8bb5184afa449fa6f06c709ea9adcb16c49ae405b" +dependencies = [ + "libm", +] + +[[package]] +name = "i_key_sort" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9190f86706ca38ac8add223b2aed8b1330002b5cdbbce28fb58b10914d38fc27" + +[[package]] +name = "i_overlay" +version = "4.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413183068e6e0289e18d7d0a1f661b81546e6918d5453a44570b9ab30cbed1b3" +dependencies = [ + "i_float", + "i_key_sort", + "i_shape", + "i_tree", + "rayon", +] + +[[package]] +name = "i_shape" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ea154b742f7d43dae2897fcd5ead86bc7b5eefcedd305a7ebf9f69d44d61082" +dependencies = [ + "i_float", +] + +[[package]] +name = "i_tree" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e6d558e6d4c7b82bc51d9c771e7a927862a161a7d87bf2b0541450e0e20915" + [[package]] name = "iana-time-zone" version = "0.1.64" @@ -3639,7 +3703,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.57.0", + "windows-core", ] [[package]] @@ -3777,20 +3841,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -3807,7 +3860,7 @@ dependencies = [ "console 0.15.11", "number_prefix", "portable-atomic", - "unicode-width 0.2.2", + "unicode-width", "web-time", ] @@ -3819,7 +3872,7 @@ checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" dependencies = [ "console 0.16.2", "portable-atomic", - "unicode-width 0.2.2", + "unicode-width", "unit-prefix", "web-time", ] @@ -3894,15 +3947,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.11.0" @@ -3937,48 +3981,101 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] -name = "jobserver" -version = "0.1.34" +name = "jni" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ - "getrandom 0.3.4", - "libc", + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", ] [[package]] -name = "js-sys" -version = "0.3.83" +name = "jni-sys" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" dependencies = [ - "once_cell", - "wasm-bindgen", + "jni-sys 0.4.1", ] [[package]] -name = "json5" +name = "jni-sys" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" dependencies = [ - "pest", - "pest_derive", - "serde", + "jni-sys-macros", ] [[package]] -name = "jsonwebtoken" -version = "9.3.1" +name = "jni-sys-macros" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ - "base64 0.22.1", - "js-sys", - "pem", - "ring", - "serde", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + +[[package]] +name = "jsonwebtoken" +version = "10.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0529410abe238729a60b108898784df8984c87f6054c9c4fcacc47e4803c1ce1" +dependencies = [ + "aws-lc-rs", + "base64 0.22.1", + "ed25519-dalek", + "getrandom 0.2.16", + "hmac", + "js-sys", + "p256", + "p384", + "pem", + "rand 0.8.5", + "rsa", + "serde", "serde_json", + "sha2", + "signature", "simple_asn1", ] @@ -4002,57 +4099,29 @@ dependencies = [ "libc", ] -[[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set 0.5.3", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" -dependencies = [ - "regex-automata", -] - [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] [[package]] name = "lexicmp" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378d131ddf24063b32cbd7e91668d183140c4b3906270635a4d633d1068ea5d" +checksum = "0e8f89da8fd95c4eb6274e914694bea90c7826523b26f2a2fd863d44b9d42c43" dependencies = [ - "any_ascii", + "deunicode", ] [[package]] name = "libc" -version = "0.2.178" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libloading" @@ -4092,18 +4161,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linfa-linalg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e7562b41c8876d3367897067013bb2884cc78e6893f092ecd26b305176ac82" -dependencies = [ - "ndarray 0.15.6", - "num-traits", - "rand 0.8.5", - "thiserror 1.0.69", -] - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -4112,9 +4169,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -4156,15 +4213,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.5", -] - [[package]] name = "lru" version = "0.16.2" @@ -4202,6 +4250,25 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "lz4" +version = "1.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4" +dependencies = [ + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "mac" version = "0.1.1" @@ -4351,29 +4418,6 @@ dependencies = [ "paste", ] -[[package]] -name = "miette" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" -dependencies = [ - "miette-derive", - "once_cell", - "thiserror 1.0.69", - "unicode-width 0.1.14", -] - -[[package]] -name = "miette-derive" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "mime" version = "0.3.17" @@ -4449,23 +4493,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "multer" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "memchr", - "mime", - "spin", - "version_check", -] - [[package]] name = "munge" version = "0.4.7" @@ -4486,15 +4513,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "nanoid" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" -dependencies = [ - "rand 0.8.5", -] - [[package]] name = "native-tls" version = "0.2.14" @@ -4504,10 +4522,10 @@ dependencies = [ "libc", "log", "openssl", - "openssl-probe", + "openssl-probe 0.1.6", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -4529,23 +4547,24 @@ dependencies = [ [[package]] name = "ndarray" -version = "0.15.6" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" +checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" dependencies = [ - "approx 0.4.0", "matrixmultiply 0.3.10", "num-complex 0.4.6", "num-integer", "num-traits", + "portable-atomic", + "portable-atomic-util", "rawpointer", ] [[package]] name = "ndarray" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" +checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d" dependencies = [ "matrixmultiply 0.3.10", "num-complex 0.4.6", @@ -4569,13 +4588,13 @@ dependencies = [ [[package]] name = "ndarray-stats" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af5a8477ac96877b5bd1fd67e0c28736c12943aba24eda92b127e036b0c8f400" +checksum = "9b6e54a8b65764f71827a90ca1d56965ec0c67f069f996477bd493402a901d1f" dependencies = [ - "indexmap 1.9.3", - "itertools 0.10.5", - "ndarray 0.15.6", + "indexmap", + "itertools 0.13.0", + "ndarray 0.17.2", "noisy_float", "num-integer", "num-traits", @@ -4667,7 +4686,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4719,6 +4738,22 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec 1.15.1", + "zeroize", +] + [[package]] name = "num-complex" version = "0.2.4" @@ -4847,28 +4882,36 @@ dependencies = [ ] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2-core-foundation" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "cc", + "bitflags 2.10.0", ] [[package]] -name = "object" -version = "0.32.2" +name = "objc2-io-kit" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ - "memchr", + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +dependencies = [ + "cc", ] [[package]] name = "object_store" -version = "0.12.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1be0c6c22ec0817cdc77d3842f721a17fd30ab6965001415b5402a74e6b740" +checksum = "c2858065e55c148d294a9f3aae3b0fa9458edadb41a108397094566f4e3c0dfb" dependencies = [ "async-trait", "bytes", @@ -4879,7 +4922,7 @@ dependencies = [ "itertools 0.14.0", "parking_lot", "percent-encoding", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "url", @@ -4966,6 +5009,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + [[package]] name = "openssl-sys" version = "0.9.111" @@ -5028,6 +5077,40 @@ dependencies = [ "ureq 3.1.4", ] +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "papaya" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f92dd0b07c53a0a0c764db2ace8c541dc47320dad97c2200c2a637ab9dd2328f" +dependencies = [ + "equivalent", + "seize", +] + [[package]] name = "parking" version = "2.2.1" @@ -5179,33 +5262,24 @@ dependencies = [ ] [[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.12.1", -] - -[[package]] -name = "pharos" -version = "0.5.3" +name = "phf" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "futures", - "rustc_version", + "phf_macros 0.11.3", + "phf_shared 0.11.3", ] [[package]] name = "phf" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", ] [[package]] @@ -5214,8 +5288,8 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", ] [[package]] @@ -5224,18 +5298,41 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared", + "phf_shared 0.11.3", "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + [[package]] name = "phf_macros" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", "proc-macro2", "quote", "syn 2.0.111", @@ -5249,14 +5346,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", - "unicase", ] [[package]] -name = "pico-args" -version = "0.5.0" +name = "phf_shared" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", + "unicase", +] [[package]] name = "pin-project" @@ -5291,10 +5391,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.32" +name = "pkcs1" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plotters" @@ -5380,6 +5501,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -5405,11 +5535,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5fd83ab7fa55fd06f5e665e3fc52b8bca451c0486b8ea60ad649cd1c10a5da" dependencies = [ "futures", - "indexmap 2.12.1", + "indexmap", "nix", "tokio", "tracing", - "windows 0.61.3", + "windows", ] [[package]] @@ -5448,7 +5578,39 @@ dependencies = [ "parking_lot", "procfs", "protobuf", - "thiserror 2.0.17", + "thiserror 2.0.18", +] + +[[package]] +name = "prost" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "prost-types" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +dependencies = [ + "prost", ] [[package]] @@ -5477,16 +5639,6 @@ version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" -[[package]] -name = "psm" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11f2fedc3b7dafdc2851bc52f277377c5473d378859be234bc7ebb593144d01" -dependencies = [ - "ar_archive_writer", - "cc", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -5553,18 +5705,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "quick_cache" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55a1aa7668676bb93926cd4e9cdfe60f03bb866553bcca9112554911b6d3dc" -dependencies = [ - "ahash 0.8.12", - "equivalent", - "hashbrown 0.14.5", - "parking_lot", -] - [[package]] name = "quick_cache" version = "0.6.18" @@ -5591,7 +5731,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2 0.6.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -5603,6 +5743,7 @@ version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ + "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -5612,7 +5753,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -5629,7 +5770,7 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -5655,7 +5796,7 @@ checksum = "6102314f700f3e8df466c49110830b18cbfc172f88f27a9d7383e455663b1be7" dependencies = [ "async-trait", "bon", - "dashmap 6.1.0", + "dashmap", "futures", "js-sys", "once_cell", @@ -5677,9 +5818,9 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "radix_trie" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +checksum = "3b4431027dcd37fc2a73ef740b5f233aa805897935b8bce0195e41bbf9a3289a" dependencies = [ "endian-type", "nibble_vec", @@ -5928,7 +6069,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.16", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -5980,6 +6121,12 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "rend" version = "0.4.2" @@ -6024,8 +6171,6 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", - "quinn", - "rustls", "rustls-pki-types", "serde", "serde_json", @@ -6033,7 +6178,6 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-native-tls", - "tokio-rustls", "tokio-util", "tower", "tower-http", @@ -6041,30 +6185,62 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.4.2", "web-sys", - "webpki-roots 1.0.4", ] [[package]] -name = "revision" -version = "0.10.0" +name = "reqwest" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f53179a035f881adad8c4d58a2c599c6b4a8325b989c68d178d7a34d1b1e4c" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" dependencies = [ - "revision-derive 0.10.0", + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.5.0", + "web-sys", ] [[package]] name = "revision" -version = "0.11.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b8ee532f15b2f0811eb1a50adf10d036e14a6cdae8d99893e7f3b921cb227d" +checksum = "11c3c8ec8b2be254beb5f8acdd80cdd57b7b5d40988c2ec3d0b7cdb6f7c2829b" dependencies = [ + "bytes", "chrono", - "geo", + "geo 0.31.0", "regex", - "revision-derive 0.11.0", + "revision-derive", "roaring", "rust_decimal", "uuid", @@ -6072,9 +6248,9 @@ dependencies = [ [[package]] name = "revision-derive" -version = "0.10.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0ec466e5d8dca9965eb6871879677bef5590cf7525ad96cae14376efb75073" +checksum = "76be63634a8b1809e663bc0b975d78f6883c0fadbcce9c52e19b9e421f423357" dependencies = [ "proc-macro2", "quote", @@ -6082,14 +6258,13 @@ dependencies = [ ] [[package]] -name = "revision-derive" -version = "0.11.0" +name = "rfc6979" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3415e1bc838c36f9a0a2ac60c0fa0851c72297685e66592c44870d82834dfa2" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", + "hmac", + "subtle", ] [[package]] @@ -6112,11 +6287,11 @@ dependencies = [ "mime_guess", "ordered-float", "pin-project-lite", - "reqwest", - "schemars 1.1.0", + "reqwest 0.12.26", + "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "tracing-futures", @@ -6133,15 +6308,15 @@ dependencies = [ "cfg-if", "getrandom 0.2.16", "libc", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] [[package]] name = "rkyv" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" dependencies = [ "bitvec", "bytecheck 0.6.12", @@ -6149,7 +6324,7 @@ dependencies = [ "hashbrown 0.12.3", "ptr_meta 0.1.4", "rend 0.4.2", - "rkyv_derive 0.7.45", + "rkyv_derive 0.7.46", "seahash", "tinyvec", "uuid", @@ -6164,7 +6339,7 @@ dependencies = [ "bytecheck 0.8.2", "bytes", "hashbrown 0.15.5", - "indexmap 2.12.1", + "indexmap", "munge", "ptr_meta 0.3.1", "rancor", @@ -6176,9 +6351,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" dependencies = [ "proc-macro2", "quote", @@ -6215,11 +6390,11 @@ dependencies = [ "process-wrap", "rand 0.9.2", "rmcp-macros", - "schemars 1.1.0", + "schemars", "serde", "serde_json", "sse-stream", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -6263,21 +6438,11 @@ dependencies = [ "serde", ] -[[package]] -name = "rmpv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" -dependencies = [ - "num-traits", - "rmp", -] - [[package]] name = "roaring" -version = "0.10.12" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e8d2cfa184d94d0726d650a9f4a1be7f9b76ac9fdb954219878dc00c1c1e7b" +checksum = "8ba9ce64a8f45d7fc86358410bb1a82e8c987504c0d4900e9141d69a9f26c885" dependencies = [ "bytemuck", "byteorder", @@ -6304,6 +6469,26 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rstar" version = "0.8.4" @@ -6365,6 +6550,35 @@ dependencies = [ "smallvec 1.15.1", ] +[[package]] +name = "rstest" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" +dependencies = [ + "futures-timer", + "futures-util", + "rstest_macros", +] + +[[package]] +name = "rstest_macros" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.111", + "unicode-ident", +] + [[package]] name = "rusqlite" version = "0.25.4" @@ -6402,16 +6616,16 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35affe401787a9bd846712274d97654355d21b2a2c092a3139aabe31e9022282" +checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" dependencies = [ "arrayvec", "borsh", "bytes", "num-traits", "rand 0.8.5", - "rkyv 0.7.45", + "rkyv 0.7.46", "serde", "serde_json", ] @@ -6428,15 +6642,6 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" -[[package]] -name = "rustc_lexer" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" -dependencies = [ - "unicode-xid", -] - [[package]] name = "rustc_version" version = "0.4.1" @@ -6461,23 +6666,24 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.35" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -6487,25 +6693,65 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe 0.2.1", + "rustls-pki-types", + "schannel", + "security-framework 3.5.1", +] + [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework 3.5.1", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -6566,18 +6812,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "schemars" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - [[package]] name = "schemars" version = "1.1.0" @@ -6640,6 +6874,20 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secrecy" version = "0.10.3" @@ -6657,7 +6905,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.10.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +dependencies = [ + "bitflags 2.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -6673,6 +6934,16 @@ dependencies = [ "libc", ] +[[package]] +name = "seize" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b55fb86dfd3a2f5f76ea78310a88f96c4ea21a3031f8d212443d56123fd0521" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + [[package]] name = "semchunk-rs" version = "0.1.1" @@ -6693,12 +6964,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "seq-macro" version = "0.3.6" @@ -6715,15 +6980,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-content" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3753ca04f350fa92d00b6146a3555e63c55388c9ef2e11e09bce2ff1c0b509c6" -dependencies = [ - "serde", -] - [[package]] name = "serde-untagged" version = "0.1.9" @@ -6780,16 +7036,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.12.1", + "indexmap", "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -6833,44 +7089,13 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "3.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.12.1", - "schemars 0.9.0", - "schemars 1.1.0", - "serde_core", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" -dependencies = [ - "darling 0.21.3", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.12.1", + "indexmap", "itoa", "ryu", "serde", @@ -6939,6 +7164,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "sif-itree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7f45b8998ced5134fb1d75732c77842a3e888f19c1ff98481822e8fbfbf930b" + [[package]] name = "signal-hook-registry" version = "1.4.7" @@ -6948,6 +7179,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + [[package]] name = "simd-adler32" version = "0.3.8" @@ -6974,7 +7215,7 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", ] @@ -6995,27 +7236,15 @@ name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "smallvec" -version = "2.0.0-alpha.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d44cfb396c3caf6fbfd0ab422af02631b69ddd96d2eff0b0f0724f9024051b" - -[[package]] -name = "smol_str" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ "serde", ] [[package]] -name = "snap" -version = "1.1.1" +name = "smallvec" +version = "2.0.0-alpha.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" +checksum = "51d44cfb396c3caf6fbfd0ab422af02631b69ddd96d2eff0b0f0724f9024051b" [[package]] name = "socket2" @@ -7069,6 +7298,16 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "spm_precompiled" version = "0.1.4" @@ -7100,31 +7339,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "stacker" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f8b29fb42aafcea4edeeb6b2f2d7ecd0d969c48b4cf0d2e64aafc471dd6e59" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "windows-sys 0.59.0", -] - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "static_assertions_next" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7beae5182595e9a8b683fa98c4317f956c9a2dec3b9716990d20023cc60c766" - [[package]] name = "statrs" version = "0.12.0" @@ -7136,14 +7356,24 @@ dependencies = [ [[package]] name = "storekey" -version = "0.5.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c42833834a5d23b344f71d87114e0cc9994766a5c42938f4b50e7b2aef85b2" +checksum = "bd9a94571bde7369ecaac47cec2e6844642d99166bd452fbd8def74b5b917b2f" dependencies = [ - "byteorder", - "memchr", - "serde", - "thiserror 1.0.69", + "bytes", + "storekey-derive", + "uuid", +] + +[[package]] +name = "storekey-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6079d53242246522ec982de613c5c952cc7b1380ef2f8622fcdab9bfe73c0098" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -7160,7 +7390,7 @@ checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", "parking_lot", - "phf_shared", + "phf_shared 0.11.3", "precomputed-hash", "serde", ] @@ -7171,8 +7401,8 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", ] @@ -7234,155 +7464,213 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "surrealdb" -version = "2.4.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4636ac0af4dd619a66d55d8b5c0d1a0965ac1fe417c6a39dbc1d3db16588b969" +checksum = "b19f5232640cfe8b1423b49582f36bc4c867dac9e85ad87f9a81b5fd1633621f" dependencies = [ - "arrayvec", + "anyhow", "async-channel", - "bincode 1.3.3", + "boxcar", "chrono", - "dmp", "futures", - "geo", "getrandom 0.3.4", - "indexmap 2.12.1", + "indexmap", + "js-sys", "path-clean", - "pharos", - "reblessive", - "reqwest", - "revision 0.11.0", + "reqwest 0.13.2", "ring", - "rust_decimal", "rustls", "rustls-pki-types", "semver", "serde", - "serde-content", "serde_json", "surrealdb-core", - "thiserror 1.0.69", + "surrealdb-types", + "surrealdb-types-derive", "tokio", - "tokio-tungstenite 0.23.1", + "tokio-tungstenite", + "tokio-tungstenite-wasm", "tokio-util", "tracing", - "trice", "url", "uuid", + "wasm-bindgen", "wasm-bindgen-futures", "wasmtimer", - "ws_stream_wasm", + "web-sys", ] [[package]] name = "surrealdb-core" -version = "2.4.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b99720b7f5119785b065d235705ca95f568a9a89745d1221871e845eedf424d" +checksum = "089a8dc4b88097a84ca3663ad0c152ae53d2e23ffc8b636dac7f65aa86ba3766" dependencies = [ "addr", "affinitypool", "ahash 0.8.12", "ammonia", - "any_ascii", + "anyhow", "argon2", "async-channel", - "async-executor", - "async-graphql", - "base64 0.21.7", + "async-stream", + "async-trait", + "base64 0.22.1", "bcrypt", - "bincode 1.3.3", "blake3", "bytes", - "castaway", - "cedar-policy", "chrono", "ciborium", - "dashmap 5.5.3", + "dashmap", "deunicode", "dmp", "ext-sort", + "fastnum", "fst", "futures", "fuzzy-matcher", - "geo", + "geo 0.32.0", "geo-types", "getrandom 0.3.4", + "headers", "hex", "http", + "humantime", "ipnet", "jsonwebtoken", "lexicmp", - "linfa-linalg", "md-5", - "nanoid", - "ndarray 0.15.6", + "mime", + "ndarray 0.17.2", "ndarray-stats", "num-traits", "num_cpus", "object_store", "parking_lot", + "path-clean", "pbkdf2", - "pharos", - "phf", + "phf 0.13.1", "pin-project-lite", - "quick_cache 0.5.2", + "quick_cache", "radix_trie", "rand 0.8.5", "rayon", "reblessive", "regex", - "revision 0.11.0", + "revision", "ring", - "rmpv", "roaring", "rust-stemmers", "rust_decimal", "scrypt", "semver", "serde", - "serde-content", "serde_json", "sha1", "sha2", - "snap", "storekey", "strsim", "subtle", - "surrealkv", + "surrealdb-protocol", + "surrealdb-types", + "surrealmx", "sysinfo", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", + "tokio-util", "tracing", - "trice", "ulid", "unicase", "url", "uuid", - "vart 0.8.1", + "vart", "wasm-bindgen-futures", "wasmtimer", - "ws_stream_wasm", + "web-time", +] + +[[package]] +name = "surrealdb-protocol" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb37698e0493bcfac3229ecb6ec6894a3ad705a3a2087b1562eeb881b3db19d4" +dependencies = [ + "anyhow", + "async-trait", + "bytes", + "chrono", + "flatbuffers", + "futures", + "geo 0.32.0", + "prost", + "prost-types", + "rust_decimal", + "semver", + "serde", + "serde_json", + "tonic", + "tonic-prost", + "uuid", +] + +[[package]] +name = "surrealdb-types" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a8277f923a20960c82cd7d133524fb2c5d0a73d5f52abd74f28d8d83a8b6fa" +dependencies = [ + "anyhow", + "bytes", + "chrono", + "flatbuffers", + "geo 0.32.0", + "hex", + "http", + "papaya", + "rand 0.8.5", + "regex", + "rstest", + "rust_decimal", + "serde", + "serde_json", + "surrealdb-protocol", + "surrealdb-types-derive", + "ulid", + "uuid", +] + +[[package]] +name = "surrealdb-types-derive" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "491b1457e76011c800818421d814472e0a9a4d3c690ae1edb44381678e97a554" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] -name = "surrealkv" -version = "0.9.3" +name = "surrealmx" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a5041979bdff8599a1d5f6cb7365acb9a79664e2a84e5c4fddac2b3969f7d1" +checksum = "6508449a7d1379a92a51ba49391b48ccab0b60dd11a4277c0dda965d8c99dbff" dependencies = [ - "ahash 0.8.12", + "arc-swap", + "bincode 2.0.1", "bytes", - "chrono", - "crc32fast", - "double-ended-peekable", - "getrandom 0.2.16", - "lru 0.12.5", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-skiplist", + "lz4", + "papaya", "parking_lot", - "quick_cache 0.6.18", - "revision 0.10.0", - "vart 0.9.3", + "serde", + "smallvec 1.15.1", + "thiserror 2.0.18", + "tracing", + "web-time", ] [[package]] @@ -7482,16 +7770,16 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.33.1" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" +checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" dependencies = [ - "core-foundation-sys", "libc", "memchr", "ntapi", - "rayon", - "windows 0.57.0", + "objc2-core-foundation", + "objc2-io-kit", + "windows", ] [[package]] @@ -7501,7 +7789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.10.0", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -7534,15 +7822,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.23.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", "getrandom 0.3.4", "once_cell", - "rustix 1.1.2", - "windows-sys 0.59.0", + "rustix 1.1.4", + "windows-sys 0.61.2", ] [[package]] @@ -7556,24 +7844,13 @@ dependencies = [ "utf-8", ] -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - [[package]] name = "terminal_size" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix 1.1.2", + "rustix 1.1.4", "windows-sys 0.60.2", ] @@ -7588,11 +7865,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -7608,9 +7885,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -7750,7 +8027,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -7758,9 +8035,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.48.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -7831,32 +8108,39 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.23.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", + "native-tls", "rustls", "rustls-pki-types", "tokio", + "tokio-native-tls", "tokio-rustls", - "tungstenite 0.23.0", + "tungstenite", "webpki-roots 0.26.11", ] [[package]] -name = "tokio-tungstenite" -version = "0.28.0" +name = "tokio-tungstenite-wasm" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" +checksum = "ccecee909c02b8863f9bda87253127eb4da0e7e1342330b2583fbc4d1795c2f8" dependencies = [ + "bytes", + "futures-channel", "futures-util", - "log", - "native-tls", + "http", + "httparse", + "js-sys", + "thiserror 2.0.18", "tokio", - "tokio-native-tls", - "tungstenite 0.28.0", + "tokio-tungstenite", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -7875,9 +8159,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.17" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -7917,7 +8201,7 @@ version = "0.9.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" dependencies = [ - "indexmap 2.12.1", + "indexmap", "serde_core", "serde_spanned", "toml_datetime", @@ -7941,7 +8225,7 @@ version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.12.1", + "indexmap", "toml_datetime", "toml_parser", "winnow", @@ -7962,6 +8246,46 @@ version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +[[package]] +name = "tonic" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec" +dependencies = [ + "async-trait", + "axum", + "base64 0.22.1", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "socket2 0.6.1", + "sync_wrapper", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-prost" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55376a0bbaa4975a3f10d009ad763d8f4108f067c7c2e74f3001fb49778d309" +dependencies = [ + "bytes", + "prost", + "tonic", +] + [[package]] name = "tower" version = "0.5.2" @@ -7970,9 +8294,12 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -8027,7 +8354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" dependencies = [ "crossbeam-channel", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", "tracing-subscriber", ] @@ -8164,6 +8491,16 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae62f7eae5eb549c71b76658648b72cc6111f2d87d24a1e31fa907f4943e3ce" +[[package]] +name = "tree-sitter-pascal" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb51e9a57493fd237e4517566749f7f7453349261a72a427e5f11d3b34b72a8" +dependencies = [ + "cc", + "tree-sitter-language", +] + [[package]] name = "tree-sitter-php" version = "0.24.2" @@ -8241,27 +8578,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.8.5", - "rustls", - "rustls-pki-types", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.28.0" @@ -8275,8 +8591,11 @@ dependencies = [ "log", "native-tls", "rand 0.9.2", + "rustls", + "rustls-pki-types", "sha1", - "thiserror 2.0.17", + "thiserror 2.0.18", + "url", "utf-8", ] @@ -8346,9 +8665,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-bom" @@ -8380,46 +8699,18 @@ dependencies = [ "smallvec 1.15.1", ] -[[package]] -name = "unicode-script" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" - -[[package]] -name = "unicode-security" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4ddba1535dd35ed8b61c52166b7155d7f4e4b8847cec6f48e71dc66d8b5e50" -dependencies = [ - "unicode-normalization", - "unicode-script", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" 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 = "unicode_categories" version = "0.1.1" @@ -8448,6 +8739,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -8518,9 +8815,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", @@ -8570,12 +8867,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vart" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87782b74f898179396e93c0efabb38de0d58d50bbd47eae00c71b3a1144dbbae" - [[package]] name = "vart" version = "0.9.3" @@ -8642,9 +8933,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -8655,11 +8946,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -8668,9 +8960,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8678,9 +8970,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -8691,9 +8983,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] @@ -8711,11 +9003,24 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmtimer" -version = "0.2.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ed9d8b15c7fb594d72bfb4b5a276f3d2029333cd93a932f376f5937f6f80ee" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" dependencies = [ "futures", "js-sys", @@ -8726,9 +9031,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -8750,7 +9055,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414" dependencies = [ - "phf", + "phf 0.11.3", "phf_codegen", "string_cache", "string_cache_codegen", @@ -8805,7 +9110,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -8814,16 +9119,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" -dependencies = [ - "windows-core 0.57.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.61.3" @@ -8831,7 +9126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ "windows-collections", - "windows-core 0.61.2", + "windows-core", "windows-future", "windows-link 0.1.3", "windows-numerics", @@ -8843,19 +9138,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core 0.61.2", -] - -[[package]] -name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", + "windows-core", ] [[package]] @@ -8864,8 +9147,8 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -8877,22 +9160,11 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", "windows-threading", ] -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "windows-implement" version = "0.60.2" @@ -8904,17 +9176,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -8944,7 +9205,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", ] @@ -8959,15 +9220,6 @@ dependencies = [ "windows-strings 0.5.1", ] -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -9004,6 +9256,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -9049,6 +9310,21 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -9106,6 +9382,12 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -9124,6 +9406,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -9142,6 +9430,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -9172,6 +9466,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -9190,6 +9490,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -9208,6 +9514,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -9226,6 +9538,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -9265,25 +9583,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" -[[package]] -name = "ws_stream_wasm" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version", - "send_wrapper", - "thiserror 2.0.17", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wyz" version = "0.5.1" @@ -9300,7 +9599,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix 1.1.2", + "rustix 1.1.4", ] [[package]] @@ -9451,11 +9750,17 @@ dependencies = [ "crc32fast", "crossbeam-utils", "displaydoc", - "indexmap 2.12.1", + "indexmap", "num_enum", "thiserror 1.0.69", ] +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + [[package]] name = "zstd" version = "0.13.3" diff --git a/Cargo.toml b/Cargo.toml index 99bb639e..35a6270a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -204,6 +204,7 @@ tree-sitter-c-sharp = "0.23.0" tree-sitter-ruby = "0.23.0" tree-sitter-php = "0.24.2" tree-sitter-dart = "0.0.4" +tree-sitter-pascal = "0.10.2" # GraphQL async-graphql = "7.0" @@ -285,6 +286,9 @@ codegraph-ai = { path = "crates/codegraph-ai" } # Development dependencies +[patch.crates-io] +objc_exception = { path = "patches/objc_exception" } + [profile.release] # Performance-oriented release (kept as-is for general builds) opt-level = 3 diff --git a/codegraph-mcp.sh b/codegraph-mcp.sh new file mode 100755 index 00000000..f77e316d --- /dev/null +++ b/codegraph-mcp.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Wrapper to start CodeGraph MCP server with SurrealDB + OpenRouter (ZDR) +# +# LLM: google/gemini-2.0-flash-lite-001 via OpenRouter +# - $0.025/M input, $0.075/M output, 1M context, tool use supported +# - Zero Data Retention enforced via openrouter.ai/settings/privacy (account-level) +# +# Embeddings: ONNX (local, bundled — no external API needed) + +export CODEGRAPH_EMBEDDING_PROVIDER=onnx +export CODEGRAPH_LOCAL_MODEL=BAAI/bge-small-en-v1.5 +export ORT_DYLIB_PATH=/home/sash/.pyenv/versions/3.13.7/lib/python3.13/site-packages/onnxruntime/capi/libonnxruntime.so +export CODEGRAPH_SURREALDB_URL=ws://127.0.0.1:8529 +export CODEGRAPH_SURREALDB_USERNAME=root +export CODEGRAPH_SURREALDB_PASSWORD=root +export CODEGRAPH_SURREALDB_NAMESPACE=codegraph +export CODEGRAPH_SURREALDB_DATABASE=main + +# OpenRouter via openai-compatible — routes to /v1/chat/completions +# ZDR enforced at account level: openrouter.ai/settings/privacy → Disable data collection +export CODEGRAPH_LLM_PROVIDER=openai-compatible +export CODEGRAPH_USE_COMPLETIONS_API=true +export OPENAI_API_KEY=REDACTED_OPENROUTER_API_KEY +export CODEGRAPH_OPENAI_COMPATIBLE_URL=https://openrouter.ai/api/v1 +export CODEGRAPH_LLM_MODEL=google/gemini-2.0-flash-lite-001 +export CODEGRAPH_AGENT_MODEL=google/gemini-2.0-flash-lite-001 +export CODEGRAPH_CONTEXT_WINDOW=1048576 + +# ReAct architecture — simpler, works with openai-compatible providers +export CODEGRAPH_AGENT_ARCHITECTURE=react + +exec /home/sash/projects/research/codegraph-rust/target/release/codegraph start stdio "$@" diff --git a/crates/codegraph-core/src/types.rs b/crates/codegraph-core/src/types.rs index a77feaf2..fc9c3d9f 100644 --- a/crates/codegraph-core/src/types.rs +++ b/crates/codegraph-core/src/types.rs @@ -51,6 +51,7 @@ pub enum Language { Ruby, Php, Dart, + FreePascal, Other(String), } diff --git a/crates/codegraph-graph/Cargo.toml b/crates/codegraph-graph/Cargo.toml index 6b9e28bb..0bcd610b 100644 --- a/crates/codegraph-graph/Cargo.toml +++ b/crates/codegraph-graph/Cargo.toml @@ -18,7 +18,7 @@ chrono = { workspace = true } sha2 = { workspace = true } # SurrealDB support (optional, default on via feature flag) -surrealdb = { version = "2.2", optional = true, features = ["kv-mem"] } +surrealdb = { version = "3", optional = true, features = ["kv-mem"] } dotenvy = { version = "0.15", optional = true } tokio = { workspace = true, optional = true, features = ["macros", "rt-multi-thread"] } diff --git a/crates/codegraph-graph/src/bin/surreal_smoke_test.rs b/crates/codegraph-graph/src/bin/surreal_smoke_test.rs index c636c114..a346a5f1 100644 --- a/crates/codegraph-graph/src/bin/surreal_smoke_test.rs +++ b/crates/codegraph-graph/src/bin/surreal_smoke_test.rs @@ -20,8 +20,8 @@ async fn main() -> anyhow::Result<()> { .to_string(); let db = Surreal::new::(&endpoint).await?; db.signin(Root { - username: &username, - password: &password, + username: username.clone(), + password: password.clone(), }) .await?; db.use_ns(&namespace).use_db(&database).await?; @@ -52,11 +52,11 @@ async fn main() -> anyhow::Result<()> { "project_id": "smoke-project", }); - db.query("UPSERT type::thing('nodes', $doc.id) CONTENT $doc;") + db.query("UPSERT type::record('nodes', $doc.id) CONTENT $doc;") .bind(("doc", node_one)) .await?; - db.query("UPSERT type::thing('nodes', $doc.id) CONTENT $doc;") + db.query("UPSERT type::record('nodes', $doc.id) CONTENT $doc;") .bind(("doc", node_two)) .await?; @@ -70,10 +70,10 @@ async fn main() -> anyhow::Result<()> { }); db.query( - "UPSERT type::thing('edges', $doc.id) CONTENT { + "UPSERT type::record('edges', $doc.id) CONTENT { id: $doc.id, - from: type::thing('nodes', $doc.from), - to: type::thing('nodes', $doc.to), + from: type::record('nodes', $doc.from), + to: type::record('nodes', $doc.to), edge_type: $doc.edge_type, weight: $doc.weight, metadata: $doc.metadata, @@ -94,7 +94,7 @@ async fn main() -> anyhow::Result<()> { "access_count": 0, }); - db.query("UPSERT type::thing('symbol_embeddings', $doc.id) CONTENT $doc;") + db.query("UPSERT type::record('symbol_embeddings', $doc.id) CONTENT $doc;") .bind(("doc", symbol_doc)) .await?; diff --git a/crates/codegraph-graph/src/graph_functions.rs b/crates/codegraph-graph/src/graph_functions.rs index 6d4c5e97..4f7fa228 100644 --- a/crates/codegraph-graph/src/graph_functions.rs +++ b/crates/codegraph-graph/src/graph_functions.rs @@ -6,64 +6,38 @@ use serde::{Deserialize, Serialize}; #[cfg(test)] use serde_json::json; use std::sync::Arc; -use surrealdb::{engine::any::Any, Surreal, Value as SurrealValue}; +use surrealdb::{engine::any::Any, Surreal}; use tracing::{debug, error, warn}; -/// Convert SurrealDB Value to clean serde_json::Value using accessor methods -/// Avoids externally-tagged enum serialization that produces {"None": ...}, {"Number": {"Int": ...}} -fn surreal_to_json(value: SurrealValue) -> serde_json::Value { - // Use into_inner() to get the internal sql::Value, then serialize properly - let inner = value.into_inner(); - sql_value_to_json(inner) -} - -fn sql_value_to_json(value: surrealdb::sql::Value) -> serde_json::Value { - use surrealdb::sql::Value as SqlValue; +/// Walk a serde_json::Value tree and transparently decompress any compressed strings. +/// Preserves all other values as-is (surrealdb 3.x returns clean JSON natively). +fn json_decompress_walk(value: serde_json::Value) -> serde_json::Value { match value { - SqlValue::None | SqlValue::Null => serde_json::Value::Null, - SqlValue::Bool(b) => serde_json::Value::Bool(b), - SqlValue::Number(n) => { - // Try to get as float first (handles both int and float) - let f = n.as_float(); - if f.fract() == 0.0 && f.abs() < i64::MAX as f64 { - // It's effectively an integer - serde_json::json!(f as i64) + serde_json::Value::String(s) => { + if let Ok(decompressed) = codegraph_core::decompress_string(&s) { + if (decompressed.starts_with('{') && decompressed.ends_with('}')) + || (decompressed.starts_with('[') && decompressed.ends_with(']')) + { + if let Ok(json) = serde_json::from_str(&decompressed) { + return json; + } + } + serde_json::Value::String(decompressed) } else { - serde_json::json!(f) + serde_json::Value::String(s) } } - SqlValue::Duration(d) => serde_json::Value::String(d.to_string()), - SqlValue::Datetime(dt) => serde_json::Value::String(dt.to_string()), - SqlValue::Uuid(u) => serde_json::Value::String(u.to_string()), - SqlValue::Array(arr) => { - serde_json::Value::Array(arr.into_iter().map(sql_value_to_json).collect()) + serde_json::Value::Array(arr) => { + serde_json::Value::Array(arr.into_iter().map(json_decompress_walk).collect()) } - SqlValue::Object(obj) => { - let map: serde_json::Map = obj + serde_json::Value::Object(obj) => { + let map = obj .into_iter() - .map(|(k, v)| (k.to_string(), sql_value_to_json(v))) + .map(|(k, v)| (k, json_decompress_walk(v))) .collect(); serde_json::Value::Object(map) } - SqlValue::Thing(thing) => serde_json::Value::String(thing.to_string()), - SqlValue::Bytes(b) => serde_json::Value::String(format!("bytes:{}", b.len())), - SqlValue::Strand(s) => { - let s_str = s.to_string(); - // Transparently decompress if it looks like our compressed format - if let Ok(decompressed) = codegraph_core::decompress_string(&s_str) { - // Try parsing as JSON first if it looks like it - if (decompressed.starts_with('{') && decompressed.ends_with('}')) || - (decompressed.starts_with('[') && decompressed.ends_with(']')) { - if let Ok(json) = serde_json::from_str(&decompressed) { - return json; - } - } - serde_json::Value::String(decompressed) - } else { - serde_json::Value::String(s_str) - } - } - other => serde_json::Value::String(format!("{}", other)), + other => other, } } @@ -92,10 +66,11 @@ impl GraphFunctions { .bind(("project_id", self.project_id.clone())) .await .map_err(|e| CodeGraphError::Database(format!("dimension probe failed: {e}")))?; - let val: Option = resp.take(0).ok(); - let json = val - .map(surreal_to_json) - .unwrap_or_else(|| serde_json::Value::Null); + let json: serde_json::Value = resp + .take::>(0) + .ok() + .flatten() + .unwrap_or(serde_json::Value::Null); let has_1024 = json.get("has_1024").and_then(|v| v.as_u64()).unwrap_or(0); let has_768 = json.get("has_768").and_then(|v| v.as_u64()).unwrap_or(0); let has_384 = json.get("has_384").and_then(|v| v.as_u64()).unwrap_or(0); @@ -199,7 +174,7 @@ impl GraphFunctions { node_id, edge_type, depth, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query( "RETURN fn::get_transitive_dependencies($project_id, $node_id, $edge_type, $depth)", @@ -218,6 +193,7 @@ impl GraphFunctions { error!("Failed to deserialize dependencies: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -238,7 +214,7 @@ impl GraphFunctions { edge_type, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::detect_circular_dependencies($project_id, $edge_type)") .bind(("project_id", self.project_id.clone())) @@ -253,6 +229,7 @@ impl GraphFunctions { error!("Failed to deserialize circular dependencies: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -275,7 +252,7 @@ impl GraphFunctions { from_node, max_depth, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::trace_call_chain($project_id, $from_node, $max_depth)") .bind(("project_id", self.project_id.clone())) @@ -291,6 +268,7 @@ impl GraphFunctions { error!("Failed to deserialize call chain: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -309,7 +287,7 @@ impl GraphFunctions { ); // Use Option to handle NONE returned by SurrealDB when node doesn't exist - let results: Vec> = self + let raw: Vec = self .db .query("RETURN fn::calculate_coupling_metrics($project_id, $node_id)") .bind(("project_id", self.project_id.clone())) @@ -324,6 +302,8 @@ impl GraphFunctions { error!("Failed to deserialize coupling metrics: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let results: Vec> = + serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); results.into_iter().next().flatten().ok_or_else(|| { CodeGraphError::Database(format!( @@ -347,7 +327,7 @@ impl GraphFunctions { min_degree, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::get_hub_nodes($project_id, $min_degree)") .bind(("project_id", self.project_id.clone())) @@ -362,6 +342,7 @@ impl GraphFunctions { error!("Failed to deserialize hub nodes: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -386,7 +367,7 @@ impl GraphFunctions { node_id, edge_type, depth, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::get_reverse_dependencies($project_id, $node_id, $edge_type, $depth)") .bind(("project_id", self.project_id.clone())) @@ -403,6 +384,7 @@ impl GraphFunctions { error!("Failed to deserialize reverse dependencies: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -425,7 +407,7 @@ impl GraphFunctions { min_complexity, limit, self.project_id ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::get_complexity_hotspots($project_id, $min_complexity, $limit)") .bind(("project_id", self.project_id.clone())) @@ -441,6 +423,7 @@ impl GraphFunctions { error!("Failed to deserialize complexity hotspots: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -482,7 +465,7 @@ impl GraphFunctions { needle, self.project_id, max ); - let result: Vec = self + let raw: Vec = self .db .query("RETURN fn::find_nodes_by_name($project_id, $needle, $limit)") .bind(("project_id", self.project_id.clone())) @@ -498,6 +481,8 @@ impl GraphFunctions { error!("Failed to deserialize find_nodes_by_name results: {}", e); CodeGraphError::Database(format!("Deserialization failed: {}", e)) })?; + let result: Vec = + serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } @@ -580,26 +565,16 @@ impl GraphFunctions { } })?; - // Workaround for SurrealDB 2.x SDK bug (GitHub #4921): - // Direct deserialization to serde_json::Value fails with "invalid type: enum" - // Instead, get raw SurrealDB Value and serialize via serde_json::to_value - let raw_value: SurrealValue = response.take(0).map_err(|e| { - error!( - "Failed to get raw value from semantic_search_chunks_with_context: {}", - e - ); - CodeGraphError::Database(format!("Failed to get raw value: {}", e)) - })?; - - // Convert SurrealDB Value to clean JSON (avoids enum variant tags) - let json_value = surreal_to_json(raw_value); - - // Extract Vec from the JSON value - let result: Vec = match json_value { - serde_json::Value::Array(arr) => arr, - serde_json::Value::Null => Vec::new(), - other => vec![other], - }; + let result: Vec = response + .take(0) + .map_err(|e| { + error!( + "Failed to get raw value from semantic_search_chunks_with_context: {}", + e + ); + CodeGraphError::Database(format!("Failed to get raw value: {}", e)) + })?; + let result: Vec = result.into_iter().map(json_decompress_walk).collect(); Ok(result) } @@ -616,7 +591,6 @@ impl GraphFunctions { threshold: f32, ) -> Result> { // Call the SurrealDB function directly - let embedding_value = surrealdb::sql::Value::from(query_embedding.to_vec()); let mut response = self .db .query("RETURN fn::semantic_search_nodes_via_chunks($project_id, $query_text, $dimension, $limit, $threshold, $query_embedding)") @@ -625,27 +599,23 @@ impl GraphFunctions { .bind(("dimension", dimension as i64)) .bind(("limit", limit as i64)) .bind(("threshold", threshold as f64)) - .bind(("query_embedding", embedding_value)) + .bind(("query_embedding", query_embedding.to_vec())) .await .map_err(|e| { error!("Failed to call semantic_search_nodes_via_chunks: {}", e); CodeGraphError::Database(format!("semantic_search_nodes_via_chunks failed: {}", e)) })?; - let raw_value: SurrealValue = response.take(0).map_err(|e| { - error!( - "Failed to get raw value from semantic_search_nodes_via_chunks: {}", - e - ); - CodeGraphError::Database(format!("Failed to get raw value: {}", e)) - })?; - - let json_value = surreal_to_json(raw_value); - let result: Vec = match json_value { - serde_json::Value::Array(arr) => arr, - serde_json::Value::Null => Vec::new(), - other => vec![other], - }; + let result: Vec = response + .take(0) + .map_err(|e| { + error!( + "Failed to get raw value from semantic_search_nodes_via_chunks: {}", + e + ); + CodeGraphError::Database(format!("Failed to get raw value: {}", e)) + })?; + let result: Vec = result.into_iter().map(json_decompress_walk).collect(); Ok(result) } @@ -690,9 +660,11 @@ impl GraphFunctions { .await .map_err(|e| CodeGraphError::Database(format!("get_top_directories failed: {}", e)))?; - let result: Vec = response.take(0).map_err(|e| { + let raw: Vec = response.take(0).map_err(|e| { CodeGraphError::Database(format!("Failed to deserialize directories: {}", e)) })?; + let result: Vec = + serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(result) } diff --git a/crates/codegraph-graph/src/surrealdb_migrations.rs b/crates/codegraph-graph/src/surrealdb_migrations.rs index 3afae303..dc464fef 100644 --- a/crates/codegraph-graph/src/surrealdb_migrations.rs +++ b/crates/codegraph-graph/src/surrealdb_migrations.rs @@ -112,7 +112,8 @@ impl MigrationRunner { version: u32, } - let versions: Vec = result.take(0).unwrap_or_default(); + let raw: Vec = result.take(0).unwrap_or_default(); + let versions: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); Ok(versions.first().map(|v| v.version).unwrap_or(0)) } @@ -166,10 +167,10 @@ impl MigrationRunner { checksum, }; - let _: Option = self + let _: Option = self .db .create(("schema_versions", format!("v{}", migration.version))) - .content(record) + .content(serde_json::to_value(&record).unwrap_or_default()) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -231,7 +232,7 @@ impl MigrationRunner { } // Remove migration record - let _: Option = self + let _: Option = self .db .delete(("schema_versions", format!("v{}", migration.version))) .await @@ -261,7 +262,8 @@ impl MigrationRunner { CodeGraphError::Database(format!("Failed to query migrations: {}", e)) })?; - let applied: Vec = result.take(0).unwrap_or_default(); + let raw: Vec = result.take(0).unwrap_or_default(); + let applied: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); let mut all_valid = true; @@ -300,7 +302,8 @@ impl MigrationRunner { CodeGraphError::Database(format!("Failed to query migrations: {}", e)) })?; - let applied: Vec = result.take(0).unwrap_or_default(); + let raw: Vec = result.take(0).unwrap_or_default(); + let applied: Vec = serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); let mut statuses = Vec::new(); diff --git a/crates/codegraph-graph/src/surrealdb_storage.rs b/crates/codegraph-graph/src/surrealdb_storage.rs index a92909fb..ca04c70f 100644 --- a/crates/codegraph-graph/src/surrealdb_storage.rs +++ b/crates/codegraph-graph/src/surrealdb_storage.rs @@ -16,6 +16,25 @@ use surrealdb::{ }; use tracing::{debug, info, warn}; +/// Recursively remove JSON null values from an object/array so SurrealDB 3.x sees +/// absent fields as NONE rather than NULL (option does not accept NULL in 3.x). +fn strip_nulls(value: JsonValue) -> JsonValue { + match value { + JsonValue::Object(map) => { + let cleaned = map + .into_iter() + .filter(|(_, v)| !v.is_null()) + .map(|(k, v)| (k, strip_nulls(v))) + .collect(); + JsonValue::Object(cleaned) + } + JsonValue::Array(arr) => { + JsonValue::Array(arr.into_iter().map(strip_nulls).collect()) + } + other => other, + } +} + /// SurrealDB storage implementation with flexible schema support #[derive(Clone)] pub struct SurrealDbStorage { @@ -118,14 +137,14 @@ impl SurrealDbStorage { let auth_result = if config.connection.starts_with("wss://") { // Prefer database-scoped auth for hosted / cloud setups db.signin(Database { - namespace: &config.namespace, - database: &config.database, - username, - password, + namespace: config.namespace.clone(), + database: config.database.clone(), + username: username.clone(), + password: password.clone(), }) .await } else { - db.signin(Root { username, password }).await + db.signin(Root { username: username.clone(), password: password.clone() }).await }; auth_result @@ -237,14 +256,14 @@ impl SurrealDbStorage { })?; // Initialize schema version if not exists - let _: Option = self + let _: Option = self .db .create(("schema_versions", "current")) - .content(SchemaVersion { + .content(strip_nulls(serde_json::to_value(SchemaVersion { version: 1, applied_at: chrono::Utc::now().to_rfc3339(), description: "Initial schema".to_string(), - }) + }).unwrap_or_default())) .await .map_err(|e| { CodeGraphError::Database(format!("Failed to set schema version: {}", e)) @@ -317,9 +336,11 @@ impl SurrealDbStorage { score: f64, } - let results: Vec = result.take(0).map_err(|e| { + let raw: Vec = result.take(0).map_err(|e| { CodeGraphError::Database(format!("Failed to extract search results: {}", e)) })?; + let results: Vec = + raw.into_iter().filter_map(|v| serde_json::from_value(v).ok()).collect(); Ok(results .into_iter() @@ -404,9 +425,11 @@ impl SurrealDbStorage { score: f64, } - let results: Vec = result.take(0).map_err(|e| { + let raw: Vec = result.take(0).map_err(|e| { CodeGraphError::Database(format!("Failed to extract filtered results: {}", e)) })?; + let results: Vec = + raw.into_iter().filter_map(|v| serde_json::from_value(v).ok()).collect(); Ok(results .into_iter() @@ -548,7 +571,7 @@ impl SurrealDbStorage { self.db .query(UPSERT_NODES_QUERY) - .bind(("data", records.clone())) + .bind(("data", strip_nulls(serde_json::to_value(&records).unwrap_or_default()))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -591,7 +614,7 @@ impl SurrealDbStorage { self.db .query(UPSERT_EDGES_QUERY) - .bind(("data", payloads)) + .bind(("data", strip_nulls(JsonValue::Array(payloads)))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -614,7 +637,7 @@ impl SurrealDbStorage { self.db .query(UPSERT_SYMBOL_EMBEDDINGS_QUERY) - .bind(("data", records.to_vec())) + .bind(("data", strip_nulls(serde_json::to_value(records).unwrap_or_default()))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -642,7 +665,7 @@ impl SurrealDbStorage { std::time::Duration::from_secs(10), self.db .query(UPSERT_CHUNK_EMBEDDINGS_QUERY) - .bind(("data", owned)), + .bind(("data", strip_nulls(serde_json::to_value(&owned).unwrap_or_default()))), ) .await .map_err(|_| { @@ -737,7 +760,7 @@ impl SurrealDbStorage { let resp = self .db .query(INSERT_CHUNK_EMBEDDINGS_QUERY) - .bind(("batch", owned)) + .bind(("batch", strip_nulls(serde_json::to_value(&owned).unwrap_or_default()))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -762,7 +785,7 @@ impl SurrealDbStorage { let resp = self .db .query(UPSERT_CHUNK_EMBEDDING_SINGLE_QUERY) - .bind(("doc", owned)) + .bind(("doc", strip_nulls(serde_json::to_value(&owned).unwrap_or_default()))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -798,7 +821,7 @@ impl SurrealDbStorage { })?; let query = format!( - "UPDATE type::thing('nodes', $id) SET {} = $embedding, updated_at = time::now();", + "UPDATE type::record('nodes', $id) SET {} = $embedding, updated_at = time::now();", column ); @@ -930,7 +953,7 @@ impl SurrealDbStorage { pub async fn upsert_project_metadata(&self, record: ProjectMetadataRecord) -> Result<()> { let query = r#" - UPSERT type::thing('project_metadata', $id) SET + UPSERT type::record('project_metadata', $id) SET project_id = $pid, name = $name, root_path = $root, @@ -978,7 +1001,7 @@ impl SurrealDbStorage { /// Upsert single file metadata record pub async fn upsert_file_metadata(&self, record: &FileMetadataRecord) -> Result<()> { let query = r#" - UPSERT type::thing('file_metadata', $id) SET + UPSERT type::record('file_metadata', $id) SET file_path = $file_path, project_id = $project_id, content_hash = $content_hash, @@ -1029,7 +1052,7 @@ impl SurrealDbStorage { let query = r#" LET $batch = $data; FOR $doc IN $batch { - UPSERT type::thing('file_metadata', $doc.id) SET + UPSERT type::record('file_metadata', $doc.id) SET file_path = $doc.file_path, project_id = $doc.project_id, content_hash = $doc.content_hash, @@ -1065,7 +1088,7 @@ impl SurrealDbStorage { self.db .query(query) - .bind(("data", payloads)) + .bind(("data", strip_nulls(JsonValue::Array(payloads)))) .await .map_err(|e| { CodeGraphError::Database(format!( @@ -1257,9 +1280,11 @@ impl SurrealDbStorage { CodeGraphError::Database(format!("Failed to query file metadata: {}", e)) })?; - let records: Vec = result.take(0).map_err(|e| { + let raw: Vec = result.take(0).map_err(|e| { CodeGraphError::Database(format!("Failed to extract file metadata results: {}", e)) })?; + let records: Vec = + serde_json::from_value(serde_json::Value::Array(raw)).unwrap_or_default(); debug!( "Retrieved {} file metadata records for project {}", @@ -1536,7 +1561,7 @@ impl GraphStore for SurrealDbStorage { let node_id = id.to_string(); let result: Option> = self .db - .select(("nodes", &node_id)) + .select(("nodes", node_id.as_str())) .await .map_err(|e| CodeGraphError::Database(format!("Failed to get node: {}", e)))?; @@ -1563,8 +1588,8 @@ impl GraphStore for SurrealDbStorage { let _: Option> = self .db - .update(("nodes", &node_id)) - .content(data) + .update(("nodes", node_id.as_str())) + .content(strip_nulls(serde_json::to_value(&data).unwrap_or_default())) .await .map_err(|e| CodeGraphError::Database(format!("Failed to update node: {}", e)))?; @@ -1582,7 +1607,7 @@ impl GraphStore for SurrealDbStorage { let node_id = id.to_string(); let _: Option> = self .db - .delete(("nodes", &node_id)) + .delete(("nodes", node_id.as_str())) .await .map_err(|e| CodeGraphError::Database(format!("Failed to delete node: {}", e)))?; @@ -2120,7 +2145,7 @@ impl ChunkEmbeddingRecord { const UPSERT_NODES_QUERY: &str = r#" LET $batch = $data; FOR $doc IN $batch { - UPSERT type::thing('nodes', $doc.id) SET + UPSERT type::record('nodes', $doc.id) SET name = $doc.name, node_type = $doc.node_type, language = $doc.language, @@ -2151,9 +2176,9 @@ FOR $doc IN $batch { const UPSERT_EDGES_QUERY: &str = r#" LET $batch = $data; FOR $doc IN $batch { - UPSERT type::thing('edges', $doc.id) SET - from = type::thing('nodes', $doc.from), - to = type::thing('nodes', $doc.to), + UPSERT type::record('edges', $doc.id) SET + from = type::record('nodes', $doc.from), + to = type::record('nodes', $doc.to), edge_type = $doc.edge_type, weight = $doc.weight, metadata = $doc.metadata, @@ -2165,9 +2190,9 @@ FOR $doc IN $batch { const UPSERT_SYMBOL_EMBEDDINGS_QUERY: &str = r#" LET $batch = $data; FOR $doc IN $batch { - LET $node_rec = if $doc.node_id != NONE { type::thing('nodes', $doc.node_id) } else { NONE }; - LET $edge_rec = if $doc.source_edge_id != NONE { type::thing('edges', $doc.source_edge_id) } else { NONE }; - UPSERT type::thing('symbol_embeddings', $doc.id) SET + LET $node_rec = if $doc.node_id != NONE { type::record('nodes', $doc.node_id) } else { NONE }; + LET $edge_rec = if $doc.source_edge_id != NONE { type::record('edges', $doc.source_edge_id) } else { NONE }; + UPSERT type::record('symbol_embeddings', $doc.id) SET symbol = $doc.symbol, normalized_symbol = $doc.normalized_symbol, project_id = $doc.project_id, @@ -2189,8 +2214,8 @@ FOR $doc IN $batch { const UPSERT_CHUNK_EMBEDDINGS_QUERY: &str = r#" LET $batch = $data; FOR $doc IN $batch { - UPSERT type::thing('chunks', $doc.id) SET - parent_node = type::thing('nodes', $doc.parent_node), + UPSERT type::record('chunks', $doc.id) SET + parent_node = type::record('nodes', $doc.parent_node), chunk_index = $doc.chunk_index, text = $doc.text, project_id = $doc.project_id, @@ -2210,8 +2235,8 @@ FOR $doc IN $batch { const INSERT_CHUNK_EMBEDDINGS_QUERY: &str = r#" LET $batch = array::map($batch, |$doc| { - id: type::thing('chunks', $doc.id), - parent_node: type::thing('nodes', $doc.parent_node), + id: type::record('chunks', $doc.id), + parent_node: type::record('nodes', $doc.parent_node), chunk_index: $doc.chunk_index, text: $doc.text, project_id: $doc.project_id, @@ -2246,8 +2271,8 @@ RETURN NONE; const UPSERT_CHUNK_EMBEDDING_SINGLE_QUERY: &str = r#" LET $doc = $doc; -UPSERT type::thing('chunks', $doc.id) SET - parent_node = type::thing('nodes', $doc.parent_node), +UPSERT type::record('chunks', $doc.id) SET + parent_node = type::record('nodes', $doc.parent_node), chunk_index = $doc.chunk_index, text = $doc.text, project_id = $doc.project_id, diff --git a/crates/codegraph-graph/tests/semantic_search_nodes_via_chunks_test.rs b/crates/codegraph-graph/tests/semantic_search_nodes_via_chunks_test.rs index ce667833..bf2be9c0 100644 --- a/crates/codegraph-graph/tests/semantic_search_nodes_via_chunks_test.rs +++ b/crates/codegraph-graph/tests/semantic_search_nodes_via_chunks_test.rs @@ -90,7 +90,7 @@ async fn vector_scores_surface_in_hybrid_search() -> Result<()> { LET $str = $input; LET $after_prefix = IF string::starts_with($str, $table + ':') THEN string::slice($str, string::len($table) + 1) ELSE $str END; LET $clean_id = IF string::starts_with($after_prefix, '⟨') AND string::ends_with($after_prefix, '⟩') THEN string::slice($after_prefix, 1, string::len($after_prefix) - 2) ELSE $after_prefix END; - RETURN type::thing($table, $clean_id); + RETURN type::record($table, $clean_id); } PERMISSIONS FULL; DEFINE FUNCTION fn::node_info($node_id: any) { diff --git a/crates/codegraph-mcp-server/Cargo.toml b/crates/codegraph-mcp-server/Cargo.toml index 16d652c5..a5ee6cca 100644 --- a/crates/codegraph-mcp-server/Cargo.toml +++ b/crates/codegraph-mcp-server/Cargo.toml @@ -37,6 +37,7 @@ embeddings-openai = ["embeddings", "codegraph-mcp/embeddings-openai"] embeddings-jina = ["embeddings", "codegraph-mcp/embeddings-jina"] embeddings-lmstudio = ["embeddings", "codegraph-mcp/embeddings-lmstudio"] embeddings-local = ["embeddings", "codegraph-mcp/embeddings-local"] +embeddings-onnx = ["embeddings", "codegraph-mcp/embeddings-onnx"] all-embeddings = [ "embeddings-ollama", "embeddings-openai", diff --git a/crates/codegraph-mcp-server/src/official_server.rs b/crates/codegraph-mcp-server/src/official_server.rs index f0e7a67b..9550290f 100644 --- a/crates/codegraph-mcp-server/src/official_server.rs +++ b/crates/codegraph-mcp-server/src/official_server.rs @@ -1099,7 +1099,8 @@ impl CodeGraphMCPServer { )])) } - /// Stub when ai-enhanced feature is disabled + /// No-LLM fallback: calls raw graph tools directly, returns JSON for Claude Code to reason over. + /// Claude Code IS the LLM — no need for CodeGraph to call a separate one. #[cfg(not(feature = "ai-enhanced"))] async fn execute_agentic_workflow( &self, @@ -1108,11 +1109,107 @@ impl CodeGraphMCPServer { _peer: Peer, _meta: Meta, ) -> Result { - let _ = (analysis_type, query); - Err(McpError::invalid_request( - "Agentic tools require the `ai-enhanced` feature to be enabled", - None, - )) + use codegraph_graph::GraphFunctions; + use codegraph_graph::SurrealDbStorage; + + // Connect to SurrealDB + let connection = std::env::var("CODEGRAPH_SURREALDB_URL") + .or_else(|_| std::env::var("SURREALDB_URL")) + .unwrap_or_else(|_| "ws://localhost:3004".to_string()); + let namespace = std::env::var("CODEGRAPH_SURREALDB_NAMESPACE") + .unwrap_or_else(|_| "ouroboros".to_string()); + let database = std::env::var("CODEGRAPH_SURREALDB_DATABASE") + .unwrap_or_else(|_| "codegraph".to_string()); + let username = std::env::var("CODEGRAPH_SURREALDB_USERNAME").ok(); + let password = std::env::var("CODEGRAPH_SURREALDB_PASSWORD").ok(); + + let surrealdb_config = codegraph_graph::SurrealDbConfig { + connection, + namespace, + database, + username, + password, + strict_mode: false, + auto_migrate: false, + cache_enabled: false, + }; + + let storage = SurrealDbStorage::new(surrealdb_config) + .await + .map_err(|e| McpError { + code: rmcp::model::ErrorCode(-32603), + message: format!("SurrealDB connection failed: {}", e).into(), + data: None, + })?; + + let canonical_project = std::env::var("CODEGRAPH_PROJECT_ID") + .or_else(|_| std::env::current_dir().map(|p| p.display().to_string())) + .unwrap_or_else(|_| "default-project".to_string()); + let canonical_project = std::path::Path::new(&canonical_project) + .canonicalize() + .map(|p| p.display().to_string()) + .unwrap_or(canonical_project); + + let graph_functions = Arc::new(GraphFunctions::new_with_project_id( + storage.db(), + canonical_project, + )); + + // Load config for embedding generator + let config_manager = codegraph_core::config_manager::ConfigManager::load() + .map_err(|e| McpError { + code: rmcp::model::ErrorCode(-32603), + message: format!("Config load failed: {}", e).into(), + data: None, + })?; + let config = config_manager.config(); + + let embedding_generator: Arc = + Arc::new(EmbeddingGenerator::with_config(&config).await); + + let tool_executor = Arc::new(GraphToolExecutor::new( + graph_functions, + Arc::new(config.clone()), + embedding_generator, + )); + + // Map analysis type to raw graph tool calls + let (tool_name, params) = match analysis_type { + AnalysisType::CodeSearch | AnalysisType::ContextBuilder | AnalysisType::SemanticQuestion => { + ("semantic_code_search", json!({"query": query, "limit": 10})) + } + AnalysisType::DependencyAnalysis => { + ("get_transitive_dependencies", json!({"query": query, "depth": 3})) + } + AnalysisType::CallChainAnalysis => { + ("trace_call_chain", json!({"query": query, "depth": 5})) + } + AnalysisType::ArchitectureAnalysis | AnalysisType::ApiSurfaceAnalysis => { + ("get_hub_nodes", json!({"query": query, "limit": 15})) + } + AnalysisType::ComplexityAnalysis => { + ("find_complexity_hotspots", json!({"query": query, "limit": 10})) + } + }; + + let result = tool_executor.execute(tool_name, params).await.map_err(|e| McpError { + code: rmcp::model::ErrorCode(-32603), + message: format!("Graph tool '{}' failed: {}", tool_name, e).into(), + data: None, + })?; + + let response = json!({ + "analysis_type": analysis_type.as_str(), + "mode": "no-llm-direct-graph", + "tool_used": tool_name, + "query": query, + "result": result, + }); + + Ok(CallToolResult::success(vec![Content::text( + serde_json::to_string_pretty(&response) + .unwrap_or_else(|_| "Error formatting graph result".to_string()), + )])) } } diff --git a/crates/codegraph-mcp/Cargo.toml b/crates/codegraph-mcp/Cargo.toml index 200c47da..b33adb6a 100644 --- a/crates/codegraph-mcp/Cargo.toml +++ b/crates/codegraph-mcp/Cargo.toml @@ -77,13 +77,14 @@ anyhow = { workspace = true } serial_test = "3.2" rmcp = { workspace = true, features = ["client", "transport-child-process"] } codegraph-vector = { workspace = true, features = ["ollama"] } -surrealdb = { version = "2.2", features = ["kv-mem"] } +surrealdb = { version = "3", features = ["kv-mem"] } [features] default = [] daemon = ["codegraph-parser/watcher-experimental"] embeddings = ["dep:codegraph-vector", "dep:codegraph-mcp-tools"] embeddings-local = ["embeddings", "codegraph-vector/local-embeddings"] +embeddings-onnx = ["embeddings", "codegraph-vector/onnx"] embeddings-openai = ["embeddings", "codegraph-vector/openai"] embeddings-ollama = ["embeddings", "codegraph-vector/ollama"] embeddings-jina = ["embeddings", "codegraph-vector/jina"] diff --git a/crates/codegraph-parser/Cargo.toml b/crates/codegraph-parser/Cargo.toml index df11016d..a4f28d1d 100644 --- a/crates/codegraph-parser/Cargo.toml +++ b/crates/codegraph-parser/Cargo.toml @@ -22,6 +22,7 @@ tree-sitter-swift = { workspace = true } tree-sitter-c-sharp = { workspace = true } tree-sitter-ruby = { workspace = true } tree-sitter-php = { workspace = true } +tree-sitter-pascal = { workspace = true } # Disabled: tree-sitter-kotlin and tree-sitter-dart pull in incompatible tree-sitter v0.20.10 serde = { workspace = true } diff --git a/crates/codegraph-parser/src/file_collect.rs b/crates/codegraph-parser/src/file_collect.rs index 7ae655a8..88bfd75f 100644 --- a/crates/codegraph-parser/src/file_collect.rs +++ b/crates/codegraph-parser/src/file_collect.rs @@ -241,6 +241,13 @@ fn get_supported_extensions(languages: &[String]) -> HashSet<&'static str> { "dart" => { extensions.insert("dart"); } + "freepascal" | "pascal" | "fpc" => { + extensions.insert("pas"); + extensions.insert("pp"); + extensions.insert("lpr"); + extensions.insert("lrs"); + extensions.insert("inc"); + } _ => { warn!("Unknown language: {}", lang); } @@ -253,7 +260,7 @@ fn get_supported_extensions(languages: &[String]) -> HashSet<&'static str> { "rs", "ts", "tsx", "js", "jsx", "py", "pyi", "go", "java", "cpp", "cxx", "cc", "hpp", "hxx", "h", "c", // Revolutionary universal language support "swift", "cs", "rb", "rake", "gemspec", "php", "phtml", "php3", "php4", "php5", "kt", - "kts", "dart", + "kts", "dart", "pas", "pp", "lpr", "lrs", "inc", ]); } diff --git a/crates/codegraph-parser/src/language.rs b/crates/codegraph-parser/src/language.rs index 183a87aa..d19eedf0 100644 --- a/crates/codegraph-parser/src/language.rs +++ b/crates/codegraph-parser/src/language.rs @@ -114,6 +114,14 @@ impl LanguageRegistry { }, ); + configs.insert( + Language::FreePascal, + LanguageConfig { + language: tree_sitter_pascal::LANGUAGE.into(), + file_extensions: vec!["pas", "pp", "lpr", "lrs", "inc"], + }, + ); + // Temporarily disabled due to tree-sitter version conflicts - TODO: Fix when compatible versions available // configs.insert( // Language::Dart, diff --git a/crates/codegraph-parser/src/languages/freepascal.rs b/crates/codegraph-parser/src/languages/freepascal.rs new file mode 100644 index 00000000..689f439c --- /dev/null +++ b/crates/codegraph-parser/src/languages/freepascal.rs @@ -0,0 +1,487 @@ +use codegraph_core::{ + CodeNode, EdgeRelationship, EdgeType, ExtractionResult, Language, Location, NodeId, NodeType, + Span, +}; +use std::collections::HashMap; +use tree_sitter::{Node, Tree, TreeCursor}; + +pub struct FreePascalExtractor; + +impl FreePascalExtractor { + pub fn extract_with_edges(tree: &Tree, content: &str, file_path: &str) -> ExtractionResult { + let mut collector = FreePascalCollector::new(content, file_path); + let mut cursor = tree.walk(); + collector.walk(&mut cursor); + collector.into_result() + } +} + +impl super::LanguageExtractor for FreePascalExtractor { + fn extract_with_edges(tree: &Tree, content: &str, file_path: &str) -> ExtractionResult { + FreePascalExtractor::extract_with_edges(tree, content, file_path) + } + + fn supported_edge_types() -> &'static [EdgeType] { + &[EdgeType::Imports, EdgeType::Calls, EdgeType::Extends] + } + + fn language() -> Language { + Language::FreePascal + } +} + +struct FreePascalCollector<'a> { + content: &'a str, + file_path: &'a str, + nodes: Vec, + edges: Vec, + current_scope_id: Option, +} + +impl<'a> FreePascalCollector<'a> { + fn new(content: &'a str, file_path: &'a str) -> Self { + Self { + content, + file_path, + nodes: Vec::new(), + edges: Vec::new(), + current_scope_id: None, + } + } + + fn into_result(self) -> ExtractionResult { + ExtractionResult { + nodes: self.nodes, + edges: self.edges, + } + } + + fn walk(&mut self, cursor: &mut TreeCursor) { + let node = cursor.node(); + + match node.kind() { + // Program/unit/library module declaration + // tree-sitter-pascal uses: "unit", "program", "library" + "unit" | "program" | "library" => { + if let Some(name) = self.module_name(&node) { + let loc = self.location(&node); + let mut code = CodeNode::new( + name, + Some(NodeType::Module), + Some(Language::FreePascal), + loc, + ) + .with_content(self.node_text(&node)); + code.span = Some(self.span_for(&node)); + self.current_scope_id = Some(code.id); + self.nodes.push(code); + // Don't recurse into module node text, recurse into children below + } + } + + // Procedure/function definitions (implementation section) + // tree-sitter-pascal: "defProc" contains a "declProc" header + "block" + "defProc" | "defFunc" => { + if let Some(name) = self.proc_name(&node) { + let loc = self.location(&node); + let prev_scope = self.current_scope_id; + let mut code = CodeNode::new( + name, + Some(NodeType::Function), + Some(Language::FreePascal), + loc, + ) + .with_content(self.node_text(&node)) + .with_complexity(crate::complexity::calculate_cyclomatic_complexity( + &node, + self.content, + )); + code.span = Some(self.span_for(&node)); + self.current_scope_id = Some(code.id); + self.nodes.push(code); + + // Recurse children under the new scope, then restore + if cursor.goto_first_child() { + loop { + self.walk(cursor); + if !cursor.goto_next_sibling() { + break; + } + } + cursor.goto_parent(); + } + self.current_scope_id = prev_scope; + return; // already recursed + } + } + + // Type declaration block: "declTypes" contains "declType" children + "declTypes" => { + self.extract_type_block(&node); + } + + // Uses clause: "declUses" contains "moduleName" children + "declUses" => { + self.extract_uses_clause(&node); + } + + // Function/procedure calls: "exprCall" + "exprCall" => { + if let Some(scope_id) = self.current_scope_id { + if let Some(callee) = self.call_target(&node) { + self.edges.push(EdgeRelationship { + from: scope_id, + to: callee, + edge_type: EdgeType::Calls, + metadata: { + let mut m = HashMap::new(); + m.insert("source_file".to_string(), self.file_path.to_string()); + m + }, + span: Some(self.span_for(&node)), + }); + } + } + } + + _ => {} + } + + // Default recursion + if cursor.goto_first_child() { + loop { + self.walk(cursor); + if !cursor.goto_next_sibling() { + break; + } + } + cursor.goto_parent(); + } + } + + // Module name is in a "moduleName" child containing an "identifier" + fn module_name(&self, node: &Node) -> Option { + let mut cursor = node.walk(); + if !cursor.goto_first_child() { + return None; + } + loop { + let child = cursor.node(); + if child.kind() == "moduleName" { + return self.find_child_text_by_kinds(&child, &["identifier"]); + } + if !cursor.goto_next_sibling() { + break; + } + } + None + } + + // Procedure name from defProc/defFunc: look in declProc child for identifier or genericDot + fn proc_name(&self, node: &Node) -> Option { + let decl = self.find_child_by_kind(node, "declProc") + .or_else(|| self.find_child_by_kind(node, "declFunc"))?; + + // Qualified name like TMyClass.DoSomething → genericDot + if let Some(dot) = self.find_child_by_kind(&decl, "genericDot") { + // Last identifier in the dot chain is the method name + return self.last_identifier_in_dot(&dot); + } + self.find_child_text_by_kinds(&decl, &["identifier"]) + } + + // Walk the genericDot chain, collect all identifiers, return the last one + fn last_identifier_in_dot(&self, dot_node: &Node) -> Option { + let mut last = None; + let mut cursor = dot_node.walk(); + if !cursor.goto_first_child() { + return None; + } + loop { + let child = cursor.node(); + if child.kind() == "identifier" { + last = Some(self.node_text(&child)); + } else if child.kind() == "genericDot" { + last = self.last_identifier_in_dot(&child); + } + if !cursor.goto_next_sibling() { + break; + } + } + last + } + + // Extract all type definitions in a declTypes block + fn extract_type_block(&mut self, block: &Node) { + let mut cursor = block.walk(); + if !cursor.goto_first_child() { + return; + } + loop { + let child = cursor.node(); + if child.kind() == "declType" { + if let Some(name) = self.find_child_text_by_kinds(&child, &["identifier"]) { + let (node_type, parent_name) = self.classify_decl_type(&child); + let loc = self.location(&child); + let mut code = CodeNode::new( + name, + Some(node_type), + Some(Language::FreePascal), + loc, + ) + .with_content(self.node_text(&child)); + code.span = Some(self.span_for(&child)); + let code_id = code.id; + self.nodes.push(code); + if let Some(parent) = parent_name { + self.edges.push(EdgeRelationship { + from: code_id, + to: parent, + edge_type: EdgeType::Extends, + metadata: HashMap::new(), + span: Some(self.span_for(&child)), + }); + } + } + } + if !cursor.goto_next_sibling() { + break; + } + } + } + + // Classify a declType by looking at its declClass child + fn classify_decl_type(&self, decl_type: &Node) -> (NodeType, Option) { + if let Some(decl_class) = self.find_child_by_kind(decl_type, "declClass") { + // Check first keyword child: kRecord, kClass, kInterface, kObject + let mut cursor = decl_class.walk(); + if cursor.goto_first_child() { + let first = cursor.node(); + match first.kind() { + "kRecord" | "kObject" => return (NodeType::Struct, None), + "kInterface" => return (NodeType::Interface, None), + "kClass" => { + // Parent class in typeref inside parentheses + let parent = self.find_child_by_kind(&decl_class, "typeref") + .and_then(|tr| self.find_child_text_by_kinds(&tr, &["identifier"])); + return (NodeType::Class, parent); + } + _ => {} + } + } + } + (NodeType::Type, None) + } + + // Extract units from a declUses clause + fn extract_uses_clause(&mut self, uses_node: &Node) { + let mut cursor = uses_node.walk(); + if !cursor.goto_first_child() { + return; + } + loop { + let child = cursor.node(); + if child.kind() == "moduleName" { + if let Some(name) = self.find_child_text_by_kinds(&child, &["identifier"]) { + let loc = self.location(&child); + let mut import_node = CodeNode::new( + name.clone(), + Some(NodeType::Import), + Some(Language::FreePascal), + loc, + ) + .with_content(name.clone()); + import_node.span = Some(self.span_for(&child)); + let import_id = import_node.id; + self.nodes.push(import_node); + self.edges.push(EdgeRelationship { + from: import_id, + to: name, + edge_type: EdgeType::Imports, + metadata: { + let mut m = HashMap::new(); + m.insert("source_file".to_string(), self.file_path.to_string()); + m + }, + span: Some(self.span_for(&child)), + }); + } + } + if !cursor.goto_next_sibling() { + break; + } + } + } + + // First identifier in exprCall is the callee + fn call_target(&self, node: &Node) -> Option { + self.find_child_text_by_kinds(node, &["identifier", "genericDot"]) + } + + fn find_child_by_kind<'b>(&self, node: &'b Node<'b>, kind: &str) -> Option> { + let mut cursor = node.walk(); + if !cursor.goto_first_child() { + return None; + } + loop { + let child = cursor.node(); + if child.kind() == kind { + return Some(child); + } + if !cursor.goto_next_sibling() { + break; + } + } + None + } + + fn find_child_text_by_kinds(&self, node: &Node, kinds: &[&str]) -> Option { + let mut cursor = node.walk(); + if !cursor.goto_first_child() { + return None; + } + loop { + let child = cursor.node(); + if kinds.iter().any(|k| child.kind() == *k) { + let text = self.node_text(&child); + if !text.is_empty() { + return Some(text); + } + } + if !cursor.goto_next_sibling() { + break; + } + } + None + } + + fn location(&self, node: &Node) -> Location { + Location { + file_path: self.file_path.to_string(), + line: node.start_position().row as u32 + 1, + column: node.start_position().column as u32, + end_line: Some(node.end_position().row as u32 + 1), + end_column: Some(node.end_position().column as u32), + } + } + + fn node_text(&self, node: &Node) -> String { + node.utf8_text(self.content.as_bytes()) + .unwrap_or("") + .to_string() + } + + fn span_for(&self, node: &Node) -> Span { + Span { + start_byte: node.start_byte() as u32, + end_byte: node.end_byte() as u32, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::language::LanguageRegistry; + + const SAMPLE: &str = r#" +unit MyUnit; + +interface + +uses + SysUtils, Classes; + +type + TMyRecord = record + Name: string; + Value: Integer; + end; + + TMyClass = class(TObject) + public + procedure DoSomething; + function GetValue: Integer; + end; + +implementation + +procedure TMyClass.DoSomething; +begin + WriteLn('hello'); +end; + +function TMyClass.GetValue: Integer; +begin + Result := 42; +end; + +end. +"#; + + #[test] + fn test_freepascal_extracts_module() { + let registry = LanguageRegistry::new(); + let mut parser = registry.create_parser(&Language::FreePascal).unwrap(); + let tree = parser.parse(SAMPLE, None).unwrap(); + let result = FreePascalExtractor::extract_with_edges(&tree, SAMPLE, "test.pas"); + + assert!( + result.nodes.iter().any(|n| n.node_type == Some(NodeType::Module) + && n.name == "MyUnit".into()), + "Expected Module node named MyUnit, got: {:?}", + result.nodes.iter().map(|n| (&n.name, &n.node_type)).collect::>() + ); + } + + #[test] + fn test_freepascal_extracts_functions() { + let registry = LanguageRegistry::new(); + let mut parser = registry.create_parser(&Language::FreePascal).unwrap(); + let tree = parser.parse(SAMPLE, None).unwrap(); + let result = FreePascalExtractor::extract_with_edges(&tree, SAMPLE, "test.pas"); + + let fns: Vec<_> = result.nodes.iter() + .filter(|n| n.node_type == Some(NodeType::Function)) + .collect(); + assert!(!fns.is_empty(), "Expected at least one Function node"); + } + + #[test] + fn test_freepascal_extracts_types() { + let registry = LanguageRegistry::new(); + let mut parser = registry.create_parser(&Language::FreePascal).unwrap(); + let tree = parser.parse(SAMPLE, None).unwrap(); + let result = FreePascalExtractor::extract_with_edges(&tree, SAMPLE, "test.pas"); + + assert!( + result.nodes.iter().any(|n| n.node_type == Some(NodeType::Struct)), + "Expected Struct (record) node" + ); + assert!( + result.nodes.iter().any(|n| n.node_type == Some(NodeType::Class)), + "Expected Class node" + ); + } + + #[test] + fn test_freepascal_extracts_imports() { + let registry = LanguageRegistry::new(); + let mut parser = registry.create_parser(&Language::FreePascal).unwrap(); + let tree = parser.parse(SAMPLE, None).unwrap(); + let result = FreePascalExtractor::extract_with_edges(&tree, SAMPLE, "test.pas"); + + let imports: Vec<_> = result.nodes.iter() + .filter(|n| n.node_type == Some(NodeType::Import)) + .collect(); + assert!(!imports.is_empty(), "Expected Import nodes from uses clause"); + } + + #[test] + fn test_freepascal_language_detection() { + let registry = LanguageRegistry::new(); + assert_eq!(registry.detect_language("foo.pas"), Some(Language::FreePascal)); + assert_eq!(registry.detect_language("foo.pp"), Some(Language::FreePascal)); + assert_eq!(registry.detect_language("foo.lpr"), Some(Language::FreePascal)); + } +} diff --git a/crates/codegraph-parser/src/languages/mod.rs b/crates/codegraph-parser/src/languages/mod.rs index 8cfba97d..a7d837cf 100644 --- a/crates/codegraph-parser/src/languages/mod.rs +++ b/crates/codegraph-parser/src/languages/mod.rs @@ -2,6 +2,7 @@ // ABOUTME: Provides unified extraction interface for all supported languages pub mod extractor_utils; +pub mod freepascal; pub mod javascript; pub mod python; pub mod rust; @@ -35,6 +36,7 @@ pub trait LanguageExtractor { // Re-export extractors for convenience pub use cpp::CppExtractor; pub use csharp::CSharpExtractor; +pub use freepascal::FreePascalExtractor; pub use go::GoExtractor; pub use java::JavaExtractor; pub use javascript::TypeScriptExtractor; @@ -96,6 +98,9 @@ pub fn extract_for_language( Language::Php => Some(::extract_with_edges( tree, content, file_path, )), + Language::FreePascal => Some( + ::extract_with_edges(tree, content, file_path), + ), // Languages without dedicated extractors yet _ => None, } diff --git a/crates/codegraph-vector/src/embedding.rs b/crates/codegraph-vector/src/embedding.rs index 7e99f13c..3fb2a46d 100644 --- a/crates/codegraph-vector/src/embedding.rs +++ b/crates/codegraph-vector/src/embedding.rs @@ -489,8 +489,44 @@ impl EmbeddingGenerator { "❌ 'lmstudio' feature is NOT ENABLED - cannot use LM Studio provider!" ); } + } else if provider == "onnx" { + #[cfg(feature = "onnx")] + { + use crate::embeddings::generator::{ + AdvancedEmbeddingGenerator, EmbeddingEngineConfig, OnnxConfigCompat, + }; + let mut cfg = EmbeddingEngineConfig::default(); + let model_repo = embedding_config + .model + .clone() + .unwrap_or_else(|| std::env::var("CODEGRAPH_LOCAL_MODEL").unwrap_or_default()); + tracing::info!( + "🚀 Initializing ONNX embedding provider with model: {}", + model_repo + ); + cfg.onnx = Some(OnnxConfigCompat { + model_repo: model_repo.clone(), + model_file: Some("model.onnx".into()), + max_sequence_length: 512, + pooling: "mean".into(), + }); + match AdvancedEmbeddingGenerator::new(cfg).await { + Ok(engine) => { + tracing::info!("✅ ONNX embedding provider initialized successfully (from config)"); + base.advanced = Some(Arc::new(engine)); + } + Err(e) => { + tracing::error!("❌ ONNX embedding provider failed to initialize: {}", e); + tracing::error!(" Model: {}", model_repo); + } + } + } + #[cfg(not(feature = "onnx"))] + { + tracing::error!("❌ 'onnx' feature is NOT ENABLED - cannot use ONNX provider!"); + } } - // Add other providers (ONNX, local, etc.) as needed following the same pattern + // Add other providers (local, etc.) as needed following the same pattern base } diff --git a/history.txt b/history.txt new file mode 100644 index 00000000..8af1eb39 --- /dev/null +++ b/history.txt @@ -0,0 +1,36 @@ +#V2 +DEFINE TABLE OVERWRITE nodes SCHEMALESS; +DEFINE TABLE OVERWRITE edges SCHEMALESS; +INFO FOR TABLE nodes; +SELECT count() FROM nodes GROUP ALL; +SELECT count() FROM chunks GROUP ALL; +SELECT project_id, count() FROM chunks GROUP BY project_id; +SELECT count() FROM nodes GROUP ALL; +DEFINE TABLE OVERWRITE project_metadata SCHEMALESS; +SELECT count() FROM nodes GROUP ALL; +SELECT count() FROM edges GROUP ALL; +SELECT count() FROM chunks GROUP ALL; +SELECT node_type, count() FROM nodes GROUP BY node_type ORDER BY count DESC LIMIT 10; +SELECT name, node_type, array::len(embedding_384) as emb_dim FROM nodes WHERE embedding_384 != NONE LIMIT 3; +LET $batch = [{ "id": "test-node-1", "name": "TestNode", "node_type": "function", "language": "rust", "content": "fn test() {}", "file_path": "/test.rs", "start_line": 1, "end_line": 3, "project_id": "test-project", "embedding_384": NONE, "embedding_model": "onnx", "complexity": 1.0, "metadata": {}, "organization_id": NONE, "repository_url": NONE, "domain": NONE, "chunk_count": 1 }]; +FOR $doc IN $batch { UPSERT type::record('nodes', $doc.id) SET name = $doc.name, node_type = $doc.node_type, language = $doc.language, content = $doc.content, file_path = $doc.file_path, start_line = $doc.start_line, end_line = $doc.end_line, embedding_384 = $doc.embedding_384, embedding_model = $doc.embedding_model, complexity = $doc.complexity, metadata = $doc.metadata, project_id = $doc.project_id, organization_id = $doc.organization_id, repository_url = $doc.repository_url, domain = $doc.domain, chunk_count = $doc.chunk_count, updated_at = time::now();}; +SELECT count() FROM nodes GROUP ALL; +INFO FOR TABLE nodes; +REMOVE FIELD metadata ON TABLE nodes; +SELECT count() FROM nodes GROUP ALL; +SELECT count() FROM file_hashes GROUP ALL; +SELECT count() FROM index_cache GROUP ALL; +INFO FOR DB; +SELECT count() FROM file_metadata GROUP ALL; +SELECT file_path, content_hash FROM file_metadata LIMIT 3; +DELETE file_metadata; +SELECT count() FROM file_metadata GROUP ALL; +SELECT count() FROM nodes GROUP ALL; +SELECT count() FROM edges GROUP ALL; +SELECT count() FROM chunks GROUP ALL; +SELECT name, node_type, array::len(embedding_384) AS emb_dim FROM nodes WHERE embedding_384 != NONE LIMIT 5; +SELECT count() FROM file_metadata GROUP ALL; +SELECT file_path FROM file_metadata WHERE file_path CONTAINS 'infer' LIMIT 5; +DELETE file_metadata WHERE file_path CONTAINS 'infer'; +SELECT count() FROM file_metadata GROUP ALL; +DELETE file_metadata WHERE file_path CONTAINS 'fpc-source'; diff --git a/patches/objc_exception/Cargo.toml b/patches/objc_exception/Cargo.toml new file mode 100644 index 00000000..c836d02d --- /dev/null +++ b/patches/objc_exception/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "objc_exception" +version = "0.1.2" +authors = ["Steven Sheldon"] +build = "build.rs" +exclude = [".gitignore"] +description = "Rust interface for Objective-C's throw and try/catch statements." +keywords = ["objective-c", "osx", "ios"] +license = "MIT" + +[build-dependencies] +cc = "1" diff --git a/patches/objc_exception/build.rs b/patches/objc_exception/build.rs new file mode 100644 index 00000000..cefb9144 --- /dev/null +++ b/patches/objc_exception/build.rs @@ -0,0 +1,11 @@ +extern crate cc; + +fn main() { + // Only compile Objective-C exception handling on Apple platforms + let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default(); + if target_os == "macos" || target_os == "ios" || target_os == "tvos" || target_os == "watchos" { + cc::Build::new() + .file("extern/exception.m") + .compile("libexception.a"); + } +} diff --git a/patches/objc_exception/extern/exception.m b/patches/objc_exception/extern/exception.m new file mode 100644 index 00000000..700439ec --- /dev/null +++ b/patches/objc_exception/extern/exception.m @@ -0,0 +1,21 @@ +#include +#include + +void RustObjCExceptionThrow(id exception) { + @throw exception; +} + +int RustObjCExceptionTryCatch(void (*try)(void *), void *context, id *error) { + @try { + try(context); + if (error) { + *error = nil; + } + return 0; + } @catch (id exception) { + if (error) { + *error = [exception retain]; + } + return 1; + } +} diff --git a/patches/objc_exception/src/lib.rs b/patches/objc_exception/src/lib.rs new file mode 100644 index 00000000..d381f60c --- /dev/null +++ b/patches/objc_exception/src/lib.rs @@ -0,0 +1,100 @@ +//! Rust interface for Objective-C's `@throw` and `@try`/`@catch` statements. + +use std::mem; +use std::os::raw::{c_int, c_void}; +use std::ptr; + +#[link(name = "objc", kind = "dylib")] +extern { } + +extern { + fn RustObjCExceptionThrow(exception: *mut c_void); + fn RustObjCExceptionTryCatch(try: extern fn(*mut c_void), + context: *mut c_void, error: *mut *mut c_void) -> c_int; +} + +/// An opaque type representing any Objective-C object thrown as an exception. +pub enum Exception { } + +/// Throws an Objective-C exception. +/// The argument must be a pointer to an Objective-C object. +/// +/// Unsafe because this unwinds from Objective-C. +pub unsafe fn throw(exception: *mut Exception) -> ! { + RustObjCExceptionThrow(exception as *mut _); + unreachable!(); +} + +unsafe fn try_no_ret(closure: F) -> Result<(), *mut Exception> + where F: FnOnce() { + extern fn try_objc_execute_closure(closure: &mut Option) + where F: FnOnce() { + // This is always passed Some, so it's safe to unwrap + let closure = closure.take().unwrap(); + closure(); + } + + let f: extern fn(&mut Option) = try_objc_execute_closure; + let f: extern fn(*mut c_void) = mem::transmute(f); + // Wrap the closure in an Option so it can be taken + let mut closure = Some(closure); + let context = &mut closure as *mut _ as *mut c_void; + + let mut exception = ptr::null_mut(); + let success = RustObjCExceptionTryCatch(f, context, &mut exception); + + if success == 0 { + Ok(()) + } else { + Err(exception as *mut _) + } +} + +/// Tries to execute the given closure and catches an Objective-C exception +/// if one is thrown. +/// +/// Returns a `Result` that is either `Ok` if the closure succeeded without an +/// exception being thrown, or an `Err` with a pointer to an exception if one +/// was thrown. The exception is retained and so must be released. +/// +/// Unsafe because this encourages unwinding through the closure from +/// Objective-C, which is not safe. +pub unsafe fn try(closure: F) -> Result + where F: FnOnce() -> R { + let mut value = None; + let result = { + let value_ref = &mut value; + try_no_ret(move || { + *value_ref = Some(closure()); + }) + }; + // If the try succeeded, this was set so it's safe to unwrap + result.map(|_| value.unwrap()) +} + +#[cfg(test)] +mod tests { + use std::ptr; + use super::{throw, try}; + + #[test] + fn test_try() { + unsafe { + let s = "Hello".to_string(); + let result = try(move || { + if s.len() > 0 { + throw(ptr::null_mut()); + } + s.len() + }); + assert!(result.unwrap_err() == ptr::null_mut()); + + let mut s = "Hello".to_string(); + let result = try(move || { + s.push_str(", World!"); + s + }); + assert!(result.unwrap() == "Hello, World!"); + } + } +} diff --git a/schema/codegraph.surql b/schema/codegraph.surql index 187a1890..cd10dbe6 100644 --- a/schema/codegraph.surql +++ b/schema/codegraph.surql @@ -11,13 +11,13 @@ OPTION IMPORT; -- Helper function to parse record IDs from various formats -- Handles: record IDs, "nodes:⟨uuid⟩", "nodes:id", "⟨uuid⟩", "id" DEFINE FUNCTION fn::parse_record_id($table: string, $input: any) { -IF type::is::record($input) { RETURN $input; }; +IF type::is_record($input) { RETURN $input; }; LET $str = $input; -- Strip table prefix if present (e.g., "nodes:" or "chunks:") LET $after_prefix = IF string::starts_with($str, $table + ':') THEN string::slice($str, string::len($table) + 1) ELSE $str END; -- Strip angle brackets ⟨⟩ if present (SurrealDB's escaping for complex IDs) LET $clean_id = IF string::starts_with($after_prefix, '⟨') AND string::ends_with($after_prefix, '⟩') THEN string::slice($after_prefix, 1, string::len($after_prefix) - 2) ELSE $after_prefix END; -RETURN type::thing($table, $clean_id); +RETURN type::record($table, $clean_id); } PERMISSIONS FULL; -- Calculate coupling metrics (afferent/efferent coupling, instability) -- FIXED: Added missing edge queries for dependents/dependencies @@ -275,7 +275,7 @@ LET $raw = (SELECT fn::node_info(id) AS node, dependency_depth FROM $min_depths) RETURN (SELECT node.id AS id, node.name AS name, node.kind AS kind, node.location AS location, node.language AS language, node.content AS content, node.metadata AS metadata, dependency_depth, $safe_depth AS requested_depth FROM $raw WHERE node != NONE); } PERMISSIONS FULL; DEFINE FUNCTION fn::node_info($node_id: any) { -IF $node_id = NONE OR !type::is::record($node_id) { RETURN NONE; }; +IF $node_id = NONE OR !type::is_record($node_id) { RETURN NONE; }; LET $res = (SELECT id AS id, name, node_type AS kind, language, content, metadata, { end_line: end_line, file_path: file_path, start_line: start_line } AS location FROM ONLY $node_id); RETURN $res; } PERMISSIONS FULL; @@ -755,18 +755,18 @@ DEFINE FUNCTION fn::get_complexity_hotspots($project_id: string, $min_complexity start_line, end_line, complexity, - (IF type::is::number(afferent_coupling) THEN afferent_coupling ELSE 0 END) AS afferent_coupling, - (IF type::is::number(efferent_coupling) THEN efferent_coupling ELSE 0 END) AS efferent_coupling, + (IF type::is_number(afferent_coupling) THEN afferent_coupling ELSE 0 END) AS afferent_coupling, + (IF type::is_number(efferent_coupling) THEN efferent_coupling ELSE 0 END) AS efferent_coupling, ( math::floor( ( - IF ((IF type::is::number(efferent_coupling) THEN efferent_coupling ELSE 0 END) + (IF type::is::number(afferent_coupling) THEN afferent_coupling ELSE 0 END)) > 0 { - (IF type::is::number(efferent_coupling) THEN efferent_coupling ELSE 0 END) / ((IF type::is::number(efferent_coupling) THEN efferent_coupling ELSE 0 END) + (IF type::is::number(afferent_coupling) THEN afferent_coupling ELSE 0 END)) + IF ((IF type::is_number(efferent_coupling) THEN efferent_coupling ELSE 0 END) + (IF type::is_number(afferent_coupling) THEN afferent_coupling ELSE 0 END)) > 0 { + (IF type::is_number(efferent_coupling) THEN efferent_coupling ELSE 0 END) / ((IF type::is_number(efferent_coupling) THEN efferent_coupling ELSE 0 END) + (IF type::is_number(afferent_coupling) THEN afferent_coupling ELSE 0 END)) } ELSE { 0f } ) * 10000f ) / 10000f ) AS instability, - complexity * ((IF type::is::number(afferent_coupling) THEN afferent_coupling ELSE 0 END) + 1) AS risk_score + complexity * ((IF type::is_number(afferent_coupling) THEN afferent_coupling ELSE 0 END) + 1) AS risk_score FROM $with_coupling ORDER BY risk_score DESC LIMIT $safe_limit; @@ -835,7 +835,7 @@ DEFINE TABLE edges TYPE NORMAL SCHEMAFULL COMMENT 'Code relationships (Calls, Im DEFINE FIELD created_at ON edges TYPE datetime DEFAULT time::now() READONLY PERMISSIONS FULL; DEFINE FIELD edge_type ON edges TYPE string PERMISSIONS FULL; DEFINE FIELD from ON edges TYPE record PERMISSIONS FULL; -DEFINE FIELD metadata ON edges FLEXIBLE TYPE option PERMISSIONS FULL; +DEFINE FIELD metadata ON edges TYPE option FLEXIBLE PERMISSIONS FULL; DEFINE FIELD to ON edges TYPE record PERMISSIONS FULL; DEFINE FIELD weight ON edges TYPE float DEFAULT 1f ASSERT $value > 0f PERMISSIONS FULL; DEFINE FIELD project_id ON edges TYPE option PERMISSIONS FULL; @@ -881,8 +881,8 @@ DEFINE INDEX idx_file_metadata_project ON file_metadata FIELDS project_id CONCUR DEFINE TABLE metadata TYPE NORMAL SCHEMAFULL PERMISSIONS FULL; -DEFINE FIELD `value` ON metadata FLEXIBLE TYPE option PERMISSIONS FULL; -DEFINE FIELD `value`[*] ON metadata FLEXIBLE TYPE any PERMISSIONS FULL; +DEFINE FIELD `value` ON metadata TYPE option FLEXIBLE PERMISSIONS FULL; +DEFINE FIELD `value`[*] ON metadata TYPE any PERMISSIONS FULL; DEFINE FIELD key ON metadata TYPE string PERMISSIONS FULL; DEFINE FIELD updated_at ON metadata TYPE datetime VALUE time::now() PERMISSIONS FULL; @@ -921,7 +921,7 @@ DEFINE FIELD embedding_model ON nodes TYPE option DEFAULT 'jina-embeddin DEFINE FIELD end_line ON nodes TYPE option PERMISSIONS FULL; DEFINE FIELD file_path ON nodes TYPE option PERMISSIONS FULL; DEFINE FIELD language ON nodes TYPE option PERMISSIONS FULL; -DEFINE FIELD metadata ON nodes FLEXIBLE TYPE option PERMISSIONS FULL; +DEFINE FIELD metadata ON nodes TYPE option FLEXIBLE PERMISSIONS FULL; DEFINE FIELD name ON nodes TYPE string PERMISSIONS FULL; DEFINE FIELD node_type ON nodes TYPE option PERMISSIONS FULL; DEFINE FIELD organization_id ON nodes TYPE option PERMISSIONS FULL; @@ -930,7 +930,7 @@ DEFINE FIELD repository_url ON nodes TYPE option PERMISSIONS FULL; DEFINE FIELD start_line ON nodes TYPE option PERMISSIONS FULL; DEFINE FIELD updated_at ON nodes TYPE datetime VALUE time::now() PERMISSIONS FULL; -DEFINE INDEX idx_nodes_content_search ON nodes FIELDS content SEARCH ANALYZER code_analyzer BM25(1.2,0.75) DOC_IDS_ORDER 100 DOC_LENGTHS_ORDER 100 POSTINGS_ORDER 100 TERMS_ORDER 100 DOC_IDS_CACHE 100 DOC_LENGTHS_CACHE 100 POSTINGS_CACHE 100 TERMS_CACHE 100 CONCURRENTLY; +-- [v3-compat] DEFINE INDEX idx_nodes_content_search ON nodes FIELDS content SEARCH ANALYZER code_analyzer BM25(1.2,0.75) CONCURRENTLY; DEFINE INDEX idx_nodes_embedding_384 ON nodes FIELDS embedding_384 HNSW DIMENSION 384 DIST COSINE TYPE F32 EFC 150 M 12 CONCURRENTLY; DEFINE INDEX idx_nodes_embedding_768 ON nodes FIELDS embedding_768 HNSW DIMENSION 768 DIST COSINE TYPE F32 EFC 150 M 12 CONCURRENTLY; DEFINE INDEX idx_nodes_embedding_1024 ON nodes FIELDS embedding_1024 HNSW DIMENSION 1024 DIST COSINE TYPE F32 EFC 150 M 12 CONCURRENTLY; @@ -945,7 +945,7 @@ DEFINE INDEX idx_nodes_project_file ON nodes FIELDS project_id, file_path CONCUR DEFINE INDEX idx_nodes_file_type ON nodes FIELDS file_path, node_type CONCURRENTLY; DEFINE INDEX idx_nodes_language ON nodes FIELDS language CONCURRENTLY; DEFINE INDEX idx_nodes_name ON nodes FIELDS name CONCURRENTLY; -DEFINE INDEX idx_nodes_name_search ON nodes FIELDS name SEARCH ANALYZER code_analyzer BM25(1.2,0.75) DOC_IDS_ORDER 100 DOC_LENGTHS_ORDER 100 POSTINGS_ORDER 100 TERMS_ORDER 100 DOC_IDS_CACHE 100 DOC_LENGTHS_CACHE 100 POSTINGS_CACHE 100 TERMS_CACHE 100 CONCURRENTLY; +-- [v3-compat] DEFINE INDEX idx_nodes_name_search ON nodes FIELDS name SEARCH ANALYZER code_analyzer BM25(1.2,0.75) CONCURRENTLY; DEFINE INDEX idx_nodes_project ON nodes FIELDS project_id CONCURRENTLY; DEFINE INDEX idx_nodes_project_type ON nodes FIELDS project_id, node_type CONCURRENTLY; DEFINE INDEX idx_nodes_type ON nodes FIELDS node_type CONCURRENTLY; @@ -960,10 +960,11 @@ DEFINE TABLE project_metadata TYPE NORMAL SCHEMAFULL COMMENT 'Project registry w DEFINE FIELD codegraph_version ON project_metadata TYPE option PERMISSIONS FULL; DEFINE FIELD created_at ON project_metadata TYPE datetime DEFAULT time::now() READONLY PERMISSIONS FULL; DEFINE FIELD domain ON project_metadata TYPE option PERMISSIONS FULL; +DEFINE FIELD avg_coverage_score ON project_metadata TYPE float DEFAULT 0.0 PERMISSIONS FULL; DEFINE FIELD edge_count ON project_metadata TYPE int DEFAULT 0 PERMISSIONS FULL; DEFINE FIELD file_count ON project_metadata TYPE int DEFAULT 0 PERMISSIONS FULL; DEFINE FIELD last_analyzed ON project_metadata TYPE option PERMISSIONS FULL; -DEFINE FIELD metadata ON project_metadata FLEXIBLE TYPE option PERMISSIONS FULL; +DEFINE FIELD metadata ON project_metadata TYPE option FLEXIBLE PERMISSIONS FULL; DEFINE FIELD name ON project_metadata TYPE string PERMISSIONS FULL; DEFINE FIELD node_count ON project_metadata TYPE int DEFAULT 0 PERMISSIONS FULL; DEFINE FIELD organization_id ON project_metadata TYPE option PERMISSIONS FULL; @@ -1020,7 +1021,7 @@ DEFINE FIELD embedding_4096 ON symbol_embeddings TYPE option> ASSER DEFINE FIELD embedding_4096[*] ON symbol_embeddings TYPE float PERMISSIONS FULL; DEFINE FIELD embedding_model ON symbol_embeddings TYPE string DEFAULT 'jina-embeddings-v4' PERMISSIONS FULL; DEFINE FIELD last_computed_at ON symbol_embeddings TYPE datetime DEFAULT time::now() READONLY PERMISSIONS FULL; -DEFINE FIELD metadata ON symbol_embeddings FLEXIBLE TYPE option PERMISSIONS FULL; +DEFINE FIELD metadata ON symbol_embeddings TYPE option FLEXIBLE PERMISSIONS FULL; DEFINE FIELD node_id ON symbol_embeddings TYPE option> PERMISSIONS FULL; DEFINE FIELD normalized_symbol ON symbol_embeddings TYPE string PERMISSIONS FULL; DEFINE FIELD organization_id ON symbol_embeddings TYPE option PERMISSIONS FULL; diff --git a/schema/codegraph_graph_experimental.surql b/schema/codegraph_graph_experimental.surql index b6e503b7..8ad674ed 100644 --- a/schema/codegraph_graph_experimental.surql +++ b/schema/codegraph_graph_experimental.surql @@ -350,7 +350,7 @@ LET $str = $input; LET $after_prefix = IF string::starts_with($str, $table + ':') THEN string::slice($str, string::len($table) + 1) ELSE $str END; -- Strip angle brackets ⟨⟩ if present (SurrealDB's escaping for complex IDs) LET $clean_id = IF string::starts_with($after_prefix, '⟨') AND string::ends_with($after_prefix, '⟩') THEN string::slice($after_prefix, 1, string::len($after_prefix) - 2) ELSE $after_prefix END; -RETURN type::thing($table, $clean_id); +RETURN type::record($table, $clean_id); } PERMISSIONS FULL; -- Calculate coupling metrics (afferent/efferent coupling, instability) diff --git a/schema/history.txt b/schema/history.txt new file mode 100644 index 00000000..469e881d --- /dev/null +++ b/schema/history.txt @@ -0,0 +1,10 @@ +#V2 +-- ------------------------------ +-- OPTION +-- ------------------------------ +OPTION IMPORT; +-- ------------------------------ +-- FUNCTIONS +-- ------------------------------ +-- Helper function to parse record IDs from various formats +-- Handles: record IDs, "nodes:⟨uuid⟩", "nodes:id", "⟨uuid⟩", "id" diff --git a/setup-surrealdb-service.sh b/setup-surrealdb-service.sh new file mode 100755 index 00000000..4bf375a6 --- /dev/null +++ b/setup-surrealdb-service.sh @@ -0,0 +1,193 @@ +#!/usr/bin/env bash +# setup-surrealdb-service.sh +# Install SurrealDB, configure it as a systemd user service, and load the CodeGraph schema. +# +# No Docker, no root required. Runs as a user-level service that starts on login +# (and on boot via loginctl linger). +# +# Usage: bash setup-surrealdb-service.sh + +set -euo pipefail + +# --------------------------------------------------------------------------- +# Config — must match codegraph-mcp.sh and ~/.codegraph/config.toml +# --------------------------------------------------------------------------- +SURREAL_PORT=8529 +SURREAL_USER=root +SURREAL_PASS=root +SURREAL_NS=codegraph +SURREAL_DB=main +SURREAL_DATA_DIR="$HOME/.codegraph/surreal.db" +SURREAL_LOG_DIR="$HOME/.local/share/surrealdb" +SERVICE_NAME=surrealdb-codegraph +SCHEMA_FILE="$(dirname "$(realpath "$0")")/schema/codegraph.surql" +INSTALL_DIR="$HOME/.local/bin" + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- +info() { echo -e "\033[1;32m[✓]\033[0m $*"; } +warn() { echo -e "\033[1;33m[!]\033[0m $*"; } +error() { echo -e "\033[1;31m[✗]\033[0m $*" >&2; exit 1; } +step() { echo -e "\n\033[1;34m──────────────────────────────\033[0m"; echo -e "\033[1;34m $*\033[0m"; echo -e "\033[1;34m──────────────────────────────\033[0m"; } + +# --------------------------------------------------------------------------- +# Step 1: Install SurrealDB binary +# --------------------------------------------------------------------------- +step "1/5 Installing SurrealDB" + +mkdir -p "$INSTALL_DIR" + +if command -v surreal &>/dev/null; then + SURREAL_BIN=$(command -v surreal) + info "SurrealDB already installed at $SURREAL_BIN ($(surreal version 2>/dev/null | head -1))" +else + info "Downloading SurrealDB via official installer..." + # Official install script puts binary in ~/.surrealdb/surreal + curl -sSf https://install.surrealdb.com | sh 2>&1 | tail -5 + + # Find where it landed and symlink to ~/.local/bin + if [ -f "$HOME/.surrealdb/surreal" ]; then + ln -sf "$HOME/.surrealdb/surreal" "$INSTALL_DIR/surreal" + info "Symlinked to $INSTALL_DIR/surreal" + elif [ -f "/usr/local/bin/surreal" ]; then + info "Installed at /usr/local/bin/surreal" + else + error "SurrealDB binary not found after install. Try: curl -sSf https://install.surrealdb.com | sh" + fi +fi + +# Resolve final binary path +SURREAL_BIN=$(command -v surreal 2>/dev/null || echo "$HOME/.surrealdb/surreal") +[ -x "$SURREAL_BIN" ] || error "surreal binary not executable at $SURREAL_BIN" +info "Using binary: $SURREAL_BIN ($("$SURREAL_BIN" version 2>/dev/null | head -1))" + +# --------------------------------------------------------------------------- +# Step 2: Prepare directories +# --------------------------------------------------------------------------- +step "2/5 Preparing data and log directories" + +mkdir -p "$SURREAL_DATA_DIR" +mkdir -p "$SURREAL_LOG_DIR" +info "Data: $SURREAL_DATA_DIR" +info "Logs: $SURREAL_LOG_DIR/surrealdb.log" + +# --------------------------------------------------------------------------- +# Step 3: Create systemd user service +# --------------------------------------------------------------------------- +step "3/5 Creating systemd user service: $SERVICE_NAME" + +SERVICE_DIR="$HOME/.config/systemd/user" +mkdir -p "$SERVICE_DIR" + +cat > "$SERVICE_DIR/$SERVICE_NAME.service" </dev/null; then + info "Linger enabled for $USER (service will auto-start at boot)" +else + warn "Could not enable linger (may need sudo). Service will start on login only." +fi + +systemctl --user daemon-reload +systemctl --user enable "$SERVICE_NAME" +systemctl --user restart "$SERVICE_NAME" + +# Wait for healthy +info "Waiting for SurrealDB on port $SURREAL_PORT..." +MAX_WAIT=20 +ELAPSED=0 +until curl -sf "http://127.0.0.1:$SURREAL_PORT/health" &>/dev/null; do + if [ "$ELAPSED" -ge "$MAX_WAIT" ]; then + error "SurrealDB did not become healthy within ${MAX_WAIT}s. Check logs: $SURREAL_LOG_DIR/surrealdb.log" + fi + sleep 1 + ELAPSED=$((ELAPSED + 1)) +done +info "SurrealDB healthy (${ELAPSED}s)" + +# --------------------------------------------------------------------------- +# Step 5: Load CodeGraph schema +# --------------------------------------------------------------------------- +step "5/5 Loading CodeGraph schema" + +[ -f "$SCHEMA_FILE" ] || error "Schema file not found: $SCHEMA_FILE" + +HTTP_RESPONSE=$(curl -sf \ + -X POST "http://127.0.0.1:$SURREAL_PORT/import" \ + -H "Authorization: Basic $(echo -n "$SURREAL_USER:$SURREAL_PASS" | base64)" \ + -H "surreal-ns: $SURREAL_NS" \ + -H "surreal-db: $SURREAL_DB" \ + -H "Content-Type: application/octet-stream" \ + --data-binary "@$SCHEMA_FILE" \ + 2>&1) || true + +if echo "$HTTP_RESPONSE" | grep -qi "error"; then + warn "Schema load returned warnings (may be OK if re-running): $HTTP_RESPONSE" +else + info "Schema loaded successfully into $SURREAL_NS/$SURREAL_DB" +fi + +# --------------------------------------------------------------------------- +# Done +# --------------------------------------------------------------------------- +echo "" +echo -e "\033[1;32m╔══════════════════════════════════════════════╗\033[0m" +echo -e "\033[1;32m║ SurrealDB is running and schema is loaded ║\033[0m" +echo -e "\033[1;32m╚══════════════════════════════════════════════╝\033[0m" +echo "" +echo " Endpoint : ws://127.0.0.1:$SURREAL_PORT" +echo " Namespace: $SURREAL_NS Database: $SURREAL_DB" +echo " Auth : $SURREAL_USER / $SURREAL_PASS" +echo " Data : $SURREAL_DATA_DIR" +echo " Logs : $SURREAL_LOG_DIR/surrealdb.log" +echo "" +echo " Service commands:" +echo " systemctl --user status $SERVICE_NAME" +echo " systemctl --user restart $SERVICE_NAME" +echo " systemctl --user stop $SERVICE_NAME" +echo " journalctl --user -u $SERVICE_NAME -f" +echo "" +echo " Next step — re-index the catalyst repo:" +echo " CODEGRAPH_SURREALDB_URL=ws://127.0.0.1:$SURREAL_PORT \\" +echo " CODEGRAPH_SURREALDB_USERNAME=$SURREAL_USER \\" +echo " CODEGRAPH_SURREALDB_PASSWORD=$SURREAL_PASS \\" +echo " CODEGRAPH_SURREALDB_NAMESPACE=$SURREAL_NS \\" +echo " CODEGRAPH_SURREALDB_DATABASE=$SURREAL_DB \\" +echo " CODEGRAPH_EMBEDDING_PROVIDER=onnx \\" +echo " /home/sash/projects/research/codegraph-rust/target/release/codegraph \\" +echo " index /home/sash/projects/incap/catalyst --index-tier balanced --workers 2"