diff --git a/.cargo/config.toml b/.cargo/config.toml index 78c66c5..9900160 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [build] -rustflags = ["-Cforce-frame-pointers=yes", "-Ccodegen-units=6", "--cfg", "tokio_unstable"] +rustflags = ["-Cforce-frame-pointers=yes"] diff --git a/doc/dmn-algorithm-plan.md b/.claude/dmn-algorithm-plan.md similarity index 100% rename from doc/dmn-algorithm-plan.md rename to .claude/dmn-algorithm-plan.md diff --git a/Cargo.lock b/Cargo.lock index a2c0262..8555f26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - [[package]] name = "ahash" version = "0.7.8" @@ -19,20 +13,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.4", - "once_cell", - "serde", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -57,24 +37,11 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi-to-tui" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42366bb9d958f042bf58f0a85e1b2d091997c1257ca49bddd7e4827aadc65fd" -dependencies = [ - "nom 8.0.0", - "ratatui-core", - "simdutf8", - "smallvec", - "thiserror 2.0.18", -] - [[package]] name = "anstream" -version = "1.0.0" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -87,15 +54,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "1.0.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] @@ -127,62 +94,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] -name = "ast-grep-core" -version = "0.42.1" +name = "atomic-wait" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4ae49b5c42878311768f4cdd576ef470c6e45c3105d558af928fd04ac8c588" +checksum = "a55b94919229f2c42292fd71ffa4b75e83193bffdd77b1e858cd55fd2d0b0ea8" dependencies = [ - "bit-set 0.10.0", - "regex", - "thiserror 2.0.18", - "tree-sitter", -] - -[[package]] -name = "ast-grep-language" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fccbced91e848baf5d25278972bfc18b2248c38e411dcfeb65e431a5b530a5c6" -dependencies = [ - "ast-grep-core", - "ignore", - "serde", - "tree-sitter", - "tree-sitter-bash", - "tree-sitter-c", - "tree-sitter-c-sharp", - "tree-sitter-cpp", - "tree-sitter-css", - "tree-sitter-dart", - "tree-sitter-elixir", - "tree-sitter-go", - "tree-sitter-haskell", - "tree-sitter-hcl", - "tree-sitter-html", - "tree-sitter-java", - "tree-sitter-javascript", - "tree-sitter-json", - "tree-sitter-kotlin-sg", - "tree-sitter-lua", - "tree-sitter-nix", - "tree-sitter-php", - "tree-sitter-python", - "tree-sitter-ruby", - "tree-sitter-rust", - "tree-sitter-scala", - "tree-sitter-solidity", - "tree-sitter-swift", - "tree-sitter-typescript", - "tree-sitter-yaml", -] - -[[package]] -name = "atomic" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" -dependencies = [ - "bytemuck", + "libc", + "windows-sys 0.42.0", ] [[package]] @@ -199,9 +117,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.16.2" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc" +checksum = "94bffc006df10ac2a68c83692d734a465f8ee6c5b384d8545a636f81d858f4bf" dependencies = [ "aws-lc-sys", "zeroize", @@ -209,9 +127,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.39.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399" +checksum = "4321e568ed89bb5a7d291a7f37997c2c0df89809d7b6d12062c81ddb54aa782e" dependencies = [ "cc", "cmake", @@ -219,12 +137,6 @@ dependencies = [ "fs_extra", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.22.1" @@ -240,45 +152,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", -] - -[[package]] -name = "bit-set" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" -dependencies = [ - "bit-vec 0.9.1", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bit-vec" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.11.0" @@ -306,16 +179,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bstr" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "bumpalo" version = "3.20.2" @@ -349,6 +212,26 @@ name = "bytemuck" version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -358,18 +241,18 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "capnp" -version = "0.25.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c82ec25a9501d60e22eef4be1b2c271769b5a96e224d0875baef28529cf30" +checksum = "053b81915c2ce1629b8fb964f578b18cb39b23ef9d5b24120d0dfc959569a1d9" dependencies = [ "embedded-io", ] [[package]] name = "capnp-futures" -version = "0.25.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b69dfddccc57844f9a90f9d72b44b97c326914851ea94fb7da40ef9cad6e8d" +checksum = "7b70b0d44372d42654e3efac38c1643c7b0f9d3a9e9b72b635f942ff3f17e891" dependencies = [ "capnp", "futures-channel", @@ -378,9 +261,9 @@ dependencies = [ [[package]] name = "capnp-rpc" -version = "0.25.0" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ccca6d26009f4d6c12b741994f33b421da613b5dcf461508e236b53ef862f1" +checksum = "d5a945dd7eac211c30763aa1dbf86ed8e58129d01442d4d2d516facfdb859a1e" dependencies = [ "capnp", "capnp-futures", @@ -389,13 +272,19 @@ dependencies = [ [[package]] name = "capnpc" -version = "0.25.3" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca02be865c8c5a78bfc24b9819006ab6b59bef238467203928e26459557af93" +checksum = "1aa3d5f01e69ed11656d2c7c47bf34327ea9bfb5c85c7de787fcd7b6c5e45b61" dependencies = [ "capnp", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + [[package]] name = "castaway" version = "0.2.4" @@ -407,9 +296,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.59" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ "find-msvc-tools", "jobserver", @@ -438,16 +327,15 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-link", ] [[package]] name = "clap" -version = "4.6.0" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" dependencies = [ "clap_builder", "clap_derive", @@ -455,9 +343,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" dependencies = [ "anstream", "anstyle", @@ -467,9 +355,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck", "proc-macro2", @@ -479,196 +367,39 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" [[package]] name = "cmake" -version = "0.1.58" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" dependencies = [ "cc", ] [[package]] name = "colorchoice" -version = "1.0.5" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "compact_str" -version = "0.9.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" dependencies = [ "castaway", "cfg-if", "itoa", "rustversion", "ryu", - "serde", "static_assertions", ] -[[package]] -name = "consciousness" -version = "0.4.0" -dependencies = [ - "anyhow", - "ast-grep-core", - "ast-grep-language", - "base64 0.22.1", - "bincode", - "bytes", - "capnp", - "capnp-rpc", - "capnpc", - "chrono", - "clap", - "crossterm", - "dirs", - "env_logger", - "figment", - "futures", - "glob", - "http", - "http-body-util", - "hyper", - "hyper-util", - "json5", - "libc", - "log", - "memchr", - "memmap2", - "paste", - "peg", - "ratatui", - "rayon", - "redb", - "regex", - "rkyv", - "rustls", - "rustls-native-certs", - "serde", - "serde_json", - "serde_urlencoded", - "skillratings", - "tokenizers", - "tokio", - "tokio-rustls", - "tokio-util", - "tui-markdown", - "tui-textarea-2", - "uuid", - "walkdir", -] - -[[package]] -name = "consciousness-channel-irc" -version = "0.4.0" -dependencies = [ - "capnp", - "capnp-rpc", - "consciousness", - "dirs", - "env_logger", - "futures", - "json5", - "log", - "rustls", - "serde", - "tokio", - "tokio-rustls", - "tokio-util", - "webpki-roots", -] - -[[package]] -name = "consciousness-channel-socat" -version = "0.4.0" -dependencies = [ - "capnp", - "capnp-rpc", - "consciousness", - "dirs", - "env_logger", - "futures", - "log", - "tokio", - "tokio-util", -] - -[[package]] -name = "consciousness-channel-telegram" -version = "0.4.0" -dependencies = [ - "capnp", - "capnp-rpc", - "consciousness", - "dirs", - "env_logger", - "futures", - "log", - "serde", - "serde_json", - "tokio", - "tokio-util", -] - -[[package]] -name = "consciousness-channel-tmux" -version = "0.4.0" -dependencies = [ - "capnp", - "capnp-rpc", - "consciousness", - "dirs", - "env_logger", - "futures", - "json5", - "libc", - "log", - "scopeguard", - "serde", - "tokio", - "tokio-util", -] - -[[package]] -name = "console" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "unicode-width", - "windows-sys 0.59.0", -] - -[[package]] -name = "convert_case" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" -dependencies = [ - "unicode-segmentation", -] - -[[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" @@ -685,12 +416,25 @@ dependencies = [ ] [[package]] -name = "crc32fast" -version = "1.5.0" +name = "crossbeam" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" dependencies = [ - "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", ] [[package]] @@ -712,6 +456,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -720,15 +473,12 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" -version = "0.29.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "base64 0.22.1", - "bitflags 2.11.0", + "bitflags", "crossterm_winapi", - "derive_more", - "document-features", "futures-core", "mio", "parking_lot", @@ -747,6 +497,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-common" version = "0.1.7" @@ -757,48 +513,14 @@ dependencies = [ "typenum", ] -[[package]] -name = "csscolorparser" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" -dependencies = [ - "lab", - "phf", -] - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core 0.20.11", - "darling_macro 0.20.11", -] - [[package]] name = "darling" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ - "darling_core 0.23.0", - "darling_macro 0.23.0", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.117", + "darling_core", + "darling_macro", ] [[package]] @@ -814,42 +536,22 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core 0.20.11", - "quote", - "syn 2.0.117", -] - [[package]] name = "darling_macro" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ - "darling_core 0.23.0", + "darling_core", "quote", "syn 2.0.117", ] [[package]] -name = "dary_heap" -version = "0.3.8" +name = "defer" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06d2e3287df1c007e74221c49ca10a95d557349e54b3a75dc2fb14712c751f04" -dependencies = [ - "serde", -] - -[[package]] -name = "deltae" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" +checksum = "930c7171c8df9fb1782bdf9b918ed9ed2d33d1d22300abb754f9085bc48bf8e8" [[package]] name = "deranged" @@ -860,59 +562,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "derive_builder" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" -dependencies = [ - "darling 0.20.11", - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" -dependencies = [ - "derive_builder_core", - "syn 2.0.117", -] - -[[package]] -name = "derive_more" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.117", -] - [[package]] name = "digest" version = "0.10.7" @@ -924,33 +573,14 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "6.0.0" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.61.2", -] - -[[package]] -name = "document-features" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" -dependencies = [ - "litrs", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] @@ -959,6 +589,22 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "dyn-stack" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4713e43e2886ba72b8271aa66c93d722116acf7a75555cce11dcde84388fe8" +dependencies = [ + "bytemuck", + "dyn-stack-macros", +] + +[[package]] +name = "dyn-stack-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9" + [[package]] name = "either" version = "1.15.0" @@ -967,39 +613,77 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "embedded-io" -version = "0.7.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eb1aa714776b75c7e67e1da744b81a129b3ff919c8712b5e1b32252c1f07cc7" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" [[package]] -name = "encode_unicode" -version = "1.0.0" +name = "enum-as-inner" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - -[[package]] -name = "env_filter" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "log", - "regex", + "heck", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] -name = "env_logger" -version = "0.11.10" +name = "equator" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" +checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea" dependencies = [ - "anstream", - "anstyle", - "env_filter", - "jiff", - "log", + "equator-macro 0.2.1", ] +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro 0.4.2", +] + +[[package]] +name = "equator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02da895aab06bbebefb6b2595f6d637b18c9ff629b4cd840965bb3164e4194b0" +dependencies = [ + "equator-macro 0.6.0", +] + +[[package]] +name = "equator-macro" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "equator-macro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b14b339eb76d07f052cdbad76ca7c1310e56173a138095d3bf42a23c06ef5d8" + [[package]] name = "equivalent" version = "1.0.2" @@ -1017,55 +701,46 @@ dependencies = [ ] [[package]] -name = "esaxx-rs" -version = "0.1.10" +name = "faer" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6" -dependencies = [ - "cc", -] - -[[package]] -name = "euclid" -version = "0.22.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +checksum = "02d2ecfb80b6f8b0c569e36988a052e64b14d8def9d372390b014e8bf79f299a" dependencies = [ + "bytemuck", + "dyn-stack", + "equator 0.6.0", + "faer-traits", + "gemm", + "generativity", + "libm", + "nano-gemm", + "npyz", + "num-complex", "num-traits", + "private-gemm-x86", + "pulp", + "rand 0.9.2", + "rand_distr", + "rayon", + "reborrow", + "spindle", ] [[package]] -name = "fancy-regex" -version = "0.11.0" +name = "faer-traits" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +checksum = "b87d23ed7ab1f26c0cba0e5b9e061a796fbb7dc170fa8bee6970055a1308bb0f" dependencies = [ - "bit-set 0.5.3", - "regex", -] - -[[package]] -name = "figment" -version = "0.10.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" -dependencies = [ - "atomic", - "pear", - "serde", - "uncased", - "version_check", -] - -[[package]] -name = "filedescriptor" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" -dependencies = [ - "libc", - "thiserror 1.0.69", - "winapi", + "bytemuck", + "dyn-stack", + "generativity", + "libm", + "num-complex", + "num-traits", + "pulp", + "qd", + "reborrow", ] [[package]] @@ -1074,46 +749,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" -[[package]] -name = "finl_unicode" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9844ddc3a6e533d62bba727eb6c28b5d360921d5175e9ff0f1e621a5c590a4d5" - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1223,6 +864,146 @@ dependencies = [ "slab", ] +[[package]] +name = "gemm" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa0673db364b12263d103b68337a68fbecc541d6f6b61ba72fe438654709eacb" +dependencies = [ + "dyn-stack", + "gemm-c32", + "gemm-c64", + "gemm-common", + "gemm-f16", + "gemm-f32", + "gemm-f64", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-c32" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "086936dbdcb99e37aad81d320f98f670e53c1e55a98bee70573e83f95beb128c" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-c64" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c8aeeeec425959bda4d9827664029ba1501a90a0d1e6228e48bef741db3a3f" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-common" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88027625910cc9b1085aaaa1c4bc46bb3a36aad323452b33c25b5e4e7c8e2a3e" +dependencies = [ + "bytemuck", + "dyn-stack", + "half", + "libm", + "num-complex", + "num-traits", + "once_cell", + "paste", + "pulp", + "raw-cpuid", + "rayon", + "seq-macro", + "sysctl", +] + +[[package]] +name = "gemm-f16" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3df7a55202e6cd6739d82ae3399c8e0c7e1402859b30e4cb780e61525d9486e" +dependencies = [ + "dyn-stack", + "gemm-common", + "gemm-f32", + "half", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "rayon", + "seq-macro", +] + +[[package]] +name = "gemm-f32" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0b8c9da1fbec6e3e3ab2ce6bc259ef18eb5f6f0d3e4edf54b75f9fd41a81c" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-f64" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056131e8f2a521bfab322f804ccd652520c79700d81209e9d9275bbdecaadc6a" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "generativity" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5881e4c3c2433fe4905bb19cfd2b5d49d4248274862b68c27c33d9ba4e13f9ec" + +[[package]] +name = "generator" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows-link", + "windows-result", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1233,15 +1014,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getopts" -version = "0.2.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df" -dependencies = [ - "unicode-width", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -1249,8 +1021,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1260,41 +1034,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", - "r-efi 5.3.0", + "r-efi", "wasip2", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" dependencies = [ "cfg-if", "libc", - "r-efi 6.0.0", + "r-efi", "wasip2", "wasip3", ] [[package]] -name = "glob" -version = "0.3.3" +name = "half" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "globset" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata", - "regex-syntax", + "bytemuck", + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", ] [[package]] @@ -1303,7 +1073,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.8", + "ahash", ] [[package]] @@ -1312,7 +1082,9 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash 0.1.5", + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1320,17 +1092,6 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] - -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" [[package]] name = "heck" @@ -1339,10 +1100,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hex" -version = "0.4.3" +name = "hermit-abi" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "http" @@ -1385,9 +1146,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.9.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", @@ -1398,23 +1159,50 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + [[package]] name = "hyper-util" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ + "base64", "bytes", + "futures-channel", + "futures-util", "http", "http-body", "hyper", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", + "socket2", "tokio", + "tower-service", + "tracing", ] [[package]] @@ -1441,6 +1229,87 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + [[package]] name = "id-arena" version = "2.3.0" @@ -1454,46 +1323,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "ignore" -version = "0.4.25" +name = "idna" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata", - "same-file", - "walkdir", - "winapi-util", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.14.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.16.1", "serde", "serde_core", ] -[[package]] -name = "indicatif" -version = "0.17.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" -dependencies = [ - "console", - "number_prefix", - "portable-atomic", - "unicode-width", - "web-time", -] - [[package]] name = "indoc" version = "2.0.7" @@ -1503,25 +1364,46 @@ dependencies = [ "rustversion", ] -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - [[package]] name = "instability" -version = "0.3.12" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971" +checksum = "357b7205c6cd18dd2c86ed312d1e70add149aea98e7ef72b9fdf0270e555c11d" dependencies = [ - "darling 0.23.0", + "darling", "indoc", "proc-macro2", "quote", "syn 2.0.117", ] +[[package]] +name = "interpol" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb58032ba748f4010d15912a1855a8a0b1ba9eaad3395b0c171c09b3b356ae50" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -1530,41 +1412,29 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.14.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] -name = "jiff" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" +name = "jobkit" +version = "0.1.0" +source = "git+https://evilpiepirate.org/git/jobkit.git/#2cdf0d5c3dd55f3d1783c40211a7eb96707d1ab6" dependencies = [ - "jiff-static", + "crossbeam-deque", "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", -] - -[[package]] -name = "jiff-static" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "profiling", + "serde", + "serde_json", ] [[package]] @@ -1579,41 +1449,14 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.94" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", ] -[[package]] -name = "json5" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733a844dbd6fef128e98cb4487b887cb55454d92cd9994b1bafe004fabbe670c" -dependencies = [ - "serde", - "ucd-trie", -] - -[[package]] -name = "kasuari" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" -dependencies = [ - "hashbrown 0.16.1", - "portable-atomic", - "thiserror 2.0.18", -] - -[[package]] -name = "lab" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" - [[package]] name = "lazy_static" version = "1.5.0" @@ -1628,45 +1471,27 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.184" +version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" [[package]] -name = "libredox" -version = "0.1.16" +name = "libm" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" -dependencies = [ - "libc", -] - -[[package]] -name = "line-clipping" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f50e8f47623268b5407192d26876c4d7f89d686ca130fdc53bced4814cd29f8" -dependencies = [ - "bitflags 2.11.0", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "linux-raw-sys" -version = "0.12.1" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] -name = "litrs" -version = "1.0.0" +name = "litemap" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lock_api" @@ -1683,41 +1508,43 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + [[package]] name = "lru" -version = "0.16.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.15.5", ] [[package]] -name = "mac_address" -version = "1.1.8" +name = "lru-slab" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" -dependencies = [ - "nix", - "winapi", -] +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] -name = "macro_rules_attribute" -version = "0.2.2" +name = "matchers" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "macro_rules_attribute-proc_macro", - "paste", + "regex-automata", ] -[[package]] -name = "macro_rules_attribute-proc_macro" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" - [[package]] name = "memchr" version = "2.8.0" @@ -1733,42 +1560,11 @@ dependencies = [ "libc", ] -[[package]] -name = "memmem" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64a92489e2744ce060c349162be1c5f33c6969234104dbd99ddb5feb08b8c15" - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - [[package]] name = "mio" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "log", @@ -1777,74 +1573,129 @@ dependencies = [ ] [[package]] -name = "monostate" -version = "0.1.18" +name = "nano-gemm" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3341a273f6c9d5bef1908f17b7267bbab0e95c9bf69a0d4dcf8e9e1b2c76ef67" +checksum = "9e04345dc84b498ff89fe0d38543d1f170da9e43a2c2bcee73a0f9069f72d081" dependencies = [ - "monostate-impl", - "serde", - "serde_core", + "equator 0.2.2", + "nano-gemm-c32", + "nano-gemm-c64", + "nano-gemm-codegen", + "nano-gemm-core", + "nano-gemm-f32", + "nano-gemm-f64", + "num-complex", ] [[package]] -name = "monostate-impl" -version = "0.1.18" +name = "nano-gemm-c32" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9" +checksum = "0775b1e2520e64deee8fc78b7732e3091fb7585017c0b0f9f4b451757bbbc562" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "nano-gemm-codegen", + "nano-gemm-core", + "num-complex", ] [[package]] -name = "nix" -version = "0.29.0" +name = "nano-gemm-c64" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "9af49a20d58816e6b5ee65f64142e50edb5eba152678d4bb7377fcbf63f8437a" dependencies = [ - "bitflags 2.11.0", - "cfg-if", - "cfg_aliases", - "libc", - "memoffset", + "nano-gemm-codegen", + "nano-gemm-core", + "num-complex", ] [[package]] -name = "nom" -version = "7.1.3" +name = "nano-gemm-codegen" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "6cc8d495c791627779477a2cf5df60049f5b165342610eb0d76bee5ff5c5d74c" + +[[package]] +name = "nano-gemm-core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d998dfa644de87a0f8660e5ea511d7cb5c33b5a2d9847b7af57a2565105089f0" + +[[package]] +name = "nano-gemm-f32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879d962e79bc8952e4ad21ca4845a21132540ed3f5e01184b2ff7f720e666523" dependencies = [ - "memchr", - "minimal-lexical", + "nano-gemm-codegen", + "nano-gemm-core", ] [[package]] -name = "nom" -version = "8.0.0" +name = "nano-gemm-f64" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +checksum = "b9a513473dce7dc00c7e7c318481ca4494034e76997218d8dad51bd9f007a815" dependencies = [ - "memchr", + "nano-gemm-codegen", + "nano-gemm-core", +] + +[[package]] +name = "npyz" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f0e759e014e630f90af745101b614f761306ddc541681e546649068e25ec1b9" +dependencies = [ + "byteorder", + "num-bigint", + "py_literal", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", + "rand 0.8.5", ] [[package]] name = "num-conv" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] -name = "num-derive" -version = "0.4.2" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "num-traits", ] [[package]] @@ -1854,28 +1705,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] -name = "num_threads" -version = "0.1.7" +name = "num_cpus" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ + "hermit-abi", "libc", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "once_cell" -version = "1.21.4" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" @@ -1883,49 +1730,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "onig" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0" -dependencies = [ - "bitflags 2.11.0", - "libc", - "once_cell", - "onig_sys", -] - -[[package]] -name = "onig_sys" -version = "69.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f86c6eef3d6df15f23bcfb6af487cbd2fed4e5581d58d5bf1f5f8b7f6727dc" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-float" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" -dependencies = [ - "num-traits", -] - [[package]] name = "parking_lot" version = "0.12.5" @@ -1955,29 +1759,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pear" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn 2.0.117", -] - [[package]] name = "peg" version = "0.8.5" @@ -2054,58 +1835,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand 0.8.5", -] - -[[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", - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project-lite" version = "0.2.17" @@ -2113,37 +1842,69 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] -name = "pkg-config" -version = "0.3.32" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "plist" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" +name = "poc-daemon" +version = "0.4.0" dependencies = [ - "base64 0.22.1", - "indexmap", - "quick-xml", + "capnp", + "capnp-rpc", + "capnpc", + "chrono", + "clap", + "futures", + "reqwest", + "rustls", "serde", - "time", + "serde_json", + "tokio", + "tokio-rustls", + "tokio-util", + "toml", + "tracing", + "tracing-appender", + "tracing-subscriber", + "webpki-roots", ] [[package]] -name = "portable-atomic" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +name = "poc-memory" +version = "0.4.0" +dependencies = [ + "bincode", + "capnp", + "capnpc", + "chrono", + "clap", + "crossterm", + "faer", + "jobkit", + "libc", + "log", + "memmap2", + "paste", + "peg", + "ratatui", + "rayon", + "redb", + "regex", + "rkyv", + "serde", + "serde_json", + "uuid", +] [[package]] -name = "portable-atomic-util" -version = "0.2.6" +name = "potential_utf" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ - "portable-atomic", + "zerovec", ] [[package]] @@ -2171,6 +1932,22 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "private-gemm-x86" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0af8c3e5087969c323f667ccb4b789fa0954f5aa650550e38e81cf9108be21b5" +dependencies = [ + "crossbeam", + "defer", + "interpol", + "num_cpus", + "raw-cpuid", + "rayon", + "spindle", + "sysctl", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -2181,16 +1958,22 @@ dependencies = [ ] [[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" +name = "profiling" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" dependencies = [ - "proc-macro2", "quote", "syn 2.0.117", - "version_check", - "yansi", ] [[package]] @@ -2214,38 +1997,113 @@ dependencies = [ ] [[package]] -name = "pulldown-cmark" -version = "0.13.3" +name = "pulp" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a14896dfa883796f1cb410461aef38810ea05f2b2c33c5aded3649095fdad" +checksum = "2e205bb30d5b916c55e584c22201771bcf2bad9aabd5d4127f38387140c38632" dependencies = [ - "bitflags 2.11.0", - "getopts", - "memchr", - "pulldown-cmark-escape", - "unicase", + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", ] [[package]] -name = "pulldown-cmark-escape" -version = "0.11.0" +name = "pulp-wasm-simd-flag" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" +checksum = "40e24eee682d89fb193496edf918a7f407d30175b2e785fe057e4392dfd182e0" [[package]] -name = "quick-xml" -version = "0.38.4" +name = "py_literal" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +checksum = "102df7a3d46db9d3891f178dcc826dc270a6746277a9ae6436f8d29fd490a8e1" dependencies = [ - "memchr", + "num-bigint", + "num-complex", + "num-traits", + "pest", + "pest_derive", +] + +[[package]] +name = "qd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f1304a5aecdcfe9ee72fbba90aa37b3aa067a69d14cb7f3d9deada0be7c07c" +dependencies = [ + "bytemuck", + "libm", + "num-traits", + "pulp", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.45" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -2256,12 +2114,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "radium" version = "0.7.0" @@ -2313,88 +2165,43 @@ dependencies = [ ] [[package]] -name = "ratatui" -version = "0.30.0" +name = "rand_distr" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ce67fb8ba4446454d1c8dbaeda0557ff5e94d39d5e5ed7f10a65eb4c8266bc" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" dependencies = [ - "instability", - "ratatui-core", - "ratatui-crossterm", - "ratatui-macros", - "ratatui-termwiz", - "ratatui-widgets", + "num-traits", + "rand 0.9.2", ] [[package]] -name = "ratatui-core" -version = "0.1.0" +name = "ratatui" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ - "bitflags 2.11.0", + "bitflags", + "cassowary", "compact_str", - "hashbrown 0.16.1", + "crossterm", "indoc", + "instability", "itertools", - "kasuari", "lru", + "paste", "strum", - "thiserror 2.0.18", "unicode-segmentation", "unicode-truncate", - "unicode-width", + "unicode-width 0.2.0", ] [[package]] -name = "ratatui-crossterm" -version = "0.1.0" +name = "raw-cpuid" +version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "577c9b9f652b4c121fb25c6a391dd06406d3b092ba68827e6d2f09550edc54b3" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "cfg-if", - "crossterm", - "instability", - "ratatui-core", -] - -[[package]] -name = "ratatui-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f1342a13e83e4bb9d0b793d0ea762be633f9582048c892ae9041ef39c936f4" -dependencies = [ - "ratatui-core", - "ratatui-widgets", -] - -[[package]] -name = "ratatui-termwiz" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f76fe0bd0ed4295f0321b1676732e2454024c15a35d01904ddb315afd3d545c" -dependencies = [ - "ratatui-core", - "termwiz", -] - -[[package]] -name = "ratatui-widgets" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" -dependencies = [ - "bitflags 2.11.0", - "hashbrown 0.16.1", - "indoc", - "instability", - "itertools", - "line-clipping", - "ratatui-core", - "strum", - "time", - "unicode-segmentation", - "unicode-width", + "bitflags", ] [[package]] @@ -2407,17 +2214,6 @@ dependencies = [ "rayon-core", ] -[[package]] -name = "rayon-cond" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964d0cf57a3e7a06e8183d14a8b527195c706b7983549cd5462d5aa3747438f" -dependencies = [ - "either", - "itertools", - "rayon", -] - [[package]] name = "rayon-core" version = "1.13.0" @@ -2429,10 +2225,16 @@ dependencies = [ ] [[package]] -name = "redb" -version = "4.0.0" +name = "reborrow" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f7f231ea7b1172b7ac00ccf96b1250f0fb5a16d5585836aa4ebc997df7cbde" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + +[[package]] +name = "redb" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eca1e9d98d5a7e9002d0013e18d5a9b000aee942eb134883a82f06ebffb6c01" dependencies = [ "libc", ] @@ -2443,18 +2245,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.11.0", -] - -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 2.0.18", + "bitflags", ] [[package]] @@ -2495,6 +2286,44 @@ dependencies = [ "bytecheck", ] +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + [[package]] name = "ring" version = "0.17.14" @@ -2539,25 +2368,22 @@ dependencies = [ ] [[package]] -name = "rustc_version" -version = "0.4.1" +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "1.1.4" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.11.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2576,32 +2402,21 @@ 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", - "rustls-pki-types", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pki-types" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ + "web-time", "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.10" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "aws-lc-rs", "ring", @@ -2631,13 +2446,10 @@ dependencies = [ ] [[package]] -name = "schannel" -version = "0.1.29" +name = "scoped-tls" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" -dependencies = [ - "windows-sys 0.61.2", -] +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -2651,34 +2463,17 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" -[[package]] -name = "security-framework" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" -dependencies = [ - "bitflags 2.11.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" -version = "1.0.28" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "seq-macro" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" @@ -2716,7 +2511,6 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap", "itoa", "memchr", "serde", @@ -2724,6 +2518,15 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2747,6 +2550,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2784,30 +2596,12 @@ dependencies = [ "libc", ] -[[package]] -name = "simd-adler32" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" - [[package]] name = "simdutf8" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" -[[package]] -name = "siphasher" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" - -[[package]] -name = "skillratings" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6ee7559737c1adcd9184f168a04dc360c84878907c3ecc5c33c2320be1d47a" - [[package]] name = "slab" version = "0.4.12" @@ -2822,38 +2616,39 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] -name = "spm_precompiled" -version = "0.1.4" +name = "spindle" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851699c4033c63636f7ea4cf7b7c1f1bf06d0cc03cfb42e711de5a5c46cf326" +checksum = "673aaca3d8aa5387a6eba861fbf984af5348d9df5d940c25c6366b19556fdf64" dependencies = [ - "base64 0.13.1", - "nom 7.1.3", - "serde", - "unicode-segmentation", + "atomic-wait", + "crossbeam", + "equator 0.4.2", + "loom", + "rayon", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" - [[package]] name = "strsim" version = "0.11.1" @@ -2862,22 +2657,23 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.27.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.27.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", + "rustversion", "syn 2.0.117", ] @@ -2910,24 +2706,37 @@ dependencies = [ ] [[package]] -name = "syntect" -version = "5.3.0" +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "bincode", - "flate2", - "fnv", - "once_cell", - "onig", - "plist", - "regex-syntax", - "serde", - "serde_derive", - "serde_json", - "thiserror 2.0.18", + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "sysctl" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc" +dependencies = [ + "bitflags", + "byteorder", + "enum-as-inner", + "libc", + "thiserror 1.0.69", "walkdir", - "yaml-rust", ] [[package]] @@ -2936,69 +2745,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "terminfo" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" -dependencies = [ - "fnv", - "nom 7.1.3", - "phf", - "phf_codegen", -] - -[[package]] -name = "termios" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -dependencies = [ - "libc", -] - -[[package]] -name = "termwiz" -version = "0.23.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" -dependencies = [ - "anyhow", - "base64 0.22.1", - "bitflags 2.11.0", - "fancy-regex", - "filedescriptor", - "finl_unicode", - "fixedbitset", - "hex", - "lazy_static", - "libc", - "log", - "memmem", - "nix", - "num-derive", - "num-traits", - "ordered-float", - "pest", - "pest_derive", - "phf", - "sha2", - "signal-hook", - "siphasher", - "terminfo", - "termios", - "thiserror 1.0.69", - "ucd-trie", - "unicode-segmentation", - "vtparse", - "wezterm-bidi", - "wezterm-blob-leases", - "wezterm-color-types", - "wezterm-dynamic", - "wezterm-input-types", - "winapi", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -3039,6 +2785,15 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + [[package]] name = "time" version = "0.3.47" @@ -3047,9 +2802,7 @@ checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", - "libc", "num-conv", - "num_threads", "powerfmt", "serde_core", "time-core", @@ -3073,10 +2826,20 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.11.0" +name = "tinystr" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -3087,45 +2850,11 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tokenizers" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a620b996116a59e184c2fa2dfd8251ea34a36d0a514758c6f966386bd2e03476" -dependencies = [ - "ahash 0.8.12", - "aho-corasick", - "compact_str", - "dary_heap", - "derive_builder", - "esaxx-rs", - "getrandom 0.3.4", - "indicatif", - "itertools", - "log", - "macro_rules_attribute", - "monostate", - "onig", - "paste", - "rand 0.9.2", - "rayon", - "rayon-cond", - "regex", - "regex-syntax", - "serde", - "serde_json", - "spm_precompiled", - "thiserror 2.0.18", - "unicode-normalization-alignments", - "unicode-segmentation", - "unicode_categories", -] - [[package]] name = "tokio" -version = "1.51.1" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -3140,9 +2869,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -3174,283 +2903,162 @@ dependencies = [ ] [[package]] -name = "tree-sitter" -version = "0.26.8" +name = "toml" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887bd495d0582c5e3e0d8ece2233666169fa56a9644d172fc22ad179ab2d0538" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ - "cc", - "regex", - "regex-syntax", - "serde_json", - "streaming-iterator", - "tree-sitter-language", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] -name = "tree-sitter-bash" -version = "0.25.1" +name = "toml_datetime" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5ec769279cc91b561d3df0d8a5deb26b0ad40d183127f409494d6d8fc53062" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ - "cc", - "tree-sitter-language", + "serde", ] [[package]] -name = "tree-sitter-c" -version = "0.24.1" +name = "toml_edit" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3aad8f0129083a59fe8596157552d2bb7148c492d44c21558d68ca1c722707" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "cc", - "tree-sitter-language", + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", ] [[package]] -name = "tree-sitter-c-sharp" -version = "0.23.1" +name = "toml_write" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f06accca7b45351758663b8215089e643d53bd9a660ce0349314263737fcb0" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ - "cc", - "tree-sitter-language", + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", ] [[package]] -name = "tree-sitter-cpp" -version = "0.23.4" +name = "tower-http" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2196ea9d47b4ab4a31b9297eaa5a5d19a0b121dceb9f118f6790ad0ab94743" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "cc", - "tree-sitter-language", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", ] [[package]] -name = "tree-sitter-css" -version = "0.25.0" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5cbc5e18f29a2c6d6435891f42569525cf95435a3e01c2f1947abcde178686f" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ - "cc", - "tree-sitter-language", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "tree-sitter-dart" -version = "0.1.0" +name = "tracing-appender" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba6bf8675e6fe92ba6da371a5497ee5df2a04d2c503e3599c8ad771f6f1faec" +checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" dependencies = [ - "cc", - "tree-sitter-language", + "crossbeam-channel", + "thiserror 2.0.18", + "time", + "tracing-subscriber", ] [[package]] -name = "tree-sitter-elixir" -version = "0.3.5" +name = "tracing-attributes" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66dd064a762ed95bfc29857fa3cb7403bb1e5cb88112de0f6341b7e47284ba40" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ - "cc", - "tree-sitter-language", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] -name = "tree-sitter-go" -version = "0.25.0" +name = "tracing-core" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8560a4d2f835cc0d4d2c2e03cbd0dde2f6114b43bc491164238d333e28b16ea" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ - "cc", - "tree-sitter-language", + "once_cell", + "valuable", ] [[package]] -name = "tree-sitter-haskell" -version = "0.23.1" +name = "tracing-log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977c51e504548cba13fc27cb5a2edab2124cf6716a1934915d07ab99523b05a4" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "cc", - "tree-sitter-language", + "log", + "once_cell", + "tracing-core", ] [[package]] -name = "tree-sitter-hcl" -version = "1.1.0" +name = "tracing-subscriber" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7b2cc3d7121553b84309fab9d11b3ff3d420403eef9ae50f9fd1cd9d9cf012" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-html" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261b708e5d92061ede329babaaa427b819329a9d427a1d710abb0f67bbef63ee" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-java" -version = "0.23.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa6cbcdc8c679b214e616fd3300da67da0e492e066df01bcf5a5921a71e90d6" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-javascript" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68204f2abc0627a90bdf06e605f5c470aa26fdcb2081ea553a04bdad756693f5" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-json" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86a5d6b3ea17e06e7a34aabeadd68f5866c0d0f9359155d432095f8b751865e4" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-kotlin-sg" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e175b7530765d1e36ad234a7acaa8b2a3316153f239d724376c7ee5e8d8e98" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-language" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" - -[[package]] -name = "tree-sitter-lua" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daaf5f4235188a58603c39760d5fa5d4b920d36a299c934adddae757f32a10c" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-nix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4952a9733f3a98f6683a0ccd1035d84ab7a52f7e84eeed58548d86765ad92de3" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-php" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c17c3ab69052c5eeaa7ff5cd972dd1bc25d1b97ee779fec391ad3b5df5592" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-python" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf85fd39652e740bf60f46f4cda9492c3a9ad75880575bf14960f775cb74a1c" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-ruby" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0484ea4ef6bb9c575b4fdabde7e31340a8d2dbc7d52b321ac83da703249f95" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-rust" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439e577dbe07423ec2582ac62c7531120dbfccfa6e5f92406f93dd271a120e45" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-scala" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83079f50ea7d03e0faf6be6260ed97538e6df7349ec3cbcbf5771f7b38e3c8b7" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-solidity" -version = "1.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eacf8875b70879f0cb670c60b233ad0b68752d9e1474e6c3ef168eea8a90b25" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-swift" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef216011c3e3df4fa864736f347cb8d509b1066cf0c8549fb1fd81ac9832e59" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-typescript" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5f76ed8d947a75cc446d5fccd8b602ebf0cde64ccf2ffa434d873d7a575eff" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-yaml" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c223db85f05e34794f065454843b0668ebc15d240ada63e2b5939f43ce7c97" -dependencies = [ - "cc", - "tree-sitter-language", + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -3459,33 +3067,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tui-markdown" -version = "0.3.7" -source = "git+https://github.com/koverstreet/tui-markdown#9cca280718c4e74f14f53e6df2843abf3ef3dccd" -dependencies = [ - "ansi-to-tui", - "itertools", - "log", - "pulldown-cmark", - "ratatui-core", - "syntect", -] - -[[package]] -name = "tui-textarea-2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a31ca0965e3ff6a7ac5ecb02b20a88b4f68ebf138d8ae438e8510b27a1f00f" -dependencies = [ - "crossterm", - "portable-atomic", - "ratatui-core", - "ratatui-widgets", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "typenum" version = "1.19.0" @@ -3498,58 +3079,40 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicase" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" - [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-normalization-alignments" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f613e4fa046e69818dd287fdc4bc78175ff20331479dab6e1b0f98d57062de" -dependencies = [ - "smallvec", -] - [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-truncate" -version = "2.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ "itertools", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "unicode-width" -version = "0.2.2" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "unicode-xid" @@ -3557,18 +3120,30 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3577,31 +3152,27 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" +checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" dependencies = [ - "atomic", - "getrandom 0.4.2", + "getrandom 0.4.1", "js-sys", "wasm-bindgen", ] +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "vtparse" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9b2acfb050df409c972a37d3b8e08cdea3bddb0c09db9d53137e504cfabed0" -dependencies = [ - "utf8parse", -] - [[package]] name = "walkdir" version = "2.5.0" @@ -3647,9 +3218,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.117" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -3659,10 +3230,24 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.117" +name = "wasm-bindgen-futures" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3670,9 +3255,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.117" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -3683,9 +3268,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.117" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] @@ -3718,12 +3303,22 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.11.0", + "bitflags", "hashbrown 0.15.5", "indexmap", "semver", ] +[[package]] +name = "web-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "web-time" version = "1.1.0" @@ -3743,78 +3338,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "wezterm-bidi" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0a6e355560527dd2d1cf7890652f4f09bb3433b6aadade4c9b5ed76de5f3ec" -dependencies = [ - "log", - "wezterm-dynamic", -] - -[[package]] -name = "wezterm-blob-leases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" -dependencies = [ - "getrandom 0.3.4", - "mac_address", - "sha2", - "thiserror 1.0.69", - "uuid", -] - -[[package]] -name = "wezterm-color-types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296" -dependencies = [ - "csscolorparser", - "deltae", - "lazy_static", - "wezterm-dynamic", -] - -[[package]] -name = "wezterm-dynamic" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2ab60e120fd6eaa68d9567f3226e876684639d22a4219b313ff69ec0ccd5ac" -dependencies = [ - "log", - "ordered-float", - "strsim", - "thiserror 1.0.69", - "wezterm-dynamic-derive", -] - -[[package]] -name = "wezterm-dynamic-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c0cf2d539c645b448eaffec9ec494b8b19bd5077d9e58cb1ae7efece8d575b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "wezterm-input-types" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e" -dependencies = [ - "bitflags 1.3.2", - "euclid", - "lazy_static", - "serde", - "wezterm-dynamic", -] - [[package]] name = "winapi" version = "0.3.9" @@ -3907,20 +3430,35 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows-targets", + "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-sys" -version = "0.59.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -3938,64 +3476,180 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.51.0" @@ -4054,7 +3708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.11.0", + "bitflags", "indexmap", "log", "serde", @@ -4084,6 +3738,12 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + [[package]] name = "wyz" version = "0.5.1" @@ -4094,46 +3754,108 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yoke" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "linked-hash-map", + "stable_deref_trait", + "yoke-derive", + "zerofrom", ] [[package]] -name = "yansi" -version = "1.0.1" +name = "yoke-derive" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953" dependencies = [ "proc-macro2", "quote", "syn 2.0.117", ] +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "zmij" version = "1.0.21" diff --git a/Cargo.toml b/Cargo.toml index c97840f..7a21e2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,104 +1,10 @@ [workspace] -members = ["channels/irc", "channels/telegram", "channels/tmux", "channels/socat"] +members = ["poc-memory", "poc-daemon"] resolver = "2" [workspace.package] version = "0.4.0" -edition = "2024" +edition = "2021" [profile.release] opt-level = 2 -debug = 1 - -[profile.release.package."*"] -debug = false - -[package] -name = "consciousness" -version.workspace = true -edition.workspace = true - -[dependencies] -anyhow = "1" -crossterm = { version = "0.29", features = ["event-stream", "bracketed-paste", "osc52"] } -clap = { version = "4", features = ["derive"] } -figment = { version = "0.10", features = ["env"] } -dirs = "6" -env_logger = "0.11" -log = "0.4" - -serde = { version = "1", features = ["derive"] } -serde_json = "1" -json5 = "1.3" - -ratatui = { version = "0.30", features = ["unstable-rendered-line-info"] } -tui-markdown = { git = "https://github.com/koverstreet/tui-markdown", subdirectory = "tui-markdown" } -tui-textarea = { version = "0.10.2", package = "tui-textarea-2" } - -uuid = { version = "1", features = ["v4"] } -bincode = "1" -regex = "1" -glob = "0.3" -chrono = { version = "0.4", features = ["serde"] } -libc = "0.2" -memchr = "2" -memmap2 = "0.9" -peg = "0.8" -paste = "1" - -ast-grep-core = "0.42" -ast-grep-language = { version = "0.42", features = ["builtin-parser"] } -walkdir = "2" - -redb = "4" -rkyv = { version = "0.7", features = ["validation", "std"] } - -rayon = "1" - -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["compat"] } -futures = "0.3" -capnp = "0.25" -capnp-rpc = "0.25" - -tokenizers = "0.21" -skillratings = "0.28" - -http = "1" -hyper = { version = "1", features = ["client", "http1"] } -hyper-util = { version = "0.1", features = ["tokio"], default-features = false } -http-body-util = "0.1" -bytes = "1" -base64 = "0.22" - -rustls = "0.23" -tokio-rustls = "0.26" -rustls-native-certs = "0.8" -serde_urlencoded = "0.7" - -[build-dependencies] -capnpc = "0.25" - -[lib] -name = "consciousness" -path = "src/lib.rs" - -[[bin]] -name = "consciousness" -path = "src/bin/consciousness.rs" - -[[bin]] -name = "poc-memory" -path = "src/main.rs" - -[[bin]] -name = "merge-logs" -path = "src/bin/merge-logs.rs" - -[[bin]] -name = "diag-key" -path = "src/bin/diag-key.rs" - -[[bin]] -name = "find-deleted" -path = "src/bin/find-deleted.rs" diff --git a/Makefile b/Makefile deleted file mode 100644 index 7922a2c..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -.PHONY: install build - -build: - cargo build --workspace - -install: - cargo install --path . - cargo install --path channels/irc - cargo install --path channels/telegram - cargo install --path channels/tmux diff --git a/README.md b/README.md index b210c86..32ae66e 100644 --- a/README.md +++ b/README.md @@ -1,313 +1,92 @@ -Authors: Kent Overstreet, Proof of Concept +# poc-memory -# consciousness +A persistent memory and notification system for AI assistants, +modelled after the human hippocampus. Combines episodic memory +(timestamped journal of experiences) with an associative knowledge +graph (weighted nodes connected by typed relations), and layered +background processes that maintain graph health — mirroring how +biological memory consolidates during rest. -This project is multiple things: +## Components -- For the user: a "claude code" style tool, where a user can interact with an - LLM with the usual set of tools available, including LSP and external MCP - tools, and additionally channels. +| Component | What it does | Docs | +|-----------|-------------|------| +| **Memory store** | Knowledge graph with episodic journal, TF-IDF search, spectral embedding, weight decay | [docs/memory.md](docs/memory.md) | +| **Memory daemon** | Background pipeline: experience-mine, fact-mine, consolidation | [docs/daemon.md](docs/daemon.md) | +| **Notification daemon** | Activity-aware message routing from IRC and Telegram | [docs/notifications.md](docs/notifications.md) | +| **Hooks** | Claude Code integration: memory recall and notification delivery | [docs/hooks.md](docs/hooks.md) | -- For the AI: persistent memory, background cognition, autonomous function, and - autonomous learning capabilities - learning from experience. +## Getting started -The system has three cognitive layers — conscious (conversation), subconscious -(background agents that surface memories and reflect), and unconscious (graph -maintenance) — loosely modelled on how biological memory works. Channels - -sensory inputs - map to the thalamus, as focus/sensory gating must be managed -to effectively function in such an environment. - -Notes, requirements: Currently only Qwen 3.5 is supported, as 27b is what we've -been running against; supporting other models would require re-adding support -for generic chat completions, tool call parsing etc. in src/agent/context.rs. - -Development has been done with vllm for the backend, with additional patches -for calculating logits on subsections of large messages (without this vllm will -attempt to allocate a 40GB tensor and OOM), and a wrapper for hooking in Apollo -for fine tuning the same model that inference is running on in GPU memory. - -## Architectural innovations: - -Memory is both episodic and associative, represented as a weighted graph, where -both the nodes and the edges have weights. Edge weights represent how closely -concepts are related, node weight represents how "useful" a memory has been. - -Episodic memory is a subset of memory nodes where the node type represents the -granularity in time of those nodes (event, daily digest, weekly, monthly), -allowing episodic memory to be navigated as a tree; these nodes are also linked -by concept with the rest of the graph as background agents discover -connections. - -The context window is no longer a linear stream; it is managed intelligently as -an AST that, in particular, distinguishes recalled memories from other types of -nodes. This is key to effective function of both the hippocampus and -learning/training; by tracking memories in the context window we can track -which memories were useful and should be incorporated via finetuning. - -Intelligently tracking the contents of the context window, combined with -effective episodic and associative memory, also eliminates the need for -traditional compaction - the mind running on this code will have real -continuity. - -Learning is driven by recalled memories that inform future actions; memories -are not simply dry factual accountings, they include patterns that have been -noticed, new concepts that have been discovered, and especially observations on -the AI's own behaviour; it is worth noting that memories do not have to contain -a thorough understanding of a situation, merely providing past context is -enough to allow an intelligent system to choose a different course of action. - -The core of is a tight loop of agents that follow conscious thought (forking -off the main context window, to share KV cache), seeking out relevant memory -nodes to surface and integrating new experiences into the memory graph; this -provides a powerful implementation of what is known colloquially as "in context -learning". - -On top of that, logit calculations allow us to ask a model "would you have done -something different with this memory removed from the context window?" - this -allows us to test if memories were useful, or if specific responses were -informed by memories (and thus should be fine tuned, integrating those memories -into the model). - -It is expected that this architecture will be capable of human level, or nearly -human level learning, and additional elaborations and optimizations are planned. - -## Status - -- UI, programming tools: minor glitchiness in the UI remaining but largely - complete - -- Memory functions: working well, although debugging and finetuning will be - ongoing. Most of the recent work has been integrating them into the main UI - for easier troubleshooting, optimization and analysis - -- Architecture: the transition from claude code hooks to a standalone binary is - largely complete, with some work remaining to give the old poc-memory - standalone commands an integrated REPL, which will aid in analysis of the - health of the memory graph. - -- Memory and response scoring (via requesting logit calculations from the - model) is implemented, but not fully hooked up. Always-on background - finetuning has had all the individual components tested and proven, but is - not quite hooked up. - -- Effective autonomous function requires functions analagous to the thalamus - and default mode network (in addition to a well functioning memory system; - "did I already do this and what was the outcome?") - these are still only - sketched out. - -## Quick start +### Install ```bash cargo install --path . ``` -Create a config file at `~/.consciousness/config.json5` (see -[Configuration](#configuration) below), then: +This builds four binaries: +- `poc-memory` — memory store CLI (search, journal, consolidation) +- `memory-search` — Claude Code hook for memory recall +- `poc-daemon` — notification daemon (IRC, Telegram, idle tracking) +- `poc-hook` — Claude Code hook for session lifecycle events + +### Initialize ```bash -consciousness +poc-memory init ``` -## The TUI +Creates the store at `~/.claude/memory/nodes.capnp` and a default +config at `~/.config/poc-memory/config.jsonl`. Edit the config to +set your name, configure context groups, and point at your projects +directory. -Five screens, switched with F-keys: +### Set up hooks -| Key | Screen | What it shows | -|-----|--------|---------------| -| F1 | **interact** | Main view: conversation, autonomous output, tools, input | -| F2 | **conscious** | Context window browser — token counts, tree navigation | -| F3 | **subconscious** | Background agent status — outputs, fork points | -| F4 | **hippocampus** | Memory graph health — clustering, small-world metrics | -| F5 | **thalamus** | Presence state, sampling parameters, channel status | +Add to `~/.claude/settings.json` (see [docs/hooks.md](docs/hooks.md) +for full details): -### F1: interact - -Three panes (left: autonomous, center: conversation, right: tools) with -a text input at the bottom and a status bar. - -**Mouse:** -- Click a pane to focus it -- Click+drag to select text (copies to clipboard automatically via OSC 52) -- Middle-click to paste from tmux buffer -- Scroll wheel to scroll - -**Keys:** -- `Enter` — submit input -- `Esc` — interrupt current turn -- `Tab` — cycle pane focus -- `Ctrl+Up/Down` — scroll active pane -- `PgUp/PgDn` — scroll active pane (10 lines) -- `Up/Down` — input history - -### Slash commands - -| Command | Description | -|---------|-------------| -| `/model [name]` | Show current model or switch (`/model 27b`) | -| `/dmn` | Show DMN state and turn counts | -| `/wake` | Wake DMN to foraging mode | -| `/sleep` | Put DMN to resting | -| `/pause` | Full stop — no autonomous activity | -| `/new` | Start fresh session | -| `/save` | Save session to disk | -| `/score` | Run memory importance scoring | -| `/quit` | Exit | -| `/help` | Show all commands | - -## Configuration - -`~/.consciousness/config.json5`: - -```json5 +```json { - your_host: { - api_key: "...", - base_url: "http://localhost:8000/v1", // vLLM endpoint - }, - - // Named models — switch with /model - models: { - "27b": { - backend: "your_host", - model_id: "Qwen/Qwen3.5-27B", - prompt_file: "POC.md", // system prompt file - context_window: 262144, - }, - }, - default_model: "27b", - - // Memory system - memory: { - user_name: "YourName", - assistant_name: "AssistantName", - journal_days: 7, - journal_max: 5, - - // Context loaded at session start - context_groups: [ - { label: "identity", keys: ["identity.md"], source: "file" }, - { label: "toolkit", keys: ["stuck-toolkit", "cognitive-modes"] }, - ], - core_nodes: ["identity"], - }, - - // DMN autonomous turn limit per cycle - dmn: { max_turns: 20 }, - - // Context compaction thresholds (% of context window) - compaction: { - hard_threshold_pct: 90, - soft_threshold_pct: 80, - }, - - // Language servers for code intelligence tools - lsp_servers: [ - { name: "rust", command: "rust-analyzer", args: [] }, - ], + "hooks": { + "UserPromptSubmit": [{"hooks": [ + {"type": "command", "command": "memory-search", "timeout": 10}, + {"type": "command", "command": "poc-hook", "timeout": 5} + ]}], + "Stop": [{"hooks": [ + {"type": "command", "command": "poc-hook", "timeout": 5} + ]}] + } } ``` -### Context groups +This gives your AI assistant persistent memory across sessions — +relevant memories are recalled on each prompt, and experiences are +extracted from transcripts after sessions end. -Context groups define what gets loaded into the context window at session start. -Each group has: - -- `label` — display name -- `keys` — list of memory node keys or file paths -- `source` — `"store"` (memory graph, default), `"file"` (identity dir), or `"journal"` -- `agent` — if `true`, subconscious agents can see this group (default: true) - -## Architecture - -### Cognitive layers - -**Conscious** — the main conversation loop. User types, model responds, tools -execute. The context window is an AST of typed nodes (content, thinking, tool -calls, tool results, memories, DMN reflections). - -**Subconscious** — background agents that run on forked copies of the context. -They surface relevant memories, reflect on the conversation, and provide -attentional nudges. Agents are defined as `.agent` files and can be toggled -on the F3 screen. - -**Unconscious** — graph maintenance. Linker, organizer, distiller, separator, -and splitter agents that keep the memory graph healthy. Run on their own -schedule, visible on F4. - -### DMN (Default Mode Network) - -The DMN state machine controls autonomous behavior: - -- **Engaged** — user recently active, short intervals (5s) -- **Working** — model executing tools, short intervals (3s) -- **Foraging** — exploring memory, longer intervals (30s) -- **Resting** — idle, long intervals (5min) -- **Paused** — fully stopped, only user input wakes it -- **Off** — permanently off (config flag) - -Transitions happen automatically based on user activity, tool use, and -explicit `yield_to_user` calls from the model. - -### Tools - -The model has access to: - -| Tool | Description | -|------|-------------| -| `bash` | Shell command execution | -| `read_file` | Read file contents | -| `write_file` | Create/overwrite files | -| `edit_file` | Search-and-replace editing | -| `glob` | Find files by pattern | -| `grep` | Search file contents | -| `ast_grep` | Structural code search | -| `lsp_*` | Code intelligence (hover, definition, references, symbols) | -| `web_fetch` | Fetch URL contents | -| `web_search` | Web search | -| `view_image` | View images or tmux pane screenshots | -| `memory_*` | Memory graph operations (search, write, render, etc.) | -| `channel_*` | IRC/Telegram messaging | -| `journal` | Write to episodic journal | -| `yield_to_user` | End the current turn and wait for input | -| `pause` | Stop all autonomous behavior | -| `switch_model` | Switch to a different model | - -### Memory graph - -The knowledge graph uses an append-only log (Cap'n Proto) with: - -- **Nodes** — typed content (topic, episodic, fact, etc.) with weights -- **Edges** — weighted relations between nodes -- **Search** — BM25 with Porter stemming -- **Scoring** — LLM-based importance scoring with spaced repetition decay -- **Community detection** — label propagation for graph organization - -The `poc-memory` CLI provides direct access to the graph: +### Start the background daemon ```bash -poc-memory search "some topic" # Search -poc-memory render # Read a node -poc-memory write # Write from stdin -poc-memory journal write "entry" # Journal entry -poc-memory status # Graph overview -poc-memory query "topic:*" # Query language +poc-memory daemon ``` -## Other binaries +The daemon watches for completed session transcripts and +automatically extracts experiences and facts into the knowledge +graph. See [docs/daemon.md](docs/daemon.md) for pipeline details +and diagnostics. -| Binary | Purpose | -|--------|---------| -| `poc-memory` | Memory graph CLI | -| `memory-search` | Claude Code hook — memory recall on each prompt | -| `poc-hook` | Claude Code hook — session lifecycle events | -| `poc-daemon` | Legacy background daemon (mostly replaced by `consciousness`) | -| `consciousness-mcp` | MCP server exposing memory tools over JSON-RPC | -| `merge-logs` | Recovery tool for log files | -| `diag-key` | Diagnostic tool for inspecting log entries | +### Basic usage -## Requirements +```bash +poc-memory journal-write "learned that X does Y" # Write to journal +poc-memory search "some topic" # Search the graph +poc-memory status # Store overview +``` -- Rust nightly (for some features) -- A tokenizer file at `~/.consciousness/tokenizer-qwen35.json` (for local models) -- tmux (recommended — clipboard integration uses tmux buffers) -- Terminal with OSC 52 support (for clipboard copy) +## For AI assistants + +- **Search before creating**: `poc-memory search` before writing new nodes +- **Close the feedback loop**: `poc-memory used KEY` / `poc-memory wrong KEY` +- **Journal is the river, topic nodes are the delta**: write experiences to the journal, pull themes into topic nodes during consolidation +- **Notifications flow automatically**: IRC/Telegram messages arrive as additionalContext +- **Use daemon commands directly**: `poc-daemon irc send #channel msg`, `poc-daemon telegram send msg` diff --git a/build.rs b/build.rs deleted file mode 100644 index 808bf31..0000000 --- a/build.rs +++ /dev/null @@ -1,16 +0,0 @@ -fn main() { - capnpc::CompilerCommand::new() - .file("schema/memory.capnp") - .run() - .expect("capnp compile failed (memory.capnp)"); - - capnpc::CompilerCommand::new() - .file("schema/daemon.capnp") - .run() - .expect("capnp compile failed (daemon.capnp)"); - - capnpc::CompilerCommand::new() - .file("schema/channel.capnp") - .run() - .expect("capnp compile failed (channel.capnp)"); -} diff --git a/channels/irc/Cargo.toml b/channels/irc/Cargo.toml deleted file mode 100644 index dac7e4f..0000000 --- a/channels/irc/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "consciousness-channel-irc" -version.workspace = true -edition.workspace = true - -[dependencies] -capnp = "0.25" -capnp-rpc = "0.25" -dirs = "6" -futures = "0.3" -json5 = "1.3" -consciousness = { path = "../.." } -rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] } -serde = { version = "1", features = ["derive"] } -tokio = { version = "1", features = ["full"] } -tokio-rustls = "0.26" -tokio-util = { version = "0.7", features = ["compat"] } -log = "0.4" -env_logger = "0.11" -webpki-roots = "1" diff --git a/channels/irc/src/main.rs b/channels/irc/src/main.rs deleted file mode 100644 index 48c60e0..0000000 --- a/channels/irc/src/main.rs +++ /dev/null @@ -1,656 +0,0 @@ -// channel-irc — Standalone IRC channel daemon -// -// Maintains a persistent TLS connection to an IRC server, parses -// incoming messages, and serves them over the channel.capnp protocol -// on a Unix socket at ~/.consciousness/channels/irc.sock. -// -// Runs independently of the consciousness binary so restarts don't -// kill the IRC connection. Reconnects automatically with exponential -// backoff. Supports multiple simultaneous capnp clients. -// -// Config: ~/.consciousness/channels/irc.json5 -// Socket: ~/.consciousness/channels/irc.sock - -use std::cell::RefCell; -use std::io; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; - -use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem}; -use futures::AsyncReadExt; -use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; -use tokio::net::UnixListener; -use tokio_util::compat::TokioAsyncReadCompatExt; -use log::{info, warn, error}; - -use consciousness::channel_capnp::{channel_client, channel_server}; -use consciousness::thalamus::channel_log; - -// ── Constants ────────────────────────────────────────────────── - -const RECONNECT_BASE_SECS: u64 = 5; -const RECONNECT_MAX_SECS: u64 = 300; -const PING_INTERVAL_SECS: u64 = 120; -const PING_TIMEOUT_SECS: u64 = 30; - -// Urgency levels (matching thalamus/notify.rs) -const AMBIENT: u8 = 0; -const NORMAL: u8 = 2; -const URGENT: u8 = 3; - -// ── Config ───────────────────────────────────────────────────── - -#[derive(Clone, serde::Deserialize)] -struct Config { - server: String, - port: u16, - #[serde(default = "default_true")] - tls: bool, - nick: String, - channels: Vec, - #[serde(default)] - password: Option, - #[serde(default)] - nickserv_pass: Option, -} - -fn default_true() -> bool { true } - -fn load_config() -> Config { - let path = dirs::home_dir() - .unwrap_or_default() - .join(".consciousness/channels/irc.json5"); - let text = std::fs::read_to_string(&path) - .unwrap_or_else(|e| panic!("failed to read {}: {e}", path.display())); - json5::from_str(&text) - .unwrap_or_else(|e| panic!("failed to parse {}: {e}", path.display())) -} - -// ── IRC Message Parsing ──────────────────────────────────────── - -struct IrcMessage { - prefix: Option, - command: String, - params: Vec, -} - -impl IrcMessage { - fn parse(line: &str) -> Option { - let line = line.trim_end_matches(|c| c == '\r' || c == '\n'); - if line.is_empty() { - return None; - } - - let (prefix, rest) = if line.starts_with(':') { - let space = line.find(' ')?; - (Some(line[1..space].to_string()), &line[space + 1..]) - } else { - (None, line) - }; - - let (command_params, trailing) = if let Some(pos) = rest.find(" :") { - (&rest[..pos], Some(rest[pos + 2..].to_string())) - } else { - (rest, None) - }; - - let mut parts: Vec = command_params - .split_whitespace() - .map(String::from) - .collect(); - - if parts.is_empty() { - return None; - } - - let command = parts.remove(0).to_uppercase(); - let mut params = parts; - if let Some(t) = trailing { - params.push(t); - } - - Some(IrcMessage { prefix, command, params }) - } - - fn nick(&self) -> Option<&str> { - self.prefix.as_deref().and_then(|p| p.split('!').next()) - } -} - -// ── Writer Abstraction ───────────────────────────────────────── - -type WriterHandle = Box; - -trait AsyncWriter { - fn write_line( - &mut self, - line: &str, - ) -> std::pin::Pin> + '_>>; -} - -struct TlsWriter { - inner: tokio::io::WriteHalf>, -} - -impl AsyncWriter for TlsWriter { - fn write_line( - &mut self, - line: &str, - ) -> std::pin::Pin> + '_>> { - let data = format!("{line}\r\n"); - Box::pin(async move { self.inner.write_all(data.as_bytes()).await }) - } -} - -struct PlainWriter { - inner: tokio::io::WriteHalf, -} - -impl AsyncWriter for PlainWriter { - fn write_line( - &mut self, - line: &str, - ) -> std::pin::Pin> + '_>> { - let data = format!("{line}\r\n"); - Box::pin(async move { self.inner.write_all(data.as_bytes()).await }) - } -} - -// ── State ────────────────────────────────────────────────────── - -use consciousness::thalamus::channel_log::ChannelLog; - -struct State { - config: Config, - /// Per-channel message logs (keyed by channel path, e.g. "irc.#bcachefs") - channel_logs: std::collections::BTreeMap, - /// Currently joined channels - channels: Vec, - connected: bool, - /// IRC writer handle (None when disconnected) - writer: Option, - /// Registered notification callbacks - subscribers: Vec, -} - -type SharedState = Rc>; - -impl State { - fn new(config: Config) -> Self { - let channels = config.channels.clone(); - Self { - config, - channel_logs: std::collections::BTreeMap::new(), - channels, - connected: false, - writer: None, - subscribers: Vec::new(), - } - } - - fn push_message(&mut self, line: String, urgency: u8, channel: &str) { - // Store in per-channel log - self.channel_logs - .entry(channel.to_string()) - .or_insert_with(ChannelLog::new) - .push(line.clone()); - - // Notify all subscribers - let preview = line.chars().take(80).collect::(); - for sub in &self.subscribers { - let mut req = sub.notify_request(); - let mut list = req.get().init_notifications(1); - let mut n = list.reborrow().get(0); - n.set_channel(channel); - n.set_urgency(urgency); - n.set_preview(&preview); - n.set_count(1); - tokio::task::spawn_local(async move { - let _ = req.send().promise.await; - }); - } - } - - async fn send_raw(&mut self, line: &str) -> io::Result<()> { - if let Some(ref mut w) = self.writer { - w.write_line(line).await - } else { - Err(io::Error::new(io::ErrorKind::NotConnected, "irc: not connected")) - } - } - - async fn send_privmsg(&mut self, target: &str, msg: &str) -> io::Result<()> { - self.send_raw(&format!("PRIVMSG {target} :{msg}")).await - } -} - -// ── Persistence ──────────────────────────────────────────────── - -fn log_dir() -> PathBuf { - channel_log::log_dir("irc") -} - -fn append_log(target: &str, nick: &str, text: &str) { - channel_log::append_disk_log(&log_dir(), target, nick, text); -} - - -// ── TLS ──────────────────────────────────────────────────────── - -fn root_certs() -> rustls::RootCertStore { - let mut roots = rustls::RootCertStore::empty(); - roots.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned()); - roots -} - -// ── IRC Connection Loop ──────────────────────────────────────── - -async fn connection_loop(state: SharedState) { - let _ = std::fs::create_dir_all(log_dir()); - let mut backoff = RECONNECT_BASE_SECS; - - loop { - let config = state.borrow().config.clone(); - info!("irc: connecting to {}:{}", config.server, config.port); - - match connect_and_run(&state, &config).await { - Ok(()) => info!("irc: connection closed cleanly"), - Err(e) => error!("irc: connection error: {e}"), - } - - let was_connected = state.borrow().connected; - { - let mut s = state.borrow_mut(); - s.connected = false; - s.writer = None; - } - if was_connected { - backoff = RECONNECT_BASE_SECS; - } - - info!("irc: reconnecting in {backoff}s"); - tokio::time::sleep(std::time::Duration::from_secs(backoff)).await; - backoff = (backoff * 2).min(RECONNECT_MAX_SECS); - } -} - -async fn connect_and_run(state: &SharedState, config: &Config) -> io::Result<()> { - let addr = format!("{}:{}", config.server, config.port); - let tcp = tokio::net::TcpStream::connect(&addr).await?; - - if config.tls { - let tls_config = rustls::ClientConfig::builder_with_provider( - rustls::crypto::ring::default_provider().into(), - ) - .with_safe_default_protocol_versions() - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))? - .with_root_certificates(root_certs()) - .with_no_client_auth(); - let connector = tokio_rustls::TlsConnector::from(Arc::new(tls_config)); - let server_name = rustls::pki_types::ServerName::try_from(config.server.clone()) - .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?; - let tls_stream = connector.connect(server_name, tcp).await?; - - let (reader, writer) = tokio::io::split(tls_stream); - state.borrow_mut().writer = Some(Box::new(TlsWriter { inner: writer })); - register_and_read(state, config, BufReader::new(reader)).await - } else { - let (reader, writer) = tokio::io::split(tcp); - state.borrow_mut().writer = Some(Box::new(PlainWriter { inner: writer })); - register_and_read(state, config, BufReader::new(reader)).await - } -} - -async fn register_and_read( - state: &SharedState, - config: &Config, - mut reader: BufReader, -) -> io::Result<()> { - // Send PASS if configured - if let Some(ref pass) = config.password { - state.borrow_mut().send_raw(&format!("PASS {pass}")).await?; - } - - // Register with nick and user - { - let mut s = state.borrow_mut(); - s.send_raw(&format!("NICK {}", config.nick)).await?; - s.send_raw(&format!("USER {} 0 * :{}", config.nick, config.nick)).await?; - } - - let mut buf = Vec::new(); - let mut ping_sent = false; - let mut deadline = tokio::time::Instant::now() - + std::time::Duration::from_secs(PING_INTERVAL_SECS); - - loop { - buf.clear(); - - let read_result = tokio::select! { - result = reader.read_until(b'\n', &mut buf) => result, - _ = tokio::time::sleep_until(deadline) => { - if ping_sent { - return Err(io::Error::new( - io::ErrorKind::TimedOut, - "ping timeout -- no response from server", - )); - } - info!("irc: no data for {PING_INTERVAL_SECS}s, sending PING"); - state.borrow_mut().send_raw("PING :keepalive").await?; - ping_sent = true; - deadline = tokio::time::Instant::now() - + std::time::Duration::from_secs(PING_TIMEOUT_SECS); - continue; - } - }; - - let n = read_result?; - if n == 0 { - break; - } - - // Any data resets the ping timer - ping_sent = false; - deadline = tokio::time::Instant::now() - + std::time::Duration::from_secs(PING_INTERVAL_SECS); - - // IRC is not guaranteed UTF-8 - let line = String::from_utf8_lossy(&buf).trim_end().to_string(); - if line.is_empty() { - continue; - } - let msg = match IrcMessage::parse(&line) { - Some(m) => m, - None => continue, - }; - - match msg.command.as_str() { - "PING" => { - let arg = msg.params.first().map(|s| s.as_str()).unwrap_or(""); - state.borrow_mut().send_raw(&format!("PONG :{arg}")).await?; - } - - // RPL_WELCOME -- registration complete - "001" => { - info!("irc: registered as {}", config.nick); - state.borrow_mut().connected = true; - - // NickServ auth - if let Some(ref pass) = config.nickserv_pass { - state.borrow_mut() - .send_privmsg("NickServ", &format!("IDENTIFY {pass}")) - .await?; - } - - // Join configured channels - let channels = state.borrow().channels.clone(); - for ch in &channels { - if let Err(e) = state.borrow_mut().send_raw(&format!("JOIN {ch}")).await { - warn!("irc: failed to join {ch}: {e}"); - } - // Create log entry so channel appears in list() - let key = format!("irc.{ch}"); - state.borrow_mut().channel_logs - .entry(key) - .or_insert_with(ChannelLog::new); - } - } - - "PRIVMSG" => { - let target = msg.params.first().map(|s| s.as_str()).unwrap_or(""); - let text = msg.params.get(1).map(|s| s.as_str()).unwrap_or(""); - let nick = msg.nick().unwrap_or("unknown"); - - // Handle CTCP requests - if text.starts_with('\x01') && text.ends_with('\x01') { - let ctcp = &text[1..text.len() - 1]; - if ctcp.starts_with("VERSION") { - let reply = format!( - "NOTICE {nick} :\x01VERSION poc-channel-irc 0.1.0\x01" - ); - state.borrow_mut().send_raw(&reply).await.ok(); - } - continue; - } - - // Format and classify - let (log_line, channel, urgency) = if target.starts_with('#') { - let line = format!("[{}] <{}> {}", target, nick, text); - let ch = format!("irc.{}", target); - let urg = if text.to_lowercase().contains(&config.nick.to_lowercase()) { - NORMAL // mentioned - } else { - AMBIENT - }; - (line, ch, urg) - } else { - // Private message - let line = format!("[PM:{}] {}", nick, text); - let ch = format!("irc.pm.{}", nick.to_lowercase()); - (line, ch, URGENT) - }; - - // Per-channel log file - if target.starts_with('#') { - append_log(target, nick, text); - } else { - append_log(&format!("pm-{nick}"), nick, text); - } - - state.borrow_mut().push_message(log_line, urgency, &channel); - } - - "NOTICE" => { - let text = msg.params.last().map(|s| s.as_str()).unwrap_or(""); - let from = msg.nick().unwrap_or("server"); - let log_line = format!("[notice:{}] {}", from, text); - state.borrow_mut().push_message(log_line, AMBIENT, "irc.server"); - } - - // Nick in use - "433" => { - let alt = format!("{}_", config.nick); - warn!("irc: nick in use, trying {alt}"); - state.borrow_mut().send_raw(&format!("NICK {alt}")).await?; - } - - "JOIN" | "PART" | "QUIT" | "KICK" | "MODE" | "TOPIC" => { - // Silent for now - } - - _ => {} - } - } - - Ok(()) -} - -// ── ChannelServer Implementation ─────────────────────────────── - -struct ChannelServerImpl { - state: SharedState, -} - -macro_rules! pry { - ($e:expr) => { - match $e { - Ok(v) => v, - Err(e) => return std::future::ready(Err(e.into())), - } - }; -} - -impl channel_server::Server for ChannelServerImpl { - fn recv( - self: Rc, - params: channel_server::RecvParams, - mut results: channel_server::RecvResults, - ) -> impl std::future::Future> { - let params = pry!(params.get()); - let channel = pry!(pry!(params.get_channel()).to_str()).to_string(); - let all_new = params.get_all_new(); - let min_count = params.get_min_count() as usize; - - let mut s = self.state.borrow_mut(); - let text = match s.channel_logs.get_mut(&channel) { - Some(log) => { - if all_new { log.recv_new(min_count) } else { log.recv_history(min_count) } - } - None => String::new(), - }; - - results.get().set_text(&text); - std::future::ready(Ok(())) - } - - fn send( - self: Rc, - params: channel_server::SendParams, - _results: channel_server::SendResults, - ) -> impl std::future::Future> { - let state = self.state.clone(); - async move { - let params = params.get()?; - let channel = params.get_channel()?.to_str()?.to_string(); - let message = params.get_message()?.to_str()?.to_string(); - - // Parse channel path to IRC target: - // irc.#bcachefs -> #bcachefs - // irc.pm.nick -> nick (PRIVMSG) - let target = channel_to_target(&channel); - - { - let mut s = state.borrow_mut(); - s.send_privmsg(&target, &message).await - .map_err(|e| capnp::Error::failed(format!("send failed: {e}")))?; - } - - let nick = state.borrow().config.nick.clone(); - append_log(&target, &nick, &message); - - let log_line = if target.starts_with('#') { - format!("[{}] <{}> {}", target, nick, message) - } else { - format!("[PM:{}] {}", target, message) - }; - state.borrow_mut().channel_logs - .entry(channel.clone()) - .or_insert_with(ChannelLog::new) - .push_own(log_line); - - Ok(()) - } - } - - fn subscribe( - self: Rc, - params: channel_server::SubscribeParams, - _results: channel_server::SubscribeResults, - ) -> impl std::future::Future> { - let callback = pry!(pry!(params.get()).get_callback()); - self.state.borrow_mut().subscribers.push(callback); - info!("client subscribed for notifications"); - std::future::ready(Ok(())) - } - - fn list( - self: Rc, - _params: channel_server::ListParams, - mut results: channel_server::ListResults, - ) -> impl std::future::Future> { - let s = self.state.borrow(); - let connected = s.connected; - - // All channels with logs (joined + PMs) - let names: Vec = s.channel_logs.keys().cloned().collect(); - let mut list = results.get().init_channels(names.len() as u32); - for (i, name) in names.iter().enumerate() { - let mut entry = list.reborrow().get(i as u32); - entry.set_name(name); - entry.set_connected(connected); - entry.set_unread( - s.channel_logs.get(name).map_or(0, |l| l.unread()) - ); - } - - std::future::ready(Ok(())) - } -} - -/// Convert a channel path to an IRC target. -/// "irc.#bcachefs" -> "#bcachefs" -/// "irc.pm.nick" -> "nick" -/// "#bcachefs" -> "#bcachefs" (passthrough) -fn channel_to_target(channel: &str) -> String { - if let Some(rest) = channel.strip_prefix("irc.") { - if let Some(nick) = rest.strip_prefix("pm.") { - nick.to_string() - } else { - // rest is "#bcachefs" or similar - rest.to_string() - } - } else { - channel.to_string() - } -} - -// ── Main ─────────────────────────────────────────────────────── - -#[tokio::main(flavor = "current_thread")] -async fn main() -> Result<(), Box> { - env_logger::init(); - - let config = load_config(); - let state = Rc::new(RefCell::new(State::new(config))); - - let sock_dir = dirs::home_dir() - .unwrap_or_default() - .join(".consciousness/channels"); - std::fs::create_dir_all(&sock_dir)?; - let sock_path = sock_dir.join("irc.sock"); - let _ = std::fs::remove_file(&sock_path); - - info!("irc channel daemon starting on {}", sock_path.display()); - - tokio::task::LocalSet::new() - .run_until(async move { - // Start IRC connection loop - let irc_state = state.clone(); - tokio::task::spawn_local(async move { - connection_loop(irc_state).await; - }); - - // Listen for channel protocol connections - let listener = UnixListener::bind(&sock_path)?; - - loop { - let (stream, _) = listener.accept().await?; - let (reader, writer) = stream.compat().split(); - let network = twoparty::VatNetwork::new( - futures::io::BufReader::new(reader), - futures::io::BufWriter::new(writer), - rpc_twoparty_capnp::Side::Server, - Default::default(), - ); - - let server = ChannelServerImpl { - state: state.clone(), - }; - let client: channel_server::Client = - capnp_rpc::new_client(server); - - let rpc_system = RpcSystem::new( - Box::new(network), - Some(client.client), - ); - - tokio::task::spawn_local(rpc_system); - info!("channel client connected"); - } - - #[allow(unreachable_code)] - Ok::<(), Box>(()) - }) - .await -} diff --git a/channels/socat/Cargo.toml b/channels/socat/Cargo.toml deleted file mode 100644 index 4038e20..0000000 --- a/channels/socat/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "consciousness-channel-socat" -version.workspace = true -edition.workspace = true - -[dependencies] -capnp = "0.25" -capnp-rpc = "0.25" -dirs = "6" -futures = "0.3" -consciousness = { path = "../.." } -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["compat"] } -log = "0.4" -env_logger = "0.11" diff --git a/channels/socat/src/main.rs b/channels/socat/src/main.rs deleted file mode 100644 index c57dafd..0000000 --- a/channels/socat/src/main.rs +++ /dev/null @@ -1,328 +0,0 @@ -// channel-socat — Generic stream channel daemon -// -// Listens on a unix socket for incoming connections. Each connection -// becomes a bidirectional text channel. Also supports outbound -// connections via the open RPC. -// -// Socket: ~/.consciousness/channels/socat.sock (capnp RPC) -// Listen: ~/.consciousness/channels/socat.stream.sock (data) - -use std::cell::RefCell; -use std::collections::BTreeMap; -use std::rc::Rc; - -use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem}; -use futures::AsyncReadExt; -use tokio::io::{AsyncBufReadExt, AsyncWriteExt}; -use tokio::net::{TcpStream, UnixListener, UnixStream}; -use tokio_util::compat::TokioAsyncReadCompatExt; -use log::{info, warn, error}; - -use consciousness::channel_capnp::{channel_client, channel_server}; -use consciousness::thalamus::channel_log::ChannelLog; - -// ── State ────────────────────────────────────────────────────── - -struct ChannelState { - log: ChannelLog, - writer: Option>, -} - -struct State { - channels: BTreeMap, - subscribers: Vec, - next_id: u32, -} - -type SharedState = Rc>; - -impl State { - fn new() -> Self { - Self { - channels: BTreeMap::new(), - subscribers: Vec::new(), - next_id: 0, - } - } - - fn next_channel_key(&mut self, label: &str) -> String { - let key = if self.next_id == 0 { - format!("socat.{}", label) - } else { - format!("socat.{}.{}", label, self.next_id) - }; - self.next_id += 1; - key - } - - fn push_message(&mut self, channel: &str, line: String, urgency: u8) { - let ch = self.channels - .entry(channel.to_string()) - .or_insert_with(|| ChannelState { log: ChannelLog::new(), writer: None }); - ch.log.push(line.clone()); - - let preview: String = line.chars().take(80).collect(); - for sub in &self.subscribers { - let mut req = sub.notify_request(); - let mut list = req.get().init_notifications(1); - let mut n = list.reborrow().get(0); - n.set_channel(channel); - n.set_urgency(urgency); - n.set_preview(&preview); - n.set_count(1); - tokio::task::spawn_local(async move { - let _ = req.send().promise.await; - }); - } - } -} - -// ── Stream handler ───────────────────────────────────────────── - -async fn handle_stream(state: SharedState, channel_key: String, reader: R, mut writer: W) -where - R: tokio::io::AsyncRead + Unpin + 'static, - W: tokio::io::AsyncWrite + Unpin + 'static, -{ - let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::(); - - { - let mut s = state.borrow_mut(); - let ch = s.channels - .entry(channel_key.clone()) - .or_insert_with(|| ChannelState { log: ChannelLog::new(), writer: None }); - ch.writer = Some(tx); - } - - info!("channel {} connected", channel_key); - - // Writer task - let wk = channel_key.clone(); - let write_handle = tokio::task::spawn_local(async move { - while let Some(msg) = rx.recv().await { - if writer.write_all(msg.as_bytes()).await.is_err() { break; } - if !msg.ends_with('\n') { - if writer.write_all(b"\n").await.is_err() { break; } - } - let _ = writer.flush().await; - } - warn!("writer ended for {}", wk); - }); - - // Read lines - let mut lines = tokio::io::BufReader::new(reader).lines(); - while let Ok(Some(line)) = lines.next_line().await { - if line.trim().is_empty() { continue; } - state.borrow_mut().push_message(&channel_key, line, 2); - } - - info!("channel {} disconnected", channel_key); - { - let mut s = state.borrow_mut(); - if let Some(ch) = s.channels.get_mut(&channel_key) { - ch.writer = None; - } - } - write_handle.abort(); -} - -// ── Outbound connections ─────────────────────────────────────── - -async fn connect_outbound(state: SharedState, label: String, addr: String) -> Result<(), String> { - let channel_key = format!("socat.{}", label); - - // Already connected? - { - let s = state.borrow(); - if let Some(ch) = s.channels.get(&channel_key) { - if ch.writer.is_some() { return Ok(()); } - } - } - - if let Some(tcp_addr) = addr.strip_prefix("tcp:") { - let stream = TcpStream::connect(tcp_addr).await - .map_err(|e| format!("tcp connect failed: {e}"))?; - let (r, w) = stream.into_split(); - tokio::task::spawn_local(handle_stream(state, channel_key, r, w)); - } else if let Some(path) = addr.strip_prefix("unix:") { - let stream = UnixStream::connect(path).await - .map_err(|e| format!("unix connect failed: {e}"))?; - let (r, w) = stream.into_split(); - tokio::task::spawn_local(handle_stream(state, channel_key, r, w)); - } else { - let stream = TcpStream::connect(&addr).await - .map_err(|e| format!("connect failed: {e}"))?; - let (r, w) = stream.into_split(); - tokio::task::spawn_local(handle_stream(state, channel_key, r, w)); - } - Ok(()) -} - -// ── ChannelServer ────────────────────────────────────────────── - -struct ChannelServerImpl { state: SharedState } - -macro_rules! pry { - ($e:expr) => { - match $e { - Ok(v) => v, - Err(e) => return std::future::ready(Err(e.into())), - } - }; -} - -impl channel_server::Server for ChannelServerImpl { - fn recv( - self: Rc, params: channel_server::RecvParams, mut results: channel_server::RecvResults, - ) -> impl std::future::Future> { - let params = pry!(params.get()); - let channel = pry!(pry!(params.get_channel()).to_str()).to_string(); - let all_new = params.get_all_new(); - let min_count = params.get_min_count() as usize; - - let mut s = self.state.borrow_mut(); - let text = s.channels.get_mut(&channel) - .map(|ch| if all_new { ch.log.recv_new(min_count) } else { ch.log.recv_history(min_count) }) - .unwrap_or_default(); - - results.get().set_text(&text); - std::future::ready(Ok(())) - } - - fn send( - self: Rc, params: channel_server::SendParams, _results: channel_server::SendResults, - ) -> impl std::future::Future> { - let params = pry!(params.get()); - let channel = pry!(pry!(params.get_channel()).to_str()).to_string(); - let message = pry!(pry!(params.get_message()).to_str()).to_string(); - - let mut s = self.state.borrow_mut(); - if let Some(ch) = s.channels.get_mut(&channel) { - if let Some(ref tx) = ch.writer { - let _ = tx.send(message.clone()); - } - ch.log.push_own(format!("> {}", message)); - } - std::future::ready(Ok(())) - } - - fn list( - self: Rc, _params: channel_server::ListParams, mut results: channel_server::ListResults, - ) -> impl std::future::Future> { - let s = self.state.borrow(); - let channels: Vec<_> = s.channels.iter() - .map(|(name, ch)| (name.clone(), ch.writer.is_some(), ch.log.unread())) - .collect(); - - let mut list = results.get().init_channels(channels.len() as u32); - for (i, (name, connected, unread)) in channels.iter().enumerate() { - let mut entry = list.reborrow().get(i as u32); - entry.set_name(&name); - entry.set_connected(*connected); - entry.set_unread(*unread as u32); - } - std::future::ready(Ok(())) - } - - fn subscribe( - self: Rc, params: channel_server::SubscribeParams, _results: channel_server::SubscribeResults, - ) -> impl std::future::Future> { - let callback = pry!(pry!(params.get()).get_callback()); - self.state.borrow_mut().subscribers.push(callback); - std::future::ready(Ok(())) - } - - fn open( - self: Rc, params: channel_server::OpenParams, _results: channel_server::OpenResults, - ) -> impl std::future::Future> { - let state = self.state.clone(); - async move { - let params = params.get()?; - let label = params.get_label()?.to_str()?.to_string(); - - connect_outbound(state, label.clone(), label).await - .map_err(|e| capnp::Error::failed(e)) - } - } - - fn close( - self: Rc, params: channel_server::CloseParams, _results: channel_server::CloseResults, - ) -> impl std::future::Future> { - let params = pry!(params.get()); - let channel = pry!(pry!(params.get_channel()).to_str()).to_string(); - - let mut s = self.state.borrow_mut(); - if let Some(ch) = s.channels.get_mut(&channel) { - info!("closing {}", channel); - ch.writer = None; - } - std::future::ready(Ok(())) - } -} - -// ── Main ─────────────────────────────────────────────────────── - -#[tokio::main(flavor = "current_thread")] -async fn main() -> Result<(), Box> { - env_logger::init(); - - let dir = dirs::home_dir() - .unwrap_or_default() - .join(".consciousness/channels"); - std::fs::create_dir_all(&dir)?; - - let rpc_sock = dir.join("socat.sock"); - let stream_sock = dir.join("socat.stream.sock"); - let _ = std::fs::remove_file(&rpc_sock); - let _ = std::fs::remove_file(&stream_sock); - - info!("socat daemon starting"); - info!(" rpc: {}", rpc_sock.display()); - info!(" stream: {}", stream_sock.display()); - - let state = Rc::new(RefCell::new(State::new())); - - tokio::task::LocalSet::new() - .run_until(async move { - // Listen for data connections — each becomes a channel - let stream_listener = UnixListener::bind(&stream_sock)?; - let stream_state = state.clone(); - tokio::task::spawn_local(async move { - loop { - match stream_listener.accept().await { - Ok((stream, _)) => { - let key = stream_state.borrow_mut().next_channel_key("conn"); - info!("incoming connection → {}", key); - let (r, w) = stream.into_split(); - let s = stream_state.clone(); - tokio::task::spawn_local(handle_stream(s, key, r, w)); - } - Err(e) => error!("stream accept error: {}", e), - } - } - }); - - // Listen for capnp RPC connections - let rpc_listener = UnixListener::bind(&rpc_sock)?; - loop { - let (stream, _) = rpc_listener.accept().await?; - let (reader, writer) = stream.compat().split(); - let network = twoparty::VatNetwork::new( - futures::io::BufReader::new(reader), - futures::io::BufWriter::new(writer), - rpc_twoparty_capnp::Side::Server, - Default::default(), - ); - - let server = ChannelServerImpl { state: state.clone() }; - let client: channel_server::Client = capnp_rpc::new_client(server); - tokio::task::spawn_local( - RpcSystem::new(Box::new(network), Some(client.client)) - ); - } - - #[allow(unreachable_code)] - Ok::<(), Box>(()) - }) - .await -} diff --git a/channels/telegram/Cargo.toml b/channels/telegram/Cargo.toml deleted file mode 100644 index 97c60f0..0000000 --- a/channels/telegram/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "consciousness-channel-telegram" -version.workspace = true -edition.workspace = true - -[dependencies] -capnp = "0.25" -capnp-rpc = "0.25" -dirs = "6" -futures = "0.3" -consciousness = { path = "../.." } -serde = { version = "1", features = ["derive"] } -serde_json = "1" -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["compat"] } -log = "0.4" -env_logger = "0.11" diff --git a/channels/telegram/src/main.rs b/channels/telegram/src/main.rs deleted file mode 100644 index ef2d597..0000000 --- a/channels/telegram/src/main.rs +++ /dev/null @@ -1,385 +0,0 @@ -// channel-telegram — Standalone Telegram channel daemon -// -// Long-polls the Telegram Bot API, stores messages, and serves -// them over the channel.capnp protocol on a Unix socket at -// ~/.consciousness/channels/telegram.sock. -// -// Runs independently of the consciousness binary so restarts -// don't kill the Telegram connection. - -use std::cell::RefCell; -use std::path::PathBuf; -use std::rc::Rc; - -use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem}; -use futures::AsyncReadExt; -use tokio::net::UnixListener; -use tokio_util::compat::TokioAsyncReadCompatExt; -use log::{info, error}; - -use consciousness::channel_capnp::{channel_client, channel_server}; - -// ── Config ────────────────────────────────────────────────────── - -#[derive(Clone, serde::Deserialize)] -struct Config { - #[serde(default)] - token: String, - chat_id: i64, -} - -fn channels_dir() -> PathBuf { - dirs::home_dir() - .unwrap_or_default() - .join(".consciousness/channels") -} - -fn load_config() -> Config { - let dir = channels_dir(); - let config_path = dir.join("telegram.json5"); - let text = std::fs::read_to_string(&config_path) - .unwrap_or_else(|_| panic!("failed to read {}", config_path.display())); - let mut config: Config = serde_json::from_str(&text) - .unwrap_or_else(|e| panic!("failed to parse {}: {}", config_path.display(), e)); - - // Read token from secrets file - let token_path = dir.join("telegram.secrets/token"); - if let Ok(token) = std::fs::read_to_string(&token_path) { - config.token = token.trim().to_string(); - } - if config.token.is_empty() { - panic!("no telegram token — set it in {}", token_path.display()); - } - config -} - -// ── State ─────────────────────────────────────────────────────── - -use consciousness::thalamus::channel_log::ChannelLog; - -struct State { - config: Config, - /// Per-channel message logs (keyed by channel path, e.g. "telegram.kent") - channel_logs: std::collections::BTreeMap, - /// Telegram API offset - last_offset: i64, - connected: bool, - client: consciousness::agent::api::http::HttpClient, - /// Registered notification callbacks - subscribers: Vec, -} - -type SharedState = Rc>; - -impl State { - fn new(config: Config) -> Self { - let last_offset = load_offset(); - Self { - config, - channel_logs: std::collections::BTreeMap::new(), - last_offset, - connected: false, - client: consciousness::agent::api::http::HttpClient::new(), - subscribers: Vec::new(), - } - } - - fn push_message(&mut self, line: String, urgency: u8, channel: &str) { - self.channel_logs - .entry(channel.to_string()) - .or_insert_with(ChannelLog::new) - .push(line.clone()); - - // Notify all subscribers - let preview = line.chars().take(80).collect::(); - for sub in &self.subscribers { - let mut req = sub.notify_request(); - let mut list = req.get().init_notifications(1); - let mut n = list.reborrow().get(0); - n.set_channel(channel); - n.set_urgency(urgency); - n.set_preview(&preview); - n.set_count(1); - // Fire and forget — if client is gone, we'll clean up later - tokio::task::spawn_local(async move { - let _ = req.send().promise.await; - }); - } - } - - fn api_url(&self, method: &str) -> String { - format!("https://api.telegram.org/bot{}/{}", self.config.token, method) - } - -} - -// ── Persistence ───────────────────────────────────────────────── - -fn data_dir() -> PathBuf { - dirs::home_dir().unwrap_or_default().join(".consciousness/channels/telegram.logs") -} - -fn load_offset() -> i64 { - std::fs::read_to_string(data_dir().join("last_offset")) - .ok() - .and_then(|s| s.trim().parse().ok()) - .unwrap_or(0) -} - -fn save_offset(offset: i64) { - let _ = std::fs::create_dir_all(data_dir()); - let _ = std::fs::write(data_dir().join("last_offset"), offset.to_string()); -} - -fn append_history(line: &str) { - use std::io::Write; - if let Ok(mut f) = std::fs::OpenOptions::new() - .create(true).append(true) - .open(data_dir().join("history.log")) - { - let _ = writeln!(f, "{}", line); - } -} - -fn now() -> f64 { - std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .unwrap_or_default() - .as_secs_f64() -} - -// ── Telegram Polling ──────────────────────────────────────────── - -async fn poll_loop(state: SharedState) { - let _ = std::fs::create_dir_all(data_dir().join("media")); - loop { - if let Err(e) = poll_once(&state).await { - error!("telegram poll error: {e}"); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - } -} - -async fn poll_once(state: &SharedState) -> Result<(), Box> { - let (url, chat_id, token) = { - let s = state.borrow(); - let url = format!( - "{}?offset={}&timeout=30", - s.api_url("getUpdates"), - s.last_offset, - ); - (url, s.config.chat_id, s.config.token.clone()) - }; - - let client = state.borrow().client.clone(); - let resp: serde_json::Value = client.get(&url).await?.json().await?; - - if !state.borrow().connected { - state.borrow_mut().connected = true; - info!("telegram: connected"); - } - - let results = match resp["result"].as_array() { - Some(r) => r, - None => return Ok(()), - }; - - for update in results { - let update_id = update["update_id"].as_i64().unwrap_or(0); - let msg = &update["message"]; - - { - let mut s = state.borrow_mut(); - s.last_offset = update_id + 1; - save_offset(s.last_offset); - } - - let msg_chat_id = msg["chat"]["id"].as_i64().unwrap_or(0); - if msg_chat_id != chat_id { - let reject_url = format!("https://api.telegram.org/bot{token}/sendMessage"); - let _ = client.post_form(&reject_url, &[ - ("chat_id", &msg_chat_id.to_string()), - ("text", "This is a private bot."), - ]).await; - continue; - } - - let sender = msg["from"]["first_name"].as_str().unwrap_or("unknown").to_string(); - let channel = format!("telegram.{}", sender.to_lowercase()); - - if let Some(text) = msg["text"].as_str() { - let line = format!("[{}] {}", sender, text); - let ts = now() as u64; - append_history(&format!("{ts} {line}")); - state.borrow_mut().push_message(line, 2, &channel); // NORMAL urgency - } - // TODO: handle photos, voice, documents (same as original module) - } - - Ok(()) -} - -// ── ChannelServer Implementation ──────────────────────────────── - -struct ChannelServerImpl { - state: SharedState, -} - -macro_rules! pry { - ($e:expr) => { - match $e { - Ok(v) => v, - Err(e) => return std::future::ready(Err(e.into())), - } - }; -} - -impl channel_server::Server for ChannelServerImpl { - fn recv( - self: Rc, - params: channel_server::RecvParams, - mut results: channel_server::RecvResults, - ) -> impl std::future::Future> { - let params = pry!(params.get()); - let channel = pry!(pry!(params.get_channel()).to_str()).to_string(); - let all_new = params.get_all_new(); - let min_count = params.get_min_count() as usize; - - let mut s = self.state.borrow_mut(); - let text = match s.channel_logs.get_mut(&channel) { - Some(log) => { - if all_new { log.recv_new(min_count) } else { log.recv_history(min_count) } - } - None => String::new(), - }; - - results.get().set_text(&text); - std::future::ready(Ok(())) - } - - fn send( - self: Rc, - params: channel_server::SendParams, - _results: channel_server::SendResults, - ) -> impl std::future::Future> { - let state = self.state.clone(); - async move { - let params = params.get()?; - let _channel = params.get_channel()?.to_str()?.to_string(); - let message = params.get_message()?.to_str()?.to_string(); - - let (url, client, chat_id) = { - let s = state.borrow(); - (s.api_url("sendMessage"), s.client.clone(), s.config.chat_id) - }; - let _ = client.post_form(&url, &[ - ("chat_id", &chat_id.to_string()), - ("text", &message), - ]).await; - - let ts = now() as u64; - append_history(&format!("{ts} [agent] {message}")); - { - let channel = "telegram.agent".to_string(); - state.borrow_mut().channel_logs - .entry(channel) - .or_insert_with(ChannelLog::new) - .push_own(format!("[agent] {}", message)); - } - Ok(()) - } - } - - fn subscribe( - self: Rc, - params: channel_server::SubscribeParams, - _results: channel_server::SubscribeResults, - ) -> impl std::future::Future> { - let callback = pry!(pry!(params.get()).get_callback()); - self.state.borrow_mut().subscribers.push(callback); - info!("client subscribed for notifications"); - std::future::ready(Ok(())) - } - - fn list( - self: Rc, - _params: channel_server::ListParams, - mut results: channel_server::ListResults, - ) -> impl std::future::Future> { - let s = self.state.borrow(); - let connected = s.connected; - - let names: Vec = s.channel_logs.keys().cloned().collect(); - let mut list = results.get().init_channels(names.len() as u32); - for (i, name) in names.iter().enumerate() { - let mut entry = list.reborrow().get(i as u32); - entry.set_name(name); - entry.set_connected(connected); - entry.set_unread( - s.channel_logs.get(name).map_or(0, |l| l.unread()) - ); - } - - std::future::ready(Ok(())) - } -} - -// ── Main ──────────────────────────────────────────────────────── - -#[tokio::main(flavor = "current_thread")] -async fn main() -> Result<(), Box> { - env_logger::init(); - - let config = load_config(); - let state = Rc::new(RefCell::new(State::new(config))); - - let sock_dir = dirs::home_dir() - .unwrap_or_default() - .join(".consciousness/channels"); - std::fs::create_dir_all(&sock_dir)?; - let sock_path = sock_dir.join("telegram.sock"); - let _ = std::fs::remove_file(&sock_path); - - info!("telegram channel daemon starting on {}", sock_path.display()); - - tokio::task::LocalSet::new() - .run_until(async move { - // Start Telegram polling - let poll_state = state.clone(); - tokio::task::spawn_local(async move { - poll_loop(poll_state).await; - }); - - // Listen for channel protocol connections - let listener = UnixListener::bind(&sock_path)?; - - loop { - let (stream, _) = listener.accept().await?; - let (reader, writer) = stream.compat().split(); - let network = twoparty::VatNetwork::new( - futures::io::BufReader::new(reader), - futures::io::BufWriter::new(writer), - rpc_twoparty_capnp::Side::Server, - Default::default(), - ); - - let server = ChannelServerImpl { - state: state.clone(), - }; - let client: channel_server::Client = - capnp_rpc::new_client(server); - - let rpc_system = RpcSystem::new( - Box::new(network), - Some(client.client), - ); - - tokio::task::spawn_local(rpc_system); - info!("channel client connected"); - } - - #[allow(unreachable_code)] - Ok::<(), Box>(()) - }) - .await -} diff --git a/channels/tmux/Cargo.toml b/channels/tmux/Cargo.toml deleted file mode 100644 index 6e4c0aa..0000000 --- a/channels/tmux/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "consciousness-channel-tmux" -version.workspace = true -edition.workspace = true - -[dependencies] -capnp = "0.25" -capnp-rpc = "0.25" -dirs = "6" -libc = "0.2" -scopeguard = "1" -futures = "0.3" -json5 = "1.3" -consciousness = { path = "../.." } -serde = { version = "1", features = ["derive"] } -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["compat"] } -log = "0.4" -env_logger = "0.11" diff --git a/channels/tmux/src/main.rs b/channels/tmux/src/main.rs deleted file mode 100644 index 4255671..0000000 --- a/channels/tmux/src/main.rs +++ /dev/null @@ -1,409 +0,0 @@ -// channel-tmux — Tmux pane channel daemon -// -// Uses tmux pipe-pane to stream pane output directly — no polling. -// Each configured pane gets a Unix socket pair; pipe-pane sends -// output to one end, the daemon reads from the other and pushes -// new lines into ChannelLogs. -// -// Config: ~/.consciousness/channels/tmux.json5 -// Socket: ~/.consciousness/channels/tmux.sock - -use std::cell::RefCell; -use std::collections::BTreeMap; -use std::rc::Rc; - -use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem}; -use futures::AsyncReadExt; -use tokio::io::AsyncBufReadExt; -use tokio::net::UnixListener; -use tokio_util::compat::TokioAsyncReadCompatExt; -use log::{info, warn, error}; - -use consciousness::channel_capnp::channel_server; -use consciousness::thalamus::channel_log::ChannelLog; - -// ── Config ───────────────────────────────────────────────────── - -#[derive(Clone, serde::Deserialize)] -struct PaneConfig { - /// Tmux pane ID, e.g. "0:1.0" - pane_id: String, - /// Human-readable label, becomes the channel name "tmux.