diff --git a/Cargo.lock b/Cargo.lock index d9de4b0..b39dbbc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99" dependencies = [ - "crypto-common 0.2.2", + "crypto-common", "inout", ] @@ -20,7 +20,7 @@ checksum = "fc0fc36d7440d015b45468ba08a21e80e056ebbd014c611c6298bb7503e04bd1" dependencies = [ "cipher", "cpubits", - "cpufeatures 0.3.1", + "cpufeatures", "zeroize", ] @@ -39,6 +39,54 @@ dependencies = [ "zeroize", ] +[[package]] +name = "age" +version = "0.12.1" +source = "git+https://github.com/str4d/rage?rev=eaa85530ba78734924ccf41b16dd55daa29b7cfd#eaa85530ba78734924ccf41b16dd55daa29b7cfd" +dependencies = [ + "age-core", + "base64 0.22.1", + "bech32", + "chacha20poly1305", + "cipher", + "cookie-factory", + "hkdf", + "hmac", + "hpke", + "i18n-embed", + "i18n-embed-fl", + "ml-kem", + "nom", + "p256", + "pin-project", + "rand", + "rust-embed", + "scrypt", + "sha2", + "sha3", + "subtle", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "age-core" +version = "0.12.0" +source = "git+https://github.com/str4d/rage?rev=eaa85530ba78734924ccf41b16dd55daa29b7cfd#eaa85530ba78734924ccf41b16dd55daa29b7cfd" +dependencies = [ + "base64 0.22.1", + "bech32", + "chacha20poly1305", + "cookie-factory", + "hkdf", + "hpke", + "io_tee", + "nom", + "rand", + "secrecy", + "sha2", +] + [[package]] name = "aho-corasick" version = "1.1.5" @@ -118,6 +166,15 @@ dependencies = [ "security-framework", ] +[[package]] +name = "arc-swap" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b5d51209f6de83d37a0b33d320acb8da88823e42a94c075140708f032a5" +dependencies = [ + "rustversion", +] + [[package]] name = "argon2" version = "0.6.0" @@ -126,7 +183,7 @@ checksum = "134c52ddac6d63c576bef8168db10c83c49c26444ecbc68060fef078925a901c" dependencies = [ "base64ct", "blake2", - "cpufeatures 0.3.1", + "cpufeatures", "password-hash", ] @@ -254,28 +311,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "async-task" version = "4.7.1" @@ -404,6 +439,15 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + [[package]] name = "bcrypt-pbkdf" version = "0.11.0" @@ -412,9 +456,15 @@ checksum = "144e573728da132683b9488acd528274c790e07fc06ff81ee29f9d8f8b1041e0" dependencies = [ "blowfish", "pbkdf2", - "sha2 0.11.1", + "sha2", ] +[[package]] +name = "bech32" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" + [[package]] name = "bitflags" version = "2.13.2" @@ -427,16 +477,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b5d4d889834ee8ecfc0f8426ad30faf7cdcb10f741a8e6d7224d95325479f6f" dependencies = [ - "digest 0.11.3", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", + "digest", ] [[package]] @@ -550,11 +591,23 @@ checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.3.1", - "rand_core 0.10.1", + "cpufeatures", + "rand_core", "zeroize", ] +[[package]] +name = "chacha20poly1305" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b89e1c441e926b9c82a8d023f6e1b7ae0adcfaa7d621814e4d60789bac751cb" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", +] + [[package]] name = "chrono" version = "0.4.45" @@ -574,8 +627,8 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" dependencies = [ - "block-buffer 0.12.1", - "crypto-common 0.2.2", + "block-buffer", + "crypto-common", "inout", "zeroize", ] @@ -666,6 +719,15 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" +dependencies = [ + "futures", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -704,15 +766,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - [[package]] name = "cpufeatures" version = "0.3.1" @@ -739,22 +792,12 @@ dependencies = [ "getrandom 0.4.3", "hybrid-array", "num-traits", - "rand_core 0.10.1", + "rand_core", "serdect", "subtle", "zeroize", ] -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "crypto-common" version = "0.2.2" @@ -763,7 +806,7 @@ checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ "getrandom 0.4.3", "hybrid-array", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -773,7 +816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3633a51a39c69ebbaa4feaa694bd83d241e4093901c84a0963b19d9bb3f0cf8f" dependencies = [ "crypto-bigint", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -802,11 +845,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" dependencies = [ "cfg-if", - "cpufeatures 0.3.1", + "cpufeatures", "curve25519-dalek-derive", - "digest 0.11.3", + "digest", "fiat-crypto", - "rand_core 0.10.1", + "rand_core", "rustc_version", "subtle", "zeroize", @@ -829,6 +872,12 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" +[[package]] +name = "datealgo" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157452fc58cced4b2dee5d279ab5d7e515fba5cd645caa9412ae9a32a449bcfc" + [[package]] name = "deadpool" version = "0.12.3" @@ -887,25 +936,15 @@ dependencies = [ "cipher", ] -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common 0.1.7", -] - [[package]] name = "digest" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer 0.12.1", + "block-buffer", "const-oid", - "crypto-common 0.2.2", + "crypto-common", "ctutils", "zeroize", ] @@ -934,7 +973,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0" dependencies = [ "der", - "digest 0.11.3", + "digest", "elliptic-curve", "rfc6979", "signature", @@ -960,9 +999,9 @@ checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core 0.10.1", + "rand_core", "serde", - "sha2 0.11.1", + "sha2", "signature", "subtle", "zeroize", @@ -976,15 +1015,15 @@ checksum = "900f37e7e18d74a2347389af6cd69e3a30d5cc9e697f40004865679aa75e9c7c" dependencies = [ "base16ct", "crypto-bigint", - "crypto-common 0.2.2", - "digest 0.11.3", + "crypto-common", + "digest", "ff", "group", "hkdf", "hybrid-array", "pem-rfc7468", "pkcs8", - "rand_core 0.10.1", + "rand_core", "sec1", "subtle", "zeroize", @@ -1103,7 +1142,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1f686ab92a9fb0eaf188f6c6c87b89490baa6fdb0db4544ba4dc47f7942489f" dependencies = [ - "rand_core 0.10.1", + "rand_core", "subtle", ] @@ -1113,12 +1152,66 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" +[[package]] +name = "find-crate" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" +dependencies = [ + "toml", +] + [[package]] name = "find-msvc-tools" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" +[[package]] +name = "fluent" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8137a6d5a2c50d6b0ebfcb9aaa91a28154e0a70605f112d30cb0cd4a78670477" +dependencies = [ + "fluent-bundle", + "unic-langid", +] + +[[package]] +name = "fluent-bundle" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01203cb8918f5711e73891b347816d932046f95f54207710bda99beaeb423bf4" +dependencies = [ + "fluent-langneg", + "fluent-syntax", + "intl-memoizer", + "intl_pluralrules", + "rustc-hash", + "self_cell", + "smallvec", + "unic-langid", +] + +[[package]] +name = "fluent-langneg" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eebbe59450baee8282d71676f3bfed5689aeab00b27545e83e5f14b1195e8b0" +dependencies = [ + "unic-langid", +] + +[[package]] +name = "fluent-syntax" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54f0d287c53ffd184d04d8677f590f4ac5379785529e5e08b1c8083acdd5c198" +dependencies = [ + "memchr", + "thiserror 2.0.21", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1131,21 +1224,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.3" @@ -1262,16 +1340,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -1295,7 +1363,7 @@ dependencies = [ "js-sys", "libc", "r-efi", - "rand_core 0.10.1", + "rand_core", "wasm-bindgen", ] @@ -1329,7 +1397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fd1a1c7a5206c5b7a3f5a0d7ccd3ff85d0c8f5133d62a02680255b0004af5f4" dependencies = [ "ff", - "rand_core 0.10.1", + "rand_core", "subtle", ] @@ -1352,15 +1420,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "foldhash", -] - [[package]] name = "hashbrown" version = "0.17.2" @@ -1376,7 +1435,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb" dependencies = [ - "hashbrown 0.17.2", + "hashbrown", ] [[package]] @@ -1418,7 +1477,31 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" dependencies = [ - "digest 0.11.3", + "digest", +] + +[[package]] +name = "hpke" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5324110b02044183df000f0bd7d2d7e61f1000631508627e77f63983b6fdffb" +dependencies = [ + "aead", + "chacha20poly1305", + "hkdf", + "hybrid-array", + "ml-kem", + "p256", + "p384", + "p521", + "rand_core", + "sha2", + "sha3", + "shake", + "subtle", + "turboshake", + "x-wing", + "zeroize", ] [[package]] @@ -1513,23 +1596,6 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", ] [[package]] @@ -1558,6 +1624,72 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "i18n-config" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e06b90c8a0d252e203c94344b21e35a30f3a3a85dc7db5af8f8df9f3e0c63ef" +dependencies = [ + "basic-toml", + "log", + "serde", + "serde_derive", + "thiserror 1.0.69", + "unic-langid", +] + +[[package]] +name = "i18n-embed" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a217bbb075dcaefb292efa78897fc0678245ca67f265d12c351e42268fcb0305" +dependencies = [ + "arc-swap", + "fluent", + "fluent-langneg", + "fluent-syntax", + "i18n-embed-impl", + "intl-memoizer", + "log", + "parking_lot", + "rust-embed", + "thiserror 1.0.69", + "unic-langid", + "walkdir", +] + +[[package]] +name = "i18n-embed-fl" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602e6bd30c3db2749e13e38b363a3d98d9d41de1d8de7a79c31bb69e45b47cda" +dependencies = [ + "find-crate", + "fluent", + "fluent-syntax", + "i18n-config", + "i18n-embed", + "proc-macro-error3", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", + "unic-langid", +] + +[[package]] +name = "i18n-embed-impl" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2cc0e0523d1fe6fc2c6f66e5038624ea8091b3e7748b5e8e0c84b1698db6c2" +dependencies = [ + "find-crate", + "i18n-config", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "iana-time-zone" version = "0.1.65" @@ -1693,7 +1825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.17.2", + "hashbrown", ] [[package]] @@ -1706,6 +1838,31 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "intl-memoizer" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "310da2e345f5eb861e7a07ee182262e94975051db9e4223e909ba90f392f163f" +dependencies = [ + "type-map", + "unic-langid", +] + +[[package]] +name = "intl_pluralrules" +version = "7.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078ea7b7c29a2b4df841a7f6ac8775ff6074020c6776d48491ce2268e068f972" +dependencies = [ + "unic-langid", +] + +[[package]] +name = "io_tee" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b3f7cef34251886990511df1c61443aa928499d598a9473929ab5a90a527304" + [[package]] name = "ipnet" version = "2.12.2" @@ -1736,7 +1893,7 @@ dependencies = [ "jni-sys", "log", "simd_cesu8", - "thiserror", + "thiserror 2.0.21", "walkdir", "windows-link", ] @@ -1801,7 +1958,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598" dependencies = [ "cfg-if", - "cpufeatures 0.3.1", + "cpufeatures", ] [[package]] @@ -1810,8 +1967,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01737161ba802849cfd486b5bd209d38ba4943494c249a8126005170c7621edd" dependencies = [ - "crypto-common 0.2.2", - "rand_core 0.10.1", + "crypto-common", + "rand_core", ] [[package]] @@ -1856,14 +2013,14 @@ dependencies = [ "bitflags", "libc", "plain", - "redox_syscall", + "redox_syscall 0.9.5", ] [[package]] name = "libsqlite3-sys" -version = "0.38.2" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8" +checksum = "b06e69070b7e12262b0cd90832f0a7396f142a2b330181255562decf9f0c6215" dependencies = [ "cc", "pkg-config", @@ -1882,6 +2039,15 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.35" @@ -1900,17 +2066,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "mcp-to-cli" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7300661cc3c7abc1fc38158c89bbcc17b6e9c7af5754b4b56d8fb9e1a53d30" -dependencies = [ - "clap", - "serde_json", - "thiserror", -] - [[package]] name = "md5" version = "0.8.1" @@ -1938,6 +2093,16 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minijinja" version = "3.1.0" @@ -1968,9 +2133,10 @@ dependencies = [ "kem", "module-lattice", "pkcs8", - "rand_core 0.10.1", + "rand_core", "sha3", "shake", + "zeroize", ] [[package]] @@ -1982,6 +2148,7 @@ dependencies = [ "ctutils", "hybrid-array", "num-traits", + "zeroize", ] [[package]] @@ -1990,23 +2157,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" -[[package]] -name = "native-tls" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nix" version = "0.31.4" @@ -2019,6 +2169,15 @@ dependencies = [ "libc", ] +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + [[package]] name = "num" version = "0.4.3" @@ -2051,8 +2210,8 @@ checksum = "93e7820bc0a80a0238e650327316f929ba18d5be054b647490a3a6a339f3e7c0" dependencies = [ "num-integer", "num-traits", - "rand 0.10.4", - "rand_core 0.10.1", + "rand", + "rand_core", ] [[package]] @@ -2131,49 +2290,12 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "openssl" -version = "0.10.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de8111e94a56adca7ebfe6c365b6d42f99deb69b74b6becacd4204e2f193aa2" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "openssl-probe" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" -[[package]] -name = "openssl-sys" -version = "0.9.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c413d6ec9ebaf5e1c829d355cb3e9f783778d700f135be0921d52fce3c60ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -2194,7 +2316,7 @@ dependencies = [ "elliptic-curve", "primefield", "primeorder", - "sha2 0.11.1", + "sha2", ] [[package]] @@ -2208,7 +2330,7 @@ dependencies = [ "fiat-crypto", "primefield", "primeorder", - "sha2 0.11.1", + "sha2", ] [[package]] @@ -2222,7 +2344,7 @@ dependencies = [ "elliptic-curve", "primefield", "primeorder", - "sha2 0.11.1", + "sha2", ] [[package]] @@ -2237,9 +2359,9 @@ dependencies = [ "delegate", "futures", "log", - "rand 0.10.4", - "sha2 0.11.1", - "thiserror", + "rand", + "sha2", + "thiserror 2.0.21", "tokio", "windows", "windows-strings", @@ -2251,6 +2373,29 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + [[package]] name = "password-hash" version = "0.6.1" @@ -2266,7 +2411,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" dependencies = [ - "digest 0.11.3", + "digest", "hmac", ] @@ -2295,6 +2440,26 @@ dependencies = [ "ctutils", ] +[[package]] +name = "pin-project" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6c2123f4708bbd422630a6dae7c03f678b1ce1f1c99e4c4b3beac69c8174cc9" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358938fd6df944c1e44bb328b60fb275f13c804aac47ba26a1165d45a3f87756" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + [[package]] name = "pin-project-lite" version = "0.2.18" @@ -2333,9 +2498,9 @@ dependencies = [ "cbc", "der", "pbkdf2", - "rand_core 0.10.1", + "rand_core", "scrypt", - "sha2 0.11.1", + "sha2", "spki", ] @@ -2347,7 +2512,7 @@ checksum = "451913da69c775a56034ea8d9003d27ee8948e12443eae7c038ba100a4f21cb7" dependencies = [ "der", "pkcs5", - "rand_core 0.10.1", + "rand_core", "spki", ] @@ -2383,7 +2548,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2d0073b297041425c7c3df6eb4792d598a15323fe63346852b092eca02904c" dependencies = [ - "cpufeatures 0.3.1", + "cpufeatures", "universal-hash", "zeroize", ] @@ -2395,7 +2560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0fa31d631f2b2cb2a544d0aa321ce847a94764d701ca2becc411138b93d49cd" dependencies = [ "cpubits", - "cpufeatures 0.3.1", + "cpufeatures", "universal-hash", "zeroize", ] @@ -2415,15 +2580,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "primefield" version = "0.14.0" @@ -2431,9 +2587,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c555a6e4eb7d4e158fcb028c835c3b8642206ddc279b5c6b202ef9a8bdb592f4" dependencies = [ "crypto-bigint", - "crypto-common 0.2.2", + "crypto-common", "ff", - "rand_core 0.10.1", + "rand_core", "subtle", "zeroize", ] @@ -2460,6 +2616,28 @@ dependencies = [ "toml_edit", ] +[[package]] +name = "proc-macro-error-attr3" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e564d14133360e1ae169ffde5da25881b5fa47261665b8e5713c212c27799da" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error3" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0d4471b3436c22106b21913b1dda531558918ae9b7ec55d58aa84b43552233" +dependencies = [ + "proc-macro-error-attr3", + "proc-macro2", + "quote", + "syn 3.0.10", +] + [[package]] name = "proc-macro2" version = "1.0.107" @@ -2492,7 +2670,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror", + "thiserror 2.0.21", "tokio", "tracing", "web-time", @@ -2508,14 +2686,14 @@ dependencies = [ "bytes", "getrandom 0.4.3", "lru-slab", - "rand 0.10.4", + "rand", "rand_pcg", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.21", "tinyvec", "tracing", "web-time", @@ -2550,17 +2728,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" -dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.10.4" @@ -2569,26 +2736,7 @@ checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", - "rand_core 0.10.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", + "rand_core", ] [[package]] @@ -2603,7 +2751,16 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df" dependencies = [ - "rand_core 0.10.1", + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", ] [[package]] @@ -2644,53 +2801,6 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tokio-rustls", - "tokio-util", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams 0.4.2", - "web-sys", - "webpki-roots", -] - [[package]] name = "reqwest" version = "0.13.5" @@ -2731,7 +2841,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams 0.5.0", + "wasm-streams", "web-sys", ] @@ -2745,49 +2855,34 @@ dependencies = [ "hmac", ] -[[package]] -name = "rhema-autonomous-agent" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b195f903228731ff75183609970aa7177963f5cc3691b250378474dcbebef0" -dependencies = [ - "async-trait", - "rhema-core", - "rhema-rsd", - "thiserror", - "tokio", -] - [[package]] name = "rhema-bash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14bc9f013dd5b0329965d76ad929021822e4662991a26ce1d4d07c45486ac291" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "base64 0.22.1", + "base64 0.23.1", "rhema-core", "rhema-submissions", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", "tokio", ] [[package]] name = "rhema-calendar-integration" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-trait", "quick-xml", - "reqwest 0.13.5", - "rhema-autonomous-agent", + "reqwest", "rhema-rsd", "rusqlite", "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 2.0.21", "time", "tokio", "wiremock", @@ -2795,15 +2890,14 @@ dependencies = [ [[package]] name = "rhema-claw" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-trait", "axum", "base64 0.23.1", "bytes", "clap", - "reqwest 0.13.5", - "rhema-autonomous-agent", + "reqwest", "rhema-bash", "rhema-calendar-integration", "rhema-claw-tools-contract", @@ -2812,7 +2906,6 @@ dependencies = [ "rhema-forge-integration", "rhema-host-agent", "rhema-identity", - "rhema-mcp", "rhema-memory", "rhema-prompt", "rhema-provider", @@ -2827,7 +2920,7 @@ dependencies = [ "serde_json", "serde_yaml", "tempfile", - "thiserror", + "thiserror 2.0.21", "time", "tokio", "tokio-stream", @@ -2836,7 +2929,7 @@ dependencies = [ [[package]] name = "rhema-claw-tools-contract" -version = "0.4.1" +version = "0.5.0" dependencies = [ "serde", "serde_json", @@ -2845,50 +2938,50 @@ dependencies = [ [[package]] name = "rhema-config" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "657d715fca5fe5c427e2758cbf03fd0ee226dd91132e307cd1afce325deede71" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ + "age", + "getrandom 0.4.3", "keyring", "rhema-core", "serde", "serde_json", "serde_yaml", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51de499b6402a10596c7a5b9646009603b3de1e5678bf236e8d808f89d7446f" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-forge-integration" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-trait", - "reqwest 0.13.5", + "reqwest", "rhema-rsd", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", "tokio", "wiremock", ] [[package]] name = "rhema-host-agent" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d64b9f54589857b49eeed7e6cf19dffea688e20003f47601bf0fd54e930377" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ + "datealgo", "minijinja", "rhema-bash", "rhema-config", @@ -2901,66 +2994,52 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-identity" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7724fb9b693cc0721eda5ba1612e8e8420b503f6cd72365413e78ab529a8437b" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ + "datealgo", "rusqlite", "serde", - "thiserror", -] - -[[package]] -name = "rhema-mcp" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3762bf1c07ac649d5aad168eb7470871bfb0a53799b0eac06742e6fe826b3ed" -dependencies = [ - "async-stream", - "axum", - "base64 0.22.1", - "bytes", - "clap", - "futures-util", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "mcp-to-cli", - "rhema-bash", - "rhema-config", - "rhema-prompt", - "serde", - "serde_json", - "sha2 0.10.9", - "thiserror", - "tokio", + "thiserror 2.0.21", ] [[package]] name = "rhema-memory" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6caacb93f3c7188ac8d269422320a4ac6d917f9f390386644bf78f96e29191b3" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", + "datealgo", "rhema-core", "serde", "serde_json", "serde_yaml", - "thiserror", + "thiserror 2.0.21", +] + +[[package]] +name = "rhema-model-catalog" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" +dependencies = [ + "async-trait", + "reqwest", + "rhema-core", + "rhema-provider", + "serde", + "serde_json", + "tokio", ] [[package]] name = "rhema-prompt" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f92b7fb63f5cc47469284bf34c45d457e48c6307c7e169c8e80a3600b4a4694" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "minijinja", "rhema-core", @@ -2970,150 +3049,141 @@ dependencies = [ [[package]] name = "rhema-provider" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0747c23b7a2974e21405e972771aefdf96bbdd3cfeaaec8ab589cf52506c78b" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-core", - "reqwest 0.12.28", + "reqwest", "rhema-core", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", "tokio", ] [[package]] name = "rhema-provider-anthropic" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47f8b4621b5f252d2b1b0dc833adc93e57850109ef82969fe526d7b5c28e0671" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-provider-chatgpt" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be081c311c3944e80ecedeb35f7bd1b759a6e67a18131d7d6f111f6ddfa7eb47" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "base64 0.22.1", + "base64 0.23.1", "futures-util", - "rand 0.8.8", - "reqwest 0.12.28", + "rand", + "reqwest", "rhema-core", "rhema-provider", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "tokio", ] [[package]] name = "rhema-provider-copilot" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777401558ef1501786a184ff61e5ace54f5833d796069671de24bc12ebcce89" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "rhema-provider-anthropic", "rhema-provider-openai-compatible", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", "tokio", ] [[package]] name = "rhema-provider-google" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3100f54086765196c23fcbd7b2b5dccb493e025a33c9c9b8ffa4b02170a3b3d5" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-provider-llama-cpp" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c5a71591fbf6aa3bb9f373bec064f647f81272c8c3d367ac4b783446861873f" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "rhema-provider-openai-compatible", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-provider-mistral" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b86aa34a98038aaf49de500fab2884110c9b0022ff6b20d23ab13d9567618f" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "base64 0.22.1", - "rand 0.8.8", - "reqwest 0.12.28", + "base64 0.23.1", + "rand", + "reqwest", "rhema-core", "rhema-provider", "rhema-provider-openai-compatible", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "tokio", ] [[package]] name = "rhema-provider-openai-compatible" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e35f4d305a6ff00f9547f2671a1d4954ef8e6886dcbf4c51e494ee40e25fb69" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-provider-opencode" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1761a1eae28b52a2f29e3c08002824e5b93cd2a062443038218d3fff476d7ad4" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "rhema-provider-openai-compatible", @@ -3123,13 +3193,12 @@ dependencies = [ [[package]] name = "rhema-provider-openrouter" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65671e35cc068ea8c4cafeaf8e27326ffe19b416ae4956c62e26af43f486c91b" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "futures-util", - "reqwest 0.12.28", + "reqwest", "rhema-core", "rhema-provider", "rhema-provider-openai-compatible", @@ -3139,11 +3208,11 @@ dependencies = [ [[package]] name = "rhema-provider-registry" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a45bb694be2a867b2a3031b3d0c835d801a9642250caa995936dadf34b338bd" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "rhema-core", + "rhema-model-catalog", "rhema-provider", "rhema-provider-anthropic", "rhema-provider-chatgpt", @@ -3154,27 +3223,27 @@ dependencies = [ "rhema-provider-openai-compatible", "rhema-provider-opencode", "rhema-provider-openrouter", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-rsd" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1651f343f455884c7252512d970ae63dfecaa3d305f6e45c507468393b7579" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ + "async-trait", "rhema-core", "rusqlite", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", + "tokio", ] [[package]] name = "rhema-sandbox" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d753773e61931c2de04db246de89b6218bb1d9582d4e289fabb74e922fe4b1de" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "rhema-bash", @@ -3182,19 +3251,18 @@ dependencies = [ "rhema-skills", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", "tokio", ] [[package]] name = "rhema-sandbox-http" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c5e5e3e529925becf541a64145e3ecd863277693b845539ad850742f3a383a" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "base64 0.22.1", - "reqwest 0.12.28", + "base64 0.23.1", + "reqwest", "rhema-sandbox", "serde", "serde_json", @@ -3202,12 +3270,11 @@ dependencies = [ [[package]] name = "rhema-sandbox-ssh" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35db979910204bd2a828c18befa9c7b0013ff22c0ee093f69f4f47a8c2c9c61" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", - "base64 0.22.1", + "base64 0.23.1", "rhema-sandbox", "russh", "russh-config", @@ -3216,21 +3283,19 @@ dependencies = [ [[package]] name = "rhema-session-store" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5dd8185f1d74fc31a816f0b796ef9edbfd403274c467ee06ed05986f7d7800a" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "rhema-core", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-session-store-file" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b656d9982c6c2d31af79133d38d64521ee5c27574b51b826336e8d48b3f1264c" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "rhema-config", "rhema-core", @@ -3240,9 +3305,8 @@ dependencies = [ [[package]] name = "rhema-skills" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f291ba6783a523254cdea0d9469f23e7bf4cfd5c030f1e9f421774a757247096" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "rhema-core", "serde", @@ -3251,22 +3315,20 @@ dependencies = [ [[package]] name = "rhema-submissions" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f7c20c8d0292e5b0c98d0cbfcc1b5aec0977c6ab54cf77c4ff474b2d45ed8d" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "rhema-core", "rhema-session-store", "serde", "serde_json", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rhema-transcript" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a9d1314414f55b78c8ed69a9c6d05f3bb7bcfa00eab2a38dd9582b860e0a691" +version = "0.5.0" +source = "git+https://git.vhaudiquet.fr/vhaudiquet/rhema?tag=v0.5.0#986760ae354f1785c10d70c9725f18af51e97ca3" dependencies = [ "async-trait", "rhema-core", @@ -3297,14 +3359,14 @@ checksum = "23e77fd77e0dea28b3011fd62d15445b7de7959333b0276d930e03be0f755699" dependencies = [ "const-oid", "crypto-bigint", - "crypto-common 0.2.2", + "crypto-common", "crypto-primes", - "digest 0.11.3", + "digest", "hmac", "pkcs1", "pkcs8", - "rand_core 0.10.1", - "sha2 0.11.1", + "rand_core", + "sha2", "signature", "spki", "zeroize", @@ -3312,19 +3374,18 @@ dependencies = [ [[package]] name = "rsqlite-vfs" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c" +checksum = "353b74f9810d5b085b6c42c9d86a5f0fdb795553235cdd48753b32e3809d18a7" dependencies = [ - "hashbrown 0.16.1", - "thiserror", + "thiserror 2.0.21", ] [[package]] name = "rusqlite" -version = "0.40.2" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3" +checksum = "f172c4812a19b26d1c23cdb0070e69db335503dfa378b910eb857386e5b8beba" dependencies = [ "bitflags", "fallible-iterator", @@ -3354,7 +3415,7 @@ dependencies = [ "data-encoding", "delegate", "der", - "digest 0.11.3", + "digest", "ecdsa", "ed25519-dalek", "elliptic-curve", @@ -3380,8 +3441,8 @@ dependencies = [ "pkcs5", "pkcs8", "polyval", - "rand 0.10.4", - "rand_core 0.10.1", + "rand", + "rand_core", "ring", "rsa", "russh-cryptovec", @@ -3390,14 +3451,14 @@ dependencies = [ "scrypt", "sec1", "sha1", - "sha2 0.11.1", + "sha2", "sha3", "signature", "spki", "ssh-encoding", "ssh-key", "subtle", - "thiserror", + "thiserror 2.0.21", "tokio", "typenum", "universal-hash", @@ -3413,7 +3474,7 @@ dependencies = [ "futures", "globset", "log", - "thiserror", + "thiserror 2.0.21", "tokio", "whoami", ] @@ -3442,6 +3503,41 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "rust-embed" +version = "8.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98f580cf7a2863aeb6827800283f52cbe6fb3f3bb7c1843783f903c16dcb8ad" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "8.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a93e2f69cf224a6c7df7509aa5ba4a23f56828ee41b040e92ac8762371eb9ba7" +dependencies = [ + "mime_guess", + "proc-macro2", + "quote", + "rust-embed-utils", + "syn 2.0.119", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "8.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915e33dccbe7deb2b8a342dc4c517503fe85e0230ddbae40a4fb0220493dad9b" +dependencies = [ + "sha2", + "walkdir", +] + [[package]] name = "rustc-hash" version = "2.1.3" @@ -3478,7 +3574,6 @@ checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "aws-lc-rs", "once_cell", - "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -3601,7 +3696,7 @@ dependencies = [ "cfg-if", "pbkdf2", "salsa20", - "sha2 0.11.1", + "sha2", ] [[package]] @@ -3618,6 +3713,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "secrecy" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" +dependencies = [ + "zeroize", +] + [[package]] name = "secret-service" version = "5.2.0" @@ -3633,7 +3737,7 @@ dependencies = [ "num", "once_cell", "serde", - "sha2 0.11.1", + "sha2", "zbus", ] @@ -3660,6 +3764,12 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813" + [[package]] name = "semver" version = "1.0.28" @@ -3773,19 +3883,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" dependencies = [ "cfg-if", - "cpufeatures 0.3.1", - "digest 0.11.3", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", + "cpufeatures", + "digest", ] [[package]] @@ -3795,8 +3894,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" dependencies = [ "cfg-if", - "cpufeatures 0.3.1", - "digest 0.11.3", + "cpufeatures", + "digest", ] [[package]] @@ -3805,7 +3904,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc9bad02c26382724b2d2692c6f179285e4b54eeecd7968f52a50059c3c11759" dependencies = [ - "digest 0.11.3", + "digest", "keccak", "sponge-cursor", ] @@ -3816,7 +3915,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09057cb2149ad4cbd2da1e26b351f9a4c354219421229c69c3063e6f61947c4a" dependencies = [ - "digest 0.11.3", + "digest", "keccak", "sponge-cursor", ] @@ -3843,8 +3942,8 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" dependencies = [ - "digest 0.11.3", - "rand_core 0.10.1", + "digest", + "rand_core", ] [[package]] @@ -3900,17 +3999,18 @@ name = "sponge-cursor" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620" +dependencies = [ + "zeroize", +] [[package]] name = "sqlite-wasm-rs" -version = "0.5.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3efc0da82635d7e1ced0053bbbfa8c7ab9645d0bf36ceb4f7127bb85315d75" +checksum = "a6cd504cecbfe7eef649988840f9a6cb768d11085efec138f8e99f160632d867" dependencies = [ "cc", - "js-sys", "rsqlite-vfs", - "wasm-bindgen", ] [[package]] @@ -3941,7 +4041,7 @@ dependencies = [ "bytes", "crypto-bigint", "ctutils", - "digest 0.11.3", + "digest", "pem-rfc7468", "zeroize", ] @@ -3961,11 +4061,11 @@ dependencies = [ "p256", "p384", "p521", - "rand_core 0.10.1", + "rand_core", "rsa", "sec1", "sha1", - "sha2 0.11.1", + "sha2", "signature", "ssh-cipher", "ssh-encoding", @@ -4066,13 +4166,33 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] @@ -4123,6 +4243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] @@ -4159,16 +4280,6 @@ dependencies = [ "syn 3.0.10", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.6" @@ -4205,6 +4316,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml_datetime" version = "1.1.3+spec-1.1.0" @@ -4319,6 +4439,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "turboshake" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f892c6904b0bd5a9241eac848347abcbbbd2b9f3892bad23ac3e6efab8d6f06a" +dependencies = [ + "digest", + "keccak", + "sponge-cursor", +] + +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash", +] + [[package]] name = "typenum" version = "1.20.1" @@ -4336,6 +4476,31 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "unic-langid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05" +dependencies = [ + "unic-langid-impl", +] + +[[package]] +name = "unic-langid-impl" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658" +dependencies = [ + "serde", + "tinystr", +] + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + [[package]] name = "unicode-ident" version = "1.0.27" @@ -4348,7 +4513,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" dependencies = [ - "crypto-common 0.2.2", + "crypto-common", "ctutils", ] @@ -4414,12 +4579,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "walkdir" version = "2.5.1" @@ -4506,19 +4665,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasm-streams" version = "0.5.0" @@ -4561,15 +4707,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "webpki-roots" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "whoami" version = "1.6.1" @@ -4856,6 +4993,31 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" +[[package]] +name = "x-wing" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01576e56599d01d75c5efcd5b30fa5de29e776f5a225e43fbf8c92c7302d4c8b" +dependencies = [ + "kem", + "ml-kem", + "sha3", + "shake", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "x25519-dalek" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e8131a03190127fb2263afc72b322ecadae46b6ff8c6f399ff5d02f5559af6" +dependencies = [ + "curve25519-dalek", + "rand_core", + "zeroize", +] + [[package]] name = "yoke" version = "0.8.4" @@ -4960,26 +5122,6 @@ dependencies = [ "serde", ] -[[package]] -name = "zerocopy" -version = "0.8.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed43f3060383c64b000f3c630550aebdfa9d3b76d48de32390483dd2cc7e0865" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5cbd820fe3e35fb38c83b6dc7e6b1618bc46e0cd10073ae94e8d52dc468d8b9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "zerofrom" version = "0.1.8" @@ -5006,6 +5148,20 @@ name = "zeroize" version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85ccff8a4805aba1eaa4cd4afcd49f7557dd2cf5fd79ffc37f8959466effc5aa" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" @@ -5024,6 +5180,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", diff --git a/Cargo.toml b/Cargo.toml index 8d11138..0f3df93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*", "integrations/*"] [workspace.package] -version = "0.4.1" +version = "0.5.0" edition = "2024" rust-version = "1.89" license = "MIT" @@ -32,3 +32,36 @@ tokio-stream = { version = "0.1", features = ["sync"] } [profile.release] strip = "symbols" codegen-units = 1 +[patch.crates-io] +# The framework 0.5.0 is tagged but not on crates.io (publishing is retried +# with 0.5.1). Until then every rhema crate the graph uses resolves from +# that tag's git tree; the lock pins the rev. Deleting this block and +# running `cargo update` is the whole follow-up once 0.5.1 lands. +rhema-bash = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-config = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-core = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-host-agent = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-identity = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-memory = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-model-catalog = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-prompt = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-anthropic = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-chatgpt = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-copilot = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-google = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-llama-cpp = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-mistral = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-openai-compatible = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-opencode = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-openrouter = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-provider-registry = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-rsd = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-sandbox = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-sandbox-http = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-sandbox-ssh = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-session-store = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-session-store-file = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-skills = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-submissions = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } +rhema-transcript = { git = "https://git.vhaudiquet.fr/vhaudiquet/rhema", tag = "v0.5.0" } diff --git a/README.md b/README.md index 511c233..f90e97b 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ surface over HTTP — native routes plus an OpenAI-compatible shim, with a web UI and an Android client talking to it. The framework it embeds (the crates under `crates/` it pulls from -crates.io: `rhema-autonomous-agent`, `rhema-host-agent`, -`rhema-rsd`, and friends) lives in the +crates.io: `rhema-rsd`, `rhema-host-agent`, `rhema-bash`, +and friends) lives in the [rhema repository](https://git.vhaudiquet.fr/vhaudiquet/rhema). ## Layout diff --git a/crates/rhema-claw/Cargo.toml b/crates/rhema-claw/Cargo.toml index 54be320..be80c46 100644 --- a/crates/rhema-claw/Cargo.toml +++ b/crates/rhema-claw/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rhema-claw" -description = "The resident agent daemon: forge watches and the chat HTTP surface, the first consumer of rhema-autonomous-agent" +description = "The resident agent daemon: forge watches and the chat HTTP surface, the first consumer of rhema-rsd" version.workspace = true edition.workspace = true rust-version.workspace = true @@ -29,37 +29,36 @@ mock = ["rhema-core/mock"] # shell, the approval seam, and revive-on-resume (rhema-bash), the # system-prompt renderer (rhema-prompt), and the driver that turns a # provider into a host-operating agent (rhema-host-agent) -rhema-bash = "0.4.2" -rhema-prompt = "0.4.2" -rhema-host-agent = "0.4.2" -rhema-autonomous-agent = "0.4.2" -rhema-config = "0.4.2" -rhema-core = "0.4.2" +rhema-bash = "0.5.0" +rhema-prompt = "0.5.0" +rhema-host-agent = "0.5.0" +rhema-config = "0.5.0" +rhema-core = "0.5.0" # The bounded request view over the claw sessions, on by default here -rhema-transcript = "0.4.2" +rhema-transcript = "0.5.0" rhema-calendar-integration = { path = "../../integrations/rhema-calendar-integration" } rhema-forge-integration = { path = "../../integrations/rhema-forge-integration" } # The accounts layer: identities hold the forge tokens the watches poll # with, and the identity tools manage them over chat -rhema-identity = "0.4.2" -rhema-rsd = "0.4.2" +rhema-identity = "0.5.0" +rhema-rsd = { version = "0.5.0", features = ["driver"] } # The sandbox seam: where `bash` runs, this host's processes, a daemon # speaking the wire protocol over HTTP, or an ssh login on a far box. # The choice carries an ssh private key as text, so a store-held # credential has no file to stage; that is the seam the 0.4.2 line adds, # and the family moves to it together. -rhema-sandbox = "0.4.2" -rhema-sandbox-http = "0.4.2" -rhema-sandbox-ssh = "0.4.2" +rhema-sandbox = "0.5.0" +rhema-sandbox-http = "0.5.0" +rhema-sandbox-ssh = "0.5.0" # The tool contract: the agent-token allowlist and version the auth # middleware enforces (rhema-tools spec). The arrow runs claw -> # contract only — never the reverse. rhema-claw-tools-contract = { path = "../../tools/contract" } # The resident tier's durable memory: its tools join the resolver chain -rhema-memory = "0.4.2" +rhema-memory = "0.5.0" # The shared ModelCard the backend registry's listings return -rhema-provider = "0.4.2" -rhema-provider-registry = "0.4.2" +rhema-provider = "0.5.0" +rhema-provider-registry = "0.5.0" # Args for the two-flag binary surface clap = { version = "4.5", features = ["derive"] } serde = { workspace = true } @@ -78,13 +77,12 @@ axum = { workspace = true } tokio-stream = { workspace = true } # The watch table: a second connection to the same SQLite file as the # dispatcher's store — the two-connections pattern rhema-rsd's tests use -rusqlite = { version = "0.40", features = ["bundled"] } +rusqlite = { version = "0.43", features = ["bundled"] } # RFC3339 parsing for schedule_task's `at` time = { version = "0.3", default-features = false, features = ["parsing"] } # Inbound chat images ride base64; the dispatch decodes them into the # attachment store base64 = "0.23" -rhema-mcp = "0.4.2" [dev-dependencies] tempfile = "3" @@ -96,7 +94,7 @@ reqwest = { version = "0.13", features = ["json", "stream"] } bytes = "1" # The scripted provider for turn-level tests; mirrors rhema-code's mock # feature without a feature of our own — tests are the only consumer -rhema-core = { version = "0.4.2", features = ["mock"] } +rhema-core = { version = "0.5.0", features = ["mock"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time"] } [lints] diff --git a/crates/rhema-claw/README.md b/crates/rhema-claw/README.md index 43ff56a..4997ddc 100644 --- a/crates/rhema-claw/README.md +++ b/crates/rhema-claw/README.md @@ -18,7 +18,7 @@ model calls like any other). ```sh rhema-claw # serve on 127.0.0.1:7799 (config: listen) rhema-claw --once # one detect + one dispatch pass, then exit -claw mcp servers # the MCP meta surface (see rhema-mcp) +mcp list # the MCP client's own surface (a shell command) ``` ### Coding jobs: the `coding_agent` tool @@ -360,19 +360,30 @@ phone app, no CORS anywhere. The image is the daemon plus what the agent's shell needs: `bash` and `git` (the shell is load-bearing, the agent clones in its workspaces), -`curl` for a turn that fetches a URL, and `gob` for a command that -outlives the turn. The agent starts a build or a dev server with `gob -add` and reads its logs and ports on a later one. The chart runs -exactly one replica, the claw is single-node by design: one SQLite -store, one dispatcher. Single-node is what makes restarts instant: at -boot the daemon releases every lease the previous process left — -outright, not at the dead lease's TTL — so a turn an update cut -mid-flight answers its next message instead of stalling behind a ghost -(the committed tool call revives at the top of that next dispatch). The -cut turn is released as superseded on the way, so a thread it never -finished reads as aborted instead of wearing the outcome of the turn -before it. Nothing re-runs it: the mention was drained before the turn -ran, and the thread waits for the next activity. +`curl` for a turn that fetches a URL, `gob` for a command that +outlives the turn (the agent starts a build or a dev server with `gob +add` and reads its logs and ports on a later one), and the toolbox its +habits assume — `rg`, `fd`, `jq`, `yq` (the Go v4, not Debian's v3), +`sd`, `python3`. `lightpanda` is the headless browser a turn fetches +and renders pages with, and `mcp` is the MCP client the sessions call +as a shell command: its config file is the one the coding agent's +settings page writes, and without the binary a session's prompt +advertises no MCP servers at all. Every pinned binary is verified +against its release checksum at build time, and the environment report +the daemon writes at boot lists each of these as present, so a session +knows what it has. + +The chart runs exactly one replica, the claw is single-node by +design: one SQLite store, one dispatcher. Single-node is what makes +restarts instant: at boot the daemon releases every lease the previous +process left — outright, not at the dead lease's TTL — so a turn an +update cut mid-flight answers its next message instead of stalling +behind a ghost (the committed tool call revives at the top of that next +dispatch). The cut turn is released as superseded on the way, so a +thread it never finished reads as aborted instead of wearing the +outcome of the turn before it. Nothing re-runs it: the mention was +drained before the turn ran, and the thread waits for the next +activity. The store and workspaces live on a PVC, `claw.yaml` in a ConfigMap (db and workspace paths are pinned to the mounted volume), credentials in a Secret, and the bearer token is the `token` value, required since diff --git a/crates/rhema-claw/SYSTEM.md b/crates/rhema-claw/SYSTEM.md index 0edc437..69e6a0e 100644 --- a/crates/rhema-claw/SYSTEM.md +++ b/crates/rhema-claw/SYSTEM.md @@ -45,22 +45,7 @@ what it is for. The arguments are the JSON schema a call must satisfy. {% if mcp %} -## MCP servers - -Available MCP servers: -{% for server in mcp %}- {{ server.name }} (server: {{ server.server }}): {{ server.description }} -{% endfor %} - -MCP servers are reachable through bash commands (**not** direct tool calls). -Usage: - - {{ mcp[0].name }} --help # a server's tools - {{ mcp[0].name }} --help # one tool's arguments - {{ mcp[0].name }} --schema # one tool's exact input JSON - {{ mcp[0].name }} --flag value # a call; --prop_json for nested values - {{ mcp[0].name }} --json - <<'EOF' ... EOF # nested payloads: heredoc, no quoting - mcp servers | mcp tools | mcp call - +{{ mcp }} {% endif %} {% if memory %} diff --git a/crates/rhema-claw/src/backends.rs b/crates/rhema-claw/src/backends.rs index a3270f8..966bcf2 100644 --- a/crates/rhema-claw/src/backends.rs +++ b/crates/rhema-claw/src/backends.rs @@ -641,9 +641,9 @@ fn seed_llama_model(backend: &mut Backend, config: &crate::config::ClawConfig) { #[cfg(test)] mod tests { use super::*; - use rhema_autonomous_agent::async_trait; use rhema_config::secrets::SecretStore as _; use rhema_core::{EventSink, Message, ModelOutput, ModelRequest, Role, StopReason, Usage}; + use rhema_rsd::async_trait; /// A minimal scripted stand-in: registry tests never complete a turn. struct Stub; diff --git a/crates/rhema-claw/src/bootstrap.rs b/crates/rhema-claw/src/bootstrap.rs index f180246..5d711e2 100644 --- a/crates/rhema-claw/src/bootstrap.rs +++ b/crates/rhema-claw/src/bootstrap.rs @@ -216,10 +216,10 @@ pub enum Surface { /// the model schedules its own wakes to — and `onboarding`, the offer /// the template's `{% if %}` shows only while a file is unwritten, and /// only on a chat surface: a forge dispatch is nobody's first -/// conversation. `mcp` renders the wired servers' section, empty on a -/// surface with none; the memory section renders only when the roster -/// actually carries the memory tools, so a forge prompt never -/// documents tools it does not have. Fallible on purpose — a store +/// conversation. `mcp` is the client's `mcp prompt` output, rendered +/// verbatim, absent on a surface with no client; the memory section +/// renders only when the roster actually carries the memory tools, so +/// a forge prompt never documents tools it does not have. Fallible on purpose — a store /// that cannot be read surfaces loudly instead of rendering a prompt /// without it, and a template that cannot render fails the dispatch /// before any model call. @@ -231,7 +231,7 @@ pub fn render_system( bootstrap: &Bootstrap, tools: &[ToolSpec], vision: Option<&str>, - mcp: &[rhema_config::mcp::McpServerLine], + mcp: Option<&str>, surface: Surface, ) -> Result { let soul = bootstrap.load(BootstrapKind::Soul)?; @@ -453,7 +453,7 @@ mod tests { &bootstrap, &tools, None, - &[], + None, Surface::Chat, ) .expect("renders"); @@ -477,7 +477,7 @@ mod tests { &bootstrap, &[], None, - &[], + None, Surface::Forge, ) .expect("renders"); @@ -511,7 +511,7 @@ mod tests { &bootstrap, &memory, None, - &[], + None, Surface::Chat, ) .expect("renders"); @@ -522,7 +522,7 @@ mod tests { &bootstrap, &[], None, - &[], + None, Surface::Forge, ) .expect("renders"); @@ -534,13 +534,9 @@ mod tests { } #[test] - fn the_wired_mcp_servers_render_their_section() { + fn the_wired_mcp_prompt_renders_its_section() { let (_dir, bootstrap) = store(); - let mcp = [rhema_config::mcp::McpServerLine { - name: "acme-mcp".to_owned(), - server: "acme".to_owned(), - description: "the acme tools".to_owned(), - }]; + let mcp = "acme: the acme tools\n acme create_issue --json '{\"project\": \"ENG\"}'"; let prompt = render_system( DEFAULT_SYSTEM_MD, "github:issue:acme/widgets#7", @@ -548,13 +544,15 @@ mod tests { &bootstrap, &[], None, - &mcp, + Some(mcp), Surface::Forge, ) .expect("renders"); - assert!(prompt.contains("## MCP servers"), "{prompt}"); + assert!(prompt.contains("acme: the acme tools"), "{prompt}"); + // The client's text lands verbatim, quotes and braces included: + // the template escapes nothing in a markdown source. assert!( - prompt.contains("- acme-mcp (server: acme): the acme tools"), + prompt.contains(r#"acme create_issue --json '{"project": "ENG"}'"#), "{prompt}" ); let bare = render_system( @@ -564,11 +562,11 @@ mod tests { &bootstrap, &[], None, - &[], + None, Surface::Chat, ) .expect("renders"); - assert!(!bare.contains("## MCP servers"), "{bare}"); + assert!(!bare.contains("acme:"), "{bare}"); } #[test] @@ -588,7 +586,7 @@ mod tests { &bootstrap, &[], None, - &[], + None, Surface::Chat, ) .expect("renders"); @@ -618,7 +616,7 @@ mod tests { &bootstrap, &[], None, - &[], + None, Surface::Chat, ) .expect("renders"); @@ -652,7 +650,7 @@ mod tests { &bootstrap, &tools, None, - &[], + None, Surface::Chat, ) .expect("renders"); diff --git a/crates/rhema-claw/src/config.rs b/crates/rhema-claw/src/config.rs index 102d543..fe5f887 100644 --- a/crates/rhema-claw/src/config.rs +++ b/crates/rhema-claw/src/config.rs @@ -154,10 +154,12 @@ pub struct ClawConfig { /// open on its interface; set it when the port is reachable from /// anywhere but loopback. `/healthz` stays open either way. pub token: Option, - /// MCP server names held back from the claw's agents — the - /// off switch (the global `mcp.yaml` is the claw's config scope; - /// there are no profiles here). The wiring step filters before - /// anything spawns and the prompt carries only what survives. + /// MCP server names held back from the claw's agents — the off + /// switch for the client's config file (`~/.config/rhema/mcp/config.json`; + /// the claw reads the reference layout, there are no profiles + /// here). The names ride the shell as `MCP_DISABLED`, and the + /// client filters `list` and `prompt` by them, so neither the + /// prompt nor a session's shell sees a muted server. #[serde(default, skip_serializing_if = "std::collections::BTreeSet::is_empty")] pub disabled_mcp_servers: std::collections::BTreeSet, /// The scoped agent token the client tools hold: it answers only diff --git a/crates/rhema-claw/src/daemon.rs b/crates/rhema-claw/src/daemon.rs index 433f36b..4ba91d1 100644 --- a/crates/rhema-claw/src/daemon.rs +++ b/crates/rhema-claw/src/daemon.rs @@ -25,11 +25,11 @@ use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::Duration; -use rhema_autonomous_agent::{Driver, Source, SourceError}; use rhema_rsd::{ DispatchError, Dispatcher, DispatcherConfig, Outcome, ResourceKey, SqliteStore, StoreError, SystemClock, }; +use rhema_rsd::{Driver, Source, SourceError}; use crate::config::{ClawConfig, ConfigError}; use crate::extension::{ExtensionDeps, Extensions, Lanes}; @@ -784,9 +784,9 @@ mod tests { release: tokio::sync::Semaphore, } - #[rhema_autonomous_agent::async_trait] - impl rhema_autonomous_agent::Handler for GatedHandler { - async fn handle(&self, _ctx: &mut rhema_autonomous_agent::SessionContext) -> Outcome { + #[rhema_rsd::async_trait] + impl rhema_rsd::Handler for GatedHandler { + async fn handle(&self, _ctx: &mut rhema_rsd::SessionContext) -> Outcome { self.runs.fetch_add(1, Ordering::SeqCst); self.started.add_permits(1); let _ = self.release.acquire().await; diff --git a/crates/rhema-claw/src/environment.rs b/crates/rhema-claw/src/environment.rs index 92f7b17..25958c4 100644 --- a/crates/rhema-claw/src/environment.rs +++ b/crates/rhema-claw/src/environment.rs @@ -22,7 +22,26 @@ use rhema_memory::record::format_utc; /// The tools the report inventories, in report order. The list is what /// v1's resident workflow reaches for; absence of any entry is ordinary. -const TOOLS: &[&str] = &["git", "cargo", "rustc", "docker", "node", "npm", "python3"]; +const TOOLS: &[&str] = &[ + // The general toolchains. + "git", + "cargo", + "rustc", + "docker", + "node", + "npm", + "python3", + // The agent's own toolbox: the image ships these, and a session that + // does not know they are there reaches for grep and sed instead. + "rg", + "fd", + "jq", + "yq", + "sd", + "gob", + "mcp", + "lightpanda", +]; /// The per-command budget: long enough for a cold `--version`, short /// enough that a hung probe cannot stall a boot past it. diff --git a/crates/rhema-claw/src/extension.rs b/crates/rhema-claw/src/extension.rs index 111d91c..b878469 100644 --- a/crates/rhema-claw/src/extension.rs +++ b/crates/rhema-claw/src/extension.rs @@ -32,11 +32,11 @@ use std::path::PathBuf; use std::sync::Arc; -use rhema_autonomous_agent::Source; use rhema_calendar_integration::CalendarSource; use rhema_calendar_integration::CalendarStore; use rhema_core::ToolResolver; use rhema_forge_integration::ForgeKind; +use rhema_rsd::Source; use rhema_rsd::{Dispatcher, ResourceKey, SystemClock}; use crate::consents::WaitBridge; diff --git a/crates/rhema-claw/src/forge.rs b/crates/rhema-claw/src/forge.rs index 78af9c5..632e931 100644 --- a/crates/rhema-claw/src/forge.rs +++ b/crates/rhema-claw/src/forge.rs @@ -22,7 +22,6 @@ use std::collections::HashMap; use std::sync::{Arc, Mutex, PoisonError}; -use rhema_autonomous_agent::{Source, SourceError, async_trait}; use rhema_forge_integration::forge_key_fn; use rhema_forge_integration::triage::{self, Role, Triage}; use rhema_forge_integration::{ @@ -31,6 +30,7 @@ use rhema_forge_integration::{ }; use rhema_identity::{IdentityStore, SecretKind}; use rhema_rsd::{Clock, Dispatcher, Event, KeyFn, SystemClock}; +use rhema_rsd::{Source, SourceError, async_trait}; use crate::watch_store::{AccountWatchRecord, ClawStore, SCOPE_ACCOUNT, SCOPE_REPO, WatchRecord}; use rhema_forge_integration::{ForgeKind, resolve_token}; diff --git a/crates/rhema-claw/src/handler.rs b/crates/rhema-claw/src/handler.rs index b228525..097709c 100644 --- a/crates/rhema-claw/src/handler.rs +++ b/crates/rhema-claw/src/handler.rs @@ -26,7 +26,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use crate::bootstrap::{Bootstrap, DEFAULT_SYSTEM_MD, Surface}; use crate::forge::{WatchCredential, record_client, resolve_watch_credential}; use crate::watch_store::ClawStore; -use rhema_autonomous_agent::{Handler, SessionContext, async_trait}; use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{Content, Event as ModelEvent, EventSink, Message, Session}; use rhema_forge_integration::ForgeKind; @@ -37,6 +36,7 @@ use rhema_forge_integration::{ }; use rhema_host_agent::{HostAgent, HostAgentConfig}; use rhema_identity::IdentityStore; +use rhema_rsd::{Handler, SessionContext, async_trait}; use rhema_rsd::{InboxItem, Outcome, ResourceKey}; use tokio::sync::OnceCell; @@ -438,7 +438,7 @@ impl ClawHandler { // and MCP documentation render here from the same wired values; // a remote sandbox wires neither. let mut vision = None; - let mut mcp = Vec::new(); + let mut mcp = None; match &self.sandbox { Some(sandbox) if sandbox.is_remote() => { config.tools = Some(Arc::new(ShellTools::with_executor( @@ -450,7 +450,7 @@ impl ClawHandler { crate::vision::apply(&mut config); crate::mcp::apply(&mut config); vision = config.vision.clone(); - mcp = config.mcp_servers.clone(); + mcp = config.mcp.clone(); } } let mut specs = ShellTools::builtin_specs(); @@ -465,7 +465,7 @@ impl ClawHandler { &self.bootstrap, &specs, vision.as_deref(), - &mcp, + mcp.as_deref(), Surface::Forge, ) .map_err(|err| format!("cannot render the forge system prompt for {key}: {err}"))?, @@ -844,7 +844,7 @@ pub(crate) fn final_text(message: &Message) -> Option { .iter() .filter_map(|content| match content { Content::Text(text) => Some(text.as_str()), - Content::ToolCall(_) | Content::ToolResult(_) | Content::Image(_) => None, + _ => None, }) .collect::>() .join(""); diff --git a/crates/rhema-claw/src/http.rs b/crates/rhema-claw/src/http.rs index f12f256..e4bfa5c 100644 --- a/crates/rhema-claw/src/http.rs +++ b/crates/rhema-claw/src/http.rs @@ -41,11 +41,11 @@ use axum::response::{IntoResponse, Response}; use axum::routing::put; use axum::routing::{delete, get, post}; use axum::{Router, middleware}; -use rhema_autonomous_agent::Driver; use rhema_claw_tools_contract::Auth; use rhema_claw_tools_contract::CONTRACT_HEADER; use rhema_claw_tools_contract::CONTRACT_VERSION; use rhema_core::ImageMediaType; +use rhema_rsd::Driver; use rhema_rsd::{ Conflict, DispatchError, Dispatcher, IngestResult, KeyRecord, KeyState, Outcome, ResourceKey, SqliteStore, Store, diff --git a/crates/rhema-claw/src/interactive.rs b/crates/rhema-claw/src/interactive.rs index 007d7fd..b0a923d 100644 --- a/crates/rhema-claw/src/interactive.rs +++ b/crates/rhema-claw/src/interactive.rs @@ -79,7 +79,6 @@ use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use std::time::{SystemTime, UNIX_EPOCH}; use async_trait::async_trait; -use rhema_autonomous_agent::{Handler, SessionContext}; use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{ Agent, ChatParams, Content, Event as ModelEvent, EventSink, Image, ImageMediaType, Message, @@ -88,6 +87,7 @@ use rhema_core::{ }; use rhema_memory::{MemoryResolver, MemoryStore, Scope}; use rhema_rsd::{Dispatcher, Event, KeyFn, Outcome, ResourceKey}; +use rhema_rsd::{Handler, SessionContext}; use serde_json::{Value, json}; use crate::abort::{AbortGuard, AbortRegistry}; @@ -308,9 +308,16 @@ impl InteractiveHandler { // results. Local shells only — the interactive handler's // executor is this host's by construction. let vision = rhema_bash::vision::wire(std::env::var_os("BASH_ENV")); - let tools = Arc::new(match vision { - Some(wiring) => ShellTools::with_env(&workspace, &wiring.shell_env), - None => ShellTools::new(&workspace), + // The MCP env rides the same shell: the client's config path, + // its media directory, and the muted names. No init file, the + // model calls the installed client directly. + let mut env = vision + .map(|wiring| wiring.shell_env.clone()) + .unwrap_or_default(); + env.extend(crate::mcp::env()); + let tools = Arc::new(match env.is_empty() { + true => ShellTools::new(&workspace), + false => ShellTools::with_env(&workspace, &env), }); tools.install_approval(Arc::new(AllowAll)); let bootstrap_resolver = @@ -383,7 +390,7 @@ impl InteractiveHandler { &self.bootstrap, &resolver.specs(), vision, - &[], + crate::mcp::section().as_deref(), crate::bootstrap::Surface::Chat, ) .map_err(|err| format!("cannot render the bootstrap system prompt: {err}"))?; @@ -887,7 +894,7 @@ fn final_text(message: &Message) -> Option { .iter() .filter_map(|content| match content { Content::Text(text) => Some(text.as_str()), - Content::ToolCall(_) | Content::ToolResult(_) | Content::Image(_) => None, + _ => None, }) .collect::>() .join(""); @@ -1323,8 +1330,8 @@ mod tests { #[tokio::test] async fn an_embedded_arrival_migrates_at_the_fold() { let (recorder, hub, dispatcher, handler, key, _workspace) = paste_env(); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); dispatcher .ingest(user_event( key.as_str(), @@ -1364,8 +1371,8 @@ mod tests { #[tokio::test] async fn a_staged_chip_rides_its_payload_beside_the_question() { let (recorder, hub, dispatcher, handler, key, _workspace) = paste_env(); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); dispatcher .ingest(user_event( key.as_str(), @@ -1461,7 +1468,7 @@ mod tests { &handler.bootstrap, &specs, None, - &[], + None, crate::bootstrap::Surface::Chat, ) .expect("renders"); @@ -1817,8 +1824,8 @@ mod tests { .ingest(user_event(key.as_str(), "hello", &[], &[])) .expect("ingests"); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); let outcomes = driver.run_once().await.expect("the run happens"); assert_eq!(outcomes, vec![RsdOutcome::Handled]); @@ -1906,8 +1913,8 @@ mod tests { dispatcher .ingest(user_event(key.as_str(), "hello", &[], &[])) .expect("ingests"); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); // The pass runs off the test task; the first generation parks // in the gate once it is in flight — and a round's inbox drain @@ -2059,8 +2066,8 @@ mod tests { dispatcher .ingest(user_event(key.as_str(), "hello", &[], &[])) .expect("ingests"); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); // The pass runs off the test task; the generation parks in the // gate once it is in flight — the turn the abort cuts. @@ -2167,7 +2174,7 @@ mod tests { } } - #[rhema_autonomous_agent::async_trait] + #[rhema_rsd::async_trait] impl rhema_core::ModelProvider for GatedProvider { async fn complete( &self, @@ -2241,8 +2248,8 @@ mod tests { Arc::new(VolatileStore::new()), )); register_user(&dispatcher); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); let key = Key::from("interactive:web"); let png = base64::engine::general_purpose::STANDARD.encode(b"\x89PNG-fake"); let jpeg = base64::engine::general_purpose::STANDARD.encode(b"\xff\xd8jpeg"); @@ -2388,8 +2395,8 @@ mod tests { Arc::new(VolatileStore::new()), )); register_user(&dispatcher); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); let key = Key::from("interactive:web"); // Dispatch 1: the model saves through the chain's memory tools. @@ -2494,8 +2501,8 @@ mod tests { Arc::new(VolatileStore::new()), )); register_user(&dispatcher); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); let key = Key::from("interactive:web"); // Dispatch 1: the model writes SOUL.md through the chain. A key @@ -2580,7 +2587,7 @@ mod tests { dispatcher .ingest(user_event(key.as_str(), "hello", &[], &[])) .expect("ingests"); - let driver = rhema_autonomous_agent::Driver::new(dispatcher, Arc::new(handler)); + let driver = rhema_rsd::Driver::new(dispatcher, Arc::new(handler)); driver.run_once().await.expect("the run happens"); let record = backing @@ -2665,8 +2672,7 @@ mod tests { Arc::new(rhema_rsd::SystemClock), tasks(), ); - let driver = - rhema_autonomous_agent::Driver::new(dispatcher.clone(), handler).with_holder("test"); + let driver = rhema_rsd::Driver::new(dispatcher.clone(), handler).with_holder("test"); // The event shape TaskScheduler::detect delivers: the prompt is // the payload's `prompt`, the key is the task's. @@ -2790,8 +2796,8 @@ mod tests { Arc::new(rhema_rsd::SystemClock), tasks(), ); - let driver = rhema_autonomous_agent::Driver::new(dispatcher.clone(), Arc::new(handler)) - .with_holder("test"); + let driver = + rhema_rsd::Driver::new(dispatcher.clone(), Arc::new(handler)).with_holder("test"); let key = Key::from("interactive:web"); // The evening's work, in the chat session. diff --git a/crates/rhema-claw/src/jobs.rs b/crates/rhema-claw/src/jobs.rs index 9f90664..72e9820 100644 --- a/crates/rhema-claw/src/jobs.rs +++ b/crates/rhema-claw/src/jobs.rs @@ -25,11 +25,11 @@ use std::num::NonZeroU32; use std::sync::Arc; -use rhema_autonomous_agent::{Handler, SessionContext, Source, SourceError, async_trait}; use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{Event as ModelEvent, EventSink}; use rhema_host_agent::{HostAgent, HostAgentConfig}; use rhema_rsd::{Dispatcher, Event, KeyFn, Outcome, ResourceKey}; +use rhema_rsd::{Handler, SessionContext, Source, SourceError, async_trait}; use crate::backends::BackendRegistry; use crate::handler::final_text; @@ -415,8 +415,8 @@ impl EventSink for JobSink { mod tests { use super::*; use crate::backends::Backend; - use rhema_autonomous_agent::Driver; use rhema_core::{Message as CoreMessage, MockProvider, ModelOutput, Role, StopReason, Usage}; + use rhema_rsd::Driver; use rhema_rsd::{DispatcherConfig, KeyState, SqliteStore, SystemClock}; /// A registry whose only backend is the scripted mock. @@ -443,7 +443,7 @@ mod tests { /// abort interrupts, released only by the drop. struct ParkingProvider; - #[rhema_autonomous_agent::async_trait] + #[rhema_rsd::async_trait] impl rhema_core::ModelProvider for ParkingProvider { async fn complete( &self, diff --git a/crates/rhema-claw/src/lib.rs b/crates/rhema-claw/src/lib.rs index 890d57f..14b5ca3 100644 --- a/crates/rhema-claw/src/lib.rs +++ b/crates/rhema-claw/src/lib.rs @@ -1,5 +1,5 @@ //! `rhema-claw` — the resident agent daemon: forge watches plus the chat -//! HTTP surface, the first consumer of `rhema-autonomous-agent`. +//! HTTP surface, the first consumer of `rhema-rsd`. //! //! The spec invariants this crate exists to keep (specs/ //! rhema-framework-v1.md): detection is deterministic code, never the diff --git a/crates/rhema-claw/src/main.rs b/crates/rhema-claw/src/main.rs index cd99f63..2a3706f 100644 --- a/crates/rhema-claw/src/main.rs +++ b/crates/rhema-claw/src/main.rs @@ -33,10 +33,9 @@ struct Args { #[arg(long)] mock: bool, - /// The MCP meta surface, the flat flags' first subcommand: - /// `claw mcp servers | tools | schema | call`. The rest goes to - /// the MCP CLI verbatim, which reads the bridge env the init - /// file set; outside a wired agent shell it exits 4 silently. + /// The hidden passthroughs the agent shell's macros exec + /// (`__vision`). The MCP client is the standalone `mcp` binary on + /// PATH; the daemon does not dispatch it. #[command(subcommand)] command: Option, } @@ -44,12 +43,6 @@ struct Args { /// The claw's subcommands. #[derive(Debug, clap::Subcommand)] enum Command { - /// The MCP meta surface, passed through to `rhema_mcp::cli`. - Mcp { - /// The CLI's own argv, passed through untouched. - #[arg(allow_hyphen_values = true, trailing_var_arg = true)] - args: Vec, - }, /// The vision CLI the agent shell's `see` macro execs: stages the /// piped bytes (or the named files) into the session's staging /// directory. Outside a wired shell it exits 4 with a hint. @@ -63,15 +56,7 @@ enum Command { #[tokio::main] async fn main() { - // The MCP CLI owns the process when dispatched: its exit code is - // ours, its stdout/stderr contract is the caller's output. let args = Args::parse(); - if let Some(Command::Mcp { args: rest }) = &args.command { - let mut argv = Vec::with_capacity(rest.len() + 1); - argv.push(std::ffi::OsString::from("mcp")); - argv.extend(rest.iter().cloned()); - std::process::exit(rhema_mcp::cli::run(&argv)); - } if let Some(Command::Vision { args: rest }) = &args.command { let mut argv = Vec::with_capacity(rest.len() + 1); argv.push(std::ffi::OsString::from(rhema_bash::vision::MODE)); @@ -206,13 +191,23 @@ fn resolve_backends(config: &ClawConfig) -> Result>() }; let env = |name: &str| std::env::var(name).ok(); - // The daemon only reads the stored rhema config, keychain tier - // included; it never writes it, so no migration runs here — the - // file's logins belong to the frontends. In a container the - // keychain is unreachable and the literal tier serves. - let secrets = rhema_config::secrets::KeyringSecretStore::named("claw"); + // The daemon only reads the stored rhema config; it never writes + // it, so no migration runs here — the file's logins belong to the + // frontends. The secrets are the encrypted file store the current + // frontends write; the old OS keyring is copied into it once, under + // the service name the claw used, for a deployment that predates + // the file. + let home = rhema_config::Home::discover().map_err(rhema_claw::ConfigError::Stored)?; + let secrets = home.secret_store(); + let imported = stored.import_legacy_secrets( + &rhema_config::secrets::KeyringSecretReader::named("claw"), + secrets.as_ref(), + ); + if imported > 0 { + eprintln!("· copied {imported} key(s) from the OS keyring into the encrypted store"); + } let backends = - rhema_claw::backends::discover(config, &profile, &env, &claw_rows, Some(&secrets)); + rhema_claw::backends::discover(config, &profile, &env, &claw_rows, Some(secrets.as_ref())); // The config's provider/model pair seeds the active backend when it // names one. When it does not, the seed is the first credential // discovery actually found — never a hardcoded default kind, and diff --git a/crates/rhema-claw/src/mcp.rs b/crates/rhema-claw/src/mcp.rs index e575852..b716fc9 100644 --- a/crates/rhema-claw/src/mcp.rs +++ b/crates/rhema-claw/src/mcp.rs @@ -1,105 +1,177 @@ -//! The claw's MCP wiring: one bridge for the daemon process, its env -//! merged into every coding-agent session the claw runs — chat turns -//! and `coding_agent` jobs alike. The global `mcp.yaml` is the -//! claw's config scope (there are no profiles here); the off switch -//! is the claw config's `disabled_mcp_servers`. +//! The claw's MCP wiring: the prompt section and the shell env the +//! standalone `mcp` client reads. Since 0.5.0 the client and its config +//! live where the session's shell runs, so the daemon names the config +//! file and lets the client describe what it holds. +//! +//! A host session reads `~/.config/rhema/mcp/config.json` and stages +//! media under `~/.cache/rhema/mcp/media`. The config's +//! `disabled_mcp_servers` rides along as `MCP_DISABLED`, which the +//! client filters at `list` and `prompt` time. #![forbid(unsafe_code)] -use std::collections::BTreeSet; -use std::sync::{Arc, OnceLock}; +use std::collections::{BTreeMap, BTreeSet}; +use std::path::{Path, PathBuf}; +use std::sync::OnceLock; use rhema_host_agent::HostAgentConfig; +use crate::config::ClawConfig; + /// What one wiring produced, held for the process. struct Wired { - wiring: Arc, - disabled: BTreeSet, + /// The env map layered over every session's shell. + env: BTreeMap, + /// The `mcp prompt` output, `None` when the client is missing or + /// the file holds no servers. + prompt: Option, } static WIRED: OnceLock> = OnceLock::new(); +/// The MCP directory pair for the reference layout: the config file +/// and the media staging directory. +fn places(home: &rhema_config::Home) -> (PathBuf, PathBuf) { + ( + home.config.join("mcp").join("config.json"), + home.cache.join("mcp").join("media"), + ) +} + +/// Runs `mcp prompt` against one config, the synchronous host probe. +/// `None` when the client is missing, the file holds no servers, or +/// the command fails: a machine without the client advertises no +/// section rather than a command that fails at the model's first use. +fn probe(env: &BTreeMap) -> Option { + let program = std::env::var("MCP_BIN").unwrap_or_else(|_| "mcp".to_owned()); + let output = std::process::Command::new(program) + .arg("prompt") + .envs(env) + // The terminal's resume token stops here: a prompt renderer has + // no business minting a resume record for it. + .env_remove(rhema_bash::exec::OSC7577_TOKEN) + .output() + .ok()?; + if !output.status.success() { + return None; + } + let text = String::from_utf8_lossy(&output.stdout).trim().to_owned(); + (!text.is_empty()).then_some(text) +} + /// The daemon's wiring, established at first use and never re-read: -/// the claw is single-instance, its servers are stateful across -/// calls, and a rewire mid-process would orphan running sessions' -/// socket paths. `None` when nothing is configured, everything is -/// muted, or the config file cannot load. +/// the claw is single-instance and a rewire mid-process would change +/// the shell env under running sessions. `None` when the config file +/// is absent or the client answers nothing. fn wired() -> Option<&'static Wired> { WIRED .get_or_init(|| { let claw = ClawConfig::load_from(&ClawConfig::default_path().ok()?).ok()?; - let mcp = rhema_config::mcp::McpConfig::load(); - if mcp.servers.is_empty() { + let home = rhema_config::Home::discover().ok()?; + let (config, media) = places(&home); + if !config.is_file() { return None; } - let dir = std::env::temp_dir().join(format!("rhema-claw-mcp-{}", std::process::id())); - std::fs::create_dir_all(&dir).ok()?; - // The init chain: the vision wiring first, this one - // second — `BASH_ENV` names ours, whose inheritance guard - // sources the vision file, which sources the process's own. - let inherited = crate::vision::init_path().or_else(|| std::env::var_os("BASH_ENV")); - let wiring = - rhema_mcp::wire(&mcp, &claw.disabled_mcp_servers, &dir, "claw", inherited).ok()?; - for notice in &wiring.notices { - eprintln!("· {notice}"); + let _ = std::fs::create_dir_all(&media); + let mut env = BTreeMap::from([ + ( + "MCP_CONFIG".to_owned(), + config.to_string_lossy().into_owned(), + ), + ( + "MCP_MEDIA_DIR".to_owned(), + media.to_string_lossy().into_owned(), + ), + ("MCP_DISABLED".to_owned(), join(&claw.disabled_mcp_servers)), + ]); + // The installer's install directory, so the client this + // daemon probes is the one the model's shell resolves. + if let Some(path) = std::env::var_os("PATH") { + let bin_dir = std::env::var("MCP_BIN") + .ok() + .map(PathBuf::from) + .and_then(|bin| bin.parent().map(Path::to_path_buf)) + .unwrap_or_else(|| home.home.join(".local/bin")); + env.insert("PATH".to_owned(), prepend(&bin_dir, &path)); } - if wiring.lines.is_empty() { - // Everything muted: drop the wiring (its own Drop - // stops the bridge) and record the answer as none. - drop(wiring); - return None; - } - Some(Wired { - wiring: Arc::new(wiring), - disabled: claw.disabled_mcp_servers, - }) + let prompt = probe(&env); + Some(Wired { env, prompt }) }) .as_ref() } -/// Layers the wiring onto one agent config: the shell env map (the -/// init file, the socket, the token), the prompt's `mcp` lines, and -/// the persisted off switch. A frontend without wiring changes -/// nothing. +/// The `MCP_DISABLED` spelling: the client reads a comma-separated list. +fn join(disabled: &BTreeSet) -> String { + disabled.iter().cloned().collect::>().join(",") +} + +/// Prepends the client's install directory to `PATH`. +fn prepend(dir: &Path, base: &std::ffi::OsStr) -> String { + let dir = dir.to_string_lossy(); + match base.is_empty() { + true => dir.into_owned(), + false => format!("{dir}:{}", base.to_string_lossy()), + } +} + +/// The `mcp prompt` section for a frontend that renders its own +/// template (the interactive handler's low-level agent). +pub(crate) fn section() -> Option { + wired().and_then(|wired| wired.prompt.clone()) +} + +/// The shell env a frontend that builds its own `ShellTools` layers on. +pub(crate) fn env() -> BTreeMap { + wired().map(|wired| wired.env.clone()).unwrap_or_default() +} + +/// Layers the wiring onto one agent config: the shell env map and the +/// prompt's `mcp` section. A frontend without a config file or a +/// client changes nothing. pub(crate) fn apply(config: &mut HostAgentConfig) { let Some(wired) = wired() else { return; }; - config.shell_env.extend(wired.wiring.shell_env.clone()); - config.mcp_servers = wired.wiring.lines.clone(); - config.disabled_mcp_servers = wired.disabled.clone(); + config.shell_env.extend(wired.env.clone()); + config.mcp = wired.prompt.clone(); } -use crate::config::ClawConfig; - #[cfg(test)] mod tests { use super::*; - /// A first `apply` is indistinguishable from a second: the - /// extension must be idempotent at the level the agent sees (the - /// wiring map's values are constants, so extending twice is the - /// same map). #[test] - fn apply_without_any_wiring_leaves_the_config_alone() { + fn join_reads_as_the_client_expects() { + let set = BTreeSet::from(["b".to_owned(), "a".to_owned()]); + assert_eq!(join(&set), "a,b"); + assert_eq!(join(&BTreeSet::new()), ""); + } + + #[test] + fn prepend_keeps_the_base_path() { + let base = std::ffi::OsStr::new("/usr/bin"); + assert_eq!(prepend(Path::new("/opt/kit"), base), "/opt/kit:/usr/bin"); + assert_eq!( + prepend(Path::new("/opt/kit"), std::ffi::OsStr::new("")), + "/opt/kit" + ); + } + + /// A first `apply` is indistinguishable from a second: the map's + /// values are constants, so extending twice is the same map. + #[test] + fn apply_twice_is_apply_once() { let mut config = HostAgentConfig::new( rhema_core::mock::MockProvider::new([]), "m", - std::path::Path::new("/tmp"), + Path::new("/tmp"), rhema_bash::AllowAll, ); - let before = config.shell_env.clone(); apply(&mut config); - // The wiring only appears when the machine's global mcp.yaml - // has servers; a bare environment must not invent any. - let after_has_mcp_vars = config - .shell_env - .keys() - .any(|key| key.starts_with("RHEMA_MCP")); - if after_has_mcp_vars { - assert!(config.shell_env.len() > before.len()); - } else { - assert_eq!(config.shell_env, before, "no wiring, no change"); - } + let once = config.shell_env.clone(); + let section = config.mcp.clone(); + apply(&mut config); + assert_eq!(config.shell_env, once); + assert_eq!(config.mcp, section); } } diff --git a/crates/rhema-claw/src/sandbox.rs b/crates/rhema-claw/src/sandbox.rs index 4d206ab..9b88b0e 100644 --- a/crates/rhema-claw/src/sandbox.rs +++ b/crates/rhema-claw/src/sandbox.rs @@ -400,6 +400,7 @@ impl ClawShell { ), cwd: root.clone().into(), timeout: PROBE_TIMEOUT, + env: std::collections::BTreeMap::new(), }, cancelled, &mut sink, @@ -460,6 +461,7 @@ impl ShellExecutor for ClawShell { command: request.command, cwd: root, timeout: request.timeout, + env: request.env, }, cancelled, progress, @@ -812,6 +814,7 @@ mod tests { command: "echo hi".to_owned(), cwd: Path::new(REMOTE_WORKSPACE).to_path_buf(), timeout: Duration::from_secs(5), + env: std::collections::BTreeMap::new(), }, &cancelled, &mut sink, diff --git a/crates/rhema-claw/src/task_source.rs b/crates/rhema-claw/src/task_source.rs index 89094a0..ac913dc 100644 --- a/crates/rhema-claw/src/task_source.rs +++ b/crates/rhema-claw/src/task_source.rs @@ -23,8 +23,8 @@ use std::sync::Arc; -use rhema_autonomous_agent::{Source, SourceError, async_trait}; use rhema_rsd::{Clock, Dispatcher, Event, KeyFn}; +use rhema_rsd::{Source, SourceError, async_trait}; use serde_json::json; use crate::interactive::passthrough_key_fn; diff --git a/crates/rhema-claw/src/thread.rs b/crates/rhema-claw/src/thread.rs index a40d4e1..a2aa071 100644 --- a/crates/rhema-claw/src/thread.rs +++ b/crates/rhema-claw/src/thread.rs @@ -81,7 +81,7 @@ pub fn events(session: &CoreSession, last: Option<&Outcome>, leased: bool) -> Ve }); } Content::ToolResult(result) => push_result(&mut out, &calls, result), - Content::Image(_) => {} + _ => {} } } if said.is_some() { diff --git a/crates/rhema-claw/src/vision.rs b/crates/rhema-claw/src/vision.rs index b81f8fc..b51313b 100644 --- a/crates/rhema-claw/src/vision.rs +++ b/crates/rhema-claw/src/vision.rs @@ -2,10 +2,7 @@ //! env merged into every coding-agent session the claw runs — chat //! turns and `coding_agent` jobs alike. There is no config gate: the //! `see` macro is a shell affordance, not a server, so it wires -//! whenever the daemon's agents run local shells. `apply` must run -//! before [`crate::mcp::apply`]: the MCP init file bakes this one in -//! as its literal predecessor, so `BASH_ENV` has to name the MCP file -//! last. +//! whenever the daemon's agents run local shells. #![forbid(unsafe_code)] @@ -20,13 +17,6 @@ pub(crate) fn wired() -> Option<&'static Arc> { rhema_bash::vision::wire(std::env::var_os("BASH_ENV")) } -/// The init file a later provisioner chains through — `None` when the -/// vision wiring itself failed, in which case the chain falls back to -/// the process's own `BASH_ENV`. -pub(crate) fn init_path() -> Option { - wired().map(|wiring| std::ffi::OsString::from(wiring.init_path.display().to_string())) -} - /// Layers the wiring onto one agent config: the shell env map (the /// init file, the binary, the staging directory) and the prompt's /// vision section. A frontend without wiring changes nothing. diff --git a/crates/rhema-claw/tests/http.rs b/crates/rhema-claw/tests/http.rs index 2710ecd..64ea8d2 100644 --- a/crates/rhema-claw/tests/http.rs +++ b/crates/rhema-claw/tests/http.rs @@ -197,7 +197,7 @@ impl GatedProvider { } } -#[rhema_autonomous_agent::async_trait] +#[rhema_rsd::async_trait] impl rhema_core::ModelProvider for GatedProvider { async fn complete( &self, @@ -216,7 +216,7 @@ impl rhema_core::ModelProvider for GatedProvider { } } -#[rhema_autonomous_agent::async_trait] +#[rhema_rsd::async_trait] impl rhema_core::ModelProvider for RecordingProvider { async fn complete( &self, @@ -2361,6 +2361,8 @@ async fn model_listings_carry_the_vision_flag_only_when_known() { supports_vision: vision, generation_methods: vec!["generateContent".to_owned()], pricing: None, + family: None, + release_date: None, }; let cards = vec![ card("claude-sonnet-4-5", Some(true)), diff --git a/deploy/docker/claw.Dockerfile b/deploy/docker/claw.Dockerfile index a8812c0..f59b189 100644 --- a/deploy/docker/claw.Dockerfile +++ b/deploy/docker/claw.Dockerfile @@ -45,28 +45,93 @@ RUN cargo build --release -p rhema-claw FROM debian:stable-slim -# bash and git are load-bearing, not conveniences: the coding agent shells -# out via `bash -c` and clones/fetches in its per-thread workspaces. +# bash and git are load-bearing, not conveniences: the agent shells out +# via `bash -c` and clones/fetches in its per-thread workspaces. The rest +# is the toolbox the sessions' habits assume — ripgrep, fd (installed as +# `fdfind` on the Debian family; linked under the name the world types), +# jq, sd and python3 — so the agent reaches for `rg`/`jq`/`sd` and finds +# them instead of probing and falling back to grep and sed. RUN apt-get update \ - && apt-get install -y --no-install-recommends bash curl git tar ca-certificates \ + && apt-get install -y --no-install-recommends \ + bash ca-certificates curl fd-find git jq procps python3 ripgrep sd tar \ + && ln -sf /usr/bin/fdfind /usr/local/bin/fd \ && rm -rf /var/lib/apt/lists/* -# gob (github.com/juanibiapina/gob) is the agent's process manager: a turn -# starts a dev server or a build with `gob add`, and a later turn reads its -# logs, status and ports. Without it a long command either blocks the turn -# for its whole run or is backgrounded with `&`, which no later turn can -# find again. The release is a static binary, so nothing rides along but -# the file; its state lands under XDG_STATE_HOME (/data/state, the volume) -# and its socket under XDG_RUNTIME_DIR. Only amd64 and arm64 are published, -# and a build for any other arch fails here rather than shipping a daemon -# with no `gob` on PATH. +# The single-file tools, each pinned by version *and* the checksum of +# every arch's artifact: a bump means re-reading the hashes, and no +# unverified download lands in the image. +# +# - gob (github.com/juanibiapina/gob): the agent's process manager. A turn +# starts a dev server or a build with `gob add`, and a later turn reads +# its logs, status and ports. Without it a long command either blocks +# the turn for its whole run or is backgrounded with `&`, which no later +# turn can find again. Its state lands under XDG_STATE_HOME +# (/data/state, the volume) and its socket under XDG_RUNTIME_DIR. +# - mcp (github.com/vhaudiquet/mcp-cli): the MCP client. The sessions call +# it as `mcp prompt | list | call` from their shell; its config file is +# the one the coding agent's settings page writes. Without the binary the +# prompt advertises no MCP servers at all, by design. +# - yq (github.com/mikefarah/yq, the Go v4): Debian's `yq` is the unrelated +# kislyuk v3, whose filters differ; the sessions' habits are v4. +# - lightpanda (github.com/lightpanda-io/browser): the headless browser the +# agent fetches pages with. It publishes no checksum file, so the version +# is the pin and the hash below was read off the release once. +# +# The image supports amd64 and arm64: every tool above publishes at least +# those, and a build for any other arch fails here rather than shipping a +# daemon with a half-empty toolbox. ARG GOB_VERSION=3.9.0 -RUN arch="$(dpkg --print-architecture)" \ - && curl -fsSL -o /tmp/gob.tar.gz \ +ARG MCP_VERSION=0.1.0 +ARG YQ_VERSION=4.54.3 +ARG LIGHTPANDA_VERSION=1.0.6 +RUN set -eu; \ + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + amd64) \ + gob_sha=2d2ebfa584f42d63d3043b6a355ce61aaf5fae1d96a8e8ee6a85a848fcf9e790; \ + mcp_sha=fe81ada6210fff737f97edc37624907dab15bc5907db6fdae7c32a61fbb65e4e; \ + yq_sha=129534601871538efe0ba4c5e62a34fb1d5f469bcb975c4fddeb467d82974973; \ + lightpanda=lightpanda-x86_64-linux; \ + lightpanda_sha=a9bff4c0b8498433cd16d8165a5e5b47181e5690d4c8e1f011d601f1f2e8a467; \ + ;; \ + arm64) \ + gob_sha=0f03bf0531c50ae97e75a70a09b107d3c40f151ff9c83198ae1e56d13e8ddbfe; \ + mcp_sha=599a2f8a54397b8a4acd3439e09090f47babd308bfa6e0cb420f5f48cd8572d8; \ + yq_sha=89f69310b61b68d1245065a1241d1fc843f7a36cd6103ffd77ad987613bd1b67; \ + lightpanda=lightpanda-aarch64-linux; \ + lightpanda_sha=26e0042a52f493d8cc1b04faef42aea9b46bef9ccfcc86170098bd330c19a890; \ + ;; \ + *) echo "no prebuilt gob/mcp/yq/lightpanda for $arch" >&2; exit 1 ;; \ + esac; \ + tmp="$(mktemp -d)"; \ + trap 'rm -rf "$tmp"' EXIT; \ + fetch() { \ + curl -fsSL -o "$1" "$2"; \ + printf '%s %s\n' "$3" "$1" | sha256sum -c - >/dev/null; \ + }; \ + fetch "$tmp/gob.tar.gz" \ "https://github.com/juanibiapina/gob/releases/download/v${GOB_VERSION}/gob_${GOB_VERSION}_linux_${arch}.tar.gz" \ - && tar -xzf /tmp/gob.tar.gz -C /usr/local/bin gob \ - && rm /tmp/gob.tar.gz \ - && gob --version + "$gob_sha"; \ + tar -xzf "$tmp/gob.tar.gz" -C "$tmp" gob; \ + install -m 0755 "$tmp/gob" /usr/local/bin/gob; \ + fetch "$tmp/mcp.tar.gz" \ + "https://github.com/vhaudiquet/mcp-cli/releases/download/v${MCP_VERSION}/mcp_${MCP_VERSION}_linux_${arch}.tar.gz" \ + "$mcp_sha"; \ + mkdir "$tmp/mcp"; \ + tar -xzf "$tmp/mcp.tar.gz" -C "$tmp/mcp"; \ + install -m 0755 "$tmp/mcp/mcp" /usr/local/bin/mcp; \ + fetch "$tmp/yq" \ + "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_${arch}" \ + "$yq_sha"; \ + install -m 0755 "$tmp/yq" /usr/local/bin/yq; \ + fetch "$tmp/lightpanda" \ + "https://github.com/lightpanda-io/browser/releases/download/${LIGHTPANDA_VERSION}/${lightpanda}" \ + "$lightpanda_sha"; \ + install -m 0755 "$tmp/lightpanda" /usr/local/bin/lightpanda; \ + gob --version; \ + mcp --version; \ + yq --version; \ + lightpanda version # Numeric USER: Kubernetes cannot verify runAsNonRoot against a name. RUN useradd --uid 1000 --user-group --create-home claw \ diff --git a/deploy/helm/rhema-claw/Chart.yaml b/deploy/helm/rhema-claw/Chart.yaml index 149dc0b..4d75a07 100644 --- a/deploy/helm/rhema-claw/Chart.yaml +++ b/deploy/helm/rhema-claw/Chart.yaml @@ -3,5 +3,5 @@ name: rhema-claw description: "The resident forge-watching agent daemon: forge watches and a chat HTTP surface over one SQLite store." type: application -version: 0.4.1 -appVersion: "0.4.1" +version: 0.5.0 +appVersion: "0.5.0" diff --git a/integrations/rhema-calendar-integration/Cargo.toml b/integrations/rhema-calendar-integration/Cargo.toml index 647288d..f697f06 100644 --- a/integrations/rhema-calendar-integration/Cargo.toml +++ b/integrations/rhema-calendar-integration/Cargo.toml @@ -12,13 +12,12 @@ authors.workspace = true publish = false [dependencies] -rusqlite = { version = "0.40", features = ["bundled"] } +rusqlite = { version = "0.43", features = ["bundled"] } # The reminder source: one `Source` over the feeds, detect-pass shaped # like the task scheduler's -rhema-autonomous-agent = "0.4.2" # The reminder source ingests its slots into a `Dispatcher`; the event # and key-function shapes are the dispatcher's -rhema-rsd = "0.4.2" +rhema-rsd = { version = "0.5.0", features = ["driver"] } serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } diff --git a/integrations/rhema-calendar-integration/src/reminder.rs b/integrations/rhema-calendar-integration/src/reminder.rs index 23f5381..a698b3f 100644 --- a/integrations/rhema-calendar-integration/src/reminder.rs +++ b/integrations/rhema-calendar-integration/src/reminder.rs @@ -33,8 +33,8 @@ use std::sync::Arc; -use rhema_autonomous_agent::{Source, SourceError, async_trait}; use rhema_rsd::{Clock, Dispatcher, Event, KeyFn, ResourceKey}; +use rhema_rsd::{Source, SourceError, async_trait}; use serde::{Deserialize, Serialize}; use serde_json::{Value, json}; use time::OffsetDateTime; diff --git a/integrations/rhema-forge-integration/Cargo.toml b/integrations/rhema-forge-integration/Cargo.toml index 95fdb40..7c60ab7 100644 --- a/integrations/rhema-forge-integration/Cargo.toml +++ b/integrations/rhema-forge-integration/Cargo.toml @@ -13,7 +13,7 @@ publish = false [dependencies] # The dispatch seam: watches ingest into a Dispatcher -rhema-rsd = "0.4.2" +rhema-rsd = "0.5.0" serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true }