diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01eea44 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +/target +/data +*.db +*.db-* +forge.key +ssh_host_ed25519_key +.env +*.pem +.env.* + +# local config; copy config/forge.example.toml +/config/forge.toml diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5a76901 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,8717 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.7", + "generic-array 0.14.7", +] + +[[package]] +name = "aead" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99" +dependencies = [ + "crypto-common 0.2.2", + "inout 0.2.3", +] + +[[package]] +name = "aegis" +version = "0.9.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41585f248ed9406567ae6d61ca2a55ed3dc7348e65203a01229881253acb95e3" +dependencies = [ + "cc", + "softaes", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aes" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32" +dependencies = [ + "cipher 0.5.2", + "cpubits", + "cpufeatures 0.3.1", + "zeroize", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead 0.5.2", + "aes 0.8.4", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.1", + "subtle", +] + +[[package]] +name = "aes-gcm" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2b8006a0c83f52b62ba44a97b58bf76fe2f70a329e588f67f89691d93d498f" +dependencies = [ + "aead 0.6.1", + "aes 0.9.3", + "cipher 0.5.2", + "ctr 0.10.1", + "ctutils", + "ghash 0.6.0", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a" + +[[package]] +name = "alloc-stdlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "allocator-api2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c880a97d28a3681c0267bd29cff89621202715b065127cd445fa0f0fe0aa2880" + +[[package]] +name = "ammonia" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061e83b03c2681c18a6787d956e355c74e0b98ba7ba3d69b0822ade1e6f1d716" +dependencies = [ + "cssparser 0.38.0", + "html5ever 0.40.1", + "maplit", + "url", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "antithesis_sdk" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ed6751597568a284314fd9e2db420665898600109dedc7d8d9b588f00ae9c4" +dependencies = [ + "libc", + "libloading", + "linkme", + "once_cell", + "rand 0.8.8", + "rustc_version_runtime", + "serde", + "serde_json", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "anymap3" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5dfbc6d8d2675589ccbe4d0fd61df2419075625f8c1a62325e718e2b0049f9" + +[[package]] +name = "arc-swap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] + +[[package]] +name = "argon2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c52ddac6d63c576bef8168db10c83c49c26444ecbc68060fef078925a901c" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures 0.3.1", + "password-hash", +] + +[[package]] +name = "aristo" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcdeefa800110050103e2459a2f8dbdbd560ad046e30f1f87e24ce19c2cb8bde" +dependencies = [ + "aristo-macros", +] + +[[package]] +name = "aristo-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d64a66d21a80182b35b1741997a6d2456911f54b7eb1918aa4e2382fc205268d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "assoc" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdc70193dadb9d7287fa4b633f15f90c876915b31f6af17da307fc59c9859a8" + +[[package]] +name = "async-compression" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee19bd99b43e3691acbad4e840420a4881cea6c0b66a208125a824f8fd53f5a1" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "aws-lc-rs" +version = "1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "base16ct" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bcrypt-pbkdf" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "144e573728da132683b9488acd528274c790e07fc06ff81ee29f9d8f8b1041e0" +dependencies = [ + "blowfish", + "pbkdf2", + "sha2 0.11.1", +] + +[[package]] +name = "bigdecimal" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fa3f3d8cbf4dffcfe4991de61d012bef509a409ecbe9dd41049bfe32b4d4653" +dependencies = [ + "autocfg", + "libm", + "num-bigint 0.4.8", + "num-integer", + "num-traits", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.13.2", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease 0.2.37", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex 1.3.0", + "syn 2.0.119", + "which", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "bitpacking" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a7139abd3d9cebf8cd6f920a389cf3dc9576172e32f4563f188cae3c3eb019" +dependencies = [ + "crunchy", +] + +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +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 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", + "zeroize", +] + +[[package]] +name = "block-padding" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "blowfish" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ce3946557b35e71d1bbe07ec385073ce9eda05043f95de134eb578fcf1a298" +dependencies = [ + "byteorder", + "cipher 0.5.2", +] + +[[package]] +name = "bon" +version = "3.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214f5df094ce551a10a30ffb9c70243d61f121a3d985a6495933e181dee6a7d2" +dependencies = [ + "bon-macros", +] + +[[package]] +name = "bon-macros" +version = "3.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2706da6c749998cc555d04184909608956a69ad3f8ab1a076fbc867b4a3c3ce5" +dependencies = [ + "darling 0.24.1", + "ident_case", + "prettyplease 0.3.0", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "branches" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7436b21fd6195415058eb41c9090e156b556bc7e0377bb57c5c026a421521525" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "brotli" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bstr" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" +dependencies = [ + "memchr", + "regex-automata", + "serde_core", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "caps" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1ddba47aba30b6a889298ad0109c3b8dcb0e8fc993b459daa7067d46f865e0" +dependencies = [ + "libc", +] + +[[package]] +name = "caseless" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8" +dependencies = [ + "unicode-normalization", +] + +[[package]] +name = "cbc" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2dc9ee5f88d11e0beb842c88b33c8a5cf0d1329c4b19494af42b07dbfe8896" +dependencies = [ + "cipher 0.5.2", +] + +[[package]] +name = "cc" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6651c9ed80effdc7db0ff72512157f901af5e3549e341e24b1dd4887d836d838" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex 2.0.1", +] + +[[package]] +name = "census" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f4c707c6a209cbe82d10abd08e1ea8995e9ea937d2550646e02798948992be0" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom 7.1.3", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cfg_block" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18758054972164c3264f7c8386f5fc6da6114cb46b619fd365d4e3b2dc3ae487" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cipher 0.5.2", + "cpufeatures 0.3.1", + "rand_core 0.10.1", + "zeroize", +] + +[[package]] +name = "chacha20poly1305" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b89e1c441e926b9c82a8d023f6e1b7ae0adcfaa7d621814e4d60789bac751cb" +dependencies = [ + "aead 0.6.1", + "chacha20", + "cipher 0.5.2", + "poly1305", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout 0.1.4", +] + +[[package]] +name = "cipher" +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", + "inout 0.2.3", + "zeroize", +] + +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_derive" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "clap_lex" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" + +[[package]] +name = "clru" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197fd99cb113a8d5d9b6376f3aa817f32c1078f2343b714fff7d2ca44fdf67d5" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + +[[package]] +name = "codemap" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "compression-codecs" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98fc98460ba0ad5317075d3632b8dfc45d0be8c4a49347c2a38272019717614a" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8ccc4ea9f6acc32d102c0f6d471d11d913ad15f20c04de743374861fa1d414" + +[[package]] +name = "comrak" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2544c4d6b6da7d54e95ac2833b464bf3dffa0666237868f2bf4ec5e11c9ba8cc" +dependencies = [ + "bon", + "caseless", + "clap", + "emojis", + "entities", + "finl_unicode", + "fmt2io", + "memchr-n", + "phf 0.14.0", + "phf_codegen 0.14.0", + "rustc-hash 2.1.3", + "shell-words", + "smallvec", + "syntect", + "typed-arena", + "xdg", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "const_format" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "cookie" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +dependencies = [ + "aes-gcm 0.10.3", + "base64 0.22.1", + "hkdf 0.12.4", + "hmac 0.12.1", + "percent-encoding", + "rand 0.8.8", + "sha2 0.10.9", + "subtle", + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpubits" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32c" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "crc32fast" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a52aa3fcda4e6302a9f48734f234d35d4721b96f8fe07d073f07ce9df4f0271" +dependencies = [ + "cpubits", + "ctutils", + "getrandom 0.4.3", + "hybrid-array", + "num-traits", + "rand_core 0.10.1", + "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 0.14.7", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "getrandom 0.4.3", + "hybrid-array", + "rand_core 0.10.1", +] + +[[package]] +name = "crypto-primes" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3633a51a39c69ebbaa4feaa694bd83d241e4093901c84a0963b19d9bb3f0cf8f" +dependencies = [ + "crypto-bigint", + "rand_core 0.10.1", +] + +[[package]] +name = "cssparser" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.13.1", + "smallvec", +] + +[[package]] +name = "cssparser" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59" +dependencies = [ + "dtoa-short", + "itoa", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" +dependencies = [ + "quote", + "syn 3.0.9", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "ctr" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21" +dependencies = [ + "cipher 0.5.2", +] + +[[package]] +name = "ctutils" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574" +dependencies = [ + "cmov", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "curve25519-dalek-derive", + "digest 0.11.3", + "fiat-crypto", + "rand_core 0.10.1", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core 0.24.1", + "darling_macro 0.24.1", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.9", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core 0.24.1", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dashmap" +version = "6.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "datasketches" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c286de4e81ea2590afc24d754e0f83810c566f50a1388fa75ebd57928c0d9745" + +[[package]] +name = "defmt" +version = "0.3.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0963443817029b2024136fc4dd07a5107eb8f977eaf18fcd1fdeb11306b64ad" +dependencies = [ + "defmt 1.1.1", +] + +[[package]] +name = "defmt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "delegate" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780eb241654bf097afb00fc5f054a09b687dad862e485fdcf8399bb056565370" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "der" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a878c850e9e421b20262e9b41f9c860e4785fa07541c266b62ff9d1ef998a80a" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.119", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "des" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a94e407b54f9034d71dd748234cd1e516ced6284009906ae246f177eafe5a" +dependencies = [ + "cipher 0.5.2", +] + +[[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", + "subtle", +] + +[[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", + "const-oid", + "crypto-common 0.2.2", + "ctutils", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0" +dependencies = [ + "der", + "digest 0.11.3", + "elliptic-curve", + "rfc6979", + "signature", + "spki", + "zeroize", +] + +[[package]] +name = "ed25519" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.10.1", + "serde", + "sha2 0.11.1", + "signature", + "subtle", + "zeroize", +] + +[[package]] +name = "ego-tree" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b04dc5a38e4f151a79d9f2451ae6037fb6eaf5cba34771f44781f80e508498e3" + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "elliptic-curve" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d65aa39b3a5c1c9c1b745c9a019234bb7a21b77abcb4f4d266d706e2d577d65" +dependencies = [ + "base16ct", + "crypto-bigint", + "crypto-common 0.2.2", + "digest 0.11.3", + "ff", + "group", + "hkdf 0.13.0", + "hybrid-array", + "pem-rfc7468", + "pkcs8", + "rand_core 0.10.1", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "elsa" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9abf33c656a7256451ebb7d0082c5a471820c31269e49d807c538c252352186e" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "email-encoding" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420b9da095f052ea597503e39073b5b3c522f7db933fbac202d91d24492693fd" +dependencies = [ + "base64 0.23.1", + "memchr", +] + +[[package]] +name = "email_address" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" + +[[package]] +name = "emojis" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b1514ced566c94991ed9563258ecf61e311fd773bf0a3f20606830386bf66e3" +dependencies = [ + "phf 0.13.1", +] + +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "entities" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "env_filter" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6" +dependencies = [ + "env_filter", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fancy-regex" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998b056554fbe42e03ae0e152895cd1a7e1002aec800fdc6635d20270260c46f" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "fastbloom" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7f34442dbe69c60fe8eaf58a8cafff81a1f278816d8ab4db255b3bef4ac3c4" +dependencies = [ + "getrandom 0.3.4", + "libm", + "siphasher", +] + +[[package]] +name = "fastdivide" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afc2bd4d5a73106dd53d10d73d3401c2f32730ba2c0b93ddb888a8983680471" + +[[package]] +name = "faster-hex" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04839bdf9d8c10f66806fad16b852fc72aab80873aebc3cb69d85b4fa41543ed" +dependencies = [ + "autocfg", + "defmt 0.3.100", + "heapless", + "serde", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "fearless_simd" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3296eb97d869113eaf148a6bdf01884e90b3828ad7ae2340b0f93362fc158611" + +[[package]] +name = "fearless_simd_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e91d94c6885390b81782d7ee60fd6583b33907333a8b340de25ccf468353315" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "ff" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f686ab92a9fb0eaf188f6c6c87b89490baa6fdb0db4544ba4dc47f7942489f" +dependencies = [ + "rand_core 0.10.1", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "finl_unicode" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bb028c8b4148c9ee0cca68fcd9add6044e81d3619f48577ddf13a263d047a2" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "fmt2io" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b6129284da9f7e5296cc22183a63f24300e945e297705dcc0672f7df01d62c8" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "forge-ci" +version = "0.1.0" +dependencies = [ + "base64 0.23.1", + "globset", + "serde", + "serde_json", + "thiserror 2.0.21", + "toml", +] + +[[package]] +name = "forge-core" +version = "0.1.0" +dependencies = [ + "argon2", + "base64 0.23.1", + "chacha20poly1305", + "hex", + "hmac 0.13.0", + "image", + "ipnet", + "jiff", + "rand 0.10.3", + "semver", + "serde", + "serde_json", + "sha1 0.11.0", + "sha2 0.11.1", + "subtle", + "tempfile", + "thiserror 2.0.21", + "time", + "tokio", + "toml", + "tracing", + "turso", + "ulid", + "unicode-normalization", + "zip", +] + +[[package]] +name = "forge-git" +version = "0.1.0" +dependencies = [ + "base64 0.23.1", + "forge-core", + "gix", + "hex", + "sha2 0.11.1", + "tempfile", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "forge-runner" +version = "0.1.0" +dependencies = [ + "base64 0.23.1", + "bytes", + "clap", + "flate2", + "forge-ci", + "forge-runner", + "globset", + "hex", + "http-body-util", + "hyper", + "hyper-util", + "libcontainer", + "nix 0.31.3", + "oci-client", + "oci-spec", + "reqwest", + "seccompiler", + "serde", + "serde_json", + "sha2 0.11.1", + "tar", + "tempfile", + "thiserror 2.0.21", + "tokio", + "tokio-util", + "toml", + "tracing", + "tracing-subscriber", + "zstd 0.14.2", +] + +[[package]] +name = "forge-ssh" +version = "0.1.0" +dependencies = [ + "bytes", + "forge-git", + "getrandom 0.4.3", + "russh", + "tempfile", + "thiserror 2.0.21", + "tokio", + "tracing", +] + +[[package]] +name = "forge-web" +version = "0.1.0" +dependencies = [ + "ammonia", + "async-compression", + "base64 0.23.1", + "bytes", + "comrak", + "emojis", + "forge-ci", + "forge-core", + "forge-git", + "forge-runner", + "forge-ssh", + "form_urlencoded", + "futures-util", + "grass", + "hex", + "hmac 0.13.0", + "http", + "http-body", + "http-body-util", + "image", + "ipnet", + "jiff", + "lettre", + "multer", + "object_store", + "rand 0.10.3", + "reqwest", + "rpassword", + "scraper", + "serde", + "serde_json", + "sha2 0.11.1", + "similar", + "subtle", + "syntect", + "tempfile", + "time", + "tokio", + "tokio-util", + "topcoat", + "tower", + "tower-http 0.7.1", + "tracing", + "tracing-subscriber", + "ulid", + "zip", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs4" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8640e34b88f7652208ce9e88b1a37a2ae95227d84abec377ccd3c5cfeb141ed4" +dependencies = [ + "rustix 1.1.5", + "windows-sys 0.59.0", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "genawaiter" +version = "0.99.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c86bd0361bcbde39b13475e6e36cb24c329964aa2611be285289d1e4b751c1a0" +dependencies = [ + "genawaiter-macro", +] + +[[package]] +name = "genawaiter-macro" +version = "0.99.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b32dfe1fdfc0bbde1f22a5da25355514b5e450c33a6af6770884c8750aedfbc" + +[[package]] +name = "generator" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be81b31c9ce4caf7f3178eeb90662bb1864d3ad363ec6bdada3201adff19c37" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows-link", + "windows-result", +] + +[[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 = "generic-array" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "337d46834ee672ab3e48caca2cb0c78cc174fb12b3a68d0d88f99a0519a5e36e" +dependencies = [ + "generic-array 0.14.7", + "rustversion", + "typenum", +] + +[[package]] +name = "getopts" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df" +dependencies = [ + "unicode-width 0.2.2", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "getset" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cf442baaabe4213ce7d1239afc26c039180b6456da2cededa316ae2c8a77a77" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval 0.6.2", +] + +[[package]] +name = "ghash" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" +dependencies = [ + "polyval 0.7.3", + "zeroize", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gix" +version = "0.89.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2156d2e07fc3afa7632a82bf3cb0db91f995645a2852f642105c9ac9b52e1cb2" +dependencies = [ + "gix-actor", + "gix-attributes", + "gix-command", + "gix-commitgraph", + "gix-config", + "gix-date", + "gix-diff", + "gix-discover", + "gix-error", + "gix-filter", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-ignore", + "gix-index", + "gix-lock", + "gix-note", + "gix-object", + "gix-odb", + "gix-pack", + "gix-parallel", + "gix-path", + "gix-pathspec", + "gix-protocol", + "gix-quote", + "gix-ref", + "gix-refspec", + "gix-revision", + "gix-revwalk", + "gix-sec", + "gix-shallow", + "gix-submodule", + "gix-tempfile", + "gix-trace", + "gix-traverse", + "gix-url", + "gix-utils", + "gix-validate", + "gix-worktree", + "gix-worktree-stream", + "gix-zlib", + "nonempty", + "smallvec", +] + +[[package]] +name = "gix-actor" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2127da41042965ed205568a52443465806944f71c8acd73f48ec94b8cd8e798e" +dependencies = [ + "bstr", + "gix-date", + "gix-error", +] + +[[package]] +name = "gix-attributes" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0feca0b8919aba9f123b75de54062dd61eb37d2a2130f34be520da6ed8b8ef72" +dependencies = [ + "bstr", + "gix-error", + "gix-glob", + "gix-parallel", + "gix-path", + "gix-quote", + "gix-trace", + "smallvec", + "unicode-bom", +] + +[[package]] +name = "gix-bitmap" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "408cb9e482e0dcc5fc481850556348dda6981ec054a4a8e81a8e1bbf84f85eef" +dependencies = [ + "gix-error", +] + +[[package]] +name = "gix-chunk" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626335faf30ed235744642c2309aa370683b8bb2757f1c22a807e274dff60074" +dependencies = [ + "gix-error", +] + +[[package]] +name = "gix-command" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac560c05e19455016a4a94b33a77debe59aaed8783da32a73d31c9975947152e" +dependencies = [ + "bstr", + "gix-error", + "gix-path", + "gix-quote", + "gix-trace", +] + +[[package]] +name = "gix-commitgraph" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfede9936d4b789867c09722576aea4ceb0e3aacf962eef035ebab0686b41a80" +dependencies = [ + "bstr", + "gix-chunk", + "gix-error", + "gix-hash", + "memmap2", + "nonempty", +] + +[[package]] +name = "gix-config" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65a9c000fa9a9154f22ffc8f8d74426e9300d759c2029e8701e2ba39d5d464ea" +dependencies = [ + "bstr", + "gix-config-value", + "gix-error", + "gix-glob", + "gix-parallel", + "gix-path", + "gix-ref", + "gix-sec", + "gix-trace", + "gix-utils", + "smallvec", + "unicode-bom", +] + +[[package]] +name = "gix-config-value" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab206c2fccfd35e0de7fb1b424997cfd42912062c66dae024e08a06e22d46674" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-error", + "gix-path", + "gix-utils", + "libc", +] + +[[package]] +name = "gix-date" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f7eeeecc599082f32b5ea6a8c4c734e38be9730e2c09e3fe2851bb4692393e9" +dependencies = [ + "bstr", + "gix-error", + "itoa", + "jiff", +] + +[[package]] +name = "gix-diff" +version = "0.69.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa640963fdcbc6b4718e48593c3917f5ae764b59fb5a96313cb5a757246d041d" +dependencies = [ + "bstr", + "gix-command", + "gix-error", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-imara-diff", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-trace", + "gix-traverse", + "gix-worktree", +] + +[[package]] +name = "gix-discover" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d0f8fd2c7e4b458eb3081362d49b54bd0131d23ecd49be802085a11f0d3cee" +dependencies = [ + "bstr", + "dunce", + "gix-error", + "gix-fs", + "gix-path", + "gix-ref", + "gix-sec", +] + +[[package]] +name = "gix-error" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb3308a948a01b94ef13d9ee7a9b28c1303d8d9a9dc33b401ff40c2184d9e04a" +dependencies = [ + "bstr", +] + +[[package]] +name = "gix-filter" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d8d932ee4043f7d77d15ee58d2be2bc95accea5dd1d77fd145de1b7c504551b" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-error", + "gix-hash", + "gix-object", + "gix-packetline", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "smallvec", +] + +[[package]] +name = "gix-fs" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a05d043e670c055cd8b53d078562dc0bc1e322bff6b0376b407d37cf72dcc5" +dependencies = [ + "bstr", + "gix-error", + "gix-parallel", + "gix-path", + "gix-utils", + "libc", + "walkdir", +] + +[[package]] +name = "gix-glob" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0d03ab50fa841621031960679caf7fe94940968d9a0736d12a580f2c03e525" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-fs", + "gix-path", + "gix-trace", + "gix-utils", +] + +[[package]] +name = "gix-hash" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ca156064e378d8c657084365846cedb8dc498c6ea4500965a64d74f12af2be" +dependencies = [ + "faster-hex", + "gix-error", + "gix-utils", + "sha1dc", +] + +[[package]] +name = "gix-hashtable" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916cb6b2ec42ffaca624e7867bb382a4673015cb4ffcd7330b48085d02e4c615" +dependencies = [ + "gix-hash", + "hashbrown 0.17.1", + "parking_lot", +] + +[[package]] +name = "gix-ignore" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1c93f60845d493a72fde38ae237498bc4e4464f45afa4af23e53f8295a3ba1" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-trace", + "unicode-bom", +] + +[[package]] +name = "gix-imara-diff" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c48eccd894bd15555b0346470e63491ded94aefe76b3fcb1052084b5a393238" +dependencies = [ + "bstr", + "hashbrown 0.17.1", +] + +[[package]] +name = "gix-index" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6db8b20a3dba8836daf90b24199600bb27dcfce3a127ec24ae61e15a7c5b68" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "filetime", + "fnv", + "gix-bitmap", + "gix-error", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-parallel", + "gix-trace", + "gix-traverse", + "gix-utils", + "gix-validate", + "hashbrown 0.17.1", + "itoa", + "libc", + "memmap2", + "rustix 1.1.5", + "smallvec", +] + +[[package]] +name = "gix-lock" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2f7f5bd6b9fcd0b0dc58b0e6a708f3a47c3313876571dfe800c926c069aa5c" +dependencies = [ + "gix-error", + "gix-fs", + "gix-tempfile", + "gix-utils", +] + +[[package]] +name = "gix-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11f5429ca73cc3758c9f53af56a9fba100a8701c5b4bc30e29b8b0b15288991" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gix-note" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd364f8bdceaed9e7f3ae40f324b16e39f20e9c7e6a6a058f7c6ec66c3e6205c" +dependencies = [ + "gix-error", + "gix-hash", + "gix-object", +] + +[[package]] +name = "gix-object" +version = "0.66.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e38f50177e211642af154f9a7f710b7a3a637e635f9b6adb9d51973b0f9209" +dependencies = [ + "bstr", + "gix-actor", + "gix-command", + "gix-date", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-path", + "gix-tempfile", + "gix-utils", + "gix-validate", + "itoa", + "smallvec", +] + +[[package]] +name = "gix-odb" +version = "0.86.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca444f33f2140876ed6b5313c2b550b4af699008193c96f3bff5023afa9ef4ea" +dependencies = [ + "arc-swap", + "crc32fast", + "gix-error", + "gix-fs", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-pack", + "gix-parallel", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "gix-zlib", + "memmap2", + "parking_lot", + "tempfile", +] + +[[package]] +name = "gix-pack" +version = "0.76.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5024cc503cd29461a705ae90b9eae772fa8f0e6fafc1c48513877dc374de05" +dependencies = [ + "clru", + "crc32fast", + "crossbeam-deque", + "gix-chunk", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-parallel", + "gix-path", + "gix-trace", + "gix-utils", + "gix-zlib", + "memmap2", + "smallvec", + "uluru", +] + +[[package]] +name = "gix-packetline" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830e51b227f6a925fe9308858ac91170dd00fa2880f5480fc81e8a4594fe2c35" +dependencies = [ + "bstr", + "faster-hex", + "gix-error", + "gix-trace", +] + +[[package]] +name = "gix-parallel" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e994cf1eec247ba4be7f9e7c0d58cc73f83eecb5fcb9feb595df5ba3d2078546" +dependencies = [ + "crossbeam-channel", + "gix-trace", + "once_cell", + "parking_lot", +] + +[[package]] +name = "gix-path" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6d563d4d0c975ed0df4e853f9ec962a2ba46633b1d324e1a5582541fcae0c6b" +dependencies = [ + "bstr", + "gix-error", + "gix-trace", + "gix-validate", +] + +[[package]] +name = "gix-pathspec" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3b7f03e516a8435d18c3cc2d446925940c81d409145ac21edb5a576f0625e4" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-attributes", + "gix-config-value", + "gix-error", + "gix-glob", + "gix-path", +] + +[[package]] +name = "gix-protocol" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "832b5dc46a3c0a6f6fa8f8e571c11074add4b545c6789799ae6d6c36ae1a294e" +dependencies = [ + "bstr", + "gix-date", + "gix-error", + "gix-hash", + "gix-macros", + "gix-ref", + "gix-shallow", + "gix-transport", + "gix-utils", + "nonempty", +] + +[[package]] +name = "gix-quote" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f92bc1b13c09e88388578e8aa1e987ec35f28fca158c13b1baa7ab1a85b124" +dependencies = [ + "bstr", + "gix-error", + "gix-utils", +] + +[[package]] +name = "gix-ref" +version = "0.69.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "073bc0928e1f747823b1eaed94918119dacef4c616532bc3d17e5b7457863471" +dependencies = [ + "gix-actor", + "gix-error", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-parallel", + "gix-path", + "gix-tempfile", + "gix-utils", + "gix-validate", + "memmap2", +] + +[[package]] +name = "gix-refspec" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccc7010dae0df2900aa77cc67f8aca042cd80e35938ccc179010d863b1d42a0c" +dependencies = [ + "bstr", + "gix-error", + "gix-hash", + "gix-validate", + "smallvec", +] + +[[package]] +name = "gix-revision" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63210c1943b67fa700806c3c3486fc16a92b3ea871f5cf092340b8eec10a0ca1" +dependencies = [ + "bitflags 2.13.2", + "bstr", + "gix-commitgraph", + "gix-date", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "gix-trace", + "nonempty", +] + +[[package]] +name = "gix-revwalk" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "800479fbbf1e7f94f663e07943a91add5499343e7aac611a81e6a0460fd44af6" +dependencies = [ + "gix-commitgraph", + "gix-date", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-object", + "smallvec", +] + +[[package]] +name = "gix-sec" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5640f642a1b471616d48230b1def7ca743cb30903441ff84800cafbab3c0fddf" +dependencies = [ + "bitflags 2.13.2", + "gix-path", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-shallow" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94bc0720a3d6b10f18e3ac382a7780bcfc4c6bee94a8b5857b8e4ec94c50d754" +dependencies = [ + "bstr", + "gix-error", + "gix-hash", + "gix-lock", + "nonempty", +] + +[[package]] +name = "gix-submodule" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d945257bd0d624ca844a5a36c79d748df080f355b0ac92d68793875aa529a3f" +dependencies = [ + "bstr", + "gix-config", + "gix-error", + "gix-path", + "gix-pathspec", + "gix-refspec", + "gix-url", +] + +[[package]] +name = "gix-tempfile" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9275c8ae0646d840ae0156d3f90d39b7beea6e31a398afb9ee72feb293a269c" +dependencies = [ + "dashmap", + "gix-fs", + "libc", + "parking_lot", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-trace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133f2de116104d637541831b6acb157898556d5eeec363ab2eb1c583adc6bb56" + +[[package]] +name = "gix-transport" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e43d6b0097ea9f2f266d5d6c43b8f615ed3da7c686ec8771cd17c1cb33cb0de" +dependencies = [ + "bstr", + "gix-command", + "gix-error", + "gix-packetline", + "gix-path", + "gix-quote", + "gix-sec", + "gix-trace", + "gix-url", + "gix-utils", +] + +[[package]] +name = "gix-traverse" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668a6e7f7688e5a43eaf161f1471ffc559de1a5fd8471e861c64d59d1699e1e" +dependencies = [ + "bitflags 2.13.2", + "gix-commitgraph", + "gix-date", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "smallvec", +] + +[[package]] +name = "gix-url" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04317dea7a5dd5253bbcab060c230f3de6a57d17cc9600c6cd7030bf4795b414" +dependencies = [ + "bstr", + "gix-error", + "gix-path", + "gix-utils", + "percent-encoding", +] + +[[package]] +name = "gix-utils" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8e770b8c34311044d1addc7b18957db0ac27183707e1140dc90e6f674a6354e" +dependencies = [ + "bstr", + "bytes", + "fastrand", + "getrandom 0.4.3", + "gix-error", + "prodash", + "unicode-normalization", +] + +[[package]] +name = "gix-validate" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbcd59cc52742468bc5c8a0e7123390d154f45e6cbd37461b0dcecdc681f2179" +dependencies = [ + "bstr", + "gix-error", +] + +[[package]] +name = "gix-worktree" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a285c0f6b41e504e8bb81ca3f861c4da00cb3d5ced3210a4591112f22da6d38f" +dependencies = [ + "bstr", + "gix-attributes", + "gix-error", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-validate", +] + +[[package]] +name = "gix-worktree-stream" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d2789610e8179d4e0e8e51170a52a66483c103a8ad3c7db4d075b571856cb6" +dependencies = [ + "gix-attributes", + "gix-error", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-object", + "gix-parallel", + "gix-path", + "gix-trace", + "gix-traverse", + "gix-utils", + "parking_lot", +] + +[[package]] +name = "gix-zlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2edb206bf06f3c801f4f6789c696396171558ab9b4c7f1fe3ba4d39b00b0f4" +dependencies = [ + "gix-error", + "zlib-rs", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "globset" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c34a9410465b45bd9787443bc7370f37735bad04b0f0cd57ff1a3186c98988" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "grass" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7a68216437ef68f0738e48d6c7bb9e6e6a92237e001b03d838314b068f33c94" +dependencies = [ + "clap", + "getrandom 0.2.17", + "grass_compiler", +] + +[[package]] +name = "grass_compiler" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d9e3df7f0222ce5184154973d247c591d9aadc28ce7a73c6cd31100c9facff6" +dependencies = [ + "codemap", + "indexmap", + "lasso", + "once_cell", + "phf 0.11.3", + "rand 0.8.8", +] + +[[package]] +name = "group" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd1a1c7a5206c5b7a3f5a0d7ccd3ff85d0c8f5133d62a02680255b0004af5f4" +dependencies = [ + "ff", + "rand_core 0.10.1", + "subtle", +] + +[[package]] +name = "h2" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2 0.2.21", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2 0.2.21", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2 0.2.21", + "equivalent", + "foldhash", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + +[[package]] +name = "hkdf" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" +dependencies = [ + "hmac 0.13.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" +dependencies = [ + "digest 0.11.3", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if", + "libc", + "windows-link", +] + +[[package]] +name = "html5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8" +dependencies = [ + "log", + "markup5ever 0.39.0", +] + +[[package]] +name = "html5ever" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130" +dependencies = [ + "log", + "markup5ever 0.40.0", + "memchr", +] + +[[package]] +name = "htmlescape" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-auth" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "150fa4a9462ef926824cf4519c84ed652ca8f4fbae34cb8af045b5cbcaf98822" +dependencies = [ + "memchr", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" + +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "ctutils", + "subtle", + "typenum", + "zeroize", +] + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collator" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08984ed58ac439ebf3e13d2cf26b0c46a60afcd21721c1d14087c0b240344dda" +dependencies = [ + "icu_collator_data", + "icu_collections", + "icu_locale_core", + "icu_locale_fallback", + "icu_normalizer", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "zerovec", +] + +[[package]] +name = "icu_collator_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d7e54efdddeb1208c08dd5d32b53a879ac00d2d3d051b2255fd26821d16368" + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "785f595c61ef57169a467eeed7b4b6936a66f6cacbb116a96ee86da983251bf4" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_locale_data", + "icu_locale_fallback", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "serde", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locale_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d37d91460e362a5cf58907cd7ce871411775ee6294e49a5cc8e6cec16dfa75ea" + +[[package]] +name = "icu_locale_fallback" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "251af8e57c9400e3eb58242fe5b8b1152b2a64fdf4cf632f923c38ccee6f2fa9" +dependencies = [ + "icu_locale_core", + "icu_locale_fallback_data", + "icu_provider", + "potential_utf", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locale_fallback_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "decf2a22ec8fa68f1a0c1129a3f8583f8f8bc24e8b9ccbe98ead99f62a4dc3a8" + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "serde", + "stable_deref_trait", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "inout" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c0d789294fb457b791f7797a04478704788f30b407e5d0b01deaa846572d9f" +dependencies = [ + "block-padding", + "hybrid-array", +] + +[[package]] +name = "intrusive-collections" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189d0897e4cbe8c75efedf3502c18c887b05046e59d28404d4d8e46cbc4d1e86" +dependencies = [ + "memoffset", +] + +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + +[[package]] +name = "io-uring" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3bd0ecfbb87805f538bb7b32e5239ca0763890c623e349860ecba69469f2bb" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jiff" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +dependencies = [ + "defmt 1.1.1", + "jiff-core", + "jiff-static", + "jiff-tzdb", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +dependencies = [ + "defmt 1.1.1", + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", +] + +[[package]] +name = "kem" +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", +] + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lasso" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e14eda50a3494b3bf7b9ce51c52434a761e383d7238ce1dd5dcec2fbc13e9fb" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "lettre" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2c646bd5cc763b1087b15493e29a64be6147ba8f19342004fa52048ee596eae" +dependencies = [ + "async-trait", + "base64 0.23.1", + "email-encoding", + "email_address", + "fastrand", + "futures-io", + "futures-util", + "hostname", + "httpdate", + "idna", + "mime", + "nom 8.0.0", + "percent-encoding", + "quoted_printable", + "rustls", + "socket2", + "tokio", + "tokio-rustls", + "url", + "webpki-roots", +] + +[[package]] +name = "levenshtein_automata" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25" + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libcgroups" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85e8f0bca12f0d04fdd8f14858022018cd1667b4f971d6b09058fe90323e19d" +dependencies = [ + "fixedbitset", + "nix 0.29.0", + "oci-spec", + "pathrs", + "procfs", + "serde", + "thiserror 2.0.21", + "tracing", +] + +[[package]] +name = "libcontainer" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c28770cf8fb3acca0d168a10f5d9f8333d304af0b2ff5654029822d222d19f0" +dependencies = [ + "caps", + "chrono", + "fastrand", + "libc", + "libcgroups", + "nc", + "netlink-packet-core", + "netlink-packet-route", + "netlink-sys", + "nix 0.29.0", + "oci-spec", + "pathrs", + "prctl", + "procfs", + "regex", + "rust-criu", + "safe-path", + "serde", + "serde_json", + "thiserror 2.0.21", + "tracing", +] + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9" +dependencies = [ + "cc", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linkme" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3045e122bd98aef8ec3ad58ce84f0791f64e70163d1a02710af4aa11a4d54cc5" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +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.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "lru" +version = "0.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + +[[package]] +name = "lz4_flex" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e" + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "markup5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de" +dependencies = [ + "log", + "tendril", + "web_atoms 0.2.6", +] + +[[package]] +name = "markup5ever" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842" +dependencies = [ + "log", + "tendril", + "web_atoms 0.3.0", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8863b587001c1b9a8a4e36008cebc6b3612cb1226fe2de94858e06092687b608" + +[[package]] +name = "md5" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c" + +[[package]] +name = "measure_time" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c55d61e72fc3ab704396c5fa16f4c184db37978ae4e94ca8959693a235fc0e" +dependencies = [ + "log", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memchr-n" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1805571b8e7b1284ad43f27c88477840c1c0e5807c150021ac83d2228806540e" +dependencies = [ + "fearless_simd", + "fearless_simd_macros", +] + +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miette" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" +dependencies = [ + "cfg-if", + "miette-derive", + "unicode-width 0.1.14", +] + +[[package]] +name = "miette-derive" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "mimalloc" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "ml-kem" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e15f3e5b957493873e396a66914e83e616b6afe335cdef7efe5c6e1216aba66" +dependencies = [ + "hybrid-array", + "kem", + "module-lattice", + "pkcs8", + "rand_core 0.10.1", + "sha3 0.11.0", +] + +[[package]] +name = "module-lattice" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c61b87c9683ab7cb1c6871d261ad5479b6b10ceb52c4352aaca3b5d35a8febe" +dependencies = [ + "ctutils", + "hybrid-array", + "num-traits", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "murmurhash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2195bf6aa996a481483b29d62a7663eed3fe39600c460e323f8ff41e90bdd89b" + +[[package]] +name = "nc" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e743792d2d212a4fb55b910332dc3805458093f6e35b1d4ff74af2e5d5fe6106" +dependencies = [ + "cc", +] + +[[package]] +name = "netlink-packet-core" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b897d7bd4f0af82e68d40d0344cf37e97f9c97ddf74a098de3e4da05e96ca395" +dependencies = [ + "paste", +] + +[[package]] +name = "netlink-packet-route" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2288fcb784eb3defd5fb16f4c4160d5f477de192eac730f43e1d11c24d9a007" +dependencies = [ + "bitflags 2.13.2", + "libc", + "log", + "netlink-packet-core", +] + +[[package]] +name = "netlink-sys" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6c30ed10fa69cc491d491b85cc971f6bdeb8e7367b7cde2ee6cc878d583fae" +dependencies = [ + "bytes", + "libc", + "log", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "nonempty" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6" + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e7820bc0a80a0238e650327316f929ba18d5be054b647490a3a6a339f3e7c0" +dependencies = [ + "num-integer", + "num-traits", + "rand 0.10.3", + "rand_core 0.10.1", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object_store" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1796bc93603f78c5760a69f2d58badc9618d22adade0a95385bb2adbae4eb94" +dependencies = [ + "async-trait", + "bytes", + "chrono", + "futures-channel", + "futures-core", + "futures-util", + "http", + "humantime", + "itertools 0.15.0", + "nix 0.31.3", + "parking_lot", + "percent-encoding", + "thiserror 2.0.21", + "tokio", + "tracing", + "url", + "walkdir", + "wasm-bindgen-futures", + "web-time", + "windows-sys 0.61.2", +] + +[[package]] +name = "oci-client" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc7848d781053285280fcd35aab24c9c0a677e26db4aa4209bd5db57467de0f" +dependencies = [ + "base64 0.22.1", + "bytes", + "chrono", + "futures-util", + "hex", + "http", + "http-auth", + "oci-spec", + "olpc-cjson", + "regex", + "reqwest", + "serde", + "serde_json", + "sha2 0.11.1", + "thiserror 2.0.21", + "tokio", + "tracing", + "unicase", +] + +[[package]] +name = "oci-spec" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6f876ad774d6a676f7e968f5c3edacc32f90e65fe680a8b686235396556fb" +dependencies = [ + "const_format", + "derive_builder", + "getset", + "regex", + "serde", + "serde_json", + "strum 0.27.2", + "strum_macros 0.27.2", + "thiserror 2.0.21", +] + +[[package]] +name = "olpc-cjson" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "696183c9b5fe81a7715d074fd632e8bd46f4ccc0231a3ed7fc580a80de5f7083" +dependencies = [ + "serde", + "serde_json", + "unicode-normalization", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "oneshot" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "269bca4c2591a28585d6bf10d9ed0332b7d76900a1b02bec41bdc3a2cdcda107" + +[[package]] +name = "onig" +version = "6.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc3cbf698f9438986c11a880c90a6d04b9de27575afd28bbf45b154b6c709e2" +dependencies = [ + "bitflags 2.13.2", + "libc", + "once_cell", + "onig_sys", +] + +[[package]] +name = "onig_sys" +version = "69.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e68317604e77e53b85896388e1a803c1d21b74c899ec9e5e1112db90735edd7" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "ordered-float" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ownedbytes" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fbd56f7631767e61784dc43f8580f403f4475bd4aaa4da003e6295e1bab4a7e" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "p256" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c9239b2dbc807adbbe147e8cf72ea7450c3a0aabe62cb8e75ff4ec22e1f72a" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primefield", + "primeorder", + "sha2 0.11.1", +] + +[[package]] +name = "p384" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d17b851e6b3e378ab4ecb07fa2ed23f4d15f075735f8fec9fa1e7bdce5f8301f" +dependencies = [ + "ecdsa", + "elliptic-curve", + "fiat-crypto", + "primefield", + "primeorder", + "sha2 0.11.1", +] + +[[package]] +name = "p521" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad64cc32c2dc466317c12ee5853e61f159f9eab1fe7efade0395dc2e7b43449" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primefield", + "primeorder", + "sha2 0.11.1", +] + +[[package]] +name = "pack1" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b7bb0ecf2e447b1f20ee94ee79ef6eed1e9d4b3c36ce1903b9dea3bf205523" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "pageant" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0786409b5aaa884655c9b4065681db0835db0cc185a6fb19fb17a5d38656866" +dependencies = [ + "base16ct", + "byteorder", + "bytes", + "delegate", + "futures", + "log", + "rand 0.10.3", + "sha2 0.11.1", + "thiserror 2.0.21", + "tokio", + "windows", + "windows-strings", +] + +[[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", + "smallvec", + "windows-link", +] + +[[package]] +name = "password-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aab41826031698d6ffcd9cff78ef56ef998e39dc7e5067cdfebe373842d4723b" +dependencies = [ + "getrandom 0.4.3", + "phc", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + +[[package]] +name = "pathrs" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd74b8fd656302d50059a07147444e46d6c2f162656271cf626e8ff3fad4cce8" +dependencies = [ + "bitflags 2.13.2", + "itertools 0.15.0", + "libc", + "memchr", + "once_cell", + "rustix 1.1.5", + "rustversion", + "static_assertions", + "tempfile", + "thiserror 2.0.21", +] + +[[package]] +name = "pbkdf2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" +dependencies = [ + "digest 0.11.3", + "hmac 0.13.0", +] + +[[package]] +name = "pem-rfc7468" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phc" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44dc769b75f93afdddd8c7fa12d685292ddeff1e66f7f0f3a234cf1818afe892" +dependencies = [ + "base64ct", + "ctutils", + "getrandom 0.4.3", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", +] + +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" +dependencies = [ + "phf_shared 0.14.0", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_codegen" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared 0.11.3", + "rand 0.8.8", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" +dependencies = [ + "fastrand", + "phf_shared 0.14.0", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkcs1" +version = "0.8.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkcs5" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63d440a804ec8d6fafbb6b84471e013286658d373248927692ab3366686220ca" +dependencies = [ + "aes 0.9.3", + "aes-gcm 0.11.1", + "cbc", + "der", + "pbkdf2", + "rand_core 0.10.1", + "scrypt", + "sha2 0.11.1", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451913da69c775a56034ea8d9003d27ee8948e12443eae7c038ba100a4f21cb7" +dependencies = [ + "der", + "pkcs5", + "rand_core 0.10.1", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plist" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896bade328c13f7042a297ea5ac5b0951f6cf989dea5f32c2fd98da398195cb" +dependencies = [ + "base64 0.23.1", + "indexmap", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "poly1305" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2d0073b297041425c7c3df6eb4792d598a15323fe63346852b092eca02904c" +dependencies = [ + "cpufeatures 0.3.1", + "universal-hash 0.6.1", + "zeroize", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash 0.5.1", +] + +[[package]] +name = "polyval" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0fa31d631f2b2cb2a544d0aa321ce847a94764d701ca2becc411138b93d49cd" +dependencies = [ + "cpubits", + "cpufeatures 0.3.1", + "universal-hash 0.6.1", + "zeroize", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "serde_core", + "writeable", + "zerovec", +] + +[[package]] +name = "powerfmt" +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 = "prctl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" +dependencies = [ + "libc", + "nix 0.31.3", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.119", +] + +[[package]] +name = "prettyplease" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0" +dependencies = [ + "proc-macro2", + "syn 3.0.9", +] + +[[package]] +name = "primefield" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c555a6e4eb7d4e158fcb028c835c3b8642206ddc279b5c6b202ef9a8bdb592f4" +dependencies = [ + "crypto-bigint", + "crypto-common 0.2.2", + "ff", + "rand_core 0.10.1", + "subtle", + "zeroize", +] + +[[package]] +name = "primeorder" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c9f42978c78a00e3d68f69fc03e57a234debae69da4020a4fb588fcdcd07b06" +dependencies = [ + "elliptic-curve", + "once_cell", + "primefield", + "serdect", + "wnaf", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "procfs" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" +dependencies = [ + "bitflags 2.13.2", + "chrono", + "flate2", + "procfs-core", + "rustix 1.1.5", +] + +[[package]] +name = "procfs-core" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" +dependencies = [ + "bitflags 2.13.2", + "chrono", + "hex", +] + +[[package]] +name = "prodash" +version = "31.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf52d87428247c5aa3760ac8e7d8b13ec7b3579b955a8c3f311668b6860acba5" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "prost" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "protobuf" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-codegen" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace" +dependencies = [ + "anyhow", + "once_cell", + "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-parse" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" +dependencies = [ + "anyhow", + "indexmap", + "log", + "protobuf", + "protobuf-support", + "tempfile", + "thiserror 1.0.69", + "which", +] + +[[package]] +name = "protobuf-support" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" +dependencies = [ + "thiserror 1.0.69", +] + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.3", + "rustls", + "socket2", + "thiserror 2.0.21", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.3", + "rand_pcg 0.10.2", + "ring", + "rustc-hash 2.1.3", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.21", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "quoted_printable" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478e0585659a122aa407eb7e3c0e1fa51b1d8a870038bd29f0cf4a8551eea972" + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +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_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rapidhash" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da7e78a036ce858e8d55b7e7dc8ba3a88b78350fd2155d3591bbd966b58589e" +dependencies = [ + "rustversion", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http 0.6.11", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rfc6979" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a459cddafb3fe76b31fd8f1108007566c40301feb64dc7b54656eb7388172b" +dependencies = [ + "crypto-bigint", + "hmac 0.13.0", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "roaring" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18bd8a37d17a58532776dcdf6041ce64929adca78e8489d5cacbafe99229d3e1" +dependencies = [ + "bytemuck", + "byteorder", +] + +[[package]] +name = "rpassword" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da316a15f47e3d053de9cb2c439650bd8fa4aaeb9365f2e5f27f492ff73c196" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.61.2", +] + +[[package]] +name = "rsa" +version = "0.10.0-rc.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" +dependencies = [ + "const-oid", + "crypto-bigint", + "crypto-primes", + "digest 0.11.3", + "pkcs1", + "pkcs8", + "rand_core 0.10.1", + "sha2 0.11.1", + "signature", + "spki", + "zeroize", +] + +[[package]] +name = "rtoolbox" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a1efe12a1469752d0e6ff5ebec0b6ef4924cc5c4c71046b0ec730040535819d" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "russh" +version = "0.64.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba61e87b9ec9a39a59a6bbed4c0b8ff7fb07073405b24a767a1f2c8560ac8f58" +dependencies = [ + "aes 0.9.3", + "aws-lc-rs", + "bitflags 2.13.2", + "block-padding", + "byteorder", + "bytes", + "cbc", + "cipher 0.5.2", + "crypto-bigint", + "ctr 0.10.1", + "curve25519-dalek", + "data-encoding", + "delegate", + "der", + "digest 0.11.3", + "ecdsa", + "ed25519-dalek", + "elliptic-curve", + "enum_dispatch", + "flate2", + "futures", + "generic-array 1.4.5", + "getrandom 0.4.3", + "ghash 0.6.0", + "hex-literal", + "hmac 0.13.0", + "inout 0.2.3", + "keccak", + "log", + "md5", + "ml-kem", + "module-lattice", + "num-bigint 0.5.1", + "p256", + "p384", + "p521", + "pageant", + "pbkdf2", + "pkcs1", + "pkcs5", + "pkcs8", + "polyval 0.7.3", + "rand 0.10.3", + "rand_core 0.10.1", + "rsa", + "russh-cryptovec", + "russh-util", + "salsa20", + "scrypt", + "sec1", + "sha1 0.11.0", + "sha2 0.11.1", + "sha3 0.12.0", + "signature", + "spki", + "ssh-encoding", + "ssh-key", + "subtle", + "thiserror 2.0.21", + "tokio", + "typenum", + "universal-hash 0.6.1", + "zeroize", +] + +[[package]] +name = "russh-cryptovec" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aec6cb630dbe85d72ffd7bcd95f07e1bd69f9f270ee8adfa1afe443a6331438" +dependencies = [ + "log", + "nix 0.31.3", + "ssh-encoding", + "windows-sys 0.61.2", +] + +[[package]] +name = "russh-util" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668424a5dde0bcb45b55ba7de8476b93831b4aa2fa6947e145f3b053e22c60b6" +dependencies = [ + "chrono", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "rust-criu" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5e5f0a3792bf6fbc4357554fb37b08c9a5a103e9bbf557d0cd65a4c8848ab1" +dependencies = [ + "libc", + "protobuf", + "protobuf-codegen", + "thiserror 2.0.21", +] + +[[package]] +name = "rust-stemmers" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustc_version_runtime" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" +dependencies = [ + "rustc_version", + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "safe-path" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980abdd3220aa19b67ca3ea07b173ca36383f18ae48cde696d90c8af39447ffb" +dependencies = [ + "libc", +] + +[[package]] +name = "salsa20" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f874456e72520ff1375a06c588eaf074b0f01f9e9e1aada45bd9b7954a6e42c" +dependencies = [ + "cfg-if", + "cipher 0.5.2", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scraper" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd0be4d296f048bfb06dd01bbc80ef789ddd2e55583e8d2e6b804942abfabc2" +dependencies = [ + "cssparser 0.37.0", + "ego-tree", + "getopts", + "html5ever 0.39.0", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "scrypt" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87af57419b594aa23fa95f09f0e06d80d84ba01c26148c43844cad6ff4485f0" +dependencies = [ + "cfg-if", + "pbkdf2", + "salsa20", + "sha2 0.11.1", +] + +[[package]] +name = "sec1" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56d437c2f19203ce5f7122e507831de96f3d2d4d3be5af44a0b0a09d8a80e4d" +dependencies = [ + "base16ct", + "ctutils", + "der", + "hybrid-array", + "subtle", + "zeroize", +] + +[[package]] +name = "seccompiler" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ae55de56877481d112a559bbc12667635fdaf5e005712fd4e2b2fa50ffc884" +dependencies = [ + "libc", + "serde", + "serde_json", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "selectors" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" +dependencies = [ + "bitflags 2.13.2", + "cssparser 0.37.0", + "derive_more", + "log", + "new_debug_unreachable", + "phf 0.13.1", + "phf_codegen 0.13.1", + "precomputed-hash", + "rustc-hash 2.1.3", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serdect" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66cf8fedced2fcf12406bcb34223dffb92eaf34908ede12fed414c82b7f00b3e" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0" +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 = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + +[[package]] +name = "sha1dc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5b0ebf6537e3e8db8bb7d21ecb6d7399738c953c757945c6b95e46c4e95df7b" + +[[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", +] + +[[package]] +name = "sha2" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "digest 0.11.3", +] + +[[package]] +name = "sha3" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1" +dependencies = [ + "digest 0.11.3", + "keccak", +] + +[[package]] +name = "sha3" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9bad02c26382724b2d2692c6f179285e4b54eeecd7968f52a50059c3c11759" +dependencies = [ + "digest 0.11.3", + "keccak", + "sponge-cursor", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "shuttle" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab17edba38d63047f46780cf7360acf7467fec2c048928689a5c1dd1c2b4e31" +dependencies = [ + "assoc", + "bitvec", + "cfg-if", + "generator", + "hex", + "owo-colors", + "rand 0.8.8", + "rand_core 0.6.4", + "rand_pcg 0.3.1", + "scoped-tls", + "smallvec", + "tracing", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +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", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "similar" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f66ca1f7aca2474dc10c942eb22feffc897735f54cd1db90138c2fddb490987" +dependencies = [ + "bstr", +] + +[[package]] +name = "simsimd" +version = "6.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fb3bc3cdce07a7d7d4caa4c54f8aa967f6be41690482b54b24100a2253fa70" +dependencies = [ + "cc", +] + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "sketches-ddsketch" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513c3f5f732bfd6fbb187619c2dfe9d2f25f1a2976f01d575f0fd329d565df56" +dependencies = [ + "serde", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softaes" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4fdfe13e1c42e45f497416afb8dc4e783bf0e25b7be9077c1c77c5fb14cb998" + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "spki" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef958a98b9d5da290cfc78946e9f3e61e1e62a18db0d92cac0b83cc161491a9" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sponge-cursor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620" + +[[package]] +name = "ssh-cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d801accda99469cde6d73da741422610fdf6508a72d9a69d1b55cb241c720597" +dependencies = [ + "aead 0.6.1", + "aes 0.9.3", + "aes-gcm 0.11.1", + "chacha20", + "cipher 0.5.2", + "ctutils", + "des", + "poly1305", + "ssh-encoding", + "zeroize", +] + +[[package]] +name = "ssh-encoding" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b54d0ed0498daf3f78d82e00e28c8eec9d75a067c4cfbcc7a0f7d0f4077749e" +dependencies = [ + "base64ct", + "bytes", + "crypto-bigint", + "ctutils", + "digest 0.11.3", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "ssh-key" +version = "0.7.0-rc.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" +dependencies = [ + "argon2", + "bcrypt-pbkdf", + "ctutils", + "ed25519-dalek", + "hex", + "hmac 0.13.0", + "p256", + "p384", + "p521", + "rand_core 0.10.1", + "rsa", + "sec1", + "sha1 0.11.0", + "sha2 0.11.1", + "signature", + "ssh-cipher", + "ssh-encoding", + "zeroize", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.13.1", + "precomputed-hash", +] + +[[package]] +name = "string_cache" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.14.0", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", +] + +[[package]] +name = "string_cache_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] + +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.119", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "syntect" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925" +dependencies = [ + "bincode", + "fancy-regex", + "flate2", + "fnv", + "once_cell", + "onig", + "plist", + "regex-syntax", + "serde", + "serde_derive", + "serde_json", + "thiserror 2.0.21", + "walkdir", + "yaml-rust", +] + +[[package]] +name = "tantivy" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "861facfabd71044968f364837f9a083b56464ba5a59079f88706ee5c451ca069" +dependencies = [ + "aho-corasick", + "arc-swap", + "base64 0.22.1", + "bitpacking", + "bon", + "byteorder", + "census", + "crc32fast", + "crossbeam-channel", + "datasketches", + "downcast-rs", + "fastdivide", + "fnv", + "fs4", + "htmlescape", + "itertools 0.14.0", + "levenshtein_automata", + "log", + "lru", + "lz4_flex", + "measure_time", + "memmap2", + "once_cell", + "oneshot", + "rayon", + "regex", + "rust-stemmers", + "rustc-hash 2.1.3", + "serde", + "serde_json", + "sketches-ddsketch", + "smallvec", + "tantivy-bitpacker", + "tantivy-columnar", + "tantivy-common", + "tantivy-fst", + "tantivy-query-grammar", + "tantivy-stacker", + "tantivy-tokenizer-api", + "tempfile", + "thiserror 2.0.21", + "time", + "typetag", + "uuid", + "winapi", +] + +[[package]] +name = "tantivy-bitpacker" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fed3d674429bcd2de5d0a6d1aa5495fed8afd9c5ecce993019caf7615f53fa4" +dependencies = [ + "bitpacking", +] + +[[package]] +name = "tantivy-columnar" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c57166f5bcfd478f370ab8445afb4678dce44801fa5ce5c451aaf8595583c5dc" +dependencies = [ + "downcast-rs", + "fastdivide", + "itertools 0.14.0", + "serde", + "tantivy-bitpacker", + "tantivy-common", + "tantivy-sstable", + "tantivy-stacker", +] + +[[package]] +name = "tantivy-common" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbf10915aa75da3c3b0d58b58853d2e889efbaf32d4982a4c3715dde6bba23e5" +dependencies = [ + "async-trait", + "byteorder", + "ownedbytes", + "serde", + "time", +] + +[[package]] +name = "tantivy-fst" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d60769b80ad7953d8a7b2c70cdfe722bbcdcac6bccc8ac934c40c034d866fc18" +dependencies = [ + "byteorder", + "regex-syntax", + "utf8-ranges", +] + +[[package]] +name = "tantivy-query-grammar" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfadb8526b6da90704feb293b0701a6aae62ea14983143344be2dc5ce30f1d82" +dependencies = [ + "fnv", + "nom 7.1.3", + "ordered-float", + "serde", + "serde_json", +] + +[[package]] +name = "tantivy-sstable" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2cfc3ac5164cbadc28965ffb145a8f47582a60ae5897859ad8d4316596c606" +dependencies = [ + "futures-util", + "itertools 0.14.0", + "tantivy-bitpacker", + "tantivy-common", + "tantivy-fst", + "zstd 0.13.3", +] + +[[package]] +name = "tantivy-stacker" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cbb051742da9d53ca9e8fff43a9b10e319338b24e2c0e15d0372df19ffeb951" +dependencies = [ + "murmurhash32", + "tantivy-common", +] + +[[package]] +name = "tantivy-tokenizer-api" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac258c2c6390673f2685813afeeafcb8c4e0ee7de8dd3fc46838dcc37263f98" +dependencies = [ + "serde", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "terminal_size" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" +dependencies = [ + "rustix 1.1.5", + "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 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]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "serde_core", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f72a05e828585856dacd553fba484c242c46e391fb0e58917c942ee9202915c" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "1.1.8+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.17+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" + +[[package]] +name = "topcoat" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7802e424033acc38249ada210b380d9846243b2830e097163780569990f8dfe" +dependencies = [ + "futures-util", + "inventory", + "serde", + "tokio", + "tokio-tungstenite", + "topcoat-asset", + "topcoat-cookie", + "topcoat-core", + "topcoat-core-macro", + "topcoat-font", + "topcoat-font-macro", + "topcoat-mail", + "topcoat-router", + "topcoat-router-macro", + "topcoat-runtime", + "topcoat-runtime-macro", + "topcoat-session", + "topcoat-view", + "topcoat-view-macro", +] + +[[package]] +name = "topcoat-asset" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c227236b1910fc45d5fe42bdd0841c9d48a77b58a23c2bc937f80c6ca7fccd10" +dependencies = [ + "http", + "memchr", + "serde", + "sha2 0.11.1", + "thiserror 2.0.21", + "tokio", + "toml", + "topcoat-core", + "topcoat-router", + "topcoat-view", +] + +[[package]] +name = "topcoat-cookie" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc66c765a1b4b3c967e76f298e11444a8372f1e04e3406f12118d9212df5c338" +dependencies = [ + "cookie", + "getrandom 0.2.17", + "http", + "serde", + "serde_json", + "topcoat-core", + "topcoat-router", +] + +[[package]] +name = "topcoat-core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e50a7a9c7df454982f9103ac0ff0c1f7a0dacc304bf5273686d9652c56dbf24" +dependencies = [ + "anymap3", + "base64 0.22.1", + "elsa", + "http", + "pin-project-lite", + "siphasher", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "topcoat-core-grammar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e281c766230381a4d1b2827c4177487342210b4673f850864c2749e071ee81" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "topcoat-core-macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b7a0f2d5d7faaa2cdf48e19b042b26d5da185f1d42be87dc3c16a6868dcdeb5" +dependencies = [ + "quote", + "syn 3.0.9", + "topcoat-core-grammar", +] + +[[package]] +name = "topcoat-font" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccfde441afe9559296586891317bc8bd332bed8bfb4daaf78578d2f4f5f08ae" +dependencies = [ + "heck", + "inventory", + "serde", + "serde_json", + "topcoat-asset", + "topcoat-core", + "topcoat-router", + "topcoat-view", + "topcoat-view-macro", +] + +[[package]] +name = "topcoat-font-grammar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c962dddbbf22479c3a65cae250fdd6fc30b28c1d67eba0f2284f7848d204e9f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "topcoat-core-grammar", + "topcoat-font", +] + +[[package]] +name = "topcoat-font-macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d7f98899e3ad0ed2d008c175a28880e4e4158cf92fce04ca2f2715d7f1241c" +dependencies = [ + "quote", + "syn 3.0.9", + "topcoat-font-grammar", +] + +[[package]] +name = "topcoat-mail" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93bc296044ec4945461a93c3eb42cf887ef0e64e31b5f0942b7cf20a621eb2cf" +dependencies = [ + "lettre", + "thiserror 2.0.21", + "time", + "topcoat-core", + "topcoat-router", + "topcoat-view", +] + +[[package]] +name = "topcoat-router" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d903046add534dab250b97bf3218775b9e6e52cfea384e4002e34d2bda9e69ea" +dependencies = [ + "bytes", + "form_urlencoded", + "futures-core", + "futures-sink", + "futures-util", + "heck", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "inventory", + "ipnet", + "matchit", + "multer", + "percent-encoding", + "pin-project-lite", + "ref-cast", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "tokio", + "tokio-tungstenite", + "topcoat-core", + "topcoat-view", + "tower", + "tower-http 0.7.1", +] + +[[package]] +name = "topcoat-router-grammar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cc97394f6c390931f8d5d02f9d3377b2a29567c33aec6f23de49da5b6e860f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.9", + "topcoat-core-grammar", +] + +[[package]] +name = "topcoat-router-macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8fe80d329fdbdfea59a39bc8a6ceffe8fedefcc9ee27351abbb52bc2021b8e5" +dependencies = [ + "quote", + "syn 3.0.9", + "topcoat-router-grammar", +] + +[[package]] +name = "topcoat-runtime" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f9a64354f18773739d7c3a544831f87252fd9b6ec9223188e3f71dcddf71a5" +dependencies = [ + "futures-util", + "pin-project-lite", + "ref-cast", + "serde", + "serde_json", + "tokio", + "topcoat-asset", + "topcoat-core", + "topcoat-router", + "topcoat-view", + "topcoat-view-macro", +] + +[[package]] +name = "topcoat-runtime-grammar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06ec39c3d5d030d3682ecb1e065db908ec83b85e8a813d1d907ca483a24394c" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 3.0.9", + "topcoat-core-grammar", + "topcoat-router", + "topcoat-runtime", +] + +[[package]] +name = "topcoat-runtime-macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8aac99e8ff2cf5cd11b010048515fe5a4e5b7e5feefe6c55f30795b778a90eb" +dependencies = [ + "quote", + "syn 3.0.9", + "topcoat-runtime-grammar", +] + +[[package]] +name = "topcoat-session" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c743c2684511c2d95ed6084b7043aed69782fd254154c3340c1697fc0044e8" +dependencies = [ + "base64 0.22.1", + "getrandom 0.4.3", + "sha2 0.11.1", + "thiserror 2.0.21", + "tokio", + "topcoat-cookie", + "topcoat-core", + "topcoat-router", + "web-time", +] + +[[package]] +name = "topcoat-view" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46315fff49446cdaf8a748fd9fb525f0345e9540b5ea4fdbacf9b9412907d12" +dependencies = [ + "futures-core", + "futures-util", + "http", + "memchr", + "pin-project-lite", + "siphasher", + "smallvec", + "topcoat-core", +] + +[[package]] +name = "topcoat-view-grammar" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d799180330985df38cd4e1666dd6cada55bd1fa9b083760f9872c0f520b47b" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.9", + "topcoat-core-grammar", + "topcoat-view", +] + +[[package]] +name = "topcoat-view-macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e36b4ab1ed15cef987723953520ccfae60e015211b0a4f6df93ec6f1270a4a" +dependencies = [ + "quote", + "syn 3.0.9", + "topcoat-view-grammar", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.2", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-http" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a05a66a4fdd61cbbe0a1d755ffe0ca6aba159dd4820936a0ff8a8278245b9c" +dependencies = [ + "async-compression", + "bitflags 2.13.2", + "bytes", + "futures-core", + "http", + "http-body", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" +dependencies = [ + "crossbeam-channel", + "symlink", + "thiserror 2.0.21", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.5", + "sha1 0.10.7", + "thiserror 2.0.21", +] + +[[package]] +name = "turso" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1cf9c519a3a971e845a42c870930557cb53c2368c5737d4c78f8fbfd0444e98" +dependencies = [ + "mimalloc", + "thiserror 2.0.21", + "tracing", + "tracing-subscriber", + "turso_core", + "turso_sdk_kit", + "turso_sync_sdk_kit", +] + +[[package]] +name = "turso_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "810ee7b139fd6aa9304cb2fa278c1be0bb964c92457e2a24c1d384196ce5e217" +dependencies = [ + "aegis", + "aes 0.8.4", + "aes-gcm 0.10.3", + "allocator-api2 0.4.0", + "antithesis_sdk", + "arc-swap", + "aristo", + "bigdecimal", + "bitflags 2.13.2", + "branches", + "bumpalo", + "bytemuck", + "cfg_aliases", + "cfg_block", + "chrono", + "crc32c", + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "either", + "fallible-iterator", + "fastbloom", + "getrandom 0.2.17", + "getrandom 0.3.4", + "hex", + "icu_collator", + "icu_locale", + "intrusive-collections", + "io-uring", + "libc", + "libloading", + "libm", + "loom", + "miette", + "num-bigint 0.4.8", + "num-traits", + "pack1", + "parking_lot", + "pastey", + "polling", + "rand 0.9.5", + "rapidhash", + "regex", + "regex-syntax", + "roaring", + "rustc-hash 2.1.3", + "rustix 1.1.5", + "ryu", + "serde_json", + "shuttle", + "simdutf8", + "simsimd", + "smallvec", + "strum 0.26.3", + "strum_macros 0.26.4", + "tantivy", + "tempfile", + "thiserror 2.0.21", + "tracing", + "tracing-subscriber", + "turso_ext", + "turso_macros", + "turso_parser", + "twox-hash", + "uncased", + "uuid", + "windows-sys 0.61.2", +] + +[[package]] +name = "turso_ext" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5003ed7e98f082fe4114627c8d7c7ab569c27766e9bd350a0c09af06ad3fd46" +dependencies = [ + "chrono", + "getrandom 0.4.3", + "turso_macros", +] + +[[package]] +name = "turso_macros" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74770c0d0c8b272b479b5343f19dbd2f8f2677d85a4d6222fc214dcac2882beb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "turso_parser" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bb856ec8306ad7ed1c13fc61de6a79452bf646ca53d99bb4cc646d5bfc4ff" +dependencies = [ + "bitflags 2.13.2", + "memchr", + "miette", + "strum 0.26.3", + "strum_macros 0.26.4", + "thiserror 2.0.21", + "turso_macros", +] + +[[package]] +name = "turso_sdk_kit" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819a17926d04dbeb5b03f00cdab6ed7351bbb6778d00840364b9af62bca02914" +dependencies = [ + "bindgen", + "env_logger", + "parking_lot", + "tracing", + "tracing-appender", + "tracing-subscriber", + "turso_core", + "turso_ext", + "turso_sdk_kit_macros", +] + +[[package]] +name = "turso_sdk_kit_macros" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f315d7f8c5bba49d1c7ca000664a455085cb95f0fa8031c6dc1f67d6d0f28e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "turso_sync_engine" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8d37dca9e05cc090ca3d73083f82fc63b0d11c33550308ca5d93668a8441b71" +dependencies = [ + "base64 0.22.1", + "bytes", + "crc32c", + "genawaiter", + "http", + "libc", + "prost", + "roaring", + "serde", + "serde_json", + "thiserror 2.0.21", + "tracing", + "turso_core", + "turso_parser", + "uuid", +] + +[[package]] +name = "turso_sync_sdk_kit" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fe4b961c9cc90f6339447dabfe83ed13a498721e41378932ab7eaf8ddd6976" +dependencies = [ + "bindgen", + "env_logger", + "genawaiter", + "parking_lot", + "tracing", + "tracing-appender", + "tracing-subscriber", + "turso_core", + "turso_sdk_kit", + "turso_sdk_kit_macros", + "turso_sync_engine", +] + +[[package]] +name = "twox-hash" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86a801b3cea342a06d468c8710662aa29e5e05e4f5c0d62f00bbb7f2ad7941c2" +dependencies = [ + "rand 0.10.3", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "typetag" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c90e86058a30d42a1a928dfb4b49bb33c98c3a2b4909492e6b0881cd94798ec2" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f153acc4e99a5f2a5aefa09fb078be54e26271b2813f6041200b224c098d8328" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "ulid" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "947dde63b6d514cc5e044edad4e0ca7261afd1099d16c83d942cb2b2f348689c" +dependencies = [ + "rand 0.10.3", + "web-time", +] + +[[package]] +name = "uluru" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-bom" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "universal-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" +dependencies = [ + "crypto-common 0.2.2", + "ctutils", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8-ranges" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "sha1_smol", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" +dependencies = [ + "phf 0.13.1", + "phf_codegen 0.13.1", + "string_cache 0.9.0", + "string_cache_codegen 0.6.1", +] + +[[package]] +name = "web_atoms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada" +dependencies = [ + "phf 0.14.0", + "phf_codegen 0.14.0", + "string_cache 0.11.0", + "string_cache_codegen 0.11.2", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wnaf" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795ca18b3fdb5e62bf982199278341ddcf7ebf7d32e25e212ad05d496e95f6fa" +dependencies = [ + "ff", + "group", + "hybrid-array", + "primefield", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix 1.1.5", +] + +[[package]] +name = "xdg" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5" + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "serde", + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "zip" +version = "9.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d98561b612a84ae525331a7a094429ef8a5772514ed507ff6db5f54badc971" +dependencies = [ + "crc32fast", + "flate2", + "indexmap", + "memchr", + "nix 0.31.3", + "typed-path", + "zopfli", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zopfli" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe 7.3.0", +] + +[[package]] +name = "zstd" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057cfd910cfac363a0ada849592624b4c9ff2e10bef504c3433810d78ed96f93" +dependencies = [ + "zstd-safe 8.1.0", +] + +[[package]] +name = "zstd-safe" +version = "7.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-safe" +version = "8.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd44c6a7284e91f3717755b24315a302edd9153a01f753c3cba3d765e8eafac" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.1.1+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeec9eaf2dffbbd09201e23bd0ffcbaa33bb8e9266a10734fd7ed90a85eca078" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "zune-core" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9c49957 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,124 @@ +[workspace] +resolver = "3" +members = [ + "crates/forge-core", + "crates/forge-git", + "crates/forge-ssh", + "crates/forge-web", + "crates/forge-ci", + "crates/forge-runner", +] + +[workspace.package] +version = "0.1.0" +edition = "2024" +license = "AGPL-3.0-or-later" + +[workspace.dependencies] +tower = { version = "0.5.3", features = ["util"] } +tower-http = { version = "0.7.1", features = ["compression-br", "compression-gzip"] } +gix = { version = "0.89.0", default-features = false, features = ["revision", "blob-diff", "max-performance-safe", "sha1"] } +comrak = "0.56.0" +emojis = "0.9.0" +ammonia = "4.2.3" +syntect = { version = "5.3.0", default-features = false, features = ["default-fancy"] } +hmac = "0.13.0" +sha1 = "0.11.0" +image = { version = "0.25.10", default-features = false, features = ["png", "jpeg", "webp", "gif"] } +# internal crates +forge-core = { path = "crates/forge-core" } +forge-ci = { path = "crates/forge-ci" } +forge-git = { path = "crates/forge-git" } +forge-ssh = { path = "crates/forge-ssh" } +forge-runner = { path = "crates/forge-runner" } + +# async runtime and HTTP plumbing +tokio = { version = "1.53.3", features = ["full"] } +futures-util = "0.3.34" +bytes = "1.12.1" +http = "1.5.0" +http-body-util = "0.1.5" +async-compression = { version = "0.4.50", features = ["tokio", "gzip"] } +tokio-util = "0.7.20" +http-body = "1.1.0" + +# errors, serialization, data +thiserror = "2.0.21" +globset = "0.4.20" +ipnet = "2.12.2" +serde = { version = "1.0.229", features = ["derive"] } +serde_json = "1.0.154" +toml = "1.1.8" +ulid = "3.0.0" +time = { version = "0.3.55", features = ["formatting", "parsing", "macros"] } +unicode-normalization = "0.1.25" +form_urlencoded = "1.2.2" +jiff = { version = "0.2.38", default-features = false, features = ["std", "tzdb-bundle-always"] } + +# crypto +argon2 = "0.6.0" +rand = "0.10.3" +sha2 = "0.11.1" +hex = "0.4.3" +subtle = "2.6.1" +base64 = "0.23.1" +getrandom = "0.4.3" +rpassword = "7.5.4" +chacha20poly1305 = "0.11.0" + +# storage +turso = "0.8.3" +object_store = { version = "0.14.2", default-features = false, features = ["fs"] } +multer = "3.1.0" + +# outgoing mail (forge-web): SMTP over rustls, no native TLS +lettre = { version = "0.11.23", default-features = false, features = ["smtp-transport", "builder", "tokio1-rustls", "ring", "webpki-roots", "pool"] } + +# web framework +topcoat = { version = "0.10.0", default-features = false, features = ["router", "view", "runtime", "cookie", "asset", "serve", "sse", "discover", "multipart"] } + +# ssh server +russh = "0.64.1" + +# observability +tracing = "0.1.44" +tracing-subscriber = "0.3.23" + +# OCI image pulls and layer unpacking (forge-runner) +oci-client = "0.18.0" +tar = "0.4.46" +flate2 = "1.1.10" +zstd = "0.14.2" + +# CLI and test servers (forge-runner) +clap = { version = "4.6.7", features = ["derive"] } +hyper = { version = "1.12.0", features = ["server", "http1"] } +hyper-util = { version = "0.1.21", features = ["tokio"] } + +# sandbox (forge-runner): in-process containers, no systemd, no youki CLI, no C libraries. +# The seccomp profile is built with the pure-Rust seccompiler (json feature resolves syscall names) +# and installed by forge-runner's own executor, so libcontainer's libseccomp feature stays off. +libcontainer = { version = "0.7.0", default-features = false, features = ["v2"] } +seccompiler = { version = "0.5.0", features = ["json"] } +oci-spec = "0.10.0" +nix = { version = "0.31.3", features = ["signal", "process", "mount", "sched", "user", "resource", "fs"] } + +# build and test +grass = "0.13.4" +tempfile = "3.27.0" +reqwest = { version = "0.13.5", default-features = false, features = ["rustls", "form", "stream"] } +scraper = "0.27.0" +similar = "3.2.0" + +# security advisories (forge-core): semver matching and OSV zip dumps +semver = "1.0.28" +zip = { version = "9.0.3", default-features = false, features = ["deflate"] } + +[profile.release] +lto = true +codegen-units = 1 + +[profile.dist] +inherits = "release" +lto = "thin" +codegen-units = 16 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9de531 --- /dev/null +++ b/README.md @@ -0,0 +1,299 @@ +# forge + +forge is a self-hosted git forge written in Rust. It is a working name, and the project is not yet released. + +It runs as a single process (`forge`) that serves the web UI, git over HTTPS (smart HTTP), and git over SSH. Repositories are plain bare git repositories on disk. Account and repo metadata live in a SQLite/Turso database. + +## Status + +forge is at **Milestone 2** ("repo browsing and raw files"). It currently provides: + +- local accounts (argon2id passwords), with the first user created as admin +- sessions, CSRF protection on every POST, and a `__Host-` session cookie +- SSH public keys and personal access tokens (`forge_...`) +- creating repos, with public or private visibility, collaborators, and an archive flag +- clone and push over HTTPS and SSH +- basic branch protection: the default branch cannot be deleted or force-pushed, and archived repos reject pushes +- repo browsing: the repo home page with the rendered README, directory listings with the last commit per entry, file views with syntax highlighting and `#L12` line anchors, Markdown rendering with a source toggle, commit history (paginated), commit views with diffs, branch and tag lists, and `.tar.gz` / `.zip` archives +- raw files served from a separate user-content origin (see [Raw user content](#raw-user-content)) + +Not yet: issues, pull requests, webhooks, mirrors, CI. See [Roadmap](#roadmap). + +## Requirements + +- Rust stable, edition 2024 +- git 2.38 or newer (boot refuses to start with an older git) + +## Quick start + +1. Copy the example config. forge reads `config/forge.toml` by default. + + ```sh + cp config/forge.example.toml config/forge.toml + ``` + +2. Start the server. + + ```sh + cargo run -p forge-web + ``` + +3. Create the admin account. Either open http://127.0.0.1:7660/setup (it works only while there are zero users), or use the CLI: + + ```sh + cargo run -p forge-web -- admin create-user --admin + ``` + + The CLI reads the password from `FORGE_PASSWORD` if set, or prompts for it twice. Passwords must be at least 12 characters. The first user is always an admin, even without `--admin`. + +4. Add an SSH key at `/settings/keys`. Use an ed25519 key: + + ```sh + ssh-keygen -t ed25519 + ``` + + Paste the contents of the `.pub` file. RSA keys are rejected with a message asking for ed25519. The reason is that `ssh-rsa` keys sign with SHA-1, and forge disables SHA-1 signatures. ECDSA and security-key (`sk-`) variants are also accepted by the form. + +5. To change only the capitalization of your username (for example `tahinli` to `Tahinli`), open `/settings/profile`. Any other change is refused. The instance operator can do the same from a shell with `cargo run -p forge-web -- admin set-username `. + +6. Create an access token at `/settings/tokens`. The token starts with `forge_` and is shown once. Store it somewhere safe. + +7. Account security lives at `/settings/security`: + - **Password:** change it with the current password. The new one needs 10 to 1024 characters. Your other sessions are signed out; the one you are using stays signed in. Wrong current passwords count toward the same per-user login limit as failed logins. + - **Email:** change it with the current password. The address must contain one `@`, have no spaces, and be at most 254 characters. + - **Two-factor authentication (TOTP):** click "Enable 2FA", add the secret or `otpauth://` link to an authenticator app, and confirm with a 6-digit code. Ten single-use recovery codes are then shown once, so save them. Turning 2FA off needs the password and a code. Regenerating recovery codes needs a code. Codes are TOTP (RFC 6238, SHA-1, 6 digits, 30-second steps), and a code from one step either side of the current time is accepted. Each code works only once. With 2FA on, a correct password leads to `/login/2fa`, which asks for a code or a recovery code. The pending login lasts 5 minutes. Each user gets 10 second-factor attempts per 15 minutes. + - **Git over HTTPS is unaffected by 2FA.** It authenticates with access tokens (step 6), not with passwords or TOTP codes. Revoke a token at `/settings/tokens` if it leaks. + +7. Create a repo at `/new`, then push over either transport: + + ```sh + # SSH + git remote add origin ssh://git@127.0.0.1:2222//.git + git push -u origin main + + # HTTPS: username and token as the password + git remote add origin http://127.0.0.1:7660//.git + git push -u origin main + ``` + +## Configuration + +The file is TOML. Every key in `config/forge.example.toml` is listed below. Paths are relative to the working directory unless absolute. + +| Key | Example value | Meaning | +|---|---|---| +| `database` | `"./data/forge.db"` | SQLite/Turso database file. `admin create-user` creates its parent directory. | +| `data_dir` | `"./data"` | Root for repos, instance key, gitconfig, hooks, and sockets. Created with mode 0700. | +| `listen` | `"127.0.0.1:7660"` | HTTP listen address for the web UI and smart HTTP. | +| `base_url` | `"http://127.0.0.1:7660"` | Public base URL used in links and clone URLs. Set this to your public `https://` URL in production. | +| `user_content_base_url` | `"http://127.0.0.1:7661"` | Separate origin for raw user content. Set it to a different registrable domain in production (see [Raw user content](#raw-user-content)). | +| `user_content_listen` | `"127.0.0.1:7661"` | Address of the listener that serves raw user content. Your reverse proxy forwards the user-content hostname to it. | +| `ssh_listen` | `"0.0.0.0:2222"` | SSH listen address for git over SSH. | +| `ssh_public_host` | `"127.0.0.1"` | Host shown in SSH clone URLs. | +| `ssh_public_port` | `2222` | Port shown in SSH clone URLs. | +| `registration` | `"closed"` | Self-registration policy: `closed`, `invite`, or `open`. Default is `closed`. M1 has no sign-up page, so accounts come from `/setup`, the CLI, or `/admin/users`. | +| `trusted_proxies` | `[]` | Addresses or CIDR networks (for example `["127.0.0.1"]`) whose `X-Forwarded-For` header is trusted. Set it to the address your reverse proxy connects from. Empty means the TCP peer is the client, so a spoofed header cannot change the client IP. Used for login and git throttling. | + +Production config normally lives at `/etc/forge/forge.toml` (see the systemd unit below). + +### Command line and environment + +```text +forge [--config ] [serve | hook | runner ... | admin create-user [--admin] | admin set-username | admin reset-password | admin trash-list | admin trash-purge --older-than-days | admin audit-purge --older-than-days | admin delete-user [--yes] | admin backup --out [--include-key] [--repos-only | --db-only] | admin backup-verify | admin fsck [--full] | admin lfs-gc | admin restore --from --data-dir ] +``` + +- `--config ` sets the config file. Precedence: `--config`, then `FORGE_CONFIG`, then `config/forge.toml`. +- `serve` (the default when no subcommand is given) starts the server. +- `hook ` is called by git hook shims. You do not run it by hand. +- `admin create-user [--admin]` creates a user from the CLI. +- `admin set-username ` changes only the capitalization of a user's username (`current` matches any case). Example: `forge admin set-username tahinli Tahinli`. +- `admin reset-password ` sets a random 20-character temporary password, prints it once, and signs the user out of every session. Give the password to the user, who should change it at `/settings/security`. Nothing else changes. Use it when a user is locked out of their account. Two-factor settings are not changed, so the user still needs a code. +- `admin trash-list` lists deleted repos in `data_dir/trash`, oldest first, as `\t\t`. +- `admin trash-purge --older-than-days N` permanently removes trash entries deleted at least N days ago. Nothing else is removed, and this cannot be undone. +- `FORGE_PASSWORD` supplies the password for `admin create-user` without a prompt. +- `RUST_LOG` sets the log filter (default `info`). Logs go to stderr. +- `GET /healthz` returns `ok `. + +## Data layout + +Everything under `data_dir`: + +| Path | Purpose | +|---|---| +| `forge.db`, `forge.db-wal`, `forge.db-shm` | Metadata database (users, sessions, keys, tokens, repos). Sits next to `database` in the example config. | +| `forge.key` | Instance key. Encrypts sealed values. Created on first boot. | +| `ssh_host_ed25519_key` | SSH host key. Created on first boot. | +| `gitconfig` | Managed gitconfig written at boot. Do not edit by hand, it is rewritten at boot. | +| `hooks/` | `pre-receive` and `post-receive` shims that run `forge hook `. Rewritten at boot. | +| `repos/ab/cd/.git` | Bare repositories. `` is the lowercased ULID; the path does not depend on the repo name. | +| `internal.sock` | Unix socket used by git hooks to reach the server. Mode 0600. Removed on shutdown. | +| `trash/-.git` | Repos deleted from the settings page (`/{owner}/{repo}/settings`). Each is a plain bare repository, moved here by a rename. The database rows are gone, so the repo no longer appears in forge. | + +### Recovering a deleted repo + +A deleted repo is not erased at once. Its bare directory is moved to `data_dir/trash/`, and only `admin trash-purge` removes it. To recover it, list the trash with `forge admin trash-list` and clone from the directory, which works without the server: + +```sh +git clone --mirror /var/lib/forge/trash/-.git recovered.git +``` + +The clone restores all branches and tags. The owner, visibility, description and collaborators are not restored, so re-create the repo under the same name and push the mirror to it with `git push --mirror`. + +### Backups + +See [`docs/backup.md`](docs/backup.md) for what a backup set contains, how to ship it off-site, how to restore, and the quarterly restore drill. + +- **`forge.key` must be backed up separately and stored safely, offline.** Without it, sealed values cannot be decrypted, and they are lost. Keep it out of the same backup set as the database if you can. +- **Never copy a live `forge.db`** (or its `-wal`/`-shm` files) with `cp` or `rsync`. Take a consistent snapshot with `VACUUM INTO`, for example from the `sqlite3` shell while forge is running: + + ```sql + VACUUM INTO '/var/backups/forge/forge-2026-10-15.db'; + ``` + +- **Repositories**: do not copy bare repos while pushes are in progress. Use `git bundle create --all` or `git push --mirror` to a copy. +- **Unix socket path length**: `data_dir/internal.sock` must be shorter than 108 bytes, the unix socket path limit. Boot fails with an error otherwise. Choose a short `data_dir` (for example `/var/lib/forge`). + +## Deployment + +### systemd + +`deploy/forge.service` runs `/usr/local/bin/forge serve` as a dedicated `forge` user, with `FORGE_CONFIG=/etc/forge/forge.toml`, working directory `/var/lib/forge`, and a hardened sandbox (`ProtectSystem=strict`, `/var/lib/forge` and, if present, `/var/backups/forge` writable, no capabilities, `UMask=0077`). + +Typical setup: + +```sh +sudo useradd --system --home /var/lib/forge --shell /usr/sbin/nologin forge +sudo install -d -o forge -g forge /var/lib/forge /etc/forge +sudo install -m 0640 -g forge config/forge.example.toml /etc/forge/forge.toml +sudo install -m 0755 target/release/forge /usr/local/bin/forge +sudo install -m 0644 deploy/forge.service /etc/systemd/system/forge.service +sudo systemctl daemon-reload && sudo systemctl enable forge +``` + +Edit `/etc/forge/forge.toml` before starting: + +- `base_url`: public `https://` URL. +- `user_content_base_url`: a separate registrable domain, not a subdomain of `base_url`. +- `ssh_public_host` and `ssh_public_port`: public hostname and port. +- `database` and `data_dir`: absolute paths under `/var/lib/forge`. +- `trusted_proxies = ["127.0.0.1"]` when the reverse proxy runs on this host. Otherwise every client shares the proxy's IP for login and git throttling. +- `[backup] dir`: under `/var/lib/forge` or `/var/backups/forge`. The unit makes only those writable. Create the latter with `sudo install -d -o forge -g forge -m 0700 /var/backups/forge`. + +Create the admin before starting. `/setup` lets the first visitor claim the admin account while there are no users, so create the admin before the reverse proxy exposes the site. + +```sh +sudo -u forge FORGE_CONFIG=/etc/forge/forge.toml /usr/local/bin/forge admin create-user --admin +sudo systemctl start forge +``` + +Open the SSH port (2222 by default) in the firewall. + +### Reverse proxy and TLS + +Run forge behind a TLS reverse proxy for any non-localhost use. The session cookie is named `__Host-forge_session` and is marked `Secure`, so browsers send it only over HTTPS. Logging in over plain HTTP outside localhost will not work. Set `base_url` to the public HTTPS URL. + +Git routes need a proxy that does not buffer or time out early. The example below targets [Ferron](https://ferron.sh) 3.0.0-rc.7, the newest release found (a pre-release; the latest stable, 2.8.1, was not checked against this config). Ferron uses its own `ferron.conf` format, not KDL. + +- Buffering: `buffer_request` and `buffer_response` are off by default. The example sets both to `0` so they stay off, because git smart HTTP streams packs in both directions. +- Timeouts: `connection_timeout` (default 2s) and `idle_timeout` (default 60s) are per upstream. The example raises `idle_timeout` to `3600s`, because `git upload-pack` can stay silent while it builds a pack. Ferron's proxy docs list no total-request timeout, so there is no separate read/send timeout to raise. +- Body size: Ferron's docs describe no request body size limit, so there is nothing to disable. Do not add one on git paths (`///git-receive-pack`, `git-upload-pack`). +- Forwarded headers: Ferron sets `X-Forwarded-For`, `X-Forwarded-Proto`, `X-Real-IP` and `Forwarded` itself and keeps the incoming `Host`, so the example adds no header lines. +- SSH: port 2222 is not proxied. Ferron handles HTTP(S) only, so forge serves SSH directly on `ssh_listen`. Open that port on the host. + +### Brute-force throttling + +Login and git HTTP authentication are throttled in memory, per process, over a 15 minute sliding window: + +- Login: 10 failed attempts per username, and 30 per client IP. A throttled attempt gets HTTP 429 with the message "Too many attempts. Try again later.", and the password is not checked. A successful login clears that username's counter. +- Git HTTP (Basic auth with a token): 30 failed attempts per client IP. The next request gets HTTP 429 with `Retry-After`. Anonymous requests and successful logins are not counted. +- The client IP is the TCP peer, unless the peer is in `trusted_proxies`. Then it is the right-most `X-Forwarded-For` address that is not a trusted proxy. IPv6 addresses are counted per /64. +- Throttling events are logged at `warn` with the IP and the folded username. Counters are lost on restart and are not shared between instances. + +### Raw user content + +forge runs a third listener, `user_content_listen` (default `127.0.0.1:7661`). It serves only the raw files of repos, on the origin `user_content_base_url`. It has its own explicit routes and does not share the app's router. + +Put it on its own registrable domain in production, for example `usercontent.example.net` next to `forge.example.com`. Browsers treat that as a separate site, so a file a user uploads cannot run script against the app origin. The raw origin is also built to be inert: + +- No cookies are read or set on it, so app sessions never reach it. +- Every response has `Content-Security-Policy: default-src 'none'; img-src 'self' data:; style-src 'unsafe-inline'; sandbox`, `X-Content-Type-Options: nosniff`, and `Referrer-Policy: no-referrer`. +- SVG, HTML, XML and other non-image binaries are sent with `Content-Disposition: attachment`. + +Private repos need a signed link. The app puts a `?token=` on raw links for private repos, and that token is valid for 10 minutes. Public repos need no token. A missing, hidden, or bad token gets 404. + +Example Ferron 3.0.0-rc.7 config (`ferron.conf`) with two hostnames. A bare host block already gets automatic ACME TLS; the `tls` block only sets the account contact: + +``` +forge.example.com { + tls { + provider acme + challenge http-01 + contact admin@example.com + } + buffer_request 0 + buffer_response 0 + proxy { + upstream http://127.0.0.1:7660 { + idle_timeout "3600s" + } + } +} + +usercontent.example.net { + tls { + provider acme + challenge http-01 + contact admin@example.com + } + buffer_request 0 + buffer_response 0 + proxy { + upstream http://127.0.0.1:7661 + } +} +``` + +The two hostnames are different registrable domains, so the raw origin is a separate site with no app cookies. + +With that setup, set `base_url = "https://forge.example.com"` and `user_content_base_url = "https://usercontent.example.net"`. + +### Limits + +- Blob view: the first 1 MiB of a file is shown. Larger files are truncated, with a link to the raw file. +- Syntax highlighting: skipped for files over 512 KiB or 20,000 lines. Those are shown without highlighting. +- Raw files: up to 8 MiB are read into memory and sent. Larger files are streamed. +- Commit diffs: at most 300 files, 2,000 lines per file, and 20,000 lines in total. Anything past that is cut off with a notice. + +Compression is currently **off for every route**. Git smart-HTTP responses must not be compressed, and the server cannot yet switch compression off per route, so it is disabled globally (`TODO(M1)` in `boot.rs`). Let the proxy do no compression on git paths either. + +## Security notes + +From `docs/architecture.md`. These are the properties forge is designed for. Not all are fully implemented in M1. + +- Authorization goes through a single function, `authorize()`. A private repo that the actor cannot see returns 404, so its existence is not revealed. +- Passwords use argon2id. Tokens and session tokens are stored as SHA-256 hashes and compared in constant time. Tokens are shown once and kept out of URLs and logs. +- SSH keys must match exactly. `ssh-rsa` with SHA-1 is disabled, and the SSH server accepts only `GIT_PROTOCOL` from env requests. Handshake and inactivity timeouts apply. +- No shell is used. SSH exec commands are parsed against an allow-list, and git is started with explicit arguments. +- Git runs with `receive.fsckObjects=true`, and hooks are fail-closed: if the internal socket is unreachable, the push is rejected. +- Users cannot write hooks or repo-local config. Submodules are not recursed. +- Run as a dedicated service user, and keep the git binary patched. +- Keep `forge.key` and `data_dir` private. Back up `forge.key` separately. + +## Roadmap + +From `docs/architecture.md` (section 10). + +- **M1: clone and push work.** Accounts, SSH keys, tokens, repo create, smart HTTP and SSH, pre-receive policy, minimal UI. +- **M2 (current): repo browsing and raw domain.** Tree, blob, commit and diff views; README rendering; syntax highlighting; raw files on `user_content_base_url`. +- **M3: issues.** Issues, comments, labels, milestones, with permissions through `authorize()`. +- **M4: pull requests.** PR refs, mergeability via `merge-tree`, reviews, merge strategies. +- **M5: webhooks, push mirrors, replication, backups, export.** Including `VACUUM INTO` snapshots, integrity checks, and restore drills. +- **M6: custom CI runner and commit-status API.** Required checks enforced on push as well as PR merge. + +## License + +forge is licensed under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later). + +### Fonts + +The web UI bundles two fonts, served from the forge origin under `/assets/fonts/`: Figtree (UI) and IBM Plex Mono (code). Both are licensed under the SIL Open Font License 1.1. The license texts are in `style/fonts/` and are also served at `/assets/fonts/Figtree-OFL.txt` and `/assets/fonts/IBMPlexMono-OFL.txt`. Sources, pinned versions and checksums are listed in `style/fonts/README.md`. diff --git a/config/forge.example.toml b/config/forge.example.toml new file mode 100644 index 0000000..07683b9 --- /dev/null +++ b/config/forge.example.toml @@ -0,0 +1,112 @@ +# forge example configuration. Copy to forge.toml and adjust. +# Development defaults; production values belong in /etc/forge/forge.toml. + +# SQLite/Turso database file. +database = "./data/forge.db" +# Root for repos, instance key, gitconfig, hooks and sockets. +data_dir = "./data" +# HTTP listen address for the web UI and smart-HTTP. +listen = "127.0.0.1:7660" +# Public base URL used in links and clone URLs. +base_url = "http://127.0.0.1:7660" +# Separate origin for raw user content (Milestone 2). +user_content_base_url = "http://127.0.0.1:7661" +# Listener for raw user files. It is served on a separate origin, so in production +# user_content_base_url should use a separate registrable domain (not a subdomain of +# base_url), which keeps user-uploaded content from running with the main site's cookies. +user_content_listen = "127.0.0.1:7661" +# SSH listen address for git over SSH. +ssh_listen = "0.0.0.0:2222" +# Host and port shown in SSH clone URLs. +ssh_public_host = "127.0.0.1" +ssh_public_port = 2222 +# Self-registration: "closed" | "invite" | "open". +registration = "closed" +# Proxies whose X-Forwarded-For is trusted for client IPs (login and git throttling). Addresses or CIDRs. +# Set to ["127.0.0.1"] when running behind a local reverse proxy. Empty: the TCP peer is the client. +trusted_proxies = [] + +# Outbound webhooks. Internal destinations (loopback, private, link-local, CGNAT, ...) are refused. +# [webhooks] +# Allow http:// hook URLs (https only by default). +# allow_http = false +# Exact hostnames or CIDR networks that may be reached even if they resolve to internal addresses. +# allowed_hosts = ["hooks.internal.example", "10.20.0.0/16"] + +# Scheduled backups (see docs/backup.md). Empty dir disables the scheduler. +# [backup] +# Directory that receives the backup sets. Ship it off-site with restic or rclone. +# dir = "/var/backups/forge" +# Hours between full backup sets. +# interval_hours = 24 +# Newest complete sets kept in dir. Older complete sets are deleted after a good run. +# keep = 7 +# Optional healthchecks.io style URL: pinged with /start, then the URL on success or /fail on error. +# The URL may hold a token, so the admin page shows only its host. +# healthcheck_url = "" +# Days between git fsck of every repo and the database integrity check. +# fsck_interval_days = 7 + +# Release settings. +# [releases] +# Largest accepted release asset, in MiB. +# max_asset_mb = 512 + +# Standby replication (see docs/backup.md). Empty target disables it. When target is set, +# identity_file and known_hosts_file are required. +# [replication] +# [user@]host:/absolute/base of the standby account. Empty disables replication. +# target = "" +# SSH port of the standby host. +# ssh_port = 22 +# Private key of the standby account (mode 0600). Required when target is set. +# identity_file = "" +# Pinned host keys of the standby. Required when target is set. StrictHostKeyChecking is always yes. +# known_hosts_file = "" +# Minutes between database snapshots shipped to the standby. Must be at least 1. +# db_snapshot_minutes = 15 +# Minutes between reconcile passes (refs checksums, deleted repos, healthcheck). Must be at least 1. +# reconcile_minutes = 60 +# Optional URL pinged after each reconcile pass. Empty disables it. +# healthcheck_url = "" + +# Git LFS limits. +# [lfs] +# Largest accepted LFS object, in MiB. +# max_object_mb = 2048 + +# CI limits and retention. +# [ci] +# Whether CI runs at all. When false, pushes and pull requests create no runs. +# enabled = true +# Largest job log, in MiB. Past it the log is truncated. +# max_log_mb = 16 +# Largest artifact, in MiB. +# max_artifact_mb = 512 +# Artifacts a single job may upload. +# max_artifacts_per_job = 50 +# Days a job log is kept. +# log_retention_days = 90 +# Days an artifact is kept. +# artifact_retention_days = 30 +# Hours a runner registration token stays valid. +# registration_token_hours = 24 + +# Security advisories (opt-in). When enabled, the forge downloads the OSV dumps for ecosystems and scans each repo's lockfiles. +# [advisories] +# Whether the advisory download and the lockfile scans run at all. +# enabled = false +# OSV ecosystems to download and scan: any of "crates.io", "npm", "Go". +# ecosystems = ["crates.io", "npm", "Go"] +# Hours before a downloaded dump is fetched again. +# refresh_hours = 24 + +# Outgoing mail transport. The SMTP server, sender and password are set on /admin/mail and stored in the database. +# [mail] +# smtp sends through the configured server. log writes each message to /mail-log/ instead, for development and tests. +# transport = "smtp" + +# Organization rules. +# [orgs] +# Who may create organizations: "all" (any signed-in person) or "admin" (instance admins only). +# creation = "all" diff --git a/crates/forge-ci/Cargo.toml b/crates/forge-ci/Cargo.toml new file mode 100644 index 0000000..463ccdd --- /dev/null +++ b/crates/forge-ci/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "forge-ci" +description = "CI workflow config, runner protocol and log masking for forge" +version.workspace = true +edition.workspace = true +license.workspace = true +publish = false + +[dependencies] +base64 = { workspace = true } +globset = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +toml = { workspace = true } diff --git a/crates/forge-ci/src/config.rs b/crates/forge-ci/src/config.rs new file mode 100644 index 0000000..8e04c22 --- /dev/null +++ b/crates/forge-ci/src/config.rs @@ -0,0 +1,662 @@ +//! Parser and validator for `.forge/ci.toml`. +//! +//! ```toml +//! [on] +//! push = ["main"] +//! pull_request = true +//! +//! [jobs.test] +//! image = "docker.io/rust:1" +//! run = "cargo test --workspace" +//! ``` +//! +//! Globs (`push`, `tags`, `artifacts`) use git-like semantics: `*` does not match `/`, `**` does. + +use std::collections::{BTreeMap, BTreeSet}; + +use globset::{Glob, GlobBuilder}; +use serde::{Deserialize, Serialize}; + +use crate::error::ConfigError; + +/// Largest accepted `ci.toml`, in bytes. +pub const MAX_CONFIG_BYTES: usize = 64 * 1024; +/// Largest number of jobs in one workflow. +pub const MAX_JOBS: usize = 20; +/// Default job timeout. +pub const DEFAULT_TIMEOUT_MINUTES: u32 = 60; +/// Smallest and largest allowed job timeout. +pub const TIMEOUT_RANGE_MINUTES: std::ops::RangeInclusive = 1..=360; + +/// A parsed and validated workflow. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct CiConfig { + /// The `[on]` table. Optional; defaults to manual runs only. + #[serde(rename = "on", default)] + pub on: Triggers, + /// The `[jobs.]` tables, keyed by job name. + #[serde(default)] + pub jobs: BTreeMap, +} + +/// The `[on]` table. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct Triggers { + /// Branch globs, e.g. `"main"`, `"release/*"`. + pub push: Vec, + /// Tag globs, e.g. `"v*"`. + pub tags: Vec, + pub pull_request: bool, + /// Defaults to `true`. + pub manual: bool, +} + +impl Default for Triggers { + fn default() -> Self { + Self { + push: Vec::new(), + tags: Vec::new(), + pull_request: false, + manual: true, + } + } +} + +/// One `[jobs.]` table. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct JobSpec { + pub image: String, + pub run: String, + #[serde(default)] + pub needs: Vec, + /// Secret names (`^[A-Z_][A-Z0-9_]{0,63}$`) the job receives. + #[serde(default)] + pub secrets: Vec, + #[serde(default)] + pub env: BTreeMap, + /// Relative globs of files to keep after a successful run. + #[serde(default)] + pub artifacts: Vec, + /// Runner labels; every label must be present on the runner. + #[serde(default)] + pub runs_on: Vec, + #[serde(default = "default_timeout_minutes")] + pub timeout_minutes: u32, + #[serde(default = "default_network")] + pub network: bool, +} + +fn default_timeout_minutes() -> u32 { + DEFAULT_TIMEOUT_MINUTES +} + +fn default_network() -> bool { + true +} + +/// Something that can start a workflow run. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Event<'a> { + Push { branch: &'a str }, + Tag { tag: &'a str }, + PullRequest, + Manual, +} + +/// Parses and validates a `ci.toml` document. +pub fn parse_config(text: &str) -> Result { + if text.len() > MAX_CONFIG_BYTES { + return Err(ConfigError::TooLarge { + size: text.len(), + max: MAX_CONFIG_BYTES, + }); + } + let config: CiConfig = toml::from_str(text).map_err(|e| ConfigError::Toml(e.to_string()))?; + config.validate()?; + Ok(config) +} + +impl CiConfig { + /// Whether an event starts this workflow. + pub fn triggered_by(&self, ev: &Event) -> bool { + match ev { + Event::Push { branch } => matches_any(&self.on.push, branch), + Event::Tag { tag } => matches_any(&self.on.tags, tag), + Event::PullRequest => self.on.pull_request, + Event::Manual => self.on.manual, + } + } + + /// Job names in dependency order. Ties are broken by name, so the order is stable. + /// Jobs in a cycle, or with unknown needs, are left out. [`parse_config`] rejects both. + pub fn job_order(&self) -> Vec<&str> { + let mut remaining: BTreeMap<&str, BTreeSet<&str>> = self + .jobs + .iter() + .map(|(name, job)| { + ( + name.as_str(), + job.needs.iter().map(String::as_str).collect(), + ) + }) + .collect(); + let mut done: BTreeSet<&str> = BTreeSet::new(); + let mut order = Vec::with_capacity(self.jobs.len()); + loop { + let next = remaining + .iter() + .find(|(_, needs)| needs.iter().all(|n| done.contains(n))) + .map(|(name, _)| *name); + let Some(name) = next else { break }; + remaining.remove(name); + done.insert(name); + order.push(name); + } + order + } + + fn validate(&self) -> Result<(), ConfigError> { + if self.jobs.is_empty() { + return Err(ConfigError::NoJobs); + } + if self.jobs.len() > MAX_JOBS { + return Err(ConfigError::TooManyJobs { + count: self.jobs.len(), + max: MAX_JOBS, + }); + } + for pattern in &self.on.push { + validate_trigger_glob("branch", pattern)?; + } + for pattern in &self.on.tags { + validate_trigger_glob("tag", pattern)?; + } + for (name, job) in &self.jobs { + validate_job(name, job, &self.jobs)?; + } + let order = self.job_order(); + if order.len() != self.jobs.len() { + let job = self + .jobs + .keys() + .find(|name| !order.contains(&name.as_str())) + .cloned() + .unwrap_or_default(); + return Err(ConfigError::Cycle { job }); + } + Ok(()) + } +} + +fn matches_any(globs: &[String], value: &str) -> bool { + globs + .iter() + .any(|pattern| build_glob(pattern).is_ok_and(|g| g.compile_matcher().is_match(value))) +} + +fn build_glob(pattern: &str) -> Result { + GlobBuilder::new(pattern).literal_separator(true).build() +} + +fn validate_trigger_glob(kind: &'static str, pattern: &str) -> Result<(), ConfigError> { + let invalid = |reason: String| ConfigError::InvalidTriggerGlob { + kind, + pattern: pattern.to_string(), + reason, + }; + if pattern.is_empty() { + return Err(invalid("pattern is empty".into())); + } + build_glob(pattern) + .map(|_| ()) + .map_err(|e| invalid(e.to_string())) +} + +/// `^[a-z0-9][a-z0-9_-]{0,39}$` +fn is_job_name(name: &str) -> bool { + let Some((first, rest)) = name.as_bytes().split_first() else { + return false; + }; + rest.len() <= 39 + && (first.is_ascii_lowercase() || first.is_ascii_digit()) + && rest + .iter() + .all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || *b == b'_' || *b == b'-') +} + +/// `^[A-Z_][A-Z0-9_]{0,63}$`, used for secret and env names. +fn is_env_name(name: &str) -> bool { + let Some((first, rest)) = name.as_bytes().split_first() else { + return false; + }; + rest.len() <= 63 + && (first.is_ascii_uppercase() || *first == b'_') + && rest + .iter() + .all(|b| b.is_ascii_uppercase() || b.is_ascii_digit() || *b == b'_') +} + +fn is_runner_label(label: &str) -> bool { + (1..=64).contains(&label.len()) + && label + .bytes() + .all(|b| b.is_ascii_alphanumeric() || b == b'-' || b == b'_' || b == b'.') +} + +fn validate_artifact(job: &str, pattern: &str) -> Result<(), ConfigError> { + let invalid = |reason: &str| ConfigError::InvalidArtifactGlob { + job: job.to_string(), + pattern: pattern.to_string(), + reason: reason.to_string(), + }; + if pattern.is_empty() { + return Err(invalid("pattern is empty")); + } + if pattern.starts_with('/') || pattern.starts_with('\\') { + return Err(invalid("must be relative")); + } + if pattern.split(['/', '\\']).any(|part| part == "..") { + return Err(invalid("must not contain \"..\"")); + } + build_glob(pattern) + .map(|_| ()) + .map_err(|e| invalid(&e.to_string())) +} + +fn validate_job( + name: &str, + job: &JobSpec, + all: &BTreeMap, +) -> Result<(), ConfigError> { + if !is_job_name(name) { + return Err(ConfigError::InvalidJobName(name.to_string())); + } + if job.image.is_empty() || job.image.chars().any(char::is_whitespace) { + return Err(ConfigError::InvalidImage { + job: name.to_string(), + }); + } + if job.run.trim().is_empty() { + return Err(ConfigError::EmptyRun { + job: name.to_string(), + }); + } + for need in &job.needs { + if !all.contains_key(need) { + return Err(ConfigError::UnknownNeed { + job: name.to_string(), + need: need.clone(), + }); + } + } + for secret in &job.secrets { + if !is_env_name(secret) { + return Err(ConfigError::InvalidSecretName { + job: name.to_string(), + name: secret.clone(), + }); + } + } + for key in job.env.keys() { + if !is_env_name(key) { + return Err(ConfigError::InvalidEnvName { + job: name.to_string(), + name: key.clone(), + }); + } + } + for pattern in &job.artifacts { + validate_artifact(name, pattern)?; + } + for label in &job.runs_on { + if !is_runner_label(label) { + return Err(ConfigError::InvalidRunsOn { + job: name.to_string(), + label: label.clone(), + }); + } + } + if !TIMEOUT_RANGE_MINUTES.contains(&job.timeout_minutes) { + return Err(ConfigError::InvalidTimeout { + job: name.to_string(), + value: job.timeout_minutes, + }); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + const EXAMPLE: &str = r#" +[on] +push = ["main"] +pull_request = true + +[jobs.test] +image = "docker.io/rust:1" +run = "cargo test --workspace" + +[jobs.lint] +image = "docker.io/rust:1" +needs = ["test"] +secrets = ["DEPLOY_KEY"] +run = ''' +cargo clippy -- -D warnings +cargo fmt --check +''' +artifacts = ["target/release/forge"] +"#; + + fn job_toml(body: &str) -> String { + format!("[jobs.build]\nimage = \"docker.io/rust:1\"\nrun = \"cargo build\"\n{body}\n") + } + + fn err_of(text: &str) -> ConfigError { + match parse_config(text) { + Ok(_) => panic!("expected an error for:\n{text}"), + Err(e) => e, + } + } + + #[test] + fn parses_the_contract_example() { + let cfg = parse_config(EXAMPLE).unwrap(); + assert_eq!(cfg.on.push, vec!["main".to_string()]); + assert!(cfg.on.pull_request); + assert!(cfg.on.manual, "manual defaults to true"); + assert!(cfg.on.tags.is_empty()); + assert_eq!(cfg.jobs.len(), 2); + let lint = &cfg.jobs["lint"]; + assert_eq!(lint.needs, vec!["test".to_string()]); + assert_eq!(lint.secrets, vec!["DEPLOY_KEY".to_string()]); + assert_eq!(lint.artifacts, vec!["target/release/forge".to_string()]); + assert!(lint.run.contains("cargo clippy -- -D warnings")); + assert_eq!(lint.timeout_minutes, 60); + assert!(lint.network); + assert!(lint.runs_on.is_empty()); + assert!(lint.env.is_empty()); + } + + #[test] + fn manual_defaults_to_true_and_on_is_optional() { + let cfg = parse_config(&job_toml("")).unwrap(); + assert!(cfg.on.manual); + assert!(!cfg.on.pull_request); + assert!(cfg.on.push.is_empty()); + } + + #[test] + fn manual_can_be_disabled() { + let cfg = parse_config(&format!("[on]\nmanual = false\n{}", job_toml(""))).unwrap(); + assert!(!cfg.triggered_by(&Event::Manual)); + } + + #[test] + fn unknown_keys_are_rejected() { + assert!(matches!( + err_of(&format!("[on]\nschedule = true\n{}", job_toml(""))), + ConfigError::Toml(_) + )); + assert!(matches!( + err_of(&job_toml("bogus = 1")), + ConfigError::Toml(_) + )); + assert!(matches!(err_of("[other]\nx = 1\n"), ConfigError::Toml(_))); + } + + #[test] + fn no_jobs_is_an_error() { + assert_eq!(err_of("[on]\nmanual = true\n"), ConfigError::NoJobs); + } + + #[test] + fn too_many_jobs_is_an_error() { + let mut text = String::new(); + for i in 0..=MAX_JOBS { + text.push_str(&format!("[jobs.j{i}]\nimage = \"img\"\nrun = \"true\"\n")); + } + assert_eq!( + err_of(&text), + ConfigError::TooManyJobs { + count: MAX_JOBS + 1, + max: MAX_JOBS + } + ); + let mut ok = String::new(); + for i in 0..MAX_JOBS { + ok.push_str(&format!("[jobs.j{i}]\nimage = \"img\"\nrun = \"true\"\n")); + } + assert!(parse_config(&ok).is_ok()); + } + + #[test] + fn file_size_cap() { + let mut text = job_toml(""); + text.push_str(&"#".repeat(MAX_CONFIG_BYTES)); + assert!(matches!( + err_of(&text), + ConfigError::TooLarge { max, .. } if max == MAX_CONFIG_BYTES + )); + // Exactly at the limit is accepted. + let mut at_limit = job_toml(""); + let pad = MAX_CONFIG_BYTES - at_limit.len(); + at_limit.push_str(&"#".repeat(pad)); + assert_eq!(at_limit.len(), MAX_CONFIG_BYTES); + assert!(parse_config(&at_limit).is_ok()); + } + + #[test] + fn invalid_job_names() { + for name in ["Test", "-x", "_x", "a b", "a.b", ""] { + let text = format!("[jobs.\"{name}\"]\nimage = \"img\"\nrun = \"true\"\n"); + assert!( + matches!(err_of(&text), ConfigError::InvalidJobName(_)), + "name {name:?} should be rejected" + ); + } + let long = "a".repeat(41); + let text = format!("[jobs.{long}]\nimage = \"img\"\nrun = \"true\"\n"); + assert!(matches!(err_of(&text), ConfigError::InvalidJobName(_))); + let max = "a".repeat(40); + let text = format!("[jobs.{max}]\nimage = \"img\"\nrun = \"true\"\n"); + assert!(parse_config(&text).is_ok()); + for name in ["a", "0", "a-b_c9"] { + let text = format!("[jobs.{name}]\nimage = \"img\"\nrun = \"true\"\n"); + assert!( + parse_config(&text).is_ok(), + "name {name:?} should be accepted" + ); + } + } + + #[test] + fn unknown_need() { + let text = job_toml("needs = [\"ghost\"]"); + assert_eq!( + err_of(&text), + ConfigError::UnknownNeed { + job: "build".into(), + need: "ghost".into() + } + ); + } + + #[test] + fn cycles_are_detected() { + let text = "[jobs.a]\nimage = \"i\"\nrun = \"r\"\nneeds = [\"b\"]\n\ + [jobs.b]\nimage = \"i\"\nrun = \"r\"\nneeds = [\"a\"]\n\ + [jobs.c]\nimage = \"i\"\nrun = \"r\"\n"; + assert_eq!(err_of(text), ConfigError::Cycle { job: "a".into() }); + let self_loop = job_toml("needs = [\"build\"]"); + assert_eq!( + err_of(&self_loop), + ConfigError::Cycle { + job: "build".into() + } + ); + } + + #[test] + fn image_validation() { + let empty = "[jobs.b]\nimage = \"\"\nrun = \"r\"\n"; + assert!(matches!(err_of(empty), ConfigError::InvalidImage { .. })); + let space = "[jobs.b]\nimage = \"a b\"\nrun = \"r\"\n"; + assert!(matches!(err_of(space), ConfigError::InvalidImage { .. })); + } + + #[test] + fn run_validation() { + let blank = "[jobs.b]\nimage = \"i\"\nrun = \" \\n \"\n"; + assert!(matches!(err_of(blank), ConfigError::EmptyRun { .. })); + } + + #[test] + fn secret_and_env_names() { + let long = "A".repeat(65); + for bad in ["deploy", "1KEY", "A-B", "", long.as_str()] { + let text = job_toml(&format!("secrets = [{bad:?}]")); + assert!( + matches!(err_of(&text), ConfigError::InvalidSecretName { .. }), + "secret {bad:?} should be rejected" + ); + } + let text = job_toml("secrets = [\"_OK_1\"]"); + assert!(parse_config(&text).is_ok()); + let text = job_toml("[jobs.build.env]\n\"lower\" = \"x\""); + assert!(matches!(err_of(&text), ConfigError::InvalidEnvName { .. })); + let text = job_toml("[jobs.build.env]\nRUST_LOG = \"info\""); + assert!(parse_config(&text).is_ok()); + } + + #[test] + fn artifact_validation() { + for bad in ["/etc/passwd", "..", "a/../b", "\\\\x", "", "a/[b"] { + let text = job_toml(&format!("artifacts = [{bad:?}]")); + assert!( + matches!(err_of(&text), ConfigError::InvalidArtifactGlob { .. }), + "artifact {bad:?} should be rejected" + ); + } + let text = job_toml("artifacts = [\"target/release/*\", \"dist/**/*.tar\"]"); + assert!(parse_config(&text).is_ok()); + } + + #[test] + fn runs_on_validation() { + let text = job_toml("runs_on = [\"linux\", \"x86_64\"]"); + assert_eq!( + parse_config(&text).unwrap().jobs["build"].runs_on, + vec!["linux".to_string(), "x86_64".to_string()] + ); + let text = job_toml("runs_on = [\"has space\"]"); + assert!(matches!(err_of(&text), ConfigError::InvalidRunsOn { .. })); + let text = job_toml("runs_on = [\"\"]"); + assert!(matches!(err_of(&text), ConfigError::InvalidRunsOn { .. })); + } + + #[test] + fn timeout_validation() { + assert_eq!( + parse_config(&job_toml("timeout_minutes = 1")).unwrap().jobs["build"].timeout_minutes, + 1 + ); + assert_eq!( + parse_config(&job_toml("timeout_minutes = 360")) + .unwrap() + .jobs["build"] + .timeout_minutes, + 360 + ); + for bad in [0, 361] { + let text = job_toml(&format!("timeout_minutes = {bad}")); + assert_eq!( + err_of(&text), + ConfigError::InvalidTimeout { + job: "build".into(), + value: bad + } + ); + } + } + + #[test] + fn network_defaults_to_true() { + assert!(parse_config(&job_toml("")).unwrap().jobs["build"].network); + assert!(!parse_config(&job_toml("network = false")).unwrap().jobs["build"].network); + } + + #[test] + fn branch_glob_triggers() { + let text = format!("[on]\npush = [\"main\", \"release/*\"]\n{}", job_toml("")); + let cfg = parse_config(&text).unwrap(); + assert!(cfg.triggered_by(&Event::Push { branch: "main" })); + assert!(cfg.triggered_by(&Event::Push { + branch: "release/1.0" + })); + assert!(!cfg.triggered_by(&Event::Push { + branch: "release/1.0/x" + })); + assert!(!cfg.triggered_by(&Event::Push { branch: "mainx" })); + assert!(!cfg.triggered_by(&Event::Push { branch: "feature" })); + assert!(!cfg.triggered_by(&Event::Tag { tag: "v1" })); + } + + #[test] + fn tag_glob_triggers() { + let text = format!("[on]\ntags = [\"v*\"]\n{}", job_toml("")); + let cfg = parse_config(&text).unwrap(); + assert!(cfg.triggered_by(&Event::Tag { tag: "v1.2.3" })); + assert!(!cfg.triggered_by(&Event::Tag { tag: "release-1" })); + assert!(!cfg.triggered_by(&Event::Push { branch: "v1" })); + } + + #[test] + fn invalid_trigger_globs_are_rejected() { + let text = format!("[on]\npush = [\"[\"]\n{}", job_toml("")); + assert!(matches!( + err_of(&text), + ConfigError::InvalidTriggerGlob { kind: "branch", .. } + )); + let text = format!("[on]\ntags = [\"\"]\n{}", job_toml("")); + assert!(matches!( + err_of(&text), + ConfigError::InvalidTriggerGlob { kind: "tag", .. } + )); + } + + #[test] + fn pull_request_and_manual_events() { + let cfg = parse_config(EXAMPLE).unwrap(); + assert!(cfg.triggered_by(&Event::PullRequest)); + assert!(cfg.triggered_by(&Event::Manual)); + let cfg = parse_config(&job_toml("")).unwrap(); + assert!(!cfg.triggered_by(&Event::PullRequest)); + } + + #[test] + fn job_order_is_topological_and_stable() { + let text = "[jobs.lint]\nimage = \"i\"\nrun = \"r\"\nneeds = [\"test\"]\n\ + [jobs.test]\nimage = \"i\"\nrun = \"r\"\n\ + [jobs.docs]\nimage = \"i\"\nrun = \"r\"\n\ + [jobs.deploy]\nimage = \"i\"\nrun = \"r\"\nneeds = [\"lint\", \"docs\"]\n"; + let cfg = parse_config(text).unwrap(); + assert_eq!(cfg.job_order(), vec!["docs", "test", "lint", "deploy"]); + // Independent jobs come out in name order. + let flat = parse_config( + "[jobs.c]\nimage = \"i\"\nrun = \"r\"\n[jobs.a]\nimage = \"i\"\nrun = \"r\"\n[jobs.b]\nimage = \"i\"\nrun = \"r\"\n", + ) + .unwrap(); + assert_eq!(flat.job_order(), vec!["a", "b", "c"]); + } + + #[test] + fn example_order() { + let cfg = parse_config(EXAMPLE).unwrap(); + assert_eq!(cfg.job_order(), vec!["test", "lint"]); + } +} diff --git a/crates/forge-ci/src/error.rs b/crates/forge-ci/src/error.rs new file mode 100644 index 0000000..0126d53 --- /dev/null +++ b/crates/forge-ci/src/error.rs @@ -0,0 +1,60 @@ +//! Errors returned by [`crate::config::parse_config`]. + +use thiserror::Error; + +/// Why a `.forge/ci.toml` file was rejected. +#[derive(Debug, Clone, PartialEq, Eq, Error)] +pub enum ConfigError { + #[error("ci config is {size} bytes, the limit is {max} bytes")] + TooLarge { size: usize, max: usize }, + + #[error("invalid TOML: {0}")] + Toml(String), + + #[error("no jobs are defined")] + NoJobs, + + #[error("{count} jobs are defined, the limit is {max}")] + TooManyJobs { count: usize, max: usize }, + + #[error("invalid job name {0:?}: must match ^[a-z0-9][a-z0-9_-]{{0,39}}$")] + InvalidJobName(String), + + #[error("job {job:?} needs unknown job {need:?}")] + UnknownNeed { job: String, need: String }, + + #[error("jobs form a cycle, involving job {job:?}")] + Cycle { job: String }, + + #[error("job {job:?}: image must be non-empty and contain no whitespace")] + InvalidImage { job: String }, + + #[error("job {job:?}: run must not be empty")] + EmptyRun { job: String }, + + #[error("job {job:?}: invalid secret name {name:?}: must match ^[A-Z_][A-Z0-9_]{{0,63}}$")] + InvalidSecretName { job: String, name: String }, + + #[error("job {job:?}: invalid env name {name:?}: must match ^[A-Z_][A-Z0-9_]{{0,63}}$")] + InvalidEnvName { job: String, name: String }, + + #[error("job {job:?}: invalid artifact pattern {pattern:?}: {reason}")] + InvalidArtifactGlob { + job: String, + pattern: String, + reason: String, + }, + + #[error("job {job:?}: invalid runner label {label:?}")] + InvalidRunsOn { job: String, label: String }, + + #[error("job {job:?}: timeout_minutes must be between 1 and 360, got {value}")] + InvalidTimeout { job: String, value: u32 }, + + #[error("invalid {kind} glob {pattern:?}: {reason}")] + InvalidTriggerGlob { + kind: &'static str, + pattern: String, + reason: String, + }, +} diff --git a/crates/forge-ci/src/lib.rs b/crates/forge-ci/src/lib.rs new file mode 100644 index 0000000..829bd66 --- /dev/null +++ b/crates/forge-ci/src/lib.rs @@ -0,0 +1,9 @@ +//! CI workflow config (`.forge/ci.toml`), the runner protocol, and log masking. Shared by +//! forge-web and forge-runner. + +pub mod config; +pub mod error; +pub mod mask; +pub mod proto; + +pub use error::ConfigError; diff --git a/crates/forge-ci/src/mask.rs b/crates/forge-ci/src/mask.rs new file mode 100644 index 0000000..550c063 --- /dev/null +++ b/crates/forge-ci/src/mask.rs @@ -0,0 +1,256 @@ +//! Secret masking for job logs. Replaces every secret value, and its standard base64 encoding, +//! with `***`. [`MaskStream`] does the same over chunks, so a secret split across two chunks is +//! still masked. + +use std::collections::BTreeSet; +use std::fmt; + +use base64::Engine as _; +use base64::engine::general_purpose::STANDARD; + +/// The text that replaces every match. +pub const MASK: &str = "***"; +/// Values shorter than this (in chars) are not masked, since they would hide ordinary output. +pub const MIN_SECRET_CHARS: usize = 4; + +/// Masks a fixed set of secret values. +#[derive(Clone)] +pub struct Masker { + /// Byte patterns (raw values and their base64), longest first, deduplicated. + patterns: Vec>, +} + +impl fmt::Debug for Masker { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Masker") + .field("patterns", &self.patterns.len()) + .finish() + } +} + +impl Masker { + /// Builds a masker. Values shorter than [`MIN_SECRET_CHARS`] are ignored. + pub fn new(secrets: impl IntoIterator) -> Self { + let mut set: BTreeSet> = BTreeSet::new(); + for value in secrets { + if value.chars().count() < MIN_SECRET_CHARS { + continue; + } + let encoded = STANDARD.encode(value.as_bytes()); + set.insert(value.into_bytes()); + set.insert(encoded.into_bytes()); + } + let mut patterns: Vec> = set.into_iter().collect(); + patterns.sort_by_key(|p| std::cmp::Reverse(p.len())); + Self { patterns } + } + + /// Masks every occurrence in `text`. + pub fn mask(&self, text: &str) -> String { + let (out, _) = scan(&self.patterns, text.as_bytes(), true); + bytes_to_string(out) + } + + /// Starts a streaming masker that owns a copy of this masker. + pub fn stream(&self) -> MaskStream { + MaskStream::new(self.clone()) + } +} + +/// Masks a byte stream that arrives in chunks. +#[derive(Debug, Clone)] +pub struct MaskStream { + masker: Masker, + /// Bytes held back because they may be the start of a secret. Never more than the longest + /// pattern minus one. + held: Vec, +} + +impl MaskStream { + pub fn new(masker: Masker) -> Self { + Self { + masker, + held: Vec::new(), + } + } + + /// Feeds one chunk. Returns the masked bytes that are now safe to emit. + pub fn push(&mut self, chunk: &[u8]) -> Vec { + self.held.extend_from_slice(chunk); + let (out, rest) = scan(&self.masker.patterns, &self.held, false); + self.held = rest; + out + } + + /// Ends the stream and returns whatever is still held back, masked. + pub fn finish(&mut self) -> Vec { + let held = std::mem::take(&mut self.held); + let (out, _) = scan(&self.masker.patterns, &held, true); + out + } +} + +/// Walks `input` and writes masked bytes. A match is replaced by [`MASK`]. When `last` is false, +/// the scan stops at the first position where a pattern could still complete in later input, and +/// returns that unprocessed tail. When `last` is true, the whole input is processed. +fn scan(patterns: &[Vec], input: &[u8], last: bool) -> (Vec, Vec) { + let mut out = Vec::with_capacity(input.len()); + let mut i = 0; + while i < input.len() { + let tail = &input[i..]; + if let Some(p) = patterns.iter().find(|p| tail.starts_with(p)) { + out.extend_from_slice(MASK.as_bytes()); + i += p.len(); + continue; + } + if !last + && patterns + .iter() + .any(|p| p.len() > tail.len() && p.starts_with(tail)) + { + return (out, tail.to_vec()); + } + out.push(input[i]); + i += 1; + } + (out, Vec::new()) +} + +fn bytes_to_string(bytes: Vec) -> String { + match String::from_utf8(bytes) { + Ok(s) => s, + Err(e) => String::from_utf8_lossy(e.as_bytes()).into_owned(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn masker(values: &[&str]) -> Masker { + Masker::new(values.iter().map(|v| v.to_string())) + } + + fn stream_all(m: &Masker, chunks: &[&[u8]]) -> String { + let mut s = m.stream(); + let mut out = Vec::new(); + for c in chunks { + out.extend(s.push(c)); + } + out.extend(s.finish()); + String::from_utf8(out).unwrap() + } + + #[test] + fn masks_plain_values() { + let m = masker(&["hunter2-secret"]); + assert_eq!(m.mask("token=hunter2-secret ok"), "token=*** ok"); + assert_eq!( + m.mask("two hunter2-secret and hunter2-secret"), + "two *** and ***" + ); + assert_eq!(m.mask("nothing here"), "nothing here"); + } + + #[test] + fn masks_base64_encoding() { + let secret = "hunter2-secret"; + let encoded = STANDARD.encode(secret.as_bytes()); + let m = masker(&[secret]); + assert_eq!(m.mask(&format!("leak: {encoded}")), "leak: ***"); + let other = masker(&["abcdefgh"]); + let enc = STANDARD.encode("abcdefgh"); + assert_eq!(other.mask(&enc), "***"); + } + + #[test] + fn short_values_are_ignored() { + let m = masker(&["abc", "", "ab"]); + assert_eq!(m.mask("abc ab"), "abc ab"); + // 4 chars is the minimum that is masked. + let m = masker(&["abcd"]); + assert_eq!(m.mask("xabcdx"), "x***x"); + } + + #[test] + fn longest_match_wins() { + let m = masker(&["secret-value", "secret"]); + assert_eq!(m.mask("a secret-value b"), "a *** b"); + } + + #[test] + fn empty_secret_set_is_a_no_op() { + let m = Masker::new(std::iter::empty()); + assert_eq!(m.mask("anything"), "anything"); + assert_eq!(stream_all(&m, &[b"anything"]), "anything"); + } + + #[test] + fn secret_split_across_two_chunks() { + let m = masker(&["hunter2-secret"]); + let out = stream_all(&m, &[b"pre hunter2-", b"secret post"]); + assert_eq!(out, "pre *** post"); + } + + #[test] + fn secret_split_one_byte_at_a_time() { + let m = masker(&["hunter2-secret"]); + let text = b"a hunter2-secret b hunter2-secret c"; + let chunks: Vec<&[u8]> = text.chunks(1).collect(); + assert_eq!(stream_all(&m, &chunks), "a *** b *** c"); + } + + #[test] + fn base64_split_across_chunks() { + let secret = "hunter2-secret"; + let encoded = STANDARD.encode(secret); + let m = masker(&[secret]); + let (a, b) = encoded.split_at(5); + let out = stream_all( + &m, + &[format!("x{a}").as_bytes(), format!("{b}y").as_bytes()], + ); + assert_eq!(out, "x***y"); + } + + #[test] + fn held_bytes_are_bounded() { + let m = masker(&["0123456789"]); + let mut s = m.stream(); + let out = s.push(b"0123456"); + assert!(out.is_empty()); + assert!(s.held.len() <= 9); + let out = s.push(b"x"); + assert_eq!(out, b"0123456x".to_vec()); + } + + #[test] + fn partial_prefix_that_does_not_complete_is_emitted() { + let m = masker(&["hunter2-secret"]); + let out = stream_all(&m, &[b"hunt", b"er is here"]); + assert_eq!(out, "hunter is here"); + } + + #[test] + fn finish_flushes_held_partial_match() { + let m = masker(&["hunter2-secret"]); + let mut s = m.stream(); + let mut out = s.push(b"end hunter2-se"); + out.extend(s.finish()); + assert_eq!(String::from_utf8(out).unwrap(), "end hunter2-se"); + } + + #[test] + fn multibyte_text_survives() { + let m = masker(&["hunter2-secret"]); + assert_eq!(m.mask("héllo 🙂 hunter2-secret ✓"), "héllo 🙂 *** ✓"); + let out = stream_all(&m, &["héllo 🙂 ".as_bytes(), "hunter2-secret ✓".as_bytes()]); + assert_eq!(out, "héllo 🙂 *** ✓"); + } + + #[test] + fn debug_does_not_print_values() { + let m = masker(&["hunter2-secret"]); + assert!(!format!("{m:?}").contains("hunter2")); + } +} diff --git a/crates/forge-ci/src/proto.rs b/crates/forge-ci/src/proto.rs new file mode 100644 index 0000000..fb58ae6 --- /dev/null +++ b/crates/forge-ci/src/proto.rs @@ -0,0 +1,173 @@ +//! Runner <-> forge JSON protocol. All types use snake_case field names and are serialized as JSON. +//! +//! Types that carry secrets (`RegisterRequest`, `RegisterResponse`, `JobAssignment`) implement +//! `Debug` by hand and print `` for their secret fields, so they never end up in logs. + +use std::collections::BTreeMap; +use std::fmt; + +use serde::{Deserialize, Serialize}; + +/// `POST /api/v1/ci/runners/register` +#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct RegisterRequest { + /// Single-use registration token, as shown once by the admin page. + pub token: String, + pub name: String, + pub labels: Vec, +} + +impl fmt::Debug for RegisterRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RegisterRequest") + .field("token", &"") + .field("name", &self.name) + .field("labels", &self.labels) + .finish() + } +} + +/// Response to [`RegisterRequest`]. +#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct RegisterResponse { + pub runner_id: String, + /// Bearer secret for all later runner calls. Shown to the runner once. + pub runner_secret: String, +} + +impl fmt::Debug for RegisterResponse { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RegisterResponse") + .field("runner_id", &self.runner_id) + .field("runner_secret", &"") + .finish() + } +} + +/// `POST /api/v1/ci/runners/claim`. Long-polls for up to 30s; 204 means nothing was claimed. +/// The labels are informational: the server uses the labels stored for the runner. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct ClaimRequest { + pub labels: Vec, +} + +/// Returned with 200 by the claim endpoint. +#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct JobAssignment { + pub job_id: String, + /// Bearer token for `/api/v1/ci/jobs/{id}/...` and for read-only git access. + pub job_token: String, + /// `owner/name`. + pub repo: String, + /// HTTPS clone URL of the repo. + pub clone_url: String, + pub commit: String, + pub git_ref: String, + pub job_name: String, + pub image: String, + pub run: String, + pub env: BTreeMap, + /// Secret values, by name. Never print these. + pub secrets: BTreeMap, + pub artifacts: Vec, + pub timeout_minutes: u32, + pub network: bool, +} + +impl fmt::Debug for JobAssignment { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("JobAssignment") + .field("job_id", &self.job_id) + .field("job_token", &"") + .field("repo", &self.repo) + .field("clone_url", &self.clone_url) + .field("commit", &self.commit) + .field("git_ref", &self.git_ref) + .field("job_name", &self.job_name) + .field("image", &self.image) + .field("run", &self.run) + .field("env", &self.env) + .field("secrets", &self.secrets.keys().collect::>()) + .field("artifacts", &self.artifacts) + .field("timeout_minutes", &self.timeout_minutes) + .field("network", &self.network) + .finish() + } +} + +/// Response to `POST /api/v1/ci/jobs/{id}/heartbeat`. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct HeartbeatResponse { + pub cancel: bool, +} + +/// `POST /api/v1/ci/jobs/{id}/finish`. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct FinishRequest { + pub outcome: Outcome, + pub exit_code: Option, + pub message: Option, +} + +/// Final result of a job, reported by the runner. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum Outcome { + Success, + Failure, + Cancelled, + Error, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn outcome_is_snake_case() { + let json = serde_json::to_string(&Outcome::Cancelled).unwrap(); + assert_eq!(json, "\"cancelled\""); + } + + #[test] + fn finish_request_round_trips() { + let req = FinishRequest { + outcome: Outcome::Failure, + exit_code: Some(2), + message: None, + }; + let json = serde_json::to_string(&req).unwrap(); + assert_eq!( + json, + r#"{"outcome":"failure","exit_code":2,"message":null}"# + ); + let back: FinishRequest = serde_json::from_str(&json).unwrap(); + assert_eq!(back, req); + } + + #[test] + fn debug_redacts_secrets() { + let mut secrets = BTreeMap::new(); + secrets.insert("DEPLOY_KEY".to_string(), "hunter2-value".to_string()); + let job = JobAssignment { + job_id: "j1".into(), + job_token: "tok-secret".into(), + repo: "o/r".into(), + clone_url: "https://example.test/o/r.git".into(), + commit: "abc".into(), + git_ref: "refs/heads/main".into(), + job_name: "lint".into(), + image: "docker.io/rust:1".into(), + run: "true".into(), + env: BTreeMap::new(), + secrets, + artifacts: vec![], + timeout_minutes: 60, + network: true, + }; + let dbg = format!("{job:?}"); + assert!(!dbg.contains("hunter2-value")); + assert!(!dbg.contains("tok-secret")); + assert!(dbg.contains("DEPLOY_KEY")); + } +} diff --git a/crates/forge-core/Cargo.toml b/crates/forge-core/Cargo.toml new file mode 100644 index 0000000..1a3b76c --- /dev/null +++ b/crates/forge-core/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "forge-core" +description = "Domain types, storage, config and security primitives for forge" +version.workspace = true +edition.workspace = true +license.workspace = true +publish = false + +[dependencies] +thiserror.workspace = true +ipnet.workspace = true +serde.workspace = true +toml.workspace = true +ulid.workspace = true +time.workspace = true +unicode-normalization.workspace = true +jiff = { workspace = true } +argon2.workspace = true +rand.workspace = true +sha2.workspace = true +hex.workspace = true +hmac = { workspace = true } +sha1.workspace = true +image = { workspace = true } +subtle.workspace = true +base64.workspace = true +chacha20poly1305.workspace = true +turso.workspace = true +tokio = { workspace = true, features = ["sync"] } +tracing.workspace = true +serde_json.workspace = true +semver = { workspace = true } +zip = { workspace = true } + +[dev-dependencies] +tempfile.workspace = true diff --git a/crates/forge-core/migrations/0001_init.sql b/crates/forge-core/migrations/0001_init.sql new file mode 100644 index 0000000..acbffed --- /dev/null +++ b/crates/forge-core/migrations/0001_init.sql @@ -0,0 +1,92 @@ +-- Milestone 1 schema. Applied by store/migrate.rs, which records the version in +-- schema_migrations. Timestamps are RFC 3339 UTC strings (see time::now_stamp). + +CREATE TABLE users ( + id TEXT PRIMARY KEY, + username TEXT NOT NULL, + username_folded TEXT NOT NULL UNIQUE, + email TEXT, + password_hash TEXT NOT NULL, + is_admin INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL +); + +CREATE TABLE sessions ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + token_hash TEXT NOT NULL UNIQUE, + csrf_token TEXT NOT NULL, + created_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + last_seen TEXT NOT NULL, + user_agent TEXT +); +CREATE INDEX sessions_user_id ON sessions(user_id); +CREATE INDEX sessions_expires_at ON sessions(expires_at); + +CREATE TABLE ssh_keys ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + title TEXT NOT NULL, + algorithm TEXT NOT NULL, + key_blob BLOB NOT NULL UNIQUE, + fingerprint TEXT NOT NULL, + created_at TEXT NOT NULL, + last_used_at TEXT +); +CREATE INDEX ssh_keys_user_id ON ssh_keys(user_id); + +CREATE TABLE access_tokens ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + name TEXT NOT NULL, + token_hash TEXT NOT NULL UNIQUE, + scopes TEXT NOT NULL DEFAULT '[]', + expires_at TEXT, + created_at TEXT NOT NULL, + last_used_at TEXT +); +CREATE INDEX access_tokens_user_id ON access_tokens(user_id); + +CREATE TABLE repos ( + id TEXT PRIMARY KEY, + owner_id TEXT NOT NULL REFERENCES users(id), + name TEXT NOT NULL, + name_folded TEXT NOT NULL, + description TEXT NOT NULL DEFAULT '', + visibility TEXT NOT NULL, + default_branch TEXT NOT NULL, + archived INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL, + UNIQUE(owner_id, name_folded) +); + +-- Old owner/name pairs (folded) that now point at a repo, e.g. after a rename. +CREATE TABLE repo_redirects ( + owner_folded TEXT NOT NULL, + name_folded TEXT NOT NULL, + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + created_at TEXT NOT NULL, + PRIMARY KEY (owner_folded, name_folded) +); +CREATE INDEX repo_redirects_repo_id ON repo_redirects(repo_id); + +CREATE TABLE collaborators ( + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + role TEXT NOT NULL, + PRIMARY KEY (repo_id, user_id) +); +CREATE INDEX collaborators_user_id ON collaborators(user_id); + +CREATE TABLE push_events ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + actor_id TEXT NOT NULL REFERENCES users(id), + ref_name TEXT NOT NULL, + old_oid TEXT NOT NULL, + new_oid TEXT NOT NULL, + protocol TEXT NOT NULL, + created_at TEXT NOT NULL +); +CREATE INDEX push_events_repo_created ON push_events(repo_id, created_at); diff --git a/crates/forge-core/migrations/0002_profile.sql b/crates/forge-core/migrations/0002_profile.sql new file mode 100644 index 0000000..5cafc69 --- /dev/null +++ b/crates/forge-core/migrations/0002_profile.sql @@ -0,0 +1,12 @@ +-- Profile: about text, IANA timezone, and avatars stored in the database. Applied by +-- store/migrate.rs. Existing users get about = '' and timezone = 'UTC'. + +ALTER TABLE users ADD COLUMN about TEXT NOT NULL DEFAULT ''; +ALTER TABLE users ADD COLUMN timezone TEXT NOT NULL DEFAULT 'UTC'; + +CREATE TABLE avatars ( + user_id TEXT PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE, + data BLOB NOT NULL, -- re-encoded PNG, 256x256 + hash TEXT NOT NULL, -- hex sha256 of data (first 16 chars), used as ETag and as ?v= + updated_at TEXT NOT NULL +); diff --git a/crates/forge-core/migrations/0003_branch_protection.sql b/crates/forge-core/migrations/0003_branch_protection.sql new file mode 100644 index 0000000..a73e620 --- /dev/null +++ b/crates/forge-core/migrations/0003_branch_protection.sql @@ -0,0 +1,12 @@ +-- Branch protection rules per repo. Applied by store/migrate.rs. Patterns are literal branch +-- names or globs (`*` within one path segment, `**` across segments); see protection.rs. + +CREATE TABLE branch_protections ( + id TEXT PRIMARY KEY, -- ULID + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + pattern TEXT NOT NULL, -- "main", "release/*", "**" + allow_force_push INTEGER NOT NULL DEFAULT 0, + allow_deletion INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL, + UNIQUE (repo_id, pattern) +); diff --git a/crates/forge-core/migrations/0004_issues.sql b/crates/forge-core/migrations/0004_issues.sql new file mode 100644 index 0000000..da57639 --- /dev/null +++ b/crates/forge-core/migrations/0004_issues.sql @@ -0,0 +1,61 @@ +-- Issues, comments, labels and milestones (milestone 3). Applied by store/migrate.rs. +-- Numbers come from repos.next_issue_number, allocated in the same transaction as the insert. + +ALTER TABLE repos ADD COLUMN next_issue_number INTEGER NOT NULL DEFAULT 1; + +CREATE TABLE milestones ( + id TEXT PRIMARY KEY, repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + title TEXT NOT NULL, title_folded TEXT NOT NULL, description TEXT NOT NULL DEFAULT '', + due_on TEXT, -- 'YYYY-MM-DD' or NULL + state TEXT NOT NULL DEFAULT 'open',-- 'open' | 'closed' + created_at TEXT NOT NULL, closed_at TEXT, + UNIQUE (repo_id, title_folded)); + +CREATE TABLE issues ( + id TEXT PRIMARY KEY, repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + number INTEGER NOT NULL, + kind TEXT NOT NULL DEFAULT 'issue', -- 'issue' now; 'pull' in M4 (shared numbering) + title TEXT NOT NULL, body TEXT NOT NULL DEFAULT '', + state TEXT NOT NULL DEFAULT 'open', -- 'open' | 'closed' + state_reason TEXT, -- NULL | 'completed' | 'not_planned' + author_id TEXT NOT NULL REFERENCES users(id), + milestone_id TEXT REFERENCES milestones(id) ON DELETE SET NULL, + comment_count INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL, updated_at TEXT NOT NULL, closed_at TEXT, + UNIQUE (repo_id, number)); +CREATE INDEX issues_repo_state ON issues(repo_id, kind, state, number); + +CREATE TABLE comments ( + id TEXT PRIMARY KEY, issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + author_id TEXT NOT NULL REFERENCES users(id), + body TEXT NOT NULL, created_at TEXT NOT NULL, updated_at TEXT NOT NULL, + edited INTEGER NOT NULL DEFAULT 0); +CREATE INDEX comments_issue ON comments(issue_id, created_at); + +-- Edit history: the previous version is saved on every edit. +CREATE TABLE edit_history ( + id TEXT PRIMARY KEY, target_kind TEXT NOT NULL, -- 'issue' | 'comment' + target_id TEXT NOT NULL, old_title TEXT, old_body TEXT NOT NULL, + editor_id TEXT NOT NULL REFERENCES users(id), edited_at TEXT NOT NULL); +CREATE INDEX edit_history_target ON edit_history(target_kind, target_id, edited_at); + +-- Timeline events (everything except comments). +CREATE TABLE issue_events ( + id TEXT PRIMARY KEY, issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + actor_id TEXT REFERENCES users(id), -- NULL = system + kind TEXT NOT NULL, -- closed reopened labeled unlabeled assigned unassigned milestoned demilestoned renamed referenced + data TEXT NOT NULL DEFAULT '{}', -- JSON, e.g. {"label":"bug"} {"from":"a","to":"b"} {"commit":""} {"reason":"completed"} + created_at TEXT NOT NULL); +CREATE INDEX issue_events_issue ON issue_events(issue_id, created_at); + +CREATE TABLE labels ( + id TEXT PRIMARY KEY, repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + name TEXT NOT NULL, name_folded TEXT NOT NULL, + color TEXT NOT NULL, -- '#rrggbb' lowercase + description TEXT NOT NULL DEFAULT '', + UNIQUE (repo_id, name_folded)); + +CREATE TABLE issue_labels (issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + label_id TEXT NOT NULL REFERENCES labels(id) ON DELETE CASCADE, PRIMARY KEY (issue_id, label_id)); +CREATE TABLE issue_assignees (issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + user_id TEXT NOT NULL REFERENCES users(id), PRIMARY KEY (issue_id, user_id)); diff --git a/crates/forge-core/migrations/0005_stars.sql b/crates/forge-core/migrations/0005_stars.sql new file mode 100644 index 0000000..eadc223 --- /dev/null +++ b/crates/forge-core/migrations/0005_stars.sql @@ -0,0 +1,9 @@ +-- Stars: a user's bookmark on a repo. A row goes with either the user or the repo. +-- The primary key serves "repos starred by a user"; the index serves the per-repo count. + +CREATE TABLE stars ( + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + created_at TEXT NOT NULL, + PRIMARY KEY (user_id, repo_id)); +CREATE INDEX stars_repo_id ON stars(repo_id); diff --git a/crates/forge-core/migrations/0006_totp.sql b/crates/forge-core/migrations/0006_totp.sql new file mode 100644 index 0000000..5631d58 --- /dev/null +++ b/crates/forge-core/migrations/0006_totp.sql @@ -0,0 +1,15 @@ +-- Two-factor authentication (TOTP) and single-use recovery codes. Applied by store/migrate.rs. +-- totp_secret_sealed holds the instance-key sealed secret (secret::seal output, UTF-8 bytes). +-- totp_enabled stays 0 until the user confirms a code. totp_last_step is the replay guard. + +ALTER TABLE users ADD COLUMN totp_secret_sealed BLOB NULL; +ALTER TABLE users ADD COLUMN totp_enabled INTEGER NOT NULL DEFAULT 0; +ALTER TABLE users ADD COLUMN totp_last_step INTEGER NOT NULL DEFAULT 0; + +CREATE TABLE recovery_codes ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + code_hash TEXT NOT NULL, -- hex sha256 of the normalized code + used_at TEXT NULL +); +CREATE INDEX recovery_codes_user_id ON recovery_codes(user_id); diff --git a/crates/forge-core/migrations/0007_pulls.sql b/crates/forge-core/migrations/0007_pulls.sql new file mode 100644 index 0000000..9809f85 --- /dev/null +++ b/crates/forge-core/migrations/0007_pulls.sql @@ -0,0 +1,21 @@ +-- Forks and pull requests. Applied by store/migrate.rs. +-- A pull request is an issues row with kind = 'pull' (shared numbering); this table holds the +-- branch, head and mergeability state. head_repo_id is NULL once the head repo is deleted. + +ALTER TABLE repos ADD COLUMN fork_of TEXT REFERENCES repos(id); + +CREATE TABLE pull_requests ( + issue_id TEXT PRIMARY KEY REFERENCES issues(id) ON DELETE CASCADE, + base_branch TEXT NOT NULL, + head_repo_id TEXT REFERENCES repos(id), -- NULL if the head repo was deleted + head_branch TEXT NOT NULL, + head_oid TEXT NOT NULL, -- last known head commit (also refs/pull/N/head) + base_oid TEXT NOT NULL, -- base branch tip when mergeability was last computed + merge_base TEXT, + mergeable TEXT NOT NULL DEFAULT 'unknown', -- 'unknown' | 'clean' | 'conflict' | 'merged' | 'up_to_date' + conflict_files TEXT NOT NULL DEFAULT '[]', -- JSON array of paths + merged_at TEXT, + merged_by TEXT REFERENCES users(id), + merge_commit TEXT, + allow_maintainer_edits INTEGER NOT NULL DEFAULT 1); +CREATE INDEX pull_requests_head ON pull_requests(head_repo_id, head_branch); diff --git a/crates/forge-core/migrations/0008_reviews.sql b/crates/forge-core/migrations/0008_reviews.sql new file mode 100644 index 0000000..636baab --- /dev/null +++ b/crates/forge-core/migrations/0008_reviews.sql @@ -0,0 +1,24 @@ +-- Pull request reviews and line comments. Applied by store/migrate.rs. +-- A review belongs to a pull request (an issues row with kind = 'pull'). Review comments belong +-- to a review; a comment with reply_to set is a reply in the root comment's thread. + +CREATE TABLE pull_reviews ( + id TEXT PRIMARY KEY, issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + author_id TEXT NOT NULL REFERENCES users(id), + state TEXT NOT NULL, -- pending | commented | approved | changes_requested | dismissed + body TEXT NOT NULL DEFAULT '', + commit_oid TEXT NOT NULL, -- head at submit (or at creation while pending) + dismissed_reason TEXT, + created_at TEXT NOT NULL, submitted_at TEXT); +CREATE INDEX pull_reviews_issue ON pull_reviews(issue_id, submitted_at); +CREATE TABLE review_comments ( + id TEXT PRIMARY KEY, issue_id TEXT NOT NULL REFERENCES issues(id) ON DELETE CASCADE, + review_id TEXT NOT NULL REFERENCES pull_reviews(id) ON DELETE CASCADE, + author_id TEXT NOT NULL REFERENCES users(id), + path TEXT NOT NULL, side TEXT NOT NULL, line INTEGER NOT NULL, + commit_oid TEXT NOT NULL, diff_hunk TEXT NOT NULL DEFAULT '', + reply_to TEXT REFERENCES review_comments(id) ON DELETE CASCADE, + body TEXT NOT NULL, outdated INTEGER NOT NULL DEFAULT 0, resolved INTEGER NOT NULL DEFAULT 0, + resolved_by TEXT REFERENCES users(id), + created_at TEXT NOT NULL, updated_at TEXT NOT NULL); +CREATE INDEX review_comments_issue ON review_comments(issue_id, path, created_at); diff --git a/crates/forge-core/migrations/0009_merge_rules.sql b/crates/forge-core/migrations/0009_merge_rules.sql new file mode 100644 index 0000000..87b0b72 --- /dev/null +++ b/crates/forge-core/migrations/0009_merge_rules.sql @@ -0,0 +1,9 @@ +-- Merge and push rules on branch protections. Applied by store/migrate.rs. See protection.rs. +-- required_approvals counts approvals from Write-or-higher reviewers on the base repo. +-- require_up_to_date: the pull request head must contain the base tip. +-- restrict_push: direct pushes to the branch are rejected for everyone but repo admins. + +ALTER TABLE branch_protections ADD COLUMN required_approvals INTEGER NOT NULL DEFAULT 0; +ALTER TABLE branch_protections ADD COLUMN block_on_changes_requested INTEGER NOT NULL DEFAULT 0; +ALTER TABLE branch_protections ADD COLUMN require_up_to_date INTEGER NOT NULL DEFAULT 0; +ALTER TABLE branch_protections ADD COLUMN restrict_push INTEGER NOT NULL DEFAULT 0; diff --git a/crates/forge-core/migrations/0010_audit_log.sql b/crates/forge-core/migrations/0010_audit_log.sql new file mode 100644 index 0000000..dbd70d7 --- /dev/null +++ b/crates/forge-core/migrations/0010_audit_log.sql @@ -0,0 +1,21 @@ +-- Security audit log. Applied by store/migrate.rs. Append-only: the store never updates or +-- deletes rows except the retention purge (`purge_audit_before`). +-- `at` is an RFC 3339 UTC stamp with fixed width, so text order is time order. +-- actor_id is NULL for anonymous or CLI actors; actor_name keeps the name at the time. +-- target_* describe the object acted on (kind e.g. 'user', 'repo', 'token', 'ssh_key'). + +CREATE TABLE audit_log ( + id TEXT PRIMARY KEY, + at TEXT NOT NULL, + actor_id TEXT NULL, + actor_name TEXT NOT NULL DEFAULT '', + action TEXT NOT NULL, + target_kind TEXT NOT NULL DEFAULT '', + target_id TEXT NOT NULL DEFAULT '', + target_name TEXT NOT NULL DEFAULT '', + ip TEXT NOT NULL DEFAULT '', + data TEXT NOT NULL DEFAULT '{}' +); +CREATE INDEX audit_log_at ON audit_log(at); +CREATE INDEX audit_log_actor ON audit_log(actor_id, at); +CREATE INDEX audit_log_target ON audit_log(target_kind, target_id, at); diff --git a/crates/forge-core/migrations/0011_webhooks.sql b/crates/forge-core/migrations/0011_webhooks.sql new file mode 100644 index 0000000..5cde38a --- /dev/null +++ b/crates/forge-core/migrations/0011_webhooks.sql @@ -0,0 +1,44 @@ +-- Repo webhooks and their deliveries. Applied by store/migrate.rs. +-- secret_sealed holds the secret::seal output (UTF-8 "v1:..." text stored as a BLOB, like +-- users.totp_secret_sealed). The plaintext secret never reaches the database. +-- events is a JSON array of WebhookEvent names. active is 0 or 1. +-- Timestamps are RFC 3339 UTC stamps from time.rs, so text comparison is time order. + +CREATE TABLE webhooks ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id), + url TEXT NOT NULL, + secret_sealed BLOB NOT NULL, + events TEXT NOT NULL, + active INTEGER NOT NULL DEFAULT 1, + created_by TEXT NULL REFERENCES users(id) ON DELETE SET NULL, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL +); +CREATE INDEX webhooks_repo_id ON webhooks(repo_id); + +-- state: pending (queued, not yet attempted), ok (2xx received), failed (an attempt failed and a +-- retry is scheduled at next_attempt_at), gave_up (no further attempts). +-- Claimable rows are state IN ('pending', 'failed') with next_attempt_at <= now. +-- guid is the X-Forge-Delivery value. The request columns are immutable once written. +CREATE TABLE webhook_deliveries ( + id TEXT PRIMARY KEY, + hook_id TEXT NOT NULL REFERENCES webhooks(id), + guid TEXT NOT NULL UNIQUE, + event TEXT NOT NULL, + action TEXT NOT NULL DEFAULT '', + request_headers TEXT NOT NULL, + request_body TEXT NOT NULL, + state TEXT NOT NULL CHECK (state IN ('pending', 'ok', 'failed', 'gave_up')), + attempt INTEGER NOT NULL DEFAULT 0, + next_attempt_at TEXT NULL, + response_status INTEGER NULL, + response_headers TEXT NULL, + response_body TEXT NULL, -- first 64 KiB of the body + error TEXT NULL, + duration_ms INTEGER NULL, + created_at TEXT NOT NULL, + delivered_at TEXT NULL +); +CREATE INDEX webhook_deliveries_state_next ON webhook_deliveries(state, next_attempt_at); +CREATE INDEX webhook_deliveries_hook_created ON webhook_deliveries(hook_id, created_at); diff --git a/crates/forge-core/migrations/0012_notifications.sql b/crates/forge-core/migrations/0012_notifications.sql new file mode 100644 index 0000000..6f64244 --- /dev/null +++ b/crates/forge-core/migrations/0012_notifications.sql @@ -0,0 +1,12 @@ +-- Notifications: repo watch levels, issue subscriptions and per-user inbox rows. +-- Applied by store/migrate.rs. Timestamps are RFC 3339 UTC stamps from time.rs. + +CREATE TABLE repo_watches (user_id TEXT NOT NULL REFERENCES users(id), repo_id TEXT NOT NULL REFERENCES repos(id), + level TEXT NOT NULL, created_at TEXT NOT NULL, PRIMARY KEY (user_id, repo_id)); +CREATE TABLE issue_subscriptions (user_id TEXT NOT NULL REFERENCES users(id), issue_id TEXT NOT NULL REFERENCES issues(id), + state TEXT NOT NULL, reason TEXT NOT NULL, created_at TEXT NOT NULL, PRIMARY KEY (user_id, issue_id)); +CREATE TABLE notifications (id TEXT PRIMARY KEY, user_id TEXT NOT NULL REFERENCES users(id), + repo_id TEXT NOT NULL REFERENCES repos(id), issue_id TEXT NOT NULL REFERENCES issues(id), + reason TEXT NOT NULL, last_activity TEXT NOT NULL, last_actor_id TEXT REFERENCES users(id), + unread INTEGER NOT NULL DEFAULT 1, updated_at TEXT NOT NULL, UNIQUE (user_id, issue_id)); +CREATE INDEX notifications_inbox ON notifications(user_id, unread, updated_at); diff --git a/crates/forge-core/migrations/0013_commit_status.sql b/crates/forge-core/migrations/0013_commit_status.sql new file mode 100644 index 0000000..eded925 --- /dev/null +++ b/crates/forge-core/migrations/0013_commit_status.sql @@ -0,0 +1,20 @@ +-- Commit statuses reported by CI runners (and people) through the token API. Applied by +-- store/migrate.rs. +-- One row per (repo, commit, context): posting again for the same context replaces the row, so the +-- latest report wins. sha is the full lowercase hex object id (40 or 64 characters). +-- state is pending, success, failure or error. Timestamps are RFC 3339 UTC stamps from time.rs. + +CREATE TABLE commit_statuses ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id), + sha TEXT NOT NULL, + context TEXT NOT NULL DEFAULT 'default', + state TEXT NOT NULL CHECK (state IN ('pending', 'success', 'failure', 'error')), + description TEXT NULL, + target_url TEXT NULL, + creator_id TEXT NOT NULL REFERENCES users(id), + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL, + UNIQUE (repo_id, sha, context) +); +CREATE INDEX commit_statuses_repo_sha ON commit_statuses(repo_id, sha); diff --git a/crates/forge-core/migrations/0014_backup_runs.sql b/crates/forge-core/migrations/0014_backup_runs.sql new file mode 100644 index 0000000..cc337b3 --- /dev/null +++ b/crates/forge-core/migrations/0014_backup_runs.sql @@ -0,0 +1,19 @@ +-- Scheduled and manual backup and fsck runs, shown on /admin/backups. Applied by store/migrate.rs. +-- kind: 'backup' (a backup set) or 'fsck' (git fsck of every repo plus the database check). +-- trigger: 'schedule' (the scheduler), 'manual' (the admin page) or 'cli' (forge-web admin backup). +-- finished_at and ok stay NULL while a run is in progress; a run that never finished is shown as failed. +-- path and bytes are set for a backup that finished; error holds the first failure. +-- Timestamps are RFC 3339 UTC stamps from time.rs. + +CREATE TABLE backup_runs ( + id TEXT PRIMARY KEY, + kind TEXT NOT NULL CHECK (kind IN ('backup', 'fsck')), + started_at TEXT NOT NULL, + finished_at TEXT NULL, + ok INTEGER NULL CHECK (ok IS NULL OR ok IN (0, 1)), + path TEXT NULL, + bytes INTEGER NULL, + error TEXT NULL, + "trigger" TEXT NOT NULL CHECK ("trigger" IN ('schedule', 'manual', 'cli')) +); +CREATE INDEX backup_runs_kind_started ON backup_runs(kind, started_at); diff --git a/crates/forge-core/migrations/0015_reactions.sql b/crates/forge-core/migrations/0015_reactions.sql new file mode 100644 index 0000000..60e4ef5 --- /dev/null +++ b/crates/forge-core/migrations/0015_reactions.sql @@ -0,0 +1,14 @@ +-- Emoji reactions on issues (and pull requests, which are issue rows) and on their comments. +-- Applied by store/migrate.rs. target_kind is 'issue' or 'comment'. reaction is the short name of +-- a forge_core::Reaction (for example '+1' or 'heart'). One row per user, target and emoji, so a +-- second toggle removes the row again. + +CREATE TABLE reactions ( + target_kind TEXT NOT NULL, + target_id TEXT NOT NULL, + user_id TEXT NOT NULL REFERENCES users(id), + emoji TEXT NOT NULL, + created_at TEXT NOT NULL, + PRIMARY KEY (target_kind, target_id, user_id, emoji) +); +CREATE INDEX reactions_target ON reactions(target_kind, target_id); diff --git a/crates/forge-core/migrations/0016_review_remap.sql b/crates/forge-core/migrations/0016_review_remap.sql new file mode 100644 index 0000000..60365f6 --- /dev/null +++ b/crates/forge-core/migrations/0016_review_remap.sql @@ -0,0 +1,3 @@ +-- Review line remapping and dismissal history. +-- dismissed_from keeps the state a review had before it was dismissed (approved or changes_requested). +ALTER TABLE pull_reviews ADD COLUMN dismissed_from TEXT; diff --git a/crates/forge-core/migrations/0017_mirrors.sql b/crates/forge-core/migrations/0017_mirrors.sql new file mode 100644 index 0000000..289736c --- /dev/null +++ b/crates/forge-core/migrations/0017_mirrors.sql @@ -0,0 +1,26 @@ +-- Push and pull mirrors of a repo. Applied by store/migrate.rs. +-- direction: 'pull' (the repo's refs come from url) or 'push' (our refs go to url). +-- At most one pull mirror per repo (partial unique index); at most 10 push mirrors (enforced +-- by the store). +-- secret_sealed holds the secret::seal output as bytes, as webhooks.secret_sealed does. NULL +-- means no password. The plaintext secret never reaches the database. +-- Timestamps are RFC 3339 UTC stamps from time.rs, so text comparison is time order. + +CREATE TABLE repo_mirrors ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id), + direction TEXT NOT NULL CHECK (direction IN ('pull', 'push')), + url TEXT NOT NULL, + username TEXT NOT NULL DEFAULT '', + secret_sealed BLOB, + interval_minutes INTEGER NOT NULL DEFAULT 480, + enabled INTEGER NOT NULL DEFAULT 1, + next_sync_at TEXT NOT NULL, + last_sync_at TEXT, + last_ok INTEGER, + last_error TEXT, + created_at TEXT NOT NULL +); +CREATE INDEX repo_mirrors_due ON repo_mirrors(enabled, next_sync_at); +CREATE UNIQUE INDEX repo_mirrors_one_pull ON repo_mirrors(repo_id) WHERE direction = 'pull'; +CREATE INDEX repo_mirrors_repo ON repo_mirrors(repo_id); diff --git a/crates/forge-core/migrations/0018_issue_lock.sql b/crates/forge-core/migrations/0018_issue_lock.sql new file mode 100644 index 0000000..208961a --- /dev/null +++ b/crates/forge-core/migrations/0018_issue_lock.sql @@ -0,0 +1,6 @@ +-- Conversation locking on issues and pull requests (they share the issues table). While locked, +-- only collaborators with Triage or higher may write to the conversation. lock_reason is one of +-- off_topic, too_heated, resolved or spam, or NULL when no reason was given. + +ALTER TABLE issues ADD COLUMN locked INTEGER NOT NULL DEFAULT 0; +ALTER TABLE issues ADD COLUMN lock_reason TEXT; diff --git a/crates/forge-core/migrations/0019_pinned_issues.sql b/crates/forge-core/migrations/0019_pinned_issues.sql new file mode 100644 index 0000000..d464c4a --- /dev/null +++ b/crates/forge-core/migrations/0019_pinned_issues.sql @@ -0,0 +1,11 @@ +-- Pinned issues shown above the issue list of a repo. At most three per repo (enforced by +-- store/pinned.rs). position orders the cards; pinned_at is an RFC 3339 UTC stamp from time.rs. +-- Only issues are pinned, never pull requests. + +CREATE TABLE pinned_issues ( + repo_id TEXT NOT NULL REFERENCES repos(id), + issue_id TEXT NOT NULL REFERENCES issues(id), + position INTEGER NOT NULL, + pinned_at TEXT NOT NULL, + PRIMARY KEY (repo_id, issue_id) +); diff --git a/crates/forge-core/migrations/0020_releases.sql b/crates/forge-core/migrations/0020_releases.sql new file mode 100644 index 0000000..1937d2a --- /dev/null +++ b/crates/forge-core/migrations/0020_releases.sql @@ -0,0 +1,32 @@ +-- Releases: a tag-anchored announcement with optional downloadable assets. A release points at +-- a tag (created as a lightweight tag on demand) and keeps its own title and body. Deleting a +-- release keeps the git tag. Drafts have published_at NULL and are visible only to writers. +-- Asset bytes live in the blob store under assets/; only metadata is here. + +CREATE TABLE releases ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id), + tag TEXT NOT NULL, + target_oid TEXT NOT NULL, + title TEXT NOT NULL, + body TEXT NOT NULL DEFAULT '', + draft INTEGER NOT NULL DEFAULT 0, + prerelease INTEGER NOT NULL DEFAULT 0, + author_id TEXT NOT NULL REFERENCES users(id), + created_at TEXT NOT NULL, + published_at TEXT, + UNIQUE (repo_id, tag) +); + +CREATE TABLE release_assets ( + id TEXT PRIMARY KEY, + release_id TEXT NOT NULL REFERENCES releases(id) ON DELETE CASCADE, + name TEXT NOT NULL, + size INTEGER NOT NULL, + sha256 TEXT NOT NULL, + content_type TEXT NOT NULL, + download_count INTEGER NOT NULL DEFAULT 0, + uploader_id TEXT NOT NULL REFERENCES users(id), + created_at TEXT NOT NULL, + UNIQUE (release_id, name) +); diff --git a/crates/forge-core/migrations/0021_lfs.sql b/crates/forge-core/migrations/0021_lfs.sql new file mode 100644 index 0000000..6a156c9 --- /dev/null +++ b/crates/forge-core/migrations/0021_lfs.sql @@ -0,0 +1,12 @@ +-- Git LFS: which repo may use which content-addressed object. The bytes live on disk under +-- data_dir/lfs (shared by every repo); only the per-repo links are stored here. + +CREATE TABLE lfs_objects ( + repo_id TEXT NOT NULL REFERENCES repos(id), + oid TEXT NOT NULL, + size INTEGER NOT NULL, + created_at TEXT NOT NULL, + PRIMARY KEY (repo_id, oid) +); + +CREATE INDEX lfs_objects_oid ON lfs_objects (oid); diff --git a/crates/forge-core/migrations/0022_signatures.sql b/crates/forge-core/migrations/0022_signatures.sql new file mode 100644 index 0000000..1f5cb50 --- /dev/null +++ b/crates/forge-core/migrations/0022_signatures.sql @@ -0,0 +1,31 @@ +-- GPG keys users added for commit verification, and the cached verification result per commit. +-- Applied by store/migrate.rs. Timestamps are RFC 3339 UTC stamps from time.rs. +-- The armored public key is stored as given. `emails` is a JSON array of the key's uid emails. +-- Rows are deleted with the user (user_delete.rs) and with the repo (Store::delete_repo). + +CREATE TABLE gpg_keys ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id), + fingerprint TEXT NOT NULL UNIQUE, + armored TEXT NOT NULL, + emails TEXT NOT NULL, + created_at TEXT NOT NULL +); + +CREATE INDEX gpg_keys_user ON gpg_keys (user_id); + +-- status: verified | unverified | unsigned | unknown_key | bad. kind: ssh | gpg, NULL when unsigned. +-- signer_user_id is set when the signing key is known to belong to a user. It has no foreign key +-- because user deletion clears these rows explicitly. +CREATE TABLE commit_signatures ( + repo_id TEXT NOT NULL REFERENCES repos(id), + oid TEXT NOT NULL, + status TEXT NOT NULL, + kind TEXT, + signer_user_id TEXT, + key_fingerprint TEXT, + checked_at TEXT NOT NULL, + PRIMARY KEY (repo_id, oid) +); + +CREATE INDEX commit_signatures_signer ON commit_signatures (signer_user_id); diff --git a/crates/forge-core/migrations/0023_replication.sql b/crates/forge-core/migrations/0023_replication.sql new file mode 100644 index 0000000..02561d4 --- /dev/null +++ b/crates/forge-core/migrations/0023_replication.sql @@ -0,0 +1,13 @@ +-- Standby replication status, shown on /admin/replication. Applied by store/migrate.rs. +-- subject: 'db' for the database snapshot, or a repo id for a replicated repo. +-- last_ok_at is set by the last successful attempt; last_error holds the latest failure and is +-- cleared by a success. last_attempt_at is set by every attempt. refs_sha256 is the refs checksum +-- of the last successful repo push. Timestamps are RFC 3339 UTC stamps from time.rs. + +CREATE TABLE replication_status ( + subject TEXT PRIMARY KEY, + last_ok_at TEXT NULL, + last_error TEXT NULL, + last_attempt_at TEXT NULL, + refs_sha256 TEXT NULL +); diff --git a/crates/forge-core/migrations/0024_ci.sql b/crates/forge-core/migrations/0024_ci.sql new file mode 100644 index 0000000..a332b94 --- /dev/null +++ b/crates/forge-core/migrations/0024_ci.sql @@ -0,0 +1,77 @@ +-- CI: runners, registration tokens, runs, jobs, artifacts and sealed repo secrets. +-- Runner, registration and job tokens are stored as sha256 hex only. Timestamps are RFC 3339 +-- UTC stamps from time.rs. See docs/ci-interfaces.md section 2. + +CREATE TABLE ci_runners ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + labels TEXT NOT NULL, + secret_hash TEXT NOT NULL UNIQUE, + created_at TEXT NOT NULL, + last_seen_at TEXT NULL, + disabled INTEGER NOT NULL DEFAULT 0 +); + +CREATE TABLE ci_registration_tokens ( + token_hash TEXT PRIMARY KEY, + created_by TEXT NOT NULL REFERENCES users(id), + created_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + used_at TEXT NULL +); + +CREATE TABLE ci_runs ( + id TEXT PRIMARY KEY, + repo_id TEXT NOT NULL REFERENCES repos(id), + number INTEGER NOT NULL, + trigger TEXT NOT NULL, + git_ref TEXT NOT NULL, + commit_oid TEXT NOT NULL, + pull_number INTEGER NULL, + actor_id TEXT NOT NULL REFERENCES users(id), + state TEXT NOT NULL, + config_error TEXT NULL, + created_at TEXT NOT NULL, + finished_at TEXT NULL, + UNIQUE (repo_id, number) +); + +CREATE TABLE ci_jobs ( + id TEXT PRIMARY KEY, + run_id TEXT NOT NULL REFERENCES ci_runs(id) ON DELETE CASCADE, + name TEXT NOT NULL, + spec TEXT NOT NULL, + state TEXT NOT NULL, + runner_id TEXT NULL, + job_token_hash TEXT NULL, + exit_code INTEGER NULL, + message TEXT NULL, + queued_at TEXT NULL, + started_at TEXT NULL, + finished_at TEXT NULL, + heartbeat_at TEXT NULL, + cancel_requested INTEGER NOT NULL DEFAULT 0, + log_bytes INTEGER NOT NULL DEFAULT 0, + UNIQUE (run_id, name) +); + +CREATE INDEX ci_jobs_queue ON ci_jobs(state, queued_at); + +CREATE TABLE ci_artifacts ( + id TEXT PRIMARY KEY, + job_id TEXT NOT NULL REFERENCES ci_jobs(id) ON DELETE CASCADE, + name TEXT NOT NULL, + size INTEGER NOT NULL, + sha256 TEXT NOT NULL, + created_at TEXT NOT NULL, + UNIQUE (job_id, name) +); + +CREATE TABLE ci_secrets ( + repo_id TEXT NOT NULL REFERENCES repos(id), + name TEXT NOT NULL, + sealed BLOB NOT NULL, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL, + PRIMARY KEY (repo_id, name) +); diff --git a/crates/forge-core/migrations/0025_orgs.sql b/crates/forge-core/migrations/0025_orgs.sql new file mode 100644 index 0000000..b1fbc65 --- /dev/null +++ b/crates/forge-core/migrations/0025_orgs.sql @@ -0,0 +1,22 @@ +-- Organizations: an org is a row in `users` with kind = 'org'. That keeps one namespace (/{name} +-- works for both), keeps repos.owner_id -> users(id), and leaves every owner_name join unchanged. +-- Org rows get the unusable password hash "!org" and can never authenticate (see store/orgs.rs). + +ALTER TABLE users ADD COLUMN kind TEXT NOT NULL DEFAULT 'user' CHECK (kind IN ('user','org')); +ALTER TABLE users ADD COLUMN description TEXT; + +CREATE TABLE org_settings (org_id TEXT PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE, + default_repo_role TEXT NOT NULL DEFAULT 'read' CHECK (default_repo_role IN ('none','read','write')), + members_can_create_repos INTEGER NOT NULL DEFAULT 1); +CREATE TABLE org_members (org_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + role TEXT NOT NULL CHECK (role IN ('owner','member')), created_at TEXT NOT NULL, + PRIMARY KEY (org_id, user_id)); +CREATE TABLE teams (id TEXT PRIMARY KEY, org_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + name TEXT NOT NULL, name_folded TEXT NOT NULL, description TEXT NOT NULL DEFAULT '', + role TEXT NOT NULL CHECK (role IN ('read','triage','write','maintain','admin')), + all_repos INTEGER NOT NULL DEFAULT 0, created_at TEXT NOT NULL, UNIQUE (org_id, name_folded)); +CREATE TABLE team_members (team_id TEXT NOT NULL REFERENCES teams(id) ON DELETE CASCADE, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, PRIMARY KEY (team_id, user_id)); +CREATE TABLE team_repos (team_id TEXT NOT NULL REFERENCES teams(id) ON DELETE CASCADE, + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, PRIMARY KEY (team_id, repo_id)); diff --git a/crates/forge-core/migrations/0026_mail.sql b/crates/forge-core/migrations/0026_mail.sql new file mode 100644 index 0000000..808f1e0 --- /dev/null +++ b/crates/forge-core/migrations/0026_mail.sql @@ -0,0 +1,36 @@ +-- Outgoing mail (M1). The SMTP account lives here, not in forge.toml, so admins change it on +-- /admin/mail. The password is sealed with the instance key (secret::seal). +CREATE TABLE mail_settings ( + id INTEGER PRIMARY KEY CHECK (id = 1), + host TEXT NOT NULL DEFAULT '', + port INTEGER NOT NULL DEFAULT 587 CHECK (port BETWEEN 1 AND 65535), + security TEXT NOT NULL DEFAULT 'starttls' CHECK (security IN ('starttls', 'tls', 'none')), + username TEXT NOT NULL DEFAULT '', + password_sealed BLOB, + from_addr TEXT NOT NULL DEFAULT '', + from_name TEXT NOT NULL DEFAULT '', + enabled INTEGER NOT NULL DEFAULT 0 CHECK (enabled IN (0, 1)), + updated_at TEXT +); +INSERT INTO mail_settings (id) VALUES (1); + +-- Durable outbox. `idem_key` makes enqueue idempotent. A row is due when `sent_at` is NULL and +-- `next_attempt_at` is set; `lease_until` keeps two passes from sending the same row. A row with +-- no `next_attempt_at` and no `sent_at` has given up. +CREATE TABLE mail_outbox ( + id TEXT PRIMARY KEY, + idem_key TEXT NOT NULL UNIQUE, + to_addr TEXT NOT NULL, + subject TEXT NOT NULL, + body_text TEXT NOT NULL, + created_at TEXT NOT NULL, + attempts INTEGER NOT NULL DEFAULT 0, + next_attempt_at TEXT, + lease_until TEXT, + sent_at TEXT, + last_error TEXT +); +CREATE INDEX mail_outbox_due ON mail_outbox (next_attempt_at); +CREATE INDEX mail_outbox_created ON mail_outbox (created_at); + +ALTER TABLE users ADD COLUMN email_verified_at TEXT; diff --git a/crates/forge-core/migrations/0027_wiki.sql b/crates/forge-core/migrations/0027_wiki.sql new file mode 100644 index 0000000..c6a4e26 --- /dev/null +++ b/crates/forge-core/migrations/0027_wiki.sql @@ -0,0 +1,4 @@ +-- Wiki switch per repo. The wiki itself is a second bare repo on disk (see forge-git wiki.rs). +-- Applied by store/migrate.rs. + +ALTER TABLE repos ADD COLUMN wiki_enabled INTEGER NOT NULL DEFAULT 1; diff --git a/crates/forge-core/migrations/0028_discussions.sql b/crates/forge-core/migrations/0028_discussions.sql new file mode 100644 index 0000000..e1cb98e --- /dev/null +++ b/crates/forge-core/migrations/0028_discussions.sql @@ -0,0 +1,43 @@ +-- Discussions: a per-repo forum next to issues, opt-in per repo. Discussion numbers come from +-- repos.next_issue_number, the same counter as issues and pull requests, in the same transaction +-- as the insert (store/discussions.rs). Comments form one level of replies: a reply's parent_id is +-- a top-level comment of the same discussion. A deleted comment keeps its row (deleted_at is set, +-- the body is emptied) so its replies still make sense. answer_comment_id is only set in 'qa'. + +ALTER TABLE repos ADD COLUMN discussions_enabled INTEGER NOT NULL DEFAULT 0; + +CREATE TABLE discussions ( + id TEXT PRIMARY KEY, repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + number INTEGER NOT NULL, + category TEXT NOT NULL CHECK (category IN ('general','ideas','qa','announcements')), + title TEXT NOT NULL, body TEXT NOT NULL DEFAULT '', + author_id TEXT NOT NULL REFERENCES users(id), + answer_comment_id TEXT, + locked INTEGER NOT NULL DEFAULT 0, + comment_count INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL, updated_at TEXT NOT NULL, + UNIQUE (repo_id, number)); +CREATE INDEX discussions_repo_category ON discussions(repo_id, category, number); + +CREATE TABLE discussion_comments ( + id TEXT PRIMARY KEY, + discussion_id TEXT NOT NULL REFERENCES discussions(id) ON DELETE CASCADE, + parent_id TEXT REFERENCES discussion_comments(id) ON DELETE CASCADE, + author_id TEXT NOT NULL REFERENCES users(id), + body TEXT NOT NULL DEFAULT '', + created_at TEXT NOT NULL, updated_at TEXT NOT NULL, + deleted_at TEXT); +CREATE INDEX discussion_comments_discussion ON discussion_comments(discussion_id, created_at); + +-- Inbox rows for @mentions in discussions. Issues use the notifications table, which points at +-- issues, so discussions get their own. One row per user and discussion. +CREATE TABLE discussion_notifications ( + user_id TEXT NOT NULL REFERENCES users(id), + discussion_id TEXT NOT NULL REFERENCES discussions(id) ON DELETE CASCADE, + repo_id TEXT NOT NULL REFERENCES repos(id), + reason TEXT NOT NULL DEFAULT 'mention', + last_actor_id TEXT REFERENCES users(id), + unread INTEGER NOT NULL DEFAULT 1, + updated_at TEXT NOT NULL, + PRIMARY KEY (user_id, discussion_id)); +CREATE INDEX discussion_notifications_inbox ON discussion_notifications(user_id, unread, updated_at); diff --git a/crates/forge-core/migrations/0029_snippets.sql b/crates/forge-core/migrations/0029_snippets.sql new file mode 100644 index 0000000..e7f3685 --- /dev/null +++ b/crates/forge-core/migrations/0029_snippets.sql @@ -0,0 +1,29 @@ +-- Snippets: small, shareable collections of text files owned by one user. Each save writes a +-- revision holding the whole set of files as JSON, so history never depends on later edits. +CREATE TABLE snippets ( + id TEXT PRIMARY KEY, + owner_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + title TEXT NOT NULL, + description TEXT NOT NULL DEFAULT '', + visibility TEXT NOT NULL CHECK (visibility IN ('public','unlisted','private')), + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL +); +CREATE INDEX snippets_owner ON snippets (owner_id, updated_at); + +CREATE TABLE snippet_files ( + snippet_id TEXT NOT NULL REFERENCES snippets(id) ON DELETE CASCADE, + name TEXT NOT NULL, + content TEXT NOT NULL, + position INTEGER NOT NULL, + PRIMARY KEY (snippet_id, name) +); + +CREATE TABLE snippet_revisions ( + id TEXT PRIMARY KEY, + snippet_id TEXT NOT NULL REFERENCES snippets(id) ON DELETE CASCADE, + author_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + created_at TEXT NOT NULL, + files_json TEXT NOT NULL +); +CREATE INDEX snippet_revisions_snippet ON snippet_revisions (snippet_id, created_at); diff --git a/crates/forge-core/migrations/0030_ui_prefs.sql b/crates/forge-core/migrations/0030_ui_prefs.sql new file mode 100644 index 0000000..170d3a4 --- /dev/null +++ b/crates/forge-core/migrations/0030_ui_prefs.sql @@ -0,0 +1,5 @@ +-- UI preferences: colour theme and language per user. 'auto' follows the browser (theme) or +-- the instance default (language). Applied by store/migrate.rs. + +ALTER TABLE users ADD COLUMN theme TEXT NOT NULL DEFAULT 'auto' CHECK (theme IN ('auto','light','dark')); +ALTER TABLE users ADD COLUMN language TEXT NOT NULL DEFAULT 'auto'; diff --git a/crates/forge-core/migrations/0031_advisories.sql b/crates/forge-core/migrations/0031_advisories.sql new file mode 100644 index 0000000..e628eb4 --- /dev/null +++ b/crates/forge-core/migrations/0031_advisories.sql @@ -0,0 +1,35 @@ +-- Security advisories (OSV dumps), the dependencies read from each repo's lockfiles, and the +-- alerts that match them. See docs/wave-c-interfaces.md (A1). +CREATE TABLE advisories ( + id TEXT NOT NULL, + ecosystem TEXT NOT NULL, + package TEXT NOT NULL, + summary TEXT NOT NULL DEFAULT '', + severity TEXT NOT NULL DEFAULT '', + ranges_json TEXT NOT NULL DEFAULT '[]', + versions_json TEXT NOT NULL DEFAULT '[]', + modified TEXT NOT NULL DEFAULT '', + PRIMARY KEY (id, ecosystem, package) +); +CREATE INDEX advisories_by_package ON advisories (ecosystem, package); + +CREATE TABLE repo_dependencies ( + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + ecosystem TEXT NOT NULL, + package TEXT NOT NULL, + version TEXT NOT NULL, + manifest_path TEXT NOT NULL, + PRIMARY KEY (repo_id, ecosystem, package, version, manifest_path) +); + +CREATE TABLE repo_alerts ( + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + advisory_id TEXT NOT NULL, + ecosystem TEXT NOT NULL, + package TEXT NOT NULL, + version TEXT NOT NULL, + state TEXT NOT NULL CHECK (state IN ('open','dismissed','fixed')), + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL, + PRIMARY KEY (repo_id, advisory_id, ecosystem, package, version) +); diff --git a/crates/forge-core/migrations/0032_repo_transfers.sql b/crates/forge-core/migrations/0032_repo_transfers.sql new file mode 100644 index 0000000..56345e7 --- /dev/null +++ b/crates/forge-core/migrations/0032_repo_transfers.sql @@ -0,0 +1,11 @@ +-- Repo transfer acceptance (P1). A transfer started by a repo owner waits here until its target +-- accepts, declines, the initiator cancels, or it expires after 7 days. The target is a person, or +-- an org (any owner of the org may accept). Instance admin transfers skip this table. +-- Timestamps are RFC 3339 UTC stamps from time.rs. + +CREATE TABLE repo_transfers (repo_id TEXT PRIMARY KEY REFERENCES repos(id) ON DELETE CASCADE, + from_owner_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + to_owner_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + initiated_by TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + created_at TEXT NOT NULL, expires_at TEXT NOT NULL); +CREATE INDEX repo_transfers_to ON repo_transfers(to_owner_id); diff --git a/crates/forge-core/migrations/0033_account_tokens.sql b/crates/forge-core/migrations/0033_account_tokens.sql new file mode 100644 index 0000000..a94ba0c --- /dev/null +++ b/crates/forge-core/migrations/0033_account_tokens.sql @@ -0,0 +1,33 @@ +-- Account mail tokens: password reset, email verification and invites. A token is 32 random +-- bytes shown once in the mail link; only its sha256 is stored. `used_at` makes a link single +-- use, and `expires_at` bounds its life. + +CREATE TABLE password_reset_tokens ( + token_hash TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + created_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + used_at TEXT +); +CREATE INDEX password_reset_tokens_user ON password_reset_tokens(user_id); + +CREATE TABLE email_verify_tokens ( + token_hash TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE, + email TEXT NOT NULL, + created_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + used_at TEXT +); +CREATE INDEX email_verify_tokens_user ON email_verify_tokens(user_id); + +CREATE TABLE invites ( + token_hash TEXT PRIMARY KEY, + email TEXT NOT NULL, + invited_by TEXT REFERENCES users(id) ON DELETE SET NULL, + created_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + accepted_at TEXT, + accepted_by TEXT REFERENCES users(id) ON DELETE SET NULL +); +CREATE INDEX invites_email ON invites(email); diff --git a/crates/forge-core/migrations/0034_advisory_notifications.sql b/crates/forge-core/migrations/0034_advisory_notifications.sql new file mode 100644 index 0000000..a7cbfee --- /dev/null +++ b/crates/forge-core/migrations/0034_advisory_notifications.sql @@ -0,0 +1,12 @@ +-- One inbox row per admin and repo, for security alerts a lockfile scan opened (see +-- docs/wave-c-interfaces.md, F-A). Alerts are not issues, so they cannot use the `notifications` +-- table, which points at issues. `new_alerts` counts the alerts opened since the row was last read. +CREATE TABLE advisory_notifications ( + user_id TEXT NOT NULL REFERENCES users(id), + repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE, + new_alerts INTEGER NOT NULL DEFAULT 0, + unread INTEGER NOT NULL DEFAULT 1, + updated_at TEXT NOT NULL, + PRIMARY KEY (user_id, repo_id) +); +CREATE INDEX advisory_notifications_inbox ON advisory_notifications (user_id, unread, updated_at); diff --git a/crates/forge-core/migrations/0035_email_notifications.sql b/crates/forge-core/migrations/0035_email_notifications.sql new file mode 100644 index 0000000..6ea8210 --- /dev/null +++ b/crates/forge-core/migrations/0035_email_notifications.sql @@ -0,0 +1,6 @@ +-- Email copies of notifications (M3). `email_notifications` is the per-user opt-out, on by +-- default. `message_id` and `in_reply_to` let mail clients thread the messages of one issue or +-- pull request: the first mail of a thread sets the root id, and later mails reference it. +ALTER TABLE users ADD COLUMN email_notifications INTEGER NOT NULL DEFAULT 1; +ALTER TABLE mail_outbox ADD COLUMN message_id TEXT; +ALTER TABLE mail_outbox ADD COLUMN in_reply_to TEXT; diff --git a/crates/forge-core/src/advisories.rs b/crates/forge-core/src/advisories.rs new file mode 100644 index 0000000..74877f3 --- /dev/null +++ b/crates/forge-core/src/advisories.rs @@ -0,0 +1,594 @@ +//! Security advisories: the OSV records read from a dump, the version ranges they name, and the +//! lockfile parsers that turn a repo's `Cargo.lock`, `package-lock.json` and `go.sum` into +//! dependencies. Storage is in `store/advisories.rs`; the download and the scan are in forge-web. +//! +//! Only the OSV fields the forge needs are read: `id`, `summary`, `aliases`, `severity`, +//! `affected[].package`, `affected[].ranges` (SEMVER and ECOSYSTEM events) and +//! `affected[].versions`. Git ranges are skipped. Versions are compared as semver: a leading `v` +//! is dropped first, so Go versions and Go pseudo-versions compare as semver too. + +use std::collections::{BTreeMap, BTreeSet}; +use std::io::{Read, Seek}; + +use serde::{Deserialize, Serialize}; +use serde_json::Value; + +use crate::error::{Error, Result}; + +/// The OSV ecosystem names the forge knows how to scan. `[advisories] ecosystems` picks a subset. +pub const KNOWN_ECOSYSTEMS: [&str; 3] = ["crates.io", "npm", "Go"]; + +/// Largest single OSV record read from a dump. Real records are a few KiB. +const MAX_RECORD_BYTES: u64 = 4 * 1024 * 1024; + +/// One event of a range, in the order it appears in the record. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum Event { + Introduced(String), + Fixed(String), + LastAffected(String), + Limit(String), +} + +/// One SEMVER or ECOSYSTEM range of an affected package. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Range { + pub events: Vec, +} + +/// An advisory as it applies to one package in one ecosystem. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Advisory { + pub id: String, + pub ecosystem: String, + pub package: String, + pub summary: String, + pub severity: String, + pub modified: String, + #[serde(default)] + pub aliases: Vec, + pub ranges: Vec, + pub versions: Vec, +} + +/// A package version read from a lockfile. +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] +pub struct Dependency { + pub ecosystem: String, + pub package: String, + pub version: String, + pub manifest_path: String, +} + +#[derive(Deserialize)] +struct Record { + id: String, + #[serde(default)] + summary: String, + #[serde(default)] + aliases: Vec, + #[serde(default)] + modified: String, + #[serde(default)] + severity: Vec, + #[serde(default)] + database_specific: Value, + #[serde(default)] + affected: Vec, +} + +#[derive(Deserialize)] +struct SeverityEntry { + #[serde(default)] + score: String, +} + +#[derive(Deserialize)] +struct Affected { + #[serde(default)] + package: Option, + #[serde(default)] + ranges: Vec, + #[serde(default)] + versions: Vec, +} + +#[derive(Deserialize)] +struct PackageRef { + #[serde(default)] + ecosystem: String, + #[serde(default)] + name: String, +} + +#[derive(Deserialize)] +struct RawRange { + #[serde(rename = "type", default)] + kind: String, + #[serde(default)] + events: Vec, +} + +#[derive(Deserialize)] +struct RawEvent { + introduced: Option, + fixed: Option, + last_affected: Option, + limit: Option, +} + +/// Parses one OSV record into one [`Advisory`] per affected package of `ecosystem`. Several +/// `affected` entries for the same package are merged into one advisory. +pub fn parse_record(json: &[u8], ecosystem: &str) -> Result> { + let record: Record = serde_json::from_slice(json) + .map_err(|e| Error::Invalid(format!("advisory record is not valid OSV: {e}")))?; + if record.id.is_empty() { + return Err(Error::Invalid("advisory record has no id".into())); + } + let severity = record + .database_specific + .get("severity") + .and_then(Value::as_str) + .map(str::to_owned) + .or_else(|| record.severity.first().map(|s| s.score.clone())) + .unwrap_or_default(); + let mut merged: BTreeMap = BTreeMap::new(); + for affected in record.affected { + let Some(package) = affected.package else { + continue; + }; + if package.ecosystem != ecosystem || package.name.is_empty() { + continue; + } + let entry = merged + .entry(package.name.clone()) + .or_insert_with(|| Advisory { + id: record.id.clone(), + ecosystem: ecosystem.to_owned(), + package: package.name.clone(), + summary: record.summary.clone(), + severity: severity.clone(), + modified: record.modified.clone(), + aliases: record.aliases.clone(), + ranges: Vec::new(), + versions: Vec::new(), + }); + for raw in affected.ranges { + if !raw.kind.eq_ignore_ascii_case("SEMVER") + && !raw.kind.eq_ignore_ascii_case("ECOSYSTEM") + { + continue; + } + let events = raw + .events + .into_iter() + .filter_map(|e| { + if let Some(v) = e.introduced { + Some(Event::Introduced(v)) + } else if let Some(v) = e.fixed { + Some(Event::Fixed(v)) + } else if let Some(v) = e.last_affected { + Some(Event::LastAffected(v)) + } else { + e.limit.map(Event::Limit) + } + }) + .collect(); + entry.ranges.push(Range { events }); + } + entry.versions.extend(affected.versions); + } + Ok(merged.into_values().collect()) +} + +/// Reads every `.json` record of an OSV zip dump for `ecosystem`. A record that does not parse, +/// or is too large, is skipped and counted in the second value. +pub fn read_dump(reader: R, ecosystem: &str) -> Result<(Vec, usize)> { + let mut zip = zip::ZipArchive::new(reader) + .map_err(|e| Error::Invalid(format!("advisory dump is not a zip file: {e}")))?; + let mut advisories = Vec::new(); + let mut skipped = 0; + for index in 0..zip.len() { + let mut file = zip + .by_index(index) + .map_err(|e| Error::Invalid(format!("advisory dump entry unreadable: {e}")))?; + if file.is_dir() || !file.name().is_ok_and(|name| name.ends_with(".json")) { + continue; + } + let mut buf = Vec::new(); + file.by_ref() + .take(MAX_RECORD_BYTES + 1) + .read_to_end(&mut buf)?; + if buf.len() as u64 > MAX_RECORD_BYTES { + skipped += 1; + continue; + } + match parse_record(&buf, ecosystem) { + Ok(found) => advisories.extend(found), + Err(_) => skipped += 1, + } + } + Ok((advisories, skipped)) +} + +/// Parses a version as semver, after dropping a leading `v` (Go style). +pub fn parse_version(raw: &str) -> Option { + semver::Version::parse(raw.trim().trim_start_matches('v')).ok() +} + +/// Whether `advisory` covers `version` of its package. A version listed in `versions` matches by +/// text. Otherwise the version must fall inside one of the ranges. +pub fn affects(advisory: &Advisory, version: &str) -> bool { + let wanted = version.trim().trim_start_matches('v'); + if advisory + .versions + .iter() + .any(|v| v.trim().trim_start_matches('v') == wanted) + { + return true; + } + let Some(parsed) = parse_version(version) else { + return false; + }; + advisory + .ranges + .iter() + .any(|range| range_affects(range, &parsed)) +} + +/// Walks the events of one range. An interval runs from an `introduced` event to the next +/// `fixed` (exclusive) or `last_affected` (inclusive). `introduced` of `0` starts at the beginning. +/// An interval still open at the end runs forever. +fn range_affects(range: &Range, version: &semver::Version) -> bool { + // `Some(start)` while an interval is open; `start` is `None` when it began at `0`. + let mut open: Option> = None; + for event in &range.events { + match event { + Event::Introduced(raw) => { + open = Some(if raw == "0" { + None + } else { + // An unreadable start is treated as "from the beginning": more alerts, never fewer. + parse_version(raw) + }); + } + Event::Fixed(raw) => { + if let Some(start) = open.take() + && starts_before(&start, version) + && parse_version(raw).is_some_and(|fixed| *version < fixed) + { + return true; + } + } + Event::LastAffected(raw) => { + if let Some(start) = open.take() + && starts_before(&start, version) + && parse_version(raw).is_some_and(|last| *version <= last) + { + return true; + } + } + Event::Limit(_) => {} + } + } + open.is_some_and(|start| starts_before(&start, version)) +} + +fn starts_before(start: &Option, version: &semver::Version) -> bool { + start.as_ref().is_none_or(|s| version >= s) +} + +/// Reads `Cargo.lock`. Only registry packages count: path and git packages have no `source` +/// from crates.io and are skipped. +pub fn parse_cargo_lock(text: &str, manifest_path: &str) -> Result> { + #[derive(Deserialize)] + struct Lock { + #[serde(default)] + package: Vec, + } + #[derive(Deserialize)] + struct Package { + name: String, + version: String, + #[serde(default)] + source: Option, + } + let lock: Lock = toml::from_str(text) + .map_err(|e| Error::Invalid(format!("Cargo.lock is not valid TOML: {e}")))?; + Ok(lock + .package + .into_iter() + .filter(|p| { + p.source + .as_deref() + .is_some_and(|s| s.starts_with("registry+")) + }) + .map(|p| dependency("crates.io", p.name, p.version, manifest_path)) + .collect()) +} + +/// Reads `package-lock.json` in the v2 and v3 `packages` layout. Entries without a version, the +/// root entry and linked workspace packages are skipped. +pub fn parse_package_lock(text: &str, manifest_path: &str) -> Result> { + let doc: Value = serde_json::from_str(text) + .map_err(|e| Error::Invalid(format!("package-lock.json is not valid JSON: {e}")))?; + let Some(packages) = doc.get("packages").and_then(Value::as_object) else { + return Ok(Vec::new()); + }; + let mut out = Vec::new(); + for (key, entry) in packages { + if key.is_empty() || entry.get("link").and_then(Value::as_bool) == Some(true) { + continue; + } + let Some(version) = entry.get("version").and_then(Value::as_str) else { + continue; + }; + // `node_modules/a/node_modules/@s/b` names `@s/b`: the part after the last `node_modules/`. + let name = match key.rsplit_once("node_modules/") { + Some((_, name)) => name, + None => continue, + }; + out.push(dependency( + "npm", + name.to_owned(), + version.to_owned(), + manifest_path, + )); + } + Ok(out) +} + +/// Reads `go.sum`. Each module version is listed once, with or without its `/go.mod` hash line; +/// the `/go.mod` lines alone are not dependencies, so they are dropped. +pub fn parse_go_sum(text: &str, manifest_path: &str) -> Vec { + let mut seen = BTreeSet::new(); + for line in text.lines() { + let mut fields = line.split_whitespace(); + let (Some(module), Some(version)) = (fields.next(), fields.next()) else { + continue; + }; + if version.ends_with("/go.mod") { + continue; + } + seen.insert((module.to_owned(), version.to_owned())); + } + seen.into_iter() + .map(|(module, version)| dependency("Go", module, version, manifest_path)) + .collect() +} + +fn dependency( + ecosystem: &str, + package: String, + version: String, + manifest_path: &str, +) -> Dependency { + Dependency { + ecosystem: ecosystem.to_owned(), + package, + version, + manifest_path: manifest_path.to_owned(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn adv(ranges: Vec, versions: Vec<&str>) -> Advisory { + Advisory { + id: "GHSA-test".into(), + ecosystem: "crates.io".into(), + package: "demo".into(), + summary: String::new(), + severity: String::new(), + modified: String::new(), + aliases: Vec::new(), + ranges, + versions: versions.into_iter().map(str::to_owned).collect(), + } + } + + fn range(events: Vec) -> Range { + Range { events } + } + + #[test] + fn introduced_and_fixed_is_half_open() { + let a = adv( + vec![range(vec![ + Event::Introduced("1.0.0".into()), + Event::Fixed("1.2.0".into()), + ])], + vec![], + ); + assert!(!affects(&a, "0.9.9")); + assert!(affects(&a, "1.0.0")); + assert!(affects(&a, "1.1.5")); + assert!(!affects(&a, "1.2.0")); + assert!(!affects(&a, "2.0.0")); + } + + #[test] + fn introduced_zero_with_last_affected_is_inclusive() { + let a = adv( + vec![range(vec![ + Event::Introduced("0".into()), + Event::LastAffected("0.4.7".into()), + ])], + vec![], + ); + assert!(affects(&a, "0.0.1")); + assert!(affects(&a, "0.4.7")); + assert!(!affects(&a, "0.4.8")); + } + + #[test] + fn open_interval_runs_forever_and_later_intervals_work() { + let a = adv( + vec![range(vec![ + Event::Introduced("1.0.0".into()), + Event::Fixed("1.1.0".into()), + Event::Introduced("2.0.0".into()), + ])], + vec![], + ); + assert!(affects(&a, "1.0.5")); + assert!(!affects(&a, "1.5.0")); + assert!(affects(&a, "9.9.9")); + } + + #[test] + fn go_v_prefix_and_pseudo_versions_compare_as_semver() { + let a = adv( + vec![range(vec![ + Event::Introduced("0".into()), + Event::Fixed("1.9.1".into()), + ])], + vec![], + ); + assert!(affects(&a, "v1.9.0")); + assert!(!affects(&a, "v1.9.1")); + assert!(affects(&a, "v0.0.0-20210101000000-abcdef123456")); + } + + #[test] + fn listed_versions_match_by_text() { + let a = adv(vec![], vec!["1.0.3", "v2.0.0"]); + assert!(affects(&a, "1.0.3")); + assert!(affects(&a, "2.0.0")); + assert!(!affects(&a, "1.0.4")); + } + + #[test] + fn unparsable_version_matches_nothing_by_range() { + let a = adv(vec![range(vec![Event::Introduced("0".into())])], vec![]); + assert!(!affects(&a, "not-a-version")); + } + + #[test] + fn parses_an_osv_record_and_merges_entries_for_one_package() { + let json = br#"{ + "id": "GHSA-xxxx", + "summary": "bad things", + "modified": "2026-01-01T00:00:00Z", + "database_specific": {"severity": "HIGH"}, + "affected": [ + {"package": {"ecosystem": "crates.io", "name": "demo"}, + "ranges": [{"type": "SEMVER", "events": [{"introduced": "0"}, {"fixed": "1.0.1"}]}]}, + {"package": {"ecosystem": "crates.io", "name": "demo"}, + "ranges": [{"type": "GIT", "events": [{"introduced": "0"}]}, + {"type": "ECOSYSTEM", "events": [{"introduced": "3.0.0"}, {"last_affected": "3.0.5"}]}], + "versions": ["0.9.0"]}, + {"package": {"ecosystem": "npm", "name": "other"}, + "ranges": []} + ] + }"#; + let found = parse_record(json, "crates.io").expect("record parses"); + assert_eq!(found.len(), 1); + let a = &found[0]; + assert_eq!(a.id, "GHSA-xxxx"); + assert_eq!(a.severity, "HIGH"); + assert_eq!(a.ranges.len(), 2, "the GIT range is skipped"); + assert!(affects(a, "0.5.0")); + assert!(!affects(a, "1.0.1")); + assert!(affects(a, "3.0.2")); + assert!(affects(a, "0.9.0")); + } + + #[test] + fn record_without_an_id_is_refused() { + assert!(parse_record(br#"{"affected": []}"#, "npm").is_err()); + assert!(parse_record(b"not json", "npm").is_err()); + } + + #[test] + fn reads_a_zip_dump_and_skips_bad_records() { + use std::io::{Cursor, Write}; + let mut buf = Cursor::new(Vec::new()); + { + let mut zip = zip::ZipWriter::new(&mut buf); + let opts = zip::write::SimpleFileOptions::default(); + zip.start_file("GHSA-a.json", opts).expect("start"); + zip.write_all( + br#"{"id":"GHSA-a","affected":[{"package":{"ecosystem":"npm","name":"left"}, + "ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]}]}"#, + ) + .expect("write"); + zip.start_file("broken.json", opts).expect("start"); + zip.write_all(b"{ nope").expect("write"); + zip.start_file("readme.txt", opts).expect("start"); + zip.write_all(b"ignored").expect("write"); + zip.finish().expect("finish"); + } + buf.set_position(0); + let (found, skipped) = read_dump(buf, "npm").expect("dump reads"); + assert_eq!(skipped, 1); + assert_eq!(found.len(), 1); + assert_eq!(found[0].package, "left"); + } + + #[test] + fn parses_cargo_lock_registry_packages_only() { + let text = r#" +version = 4 + +[[package]] +name = "serde" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc" + +[[package]] +name = "local" +version = "0.1.0" +"#; + let deps = parse_cargo_lock(text, "Cargo.lock").expect("parses"); + assert_eq!(deps.len(), 1); + assert_eq!(deps[0].ecosystem, "crates.io"); + assert_eq!(deps[0].package, "serde"); + assert_eq!(deps[0].version, "1.0.0"); + assert_eq!(deps[0].manifest_path, "Cargo.lock"); + } + + #[test] + fn parses_package_lock_v3_packages() { + let text = r#"{ + "lockfileVersion": 3, + "packages": { + "": {"name": "app", "version": "1.0.0"}, + "node_modules/left-pad": {"version": "1.3.0"}, + "node_modules/a/node_modules/@scope/inner": {"version": "2.0.1"}, + "node_modules/linked": {"link": true}, + "packages/ws": {"version": "0.0.1"} + } + }"#; + let mut deps = parse_package_lock(text, "web/package-lock.json").expect("parses"); + deps.sort(); + let names: Vec<(&str, &str)> = deps + .iter() + .map(|d| (d.package.as_str(), d.version.as_str())) + .collect(); + assert_eq!( + names, + vec![("@scope/inner", "2.0.1"), ("left-pad", "1.3.0")] + ); + assert!(deps.iter().all(|d| d.ecosystem == "npm")); + } + + #[test] + fn parses_go_sum_and_drops_go_mod_lines() { + let text = "\ +github.com/a/b v1.2.3 h1:abc= +github.com/a/b v1.2.3/go.mod h1:def= +github.com/c/d v0.0.0-20210101000000-abcdef123456 h1:ghi= +github.com/c/d v0.0.0-20210101000000-abcdef123456/go.mod h1:jkl= +"; + let deps = parse_go_sum(text, "go.sum"); + assert_eq!(deps.len(), 2); + assert_eq!(deps[0].ecosystem, "Go"); + assert_eq!(deps[0].package, "github.com/a/b"); + assert_eq!(deps[0].version, "v1.2.3"); + } +} diff --git a/crates/forge-core/src/audit.rs b/crates/forge-core/src/audit.rs new file mode 100644 index 0000000..7e7f802 --- /dev/null +++ b/crates/forge-core/src/audit.rs @@ -0,0 +1,413 @@ +//! Security audit log: the action names, the entry shape and the list filter. The stored shape is +//! in migrations/0010_audit_log.sql; the store functions live in store/audit.rs. Rows are never +//! edited; only the retention purge removes them. + +use ulid::Ulid; + +use crate::time::now_stamp; + +/// Every security-relevant action that is recorded. The `as_str` names are stored and shown. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum AuditAction { + LoginSuccess, + LoginFailed, + Login2faFailed, + Logout, + PasswordChanged, + EmailChanged, + PasswordResetByAdmin, + TotpEnabled, + TotpDisabled, + RecoveryCodesRegenerated, + SshKeyAdded, + SshKeyRemoved, + GpgKeyAdded, + GpgKeyDeleted, + TokenCreated, + TokenRevoked, + SessionRevoked, + UserCreated, + UsernameChanged, + UserDeleted, + RepoCreated, + RepoDeleted, + RepoRenamed, + RepoTransferred, + RepoTransferInitiated, + RepoTransferAccepted, + RepoTransferDeclined, + RepoTransferCancelled, + RepoVisibilityChanged, + CollaboratorAdded, + CollaboratorRemoved, + CollaboratorRoleChanged, + BranchRuleCreated, + BranchRuleUpdated, + BranchRuleDeleted, + RepoArchived, + RepoUnarchived, + WebhookCreated, + WebhookUpdated, + WebhookDeleted, + MirrorCreated, + MirrorUpdated, + MirrorDeleted, + MirrorSyncFailed, + BackupStarted, + FsckStarted, + ReplicationReconcileStarted, + CiSecretSet, + CiSecretDeleted, + CiRunnerRegistered, + CiRunnerDeleted, + CiRegistrationTokenCreated, + AdvisoryAlertDismissed, + AdvisoryAlertReopened, + UiPrefsChanged, + DiscussionsEnabled, + DiscussionsDisabled, + DiscussionCreated, + DiscussionEdited, + DiscussionDeleted, + DiscussionLocked, + DiscussionUnlocked, + DiscussionAnswered, + DiscussionCommentCreated, + DiscussionCommentEdited, + DiscussionCommentDeleted, + MailSettingsUpdated, + MailTestQueued, + SnippetCreated, + SnippetUpdated, + SnippetDeleted, + WikiPageSaved, + WikiEnabled, + WikiDisabled, + WikiPushed, + OrgCreated, + OrgDeleted, + OrgSettingsUpdated, + OrgMemberAdded, + OrgMemberRemoved, + OrgMemberRoleChanged, + TeamCreated, + TeamUpdated, + TeamDeleted, + TeamMemberAdded, + TeamMemberRemoved, + TeamRepoAdded, + TeamRepoRemoved, + PasswordResetCompleted, + EmailVerified, + InviteSent, + InviteAccepted, +} + +impl AuditAction { + /// Every action, in declaration order. Used to parse filter values. + pub const ALL: &'static [AuditAction] = &[ + AuditAction::LoginSuccess, + AuditAction::LoginFailed, + AuditAction::Login2faFailed, + AuditAction::Logout, + AuditAction::PasswordChanged, + AuditAction::EmailChanged, + AuditAction::PasswordResetByAdmin, + AuditAction::TotpEnabled, + AuditAction::TotpDisabled, + AuditAction::RecoveryCodesRegenerated, + AuditAction::SshKeyAdded, + AuditAction::SshKeyRemoved, + AuditAction::GpgKeyAdded, + AuditAction::GpgKeyDeleted, + AuditAction::TokenCreated, + AuditAction::TokenRevoked, + AuditAction::SessionRevoked, + AuditAction::UserCreated, + AuditAction::UsernameChanged, + AuditAction::UserDeleted, + AuditAction::RepoCreated, + AuditAction::RepoDeleted, + AuditAction::RepoRenamed, + AuditAction::RepoTransferred, + AuditAction::RepoTransferInitiated, + AuditAction::RepoTransferAccepted, + AuditAction::RepoTransferDeclined, + AuditAction::RepoTransferCancelled, + AuditAction::RepoVisibilityChanged, + AuditAction::CollaboratorAdded, + AuditAction::CollaboratorRemoved, + AuditAction::CollaboratorRoleChanged, + AuditAction::BranchRuleCreated, + AuditAction::BranchRuleUpdated, + AuditAction::BranchRuleDeleted, + AuditAction::RepoArchived, + AuditAction::RepoUnarchived, + AuditAction::WebhookCreated, + AuditAction::WebhookUpdated, + AuditAction::WebhookDeleted, + AuditAction::MirrorCreated, + AuditAction::MirrorUpdated, + AuditAction::MirrorDeleted, + AuditAction::MirrorSyncFailed, + AuditAction::BackupStarted, + AuditAction::FsckStarted, + AuditAction::ReplicationReconcileStarted, + AuditAction::CiSecretSet, + AuditAction::CiSecretDeleted, + AuditAction::CiRunnerRegistered, + AuditAction::CiRunnerDeleted, + AuditAction::CiRegistrationTokenCreated, + AuditAction::AdvisoryAlertDismissed, + AuditAction::AdvisoryAlertReopened, + AuditAction::UiPrefsChanged, + AuditAction::DiscussionsEnabled, + AuditAction::DiscussionsDisabled, + AuditAction::DiscussionCreated, + AuditAction::DiscussionEdited, + AuditAction::DiscussionDeleted, + AuditAction::DiscussionLocked, + AuditAction::DiscussionUnlocked, + AuditAction::DiscussionAnswered, + AuditAction::DiscussionCommentCreated, + AuditAction::DiscussionCommentEdited, + AuditAction::DiscussionCommentDeleted, + AuditAction::MailSettingsUpdated, + AuditAction::MailTestQueued, + AuditAction::SnippetCreated, + AuditAction::SnippetUpdated, + AuditAction::SnippetDeleted, + AuditAction::WikiPageSaved, + AuditAction::WikiEnabled, + AuditAction::WikiDisabled, + AuditAction::WikiPushed, + AuditAction::OrgCreated, + AuditAction::OrgDeleted, + AuditAction::OrgSettingsUpdated, + AuditAction::OrgMemberAdded, + AuditAction::OrgMemberRemoved, + AuditAction::OrgMemberRoleChanged, + AuditAction::TeamCreated, + AuditAction::TeamUpdated, + AuditAction::TeamDeleted, + AuditAction::TeamMemberAdded, + AuditAction::TeamMemberRemoved, + AuditAction::TeamRepoAdded, + AuditAction::TeamRepoRemoved, + AuditAction::PasswordResetCompleted, + AuditAction::EmailVerified, + AuditAction::InviteSent, + AuditAction::InviteAccepted, + ]; + + pub fn as_str(self) -> &'static str { + match self { + AuditAction::LoginSuccess => "login_success", + AuditAction::LoginFailed => "login_failed", + AuditAction::Login2faFailed => "login_2fa_failed", + AuditAction::Logout => "logout", + AuditAction::PasswordChanged => "password_changed", + AuditAction::EmailChanged => "email_changed", + AuditAction::PasswordResetByAdmin => "password_reset_by_admin", + AuditAction::TotpEnabled => "totp_enabled", + AuditAction::TotpDisabled => "totp_disabled", + AuditAction::RecoveryCodesRegenerated => "recovery_codes_regenerated", + AuditAction::SshKeyAdded => "ssh_key_added", + AuditAction::SshKeyRemoved => "ssh_key_removed", + AuditAction::GpgKeyAdded => "gpg_key_added", + AuditAction::GpgKeyDeleted => "gpg_key_deleted", + AuditAction::TokenCreated => "token_created", + AuditAction::TokenRevoked => "token_revoked", + AuditAction::SessionRevoked => "session_revoked", + AuditAction::UserCreated => "user_created", + AuditAction::UsernameChanged => "username_changed", + AuditAction::UserDeleted => "user_deleted", + AuditAction::RepoCreated => "repo_created", + AuditAction::RepoDeleted => "repo_deleted", + AuditAction::RepoRenamed => "repo_renamed", + AuditAction::RepoTransferred => "repo_transferred", + AuditAction::RepoTransferInitiated => "repo_transfer_initiated", + AuditAction::RepoTransferAccepted => "repo_transfer_accepted", + AuditAction::RepoTransferDeclined => "repo_transfer_declined", + AuditAction::RepoTransferCancelled => "repo_transfer_cancelled", + AuditAction::RepoVisibilityChanged => "repo_visibility_changed", + AuditAction::CollaboratorAdded => "collaborator_added", + AuditAction::CollaboratorRemoved => "collaborator_removed", + AuditAction::CollaboratorRoleChanged => "collaborator_role_changed", + AuditAction::BranchRuleCreated => "branch_rule_created", + AuditAction::BranchRuleUpdated => "branch_rule_updated", + AuditAction::BranchRuleDeleted => "branch_rule_deleted", + AuditAction::RepoArchived => "repo_archived", + AuditAction::RepoUnarchived => "repo_unarchived", + AuditAction::WebhookCreated => "webhook_created", + AuditAction::WebhookUpdated => "webhook_updated", + AuditAction::WebhookDeleted => "webhook_deleted", + AuditAction::MirrorCreated => "mirror_created", + AuditAction::MirrorUpdated => "mirror_updated", + AuditAction::MirrorDeleted => "mirror_deleted", + AuditAction::MirrorSyncFailed => "mirror_sync_failed", + AuditAction::BackupStarted => "backup_started", + AuditAction::FsckStarted => "fsck_started", + AuditAction::ReplicationReconcileStarted => "replication_reconcile_started", + AuditAction::CiSecretSet => "ci_secret_set", + AuditAction::CiSecretDeleted => "ci_secret_deleted", + AuditAction::CiRunnerRegistered => "ci_runner_registered", + AuditAction::CiRunnerDeleted => "ci_runner_deleted", + AuditAction::CiRegistrationTokenCreated => "ci_registration_token_created", + AuditAction::AdvisoryAlertDismissed => "advisory_alert_dismissed", + AuditAction::AdvisoryAlertReopened => "advisory_alert_reopened", + AuditAction::UiPrefsChanged => "ui_prefs_changed", + AuditAction::DiscussionsEnabled => "discussions_enabled", + AuditAction::DiscussionsDisabled => "discussions_disabled", + AuditAction::DiscussionCreated => "discussion_created", + AuditAction::DiscussionEdited => "discussion_edited", + AuditAction::DiscussionDeleted => "discussion_deleted", + AuditAction::DiscussionLocked => "discussion_locked", + AuditAction::DiscussionUnlocked => "discussion_unlocked", + AuditAction::DiscussionAnswered => "discussion_answered", + AuditAction::DiscussionCommentCreated => "discussion_comment_created", + AuditAction::DiscussionCommentEdited => "discussion_comment_edited", + AuditAction::DiscussionCommentDeleted => "discussion_comment_deleted", + AuditAction::MailSettingsUpdated => "mail_settings_updated", + AuditAction::MailTestQueued => "mail_test_queued", + AuditAction::SnippetCreated => "snippet_created", + AuditAction::SnippetUpdated => "snippet_updated", + AuditAction::SnippetDeleted => "snippet_deleted", + AuditAction::WikiPageSaved => "wiki_page_saved", + AuditAction::WikiEnabled => "wiki_enabled", + AuditAction::WikiDisabled => "wiki_disabled", + AuditAction::WikiPushed => "wiki_pushed", + AuditAction::OrgCreated => "org_created", + AuditAction::OrgDeleted => "org_deleted", + AuditAction::OrgSettingsUpdated => "org_settings_updated", + AuditAction::OrgMemberAdded => "org_member_added", + AuditAction::OrgMemberRemoved => "org_member_removed", + AuditAction::OrgMemberRoleChanged => "org_member_role_changed", + AuditAction::TeamCreated => "team_created", + AuditAction::TeamUpdated => "team_updated", + AuditAction::TeamDeleted => "team_deleted", + AuditAction::TeamMemberAdded => "team_member_added", + AuditAction::TeamMemberRemoved => "team_member_removed", + AuditAction::TeamRepoAdded => "team_repo_added", + AuditAction::TeamRepoRemoved => "team_repo_removed", + AuditAction::PasswordResetCompleted => "password_reset_completed", + AuditAction::EmailVerified => "email_verified", + AuditAction::InviteSent => "invite_sent", + AuditAction::InviteAccepted => "invite_accepted", + } + } + + /// The action with this stored name, if any. + pub fn parse(name: &str) -> Option { + AuditAction::ALL + .iter() + .copied() + .find(|action| action.as_str() == name) + } +} + +/// One row of the audit log. `at` is an RFC 3339 UTC stamp. `data` is a JSON object as text. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct AuditEntry { + pub id: String, + pub at: String, + pub actor_id: Option, + pub actor_name: String, + pub action: AuditAction, + pub target_kind: String, + pub target_id: String, + pub target_name: String, + pub ip: String, + pub data: String, +} + +impl AuditEntry { + /// A new entry stamped with the current time and a fresh id. Everything else is empty. + pub fn new(action: AuditAction) -> AuditEntry { + AuditEntry { + id: Ulid::generate().to_string(), + at: now_stamp(), + actor_id: None, + actor_name: String::new(), + action, + target_kind: String::new(), + target_id: String::new(), + target_name: String::new(), + ip: String::new(), + data: "{}".to_string(), + } + } +} + +/// Optional filters for [`crate::store::Store::list_audit`]. Unset fields do not restrict. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct AuditFilter { + pub actor_id: Option, + pub action: Option, + pub target_kind: Option, + pub target_id: Option, + /// Matches entries where this user is the actor, or the `user` target. + pub involving_user: Option, +} + +/// Position in the newest-first listing: the last entry of the previous page. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct AuditCursor { + pub at: String, + pub id: String, +} + +impl AuditCursor { + /// The cursor for the entry a page ended on. + pub fn after(entry: &AuditEntry) -> AuditCursor { + AuditCursor { + at: entry.at.clone(), + id: entry.id.clone(), + } + } + + /// Text form for a URL: `_`. Neither part contains `_`. + pub fn encode(&self) -> String { + format!("{}_{}", self.at, self.id) + } + + /// Parses [`AuditCursor::encode`] output. Anything malformed is `None`. + pub fn decode(text: &str) -> Option { + let (at, id) = text.split_once('_')?; + let stamp_ok = at.len() == 30 && at.ends_with('Z') && at.contains('T'); + let id_ok = !id.is_empty() && id.bytes().all(|b| b.is_ascii_alphanumeric()); + (stamp_ok && id_ok).then(|| AuditCursor { + at: at.to_string(), + id: id.to_string(), + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn names_are_unique_and_round_trip() { + let mut names: Vec<&str> = AuditAction::ALL.iter().map(|a| a.as_str()).collect(); + assert_eq!(names.len(), 92); + for action in AuditAction::ALL { + assert_eq!(AuditAction::parse(action.as_str()), Some(*action)); + } + names.sort(); + names.dedup(); + assert_eq!(names.len(), 92); + assert_eq!(AuditAction::parse("nope"), None); + } + + #[test] + fn cursor_round_trips_and_rejects_junk() { + let entry = AuditEntry::new(AuditAction::Logout); + let cursor = AuditCursor::after(&entry); + assert_eq!(AuditCursor::decode(&cursor.encode()), Some(cursor)); + assert_eq!(AuditCursor::decode(""), None); + assert_eq!(AuditCursor::decode("nounderscore"), None); + assert_eq!(AuditCursor::decode("2026-10-15T00:00:00Z_"), None); + assert_eq!(AuditCursor::decode("bogus_01ABC"), None); + } +} diff --git a/crates/forge-core/src/authz.rs b/crates/forge-core/src/authz.rs new file mode 100644 index 0000000..f64e62f --- /dev/null +++ b/crates/forge-core/src/authz.rs @@ -0,0 +1,569 @@ +//! Authorization rules. Pure, no IO. + +use crate::model::{Repo, Role, User, Visibility}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Action { + Read, + /// Edit anyone's issue or comment, close/reopen, labels, assignees, milestones. + /// Not blocked by `archived` (the pages handle archived repos). + Triage, + Write, + Admin, + /// Delete the repo. Owner and instance admin only; a collaborator role never grants it. + Delete, +} + +/// `NotFound` when the actor cannot even see the repo; `Forbidden` when they can see it but lack the right. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Denied { + NotFound, + Forbidden, +} + +/// The higher of two optional roles. `Read < Triage < Write < Maintain < Admin`. +pub fn max_role(a: Option, b: Option) -> Option { + fn rank(role: Role) -> u8 { + match role { + Role::Read => 1, + Role::Triage => 2, + Role::Write => 3, + Role::Maintain => 4, + Role::Admin => 5, + } + } + match (a, b) { + (Some(x), Some(y)) => Some(if rank(y) > rank(x) { y } else { x }), + (x, None) => x, + (None, y) => y, + } +} + +/// Owner or instance admin: all actions. Public repo: Read for anyone. +/// Private repo with no role: NotFound. Read/Triage: Read. Write/Maintain: Read+Write. Admin: all. +/// Triage is granted to Triage, Write, Maintain and Admin. +/// Archived repos deny Write with Forbidden. +/// +/// `org_role` is the role the actor gets through an organization that owns the repo (see +/// `Store::org_repo_role`). The effective role is `max_role(collaborator_role, org_role)`. A +/// collaborator Admin never deletes a repo; an org-derived Admin (org owner, or a team with +/// the admin role) does, because org-owned repos have no single owner person. +pub fn authorize( + actor: Option<&User>, + repo: &Repo, + collaborator_role: Option, + org_role: Option, + action: Action, +) -> Result<(), Denied> { + // A role only belongs to a signed-in actor. + let role = if actor.is_some() { + max_role(collaborator_role, org_role) + } else { + None + }; + + if action == Action::Write && repo.archived { + return Err(Denied::Forbidden); + } + + let privileged = actor.is_some_and(|u| u.is_admin || u.id == repo.owner_id); + if privileged { + return Ok(()); + } + + let can_see = repo.visibility == Visibility::Public || role.is_some(); + if !can_see { + return Err(Denied::NotFound); + } + + let granted = match action { + Action::Read => true, + Action::Triage => matches!( + role, + Some(Role::Triage | Role::Write | Role::Maintain | Role::Admin) + ), + Action::Write => matches!(role, Some(Role::Write | Role::Maintain | Role::Admin)), + Action::Admin => matches!(role, Some(Role::Admin)), + Action::Delete => actor.is_some() && org_role == Some(Role::Admin), + }; + if granted { + Ok(()) + } else { + Err(Denied::Forbidden) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::model::AccountKind; + + const ACTIONS: [Action; 5] = [ + Action::Read, + Action::Triage, + Action::Write, + Action::Admin, + Action::Delete, + ]; + const ROLES: [Option; 6] = [ + None, + Some(Role::Read), + Some(Role::Triage), + Some(Role::Write), + Some(Role::Maintain), + Some(Role::Admin), + ]; + + fn user(id: &str, is_admin: bool) -> User { + User { + id: id.into(), + username: id.into(), + email: None, + password_hash: String::new(), + is_admin, + created_at: String::new(), + about: String::new(), + timezone: "UTC".into(), + avatar_hash: None, + theme: "auto".into(), + language: "auto".into(), + kind: AccountKind::User, + email_notifications: true, + } + } + + fn repo(visibility: Visibility, archived: bool) -> Repo { + Repo { + id: "repo1".into(), + owner_id: "owner".into(), + owner_name: "owner".into(), + name: "r".into(), + description: String::new(), + visibility, + default_branch: "main".into(), + archived, + created_at: String::new(), + fork_of: None, + } + } + + /// Expected result from the contract, written independently of the implementation. + fn expected( + actor: Option<&User>, + r: &Repo, + role: Option, + action: Action, + ) -> Result<(), Denied> { + let role = if actor.is_some() { role } else { None }; + if action == Action::Write && r.archived { + return Err(Denied::Forbidden); + } + if actor.is_some_and(|u| u.is_admin || u.id == r.owner_id) { + return Ok(()); + } + if action == Action::Delete { + // Only owner or instance admin: hidden repos are 404, visible ones 403. + return if r.visibility == Visibility::Public || role.is_some() { + Err(Denied::Forbidden) + } else { + Err(Denied::NotFound) + }; + } + if r.visibility == Visibility::Public { + let ok = match action { + Action::Read => true, + Action::Triage => matches!( + role, + Some(Role::Triage | Role::Write | Role::Maintain | Role::Admin) + ), + Action::Write => matches!(role, Some(Role::Write | Role::Maintain | Role::Admin)), + Action::Admin => role == Some(Role::Admin), + Action::Delete => false, + }; + return if ok { Ok(()) } else { Err(Denied::Forbidden) }; + } + match role { + None => Err(Denied::NotFound), + Some(r) => { + let ok = match action { + Action::Read => true, + Action::Triage => { + matches!(r, Role::Triage | Role::Write | Role::Maintain | Role::Admin) + } + Action::Write => matches!(r, Role::Write | Role::Maintain | Role::Admin), + Action::Admin => r == Role::Admin, + Action::Delete => false, + }; + if ok { Ok(()) } else { Err(Denied::Forbidden) } + } + } + } + + #[test] + fn exhaustive_matrix_matches_contract() { + let stranger = user("stranger", false); + let owner = user("owner", false); + let admin = user("root", true); + let actors: [Option<&User>; 4] = [None, Some(&stranger), Some(&owner), Some(&admin)]; + for visibility in [Visibility::Public, Visibility::Private] { + for archived in [false, true] { + let r = repo(visibility, archived); + for actor in actors { + for role in ROLES { + for action in ACTIONS { + assert_eq!( + authorize(actor, &r, role, None, action), + expected(actor, &r, role, action), + "vis={visibility:?} archived={archived} actor={:?} role={role:?} action={action:?}", + actor.map(|u| u.id.as_str()), + ); + } + } + } + } + } + } + + #[test] + fn anonymous_on_public_repo_can_read_only() { + let r = repo(Visibility::Public, false); + assert_eq!(authorize(None, &r, None, None, Action::Read), Ok(())); + assert_eq!( + authorize(None, &r, None, None, Action::Write), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(None, &r, None, None, Action::Admin), + Err(Denied::Forbidden) + ); + } + + #[test] + fn anonymous_on_private_repo_gets_not_found() { + let r = repo(Visibility::Private, false); + for action in ACTIONS { + assert_eq!( + authorize(None, &r, None, None, action), + Err(Denied::NotFound) + ); + } + } + + #[test] + fn owner_and_instance_admin_can_do_everything() { + for visibility in [Visibility::Public, Visibility::Private] { + let r = repo(visibility, false); + let owner = user("owner", false); + let admin = user("root", true); + for action in ACTIONS { + assert_eq!(authorize(Some(&owner), &r, None, None, action), Ok(())); + assert_eq!(authorize(Some(&admin), &r, None, None, action), Ok(())); + } + } + } + + #[test] + fn each_role_on_private_repo() { + let r = repo(Visibility::Private, false); + let u = user("collab", false); + let cases = [ + ( + Role::Read, + [ + Ok(()), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + ], + ), + ( + Role::Triage, + [ + Ok(()), + Ok(()), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + ], + ), + ( + Role::Write, + [ + Ok(()), + Ok(()), + Ok(()), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + ], + ), + ( + Role::Maintain, + [ + Ok(()), + Ok(()), + Ok(()), + Err(Denied::Forbidden), + Err(Denied::Forbidden), + ], + ), + ( + Role::Admin, + [Ok(()), Ok(()), Ok(()), Ok(()), Err(Denied::Forbidden)], + ), + ]; + for (role, results) in cases { + for (action, want) in ACTIONS.into_iter().zip(results) { + assert_eq!( + authorize(Some(&u), &r, Some(role), None, action), + want, + "role {role:?} {action:?}" + ); + } + } + } + + #[test] + fn each_role_on_public_repo_keeps_read() { + let r = repo(Visibility::Public, false); + let u = user("collab", false); + assert_eq!(authorize(Some(&u), &r, None, None, Action::Read), Ok(())); + assert_eq!( + authorize(Some(&u), &r, None, None, Action::Write), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(Some(&u), &r, Some(Role::Read), None, Action::Read), + Ok(()) + ); + assert_eq!( + authorize(Some(&u), &r, Some(Role::Maintain), None, Action::Write), + Ok(()) + ); + assert_eq!( + authorize(Some(&u), &r, Some(Role::Maintain), None, Action::Admin), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(Some(&u), &r, Some(Role::Admin), None, Action::Admin), + Ok(()) + ); + } + + #[test] + fn stranger_on_private_repo_gets_not_found_not_forbidden() { + let r = repo(Visibility::Private, false); + let u = user("stranger", false); + for action in ACTIONS { + assert_eq!( + authorize(Some(&u), &r, None, None, action), + Err(Denied::NotFound) + ); + } + } + + #[test] + fn archived_denies_write_even_for_owner_and_admin_but_not_read_or_admin() { + let r = repo(Visibility::Public, true); + let owner = user("owner", false); + let root = user("root", true); + for actor in [&owner, &root] { + assert_eq!( + authorize(Some(actor), &r, None, None, Action::Write), + Err(Denied::Forbidden) + ); + assert_eq!(authorize(Some(actor), &r, None, None, Action::Read), Ok(())); + assert_eq!( + authorize(Some(actor), &r, None, None, Action::Admin), + Ok(()) + ); + } + let maintainer = user("m", false); + assert_eq!( + authorize( + Some(&maintainer), + &r, + Some(Role::Maintain), + None, + Action::Write + ), + Err(Denied::Forbidden) + ); + } + + #[test] + fn delete_is_owner_and_instance_admin_only() { + let stranger = user("stranger", false); + let owner = user("owner", false); + let root = user("root", true); + for visibility in [Visibility::Public, Visibility::Private] { + let r = repo(visibility, false); + assert_eq!( + authorize(Some(&owner), &r, None, None, Action::Delete), + Ok(()) + ); + assert_eq!( + authorize(Some(&root), &r, None, None, Action::Delete), + Ok(()) + ); + // A collaborator with the top role still cannot delete. + assert_eq!( + authorize(Some(&stranger), &r, Some(Role::Admin), None, Action::Delete), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(None, &r, Some(Role::Admin), None, Action::Delete), + if visibility == Visibility::Public { + Err(Denied::Forbidden) + } else { + Err(Denied::NotFound) + } + ); + } + // Visible to a stranger on a public repo: 403. Hidden: 404. + let public = repo(Visibility::Public, false); + assert_eq!( + authorize(Some(&stranger), &public, None, None, Action::Delete), + Err(Denied::Forbidden) + ); + let private = repo(Visibility::Private, false); + assert_eq!( + authorize(Some(&stranger), &private, None, None, Action::Delete), + Err(Denied::NotFound) + ); + // Archiving does not stop an owner from deleting. + let archived = repo(Visibility::Private, true); + assert_eq!( + authorize(Some(&owner), &archived, None, None, Action::Delete), + Ok(()) + ); + } + + #[test] + fn triage_is_granted_to_owner_admin_and_triage_plus_write_roles() { + let stranger = user("stranger", false); + let owner = user("owner", false); + let root = user("root", true); + let private = repo(Visibility::Private, false); + assert_eq!( + authorize(Some(&owner), &private, None, None, Action::Triage), + Ok(()) + ); + assert_eq!( + authorize(Some(&root), &private, None, None, Action::Triage), + Ok(()) + ); + assert_eq!( + authorize(Some(&stranger), &private, None, None, Action::Triage), + Err(Denied::NotFound) + ); + let public = repo(Visibility::Public, false); + assert_eq!( + authorize( + Some(&stranger), + &public, + Some(Role::Read), + None, + Action::Triage + ), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(None, &public, None, None, Action::Triage), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(None, &private, None, None, Action::Triage), + Err(Denied::NotFound) + ); + } + + #[test] + fn triage_is_not_blocked_by_archived() { + let archived = repo(Visibility::Public, true); + let owner = user("owner", false); + let triager = user("t", false); + assert_eq!( + authorize(Some(&owner), &archived, None, None, Action::Triage), + Ok(()) + ); + assert_eq!( + authorize( + Some(&triager), + &archived, + Some(Role::Triage), + None, + Action::Triage + ), + Ok(()) + ); + } + + #[test] + fn role_is_ignored_without_an_actor() { + let r = repo(Visibility::Private, false); + assert_eq!( + authorize(None, &r, Some(Role::Admin), None, Action::Read), + Err(Denied::NotFound) + ); + } + + #[test] + fn max_role_takes_the_higher_of_two() { + assert_eq!(max_role(None, None), None); + assert_eq!(max_role(Some(Role::Read), None), Some(Role::Read)); + assert_eq!(max_role(None, Some(Role::Write)), Some(Role::Write)); + assert_eq!( + max_role(Some(Role::Maintain), Some(Role::Triage)), + Some(Role::Maintain) + ); + assert_eq!( + max_role(Some(Role::Read), Some(Role::Admin)), + Some(Role::Admin) + ); + } + + #[test] + fn org_role_grants_what_the_collaborator_role_would() { + let r = repo(Visibility::Private, false); + let member = user("member", false); + // Read-only collaborator, but the org gives Write. + assert_eq!( + authorize( + Some(&member), + &r, + Some(Role::Read), + Some(Role::Write), + Action::Write + ), + Ok(()) + ); + // An org role alone makes a private repo visible. + assert_eq!( + authorize(Some(&member), &r, None, Some(Role::Read), Action::Read), + Ok(()) + ); + assert_eq!( + authorize(Some(&member), &r, None, None, Action::Read), + Err(Denied::NotFound) + ); + } + + #[test] + fn org_admin_may_delete_but_collaborator_admin_may_not() { + let r = repo(Visibility::Private, false); + let member = user("member", false); + assert_eq!( + authorize(Some(&member), &r, None, Some(Role::Admin), Action::Delete), + Ok(()) + ); + assert_eq!( + authorize(Some(&member), &r, Some(Role::Admin), None, Action::Delete), + Err(Denied::Forbidden) + ); + assert_eq!( + authorize(None, &r, None, Some(Role::Admin), Action::Delete), + Err(Denied::NotFound) + ); + } +} diff --git a/crates/forge-core/src/avatar.rs b/crates/forge-core/src/avatar.rs new file mode 100644 index 0000000..b819275 --- /dev/null +++ b/crates/forge-core/src/avatar.rs @@ -0,0 +1,182 @@ +//! Avatar upload processing: validate, decode with limits, crop, resize and re-encode as PNG. +//! +//! Re-encoding to PNG drops all metadata (EXIF, GPS, comments) from the input. + +use std::io::Cursor; + +use image::{ImageFormat, ImageReader, Limits, imageops::FilterType}; +use sha2::{Digest, Sha256}; + +use crate::error::{Error, Result}; + +/// Largest accepted upload, in bytes. +pub const MAX_UPLOAD_BYTES: usize = 5 * 1024 * 1024; + +/// Largest accepted width or height of the decoded source image, in pixels. +const MAX_SOURCE_DIMENSION: u32 = 4096; + +/// Upper bound on decoder allocations (128 MiB). +const MAX_ALLOC_BYTES: u64 = 128 * 1024 * 1024; + +/// Edge length of the stored avatar, in pixels. +const AVATAR_SIZE: u32 = 256; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ProcessedAvatar { + pub png: Vec, + pub hash: String, +} + +/// Decode with limits (max 4096x4096, image::Limits), center-crop to a square, resize to 256x256 +/// (Lanczos3), re-encode as PNG. Metadata (EXIF/GPS) is dropped by re-encoding. SVG, unknown +/// formats, too-large input or a decode failure give Error::Invalid. +pub fn process_avatar(bytes: &[u8]) -> Result { + if bytes.len() > MAX_UPLOAD_BYTES { + return Err(Error::Invalid(format!( + "avatar is larger than {MAX_UPLOAD_BYTES} bytes" + ))); + } + + // Format is decided from magic bytes only; the client-supplied type is never consulted. + let mut reader = ImageReader::new(Cursor::new(bytes)) + .with_guessed_format() + .map_err(|_| Error::Invalid("unreadable image header".into()))?; + match reader.format() { + Some(ImageFormat::Png | ImageFormat::Jpeg | ImageFormat::WebP | ImageFormat::Gif) => {} + _ => { + return Err(Error::Invalid( + "avatar must be a PNG, JPEG, WebP or GIF image".into(), + )); + } + } + + let mut limits = Limits::default(); + limits.max_image_width = Some(MAX_SOURCE_DIMENSION); + limits.max_image_height = Some(MAX_SOURCE_DIMENSION); + limits.max_alloc = Some(MAX_ALLOC_BYTES); + reader.limits(limits); + + let decoded = reader + .decode() + .map_err(|e| Error::Invalid(format!("could not decode avatar: {e}")))?; + + // Center-crop to the largest square, then scale down to the avatar size. + let (width, height) = (decoded.width(), decoded.height()); + let side = width.min(height); + let x = (width - side) / 2; + let y = (height - side) / 2; + let square = decoded.crop_imm(x, y, side, side); + let resized = square.resize_exact(AVATAR_SIZE, AVATAR_SIZE, FilterType::Lanczos3); + + let mut png = Cursor::new(Vec::new()); + resized + .write_to(&mut png, ImageFormat::Png) + .map_err(|e| Error::Invalid(format!("could not encode avatar: {e}")))?; + let png = png.into_inner(); + + let digest = Sha256::digest(&png); + let hash = hex::encode(&digest[..8]); + + Ok(ProcessedAvatar { png, hash }) +} + +#[cfg(test)] +mod tests { + use super::*; + use image::{DynamicImage, RgbImage}; + + const PNG_MAGIC: [u8; 8] = [0x89, b'P', b'N', b'G', 0x0D, 0x0A, 0x1A, 0x0A]; + + fn encode(img: &DynamicImage, format: ImageFormat) -> Vec { + let mut out = Cursor::new(Vec::new()); + img.write_to(&mut out, format).expect("encode test image"); + out.into_inner() + } + + fn sample(width: u32, height: u32) -> DynamicImage { + DynamicImage::ImageRgb8(RgbImage::from_fn(width, height, |x, y| { + image::Rgb([(x % 256) as u8, (y % 256) as u8, 128]) + })) + } + + fn crc32(data: &[u8]) -> u32 { + let mut crc = 0xFFFF_FFFFu32; + for &byte in data { + crc ^= u32::from(byte); + for _ in 0..8 { + let mask = (crc & 1).wrapping_neg(); + crc = (crc >> 1) ^ (0xEDB8_8320 & mask); + } + } + !crc + } + + #[test] + fn png_is_cropped_and_resized_to_256() { + let input = encode(&sample(300, 200), ImageFormat::Png); + let out = process_avatar(&input).expect("png accepted"); + assert_eq!(&out.png[..8], &PNG_MAGIC); + let decoded = image::load_from_memory_with_format(&out.png, ImageFormat::Png).unwrap(); + assert_eq!((decoded.width(), decoded.height()), (256, 256)); + } + + #[test] + fn jpeg_is_accepted() { + let input = encode(&sample(300, 200), ImageFormat::Jpeg); + let out = process_avatar(&input).expect("jpeg accepted"); + assert_eq!(&out.png[..8], &PNG_MAGIC); + } + + #[test] + fn svg_is_rejected() { + let svg = br#""#; + assert!(matches!(process_avatar(svg), Err(Error::Invalid(_)))); + } + + #[test] + fn random_bytes_are_rejected() { + let junk: Vec = (0..4096u32) + .map(|i| (i.wrapping_mul(2654435761) >> 13) as u8) + .collect(); + assert!(matches!(process_avatar(&junk), Err(Error::Invalid(_)))); + assert!(matches!(process_avatar(&[]), Err(Error::Invalid(_)))); + } + + #[test] + fn oversized_input_is_rejected() { + let input = vec![0u8; MAX_UPLOAD_BYTES + 1]; + assert!(matches!(process_avatar(&input), Err(Error::Invalid(_)))); + } + + #[test] + fn huge_declared_dimensions_are_rejected() { + // Take a valid tiny PNG and rewrite its IHDR to claim 50000x50000, fixing the CRC so + // only the dimension limit can reject it. + let mut png = encode(&sample(2, 2), ImageFormat::Png); + // Layout: 8-byte signature, 4-byte length, 4-byte "IHDR", then width and height. + assert_eq!(&png[12..16], b"IHDR"); + png[16..20].copy_from_slice(&50_000u32.to_be_bytes()); + png[20..24].copy_from_slice(&50_000u32.to_be_bytes()); + let crc = crc32(&png[12..29]); + png[29..33].copy_from_slice(&crc.to_be_bytes()); + assert!(matches!(process_avatar(&png), Err(Error::Invalid(_)))); + } + + #[test] + fn output_starts_with_png_magic() { + let input = encode(&sample(64, 64), ImageFormat::Png); + let out = process_avatar(&input).unwrap(); + assert_eq!(&out.png[..8], &PNG_MAGIC); + } + + #[test] + fn hash_is_stable_and_well_formed() { + let input = encode(&sample(120, 90), ImageFormat::Png); + let a = process_avatar(&input).unwrap(); + let b = process_avatar(&input).unwrap(); + assert_eq!(a.hash, b.hash); + assert_eq!(a.hash.len(), 16); + assert!(a.hash.bytes().all(|c| c.is_ascii_hexdigit())); + assert_eq!(a.png, b.png); + } +} diff --git a/crates/forge-core/src/ci.rs b/crates/forge-core/src/ci.rs new file mode 100644 index 0000000..fb19407 --- /dev/null +++ b/crates/forge-core/src/ci.rs @@ -0,0 +1,185 @@ +//! CI models: run and job states, runners, runs, jobs and artifacts. The stored shape is in +//! migrations/0024_ci.sql; the store functions live in store/ci.rs. +//! +//! Job specs are kept as JSON text (`CiJob::spec_json`). The store reads only the `needs` and +//! `runs_on` arrays out of it, so this crate does not depend on forge-ci. + +use std::str::FromStr; + +use crate::error::{Error, Result}; + +/// State of a run. Stored as the `as_str` name. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum RunState { + WaitingApproval, + Queued, + Running, + Success, + Failure, + Cancelled, + Error, +} + +impl RunState { + pub fn as_str(self) -> &'static str { + match self { + RunState::WaitingApproval => "waiting_approval", + RunState::Queued => "queued", + RunState::Running => "running", + RunState::Success => "success", + RunState::Failure => "failure", + RunState::Cancelled => "cancelled", + RunState::Error => "error", + } + } + + /// True for states a run cannot leave. + pub fn is_terminal(self) -> bool { + matches!( + self, + RunState::Success | RunState::Failure | RunState::Cancelled | RunState::Error + ) + } +} + +impl FromStr for RunState { + type Err = Error; + + fn from_str(s: &str) -> Result { + Ok(match s { + "waiting_approval" => RunState::WaitingApproval, + "queued" => RunState::Queued, + "running" => RunState::Running, + "success" => RunState::Success, + "failure" => RunState::Failure, + "cancelled" => RunState::Cancelled, + "error" => RunState::Error, + other => return Err(Error::Database(format!("unknown CI run state {other:?}"))), + }) + } +} + +/// State of a job. Stored as the `as_str` name. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum JobState { + Blocked, + Queued, + Running, + Success, + Failure, + Cancelled, + Error, + Skipped, +} + +impl JobState { + pub fn as_str(self) -> &'static str { + match self { + JobState::Blocked => "blocked", + JobState::Queued => "queued", + JobState::Running => "running", + JobState::Success => "success", + JobState::Failure => "failure", + JobState::Cancelled => "cancelled", + JobState::Error => "error", + JobState::Skipped => "skipped", + } + } + + /// True for states a job cannot leave. + pub fn is_terminal(self) -> bool { + matches!( + self, + JobState::Success + | JobState::Failure + | JobState::Cancelled + | JobState::Error + | JobState::Skipped + ) + } +} + +impl FromStr for JobState { + type Err = Error; + + fn from_str(s: &str) -> Result { + Ok(match s { + "blocked" => JobState::Blocked, + "queued" => JobState::Queued, + "running" => JobState::Running, + "success" => JobState::Success, + "failure" => JobState::Failure, + "cancelled" => JobState::Cancelled, + "error" => JobState::Error, + "skipped" => JobState::Skipped, + other => return Err(Error::Database(format!("unknown CI job state {other:?}"))), + }) + } +} + +/// A registered runner. The secret and its hash are never part of this type. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CiRunner { + pub id: String, + pub name: String, + pub labels: Vec, + pub created_at: String, + pub last_seen_at: Option, + pub disabled: bool, +} + +/// One run of the workflow for a commit. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CiRun { + pub id: String, + pub repo_id: String, + pub number: i64, + /// `push`, `tag`, `pull_request` or `manual`. + pub trigger: String, + pub git_ref: String, + pub commit_oid: String, + pub pull_number: Option, + pub actor_id: String, + pub state: RunState, + pub config_error: Option, + pub created_at: String, + pub finished_at: Option, +} + +/// One job of a run. `spec_json` is the JobSpec as JSON text. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CiJob { + pub id: String, + pub run_id: String, + pub name: String, + pub spec_json: String, + pub state: JobState, + pub runner_id: Option, + pub exit_code: Option, + pub message: Option, + pub queued_at: Option, + pub started_at: Option, + pub finished_at: Option, + pub heartbeat_at: Option, + pub cancel_requested: bool, + pub log_bytes: i64, +} + +/// An artifact uploaded by a job. The file itself is stored outside the database. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CiArtifact { + pub id: String, + pub job_id: String, + pub name: String, + pub size: i64, + pub sha256: String, + pub created_at: String, +} + +/// A job to create with a run. `needs` must match the `needs` in `spec_json`. +#[derive(Debug, Clone, Copy)] +pub struct NewJob<'a> { + pub name: &'a str, + pub spec_json: &'a str, + pub needs: &'a [String], +} diff --git a/crates/forge-core/src/config.rs b/crates/forge-core/src/config.rs new file mode 100644 index 0000000..7daf0ee --- /dev/null +++ b/crates/forge-core/src/config.rs @@ -0,0 +1,570 @@ +//! Instance configuration, read from TOML. + +use std::net::{IpAddr, SocketAddr}; +use std::path::{Path, PathBuf}; + +use ipnet::IpNet; +use serde::{Deserialize, Deserializer}; + +use crate::error::{Error, Result}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum Registration { + Closed, + Invite, + Open, +} + +/// Parses each entry as a CIDR network or as a single address (a /32 or /128). +fn deserialize_trusted_proxies<'de, D: Deserializer<'de>>( + deserializer: D, +) -> std::result::Result, D::Error> { + let entries = Vec::::deserialize(deserializer)?; + entries + .iter() + .map(|entry| { + if let Ok(net) = entry.parse::() { + return Ok(net); + } + entry + .parse::() + .map(IpNet::from) + .map_err(|_| serde::de::Error::custom(format!("invalid trusted proxy `{entry}`"))) + }) + .collect() +} + +fn default_user_content_listen() -> SocketAddr { + "127.0.0.1:7661" + .parse() + .expect("valid default socket address") +} + +/// Outbound webhook delivery policy. Internal destinations are refused unless listed in `allowed_hosts`. +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct WebhookConfig { + /// Permit `http://` hook URLs in addition to `https://`. + #[serde(default)] + pub allow_http: bool, + /// Exact hostnames or CIDR networks that may be reached even when they resolve to internal addresses. + #[serde(default)] + pub allowed_hosts: Vec, +} + +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct Config { + pub database: PathBuf, + pub data_dir: PathBuf, + pub listen: SocketAddr, + pub base_url: String, + pub user_content_base_url: String, + /// Listener that serves raw user files on the separate user-content origin. + #[serde(default = "default_user_content_listen")] + pub user_content_listen: SocketAddr, + pub ssh_listen: SocketAddr, + pub ssh_public_host: String, + pub ssh_public_port: u16, + pub registration: Registration, + /// Peers whose `X-Forwarded-For` header is trusted, such as the reverse proxy in front of forge. + /// Entries are addresses or CIDR networks. Empty by default, so the TCP peer is the client. + #[serde(default, deserialize_with = "deserialize_trusted_proxies")] + pub trusted_proxies: Vec, + /// Outbound webhook policy, from the `[webhooks]` section. + #[serde(default)] + pub webhooks: WebhookConfig, + /// Scheduled backups and fsck, from the `[backup]` section. An empty `dir` disables both. + #[serde(default)] + pub backup: BackupConfig, + /// Release asset limits, from the `[releases]` section. + #[serde(default)] + pub releases: ReleasesConfig, + /// Standby replication, from the `[replication]` section. An empty `target` disables it. + #[serde(default)] + pub replication: ReplicationConfig, + /// Git LFS limits, from the `[lfs]` section. + #[serde(default)] + pub lfs: LfsConfig, + /// CI limits and retention, from the `[ci]` section. + #[serde(default)] + pub ci: CiConfig, + /// Security advisories (opt-in), from the `[advisories]` section. + #[serde(default)] + pub advisories: AdvisoriesConfig, + /// Outgoing mail transport, from the `[mail]` section. The SMTP account is set in the database. + #[serde(default)] + pub mail: MailConfig, + /// Organization rules, from the `[orgs]` section. + #[serde(default)] + pub orgs: OrgsConfig, +} + +/// Organization rules, from the `[orgs]` section. +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct OrgsConfig { + /// Who may create an organization: `all` (any signed-in person, the default) or `admin` + /// (instance admins only). + pub creation: OrgCreation, +} + +/// Who may create organizations. See `OrgsConfig::creation`. +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum OrgCreation { + #[default] + All, + Admin, +} + +/// Outgoing mail transport, from the `[mail]` section. The SMTP server, sender and password are +/// set on `/admin/mail` and stored in the database; this section only picks the transport. +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct MailConfig { + pub transport: MailTransport, +} + +/// `smtp` sends through the configured server. `log` writes each message to `/mail-log/` +/// instead, for development and tests. +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum MailTransport { + #[default] + Smtp, + Log, +} + +/// CI settings, from the `[ci]` section. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct CiConfig { + /// Whether CI runs at all. When false, pushes and pull requests create no runs. + pub enabled: bool, + /// Largest job log, in MiB. Past it the log is truncated. + pub max_log_mb: u64, + /// Largest artifact, in MiB. + pub max_artifact_mb: u64, + /// Artifacts a single job may upload. + pub max_artifacts_per_job: u32, + /// Days a job log is kept. + pub log_retention_days: u64, + /// Days an artifact is kept. + pub artifact_retention_days: u64, + /// Hours a runner registration token stays valid. + pub registration_token_hours: u32, +} + +impl Default for CiConfig { + fn default() -> Self { + CiConfig { + enabled: true, + max_log_mb: 16, + max_artifact_mb: 512, + max_artifacts_per_job: 50, + log_retention_days: 90, + artifact_retention_days: 30, + registration_token_hours: 24, + } + } +} + +/// Security advisories, from the `[advisories]` section. Off by default: when on, the forge +/// downloads the OSV dumps for `ecosystems` and scans each repo's lockfiles. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct AdvisoriesConfig { + /// Whether the advisory download and the lockfile scans run at all. + pub enabled: bool, + /// OSV ecosystems to download and scan: any of `crates.io`, `npm`, `Go`. + pub ecosystems: Vec, + /// Hours before a downloaded dump is fetched again. + pub refresh_hours: u64, +} + +impl Default for AdvisoriesConfig { + fn default() -> Self { + AdvisoriesConfig { + enabled: false, + ecosystems: vec!["crates.io".into(), "npm".into(), "Go".into()], + refresh_hours: 24, + } + } +} + +/// Git LFS limits, from the `[lfs]` section. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct LfsConfig { + /// Largest accepted LFS object, in MiB. + pub max_object_mb: u64, +} + +impl Default for LfsConfig { + fn default() -> Self { + LfsConfig { + max_object_mb: 2048, + } + } +} + +impl LfsConfig { + /// The object size limit in bytes. + pub fn max_object_bytes(&self) -> u64 { + self.max_object_mb.saturating_mul(1024 * 1024) + } +} + +/// Standby replication, from the `[replication]` section. See `docs/backup.md`. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct ReplicationConfig { + /// `[user@]host:/absolute/base` of the standby account. Empty disables replication. + pub target: String, + /// SSH port of the standby host. + pub ssh_port: u16, + /// Private key of the standby account (mode 0600). Required when `target` is set. + pub identity_file: PathBuf, + /// Pinned host keys of the standby. Required when `target` is set; StrictHostKeyChecking is always `yes`. + pub known_hosts_file: PathBuf, + /// Minutes between database snapshots shipped to the standby. + pub db_snapshot_minutes: u64, + /// Minutes between reconcile passes (refs checksums, deleted repos, healthcheck). + pub reconcile_minutes: u64, + /// Optional URL pinged after each reconcile pass. Empty disables it. + pub healthcheck_url: String, +} + +impl Default for ReplicationConfig { + fn default() -> Self { + ReplicationConfig { + target: String::new(), + ssh_port: 22, + identity_file: PathBuf::new(), + known_hosts_file: PathBuf::new(), + db_snapshot_minutes: 15, + reconcile_minutes: 60, + healthcheck_url: String::new(), + } + } +} + +impl ReplicationConfig { + /// Whether the replication worker runs at all. + pub fn enabled(&self) -> bool { + !self.target.is_empty() + } + + fn validate(&self) -> Result<()> { + if !self.enabled() { + return Ok(()); + } + if self.identity_file.as_os_str().is_empty() { + return Err(Error::Config( + "[replication] identity_file is required when target is set".into(), + )); + } + if self.known_hosts_file.as_os_str().is_empty() { + return Err(Error::Config( + "[replication] known_hosts_file is required when target is set".into(), + )); + } + if self.db_snapshot_minutes == 0 { + return Err(Error::Config( + "[replication] db_snapshot_minutes must be at least 1".into(), + )); + } + if self.reconcile_minutes == 0 { + return Err(Error::Config( + "[replication] reconcile_minutes must be at least 1".into(), + )); + } + Ok(()) + } +} + +/// Release settings, from the `[releases]` section. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct ReleasesConfig { + /// Largest accepted release asset, in mebibytes. + pub max_asset_mb: u64, +} + +impl Default for ReleasesConfig { + fn default() -> Self { + ReleasesConfig { max_asset_mb: 512 } + } +} + +/// Scheduled backups, from the `[backup]` section. See `docs/backup-interfaces.md`. +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields, default)] +pub struct BackupConfig { + /// Directory that receives the backup sets. Empty disables the scheduler. + pub dir: PathBuf, + /// Hours between full backup sets. + pub interval_hours: u64, + /// Newest complete sets kept in `dir`. Older complete sets are deleted after a good run. + pub keep: usize, + /// Optional healthchecks.io style URL. Pinged with `/start`, then the URL itself or `/fail`. + pub healthcheck_url: String, + /// Days between `git fsck` and integrity checks of every repo and the database. + pub fsck_interval_days: u64, +} + +impl Default for BackupConfig { + fn default() -> Self { + BackupConfig { + dir: PathBuf::new(), + interval_hours: 24, + keep: 7, + healthcheck_url: String::new(), + fsck_interval_days: 7, + } + } +} + +impl BackupConfig { + /// Whether the scheduler runs at all. + pub fn enabled(&self) -> bool { + !self.dir.as_os_str().is_empty() + } + + fn validate(&self) -> Result<()> { + if self.interval_hours == 0 { + return Err(Error::Config( + "[backup] interval_hours must be at least 1".into(), + )); + } + if self.keep == 0 { + return Err(Error::Config("[backup] keep must be at least 1".into())); + } + if self.fsck_interval_days == 0 { + return Err(Error::Config( + "[backup] fsck_interval_days must be at least 1".into(), + )); + } + Ok(()) + } +} + +/// Development defaults, written when the config file is missing. Keep in sync with `config/forge.example.toml`. +const DEV_DEFAULTS: &str = r#"# forge configuration (development defaults). Production values belong in /etc/forge/forge.toml. + +# SQLite/Turso database file. +database = "./data/forge.db" +# Root for repos, instance key, gitconfig, hooks and sockets. +data_dir = "./data" +# HTTP listen address for the web UI and smart-HTTP. +listen = "127.0.0.1:7660" +# Public base URL used in links and clone URLs. +base_url = "http://127.0.0.1:7660" +# Separate origin for raw user content (Milestone 2). +user_content_base_url = "http://127.0.0.1:7661" +# Listener for raw user content, served on a separate origin. +user_content_listen = "127.0.0.1:7661" +# SSH listen address for git over SSH. +ssh_listen = "0.0.0.0:2222" +# Host and port shown in SSH clone URLs. +ssh_public_host = "127.0.0.1" +ssh_public_port = 2222 +# Self-registration: "closed" | "invite" | "open". +registration = "closed" +# Proxies whose X-Forwarded-For is trusted for client IPs (login and git throttling). Addresses or CIDRs. +trusted_proxies = [] +"#; + +impl Config { + /// Loads the config from `path`. Writes development defaults if the file is missing. + pub fn load(path: &Path) -> Result { + let text = match std::fs::read_to_string(path) { + Ok(text) => text, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + if let Some(parent) = path.parent().filter(|p| !p.as_os_str().is_empty()) { + std::fs::create_dir_all(parent)?; + } + std::fs::write(path, DEV_DEFAULTS)?; + DEV_DEFAULTS.to_owned() + } + Err(e) => return Err(e.into()), + }; + let config: Config = + toml::from_str(&text).map_err(|e| Error::Config(format!("{}: {e}", path.display())))?; + config.backup.validate()?; + config.replication.validate()?; + Ok(config) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn missing_file_writes_dev_defaults() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("nested").join("forge.toml"); + let cfg = Config::load(&path).unwrap(); + assert!(path.exists()); + assert_eq!(cfg.database, PathBuf::from("./data/forge.db")); + assert_eq!(cfg.listen, "127.0.0.1:7660".parse().unwrap()); + assert_eq!(cfg.user_content_listen, "127.0.0.1:7661".parse().unwrap()); + assert_eq!(cfg.ssh_listen, "0.0.0.0:2222".parse().unwrap()); + assert_eq!(cfg.ssh_public_port, 2222); + assert_eq!(cfg.registration, Registration::Closed); + // Reloading the written file gives the same config. + let again = Config::load(&path).unwrap(); + assert_eq!(again.base_url, cfg.base_url); + } + + #[test] + fn missing_user_content_listen_uses_default() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text: String = DEV_DEFAULTS + .lines() + .filter(|line| !line.starts_with("user_content_listen")) + .collect::>() + .join("\n"); + std::fs::write(&path, text).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert_eq!(cfg.user_content_listen, "127.0.0.1:7661".parse().unwrap()); + } + + #[test] + fn user_content_listen_is_parsed() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text = DEV_DEFAULTS.replace("127.0.0.1:7661\"\n# SSH", "0.0.0.0:9000\"\n# SSH"); + std::fs::write(&path, text).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert_eq!(cfg.user_content_listen, "0.0.0.0:9000".parse().unwrap()); + } + + #[test] + fn unknown_keys_are_rejected() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text = DEV_DEFAULTS.replace("registration", "bogus = 1\nregistration"); + std::fs::write(&path, text).unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + } + + #[test] + fn registration_is_lowercase() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + std::fs::write(&path, DEV_DEFAULTS.replace("\"closed\"", "\"invite\"")).unwrap(); + assert_eq!( + Config::load(&path).unwrap().registration, + Registration::Invite + ); + std::fs::write(&path, DEV_DEFAULTS.replace("\"closed\"", "\"Invite\"")).unwrap(); + assert!(Config::load(&path).is_err()); + } + + #[test] + fn trusted_proxies_accept_addresses_and_networks() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text = DEV_DEFAULTS.replace( + "trusted_proxies = []", + "trusted_proxies = [\"127.0.0.1\", \"10.0.0.0/8\", \"2001:db8::/32\"]", + ); + std::fs::write(&path, text).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert_eq!(cfg.trusted_proxies.len(), 3); + assert_eq!( + cfg.trusted_proxies[0], + "127.0.0.1/32".parse::().unwrap() + ); + assert_eq!( + cfg.trusted_proxies[1], + "10.0.0.0/8".parse::().unwrap() + ); + } + + #[test] + fn invalid_trusted_proxy_is_rejected() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text = + DEV_DEFAULTS.replace("trusted_proxies = []", "trusted_proxies = [\"not-an-ip\"]"); + std::fs::write(&path, text).unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + } + + #[test] + fn backup_section_defaults_to_disabled() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + std::fs::write(&path, DEV_DEFAULTS).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert!(!cfg.backup.enabled()); + assert_eq!(cfg.backup.interval_hours, 24); + assert_eq!(cfg.backup.keep, 7); + assert_eq!(cfg.backup.fsck_interval_days, 7); + assert!(cfg.backup.healthcheck_url.is_empty()); + } + + #[test] + fn replication_section_defaults_to_disabled() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + std::fs::write(&path, DEV_DEFAULTS).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert!(!cfg.replication.enabled()); + assert_eq!(cfg.replication.ssh_port, 22); + assert_eq!(cfg.replication.db_snapshot_minutes, 15); + assert_eq!(cfg.replication.reconcile_minutes, 60); + assert!(cfg.replication.healthcheck_url.is_empty()); + } + + #[test] + fn replication_target_requires_keys_and_positive_intervals() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let base = format!("{DEV_DEFAULTS}\n[replication]\ntarget = \"sb@host:/srv/standby\"\n"); + std::fs::write(&path, &base).unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + std::fs::write( + &path, + format!("{base}identity_file = \"/k\"\nknown_hosts_file = \"/kh\"\n"), + ) + .unwrap(); + let cfg = Config::load(&path).unwrap(); + assert!(cfg.replication.enabled()); + assert_eq!(cfg.replication.identity_file, PathBuf::from("/k")); + std::fs::write( + &path, + format!( + "{base}identity_file = \"/k\"\nknown_hosts_file = \"/kh\"\nreconcile_minutes = 0\n" + ), + ) + .unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + } + + #[test] + fn backup_section_is_parsed_and_validated() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("forge.toml"); + let text = format!( + "{DEV_DEFAULTS}\n[backup]\ndir = \"/srv/backups\"\nkeep = 3\ninterval_hours = 6\n" + ); + std::fs::write(&path, &text).unwrap(); + let cfg = Config::load(&path).unwrap(); + assert!(cfg.backup.enabled()); + assert_eq!(cfg.backup.dir, PathBuf::from("/srv/backups")); + assert_eq!(cfg.backup.keep, 3); + assert_eq!(cfg.backup.interval_hours, 6); + + std::fs::write(&path, format!("{DEV_DEFAULTS}\n[backup]\nkeep = 0\n")).unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + std::fs::write(&path, format!("{DEV_DEFAULTS}\n[backup]\nbogus = 1\n")).unwrap(); + assert!(matches!(Config::load(&path), Err(Error::Config(_)))); + } +} diff --git a/crates/forge-core/src/discussions.rs b/crates/forge-core/src/discussions.rs new file mode 100644 index 0000000..a234e85 --- /dev/null +++ b/crates/forge-core/src/discussions.rs @@ -0,0 +1,158 @@ +//! Discussion types: a per-repo forum next to issues. Storage lives in `store/discussions.rs`. +//! Titles and bodies are checked with the issue validators, since the limits are the same. + +use crate::error::{Error, Result}; + +/// Categories a discussion can be filed under. The `as_str` names are stored. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum DiscussionCategory { + General, + Ideas, + Qa, + /// Only Maintain or higher may post here. + Announcements, +} + +/// Every category, in the order the chooser shows them. +pub const DISCUSSION_CATEGORIES: &[DiscussionCategory] = &[ + DiscussionCategory::General, + DiscussionCategory::Ideas, + DiscussionCategory::Qa, + DiscussionCategory::Announcements, +]; + +impl DiscussionCategory { + /// The stored and URL name. + pub fn as_str(self) -> &'static str { + match self { + DiscussionCategory::General => "general", + DiscussionCategory::Ideas => "ideas", + DiscussionCategory::Qa => "qa", + DiscussionCategory::Announcements => "announcements", + } + } + + /// The label people read. + pub fn label(self) -> &'static str { + match self { + DiscussionCategory::General => "General", + DiscussionCategory::Ideas => "Ideas", + DiscussionCategory::Qa => "Q&A", + DiscussionCategory::Announcements => "Announcements", + } + } + + /// The category with this stored name, if any. + pub fn parse(name: &str) -> Option { + DISCUSSION_CATEGORIES + .iter() + .copied() + .find(|c| c.as_str() == name) + } +} + +/// One discussion. `answer_comment_id` is set only in Q&A, and names the accepted reply. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Discussion { + pub id: String, + pub repo_id: String, + pub number: i64, + pub category: DiscussionCategory, + pub title: String, + pub body: String, + pub author_id: String, + pub answer_comment_id: Option, + pub locked: bool, + pub comment_count: i64, + pub created_at: String, + pub updated_at: String, +} + +/// A discussion with its author's username, for the list. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DiscussionListItem { + pub discussion: Discussion, + pub author: String, +} + +/// Why a discussion is in a user's inbox. The `as_str` names are stored in `discussion_notifications`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum DiscussionReason { + /// The user was @mentioned in the discussion or one of its comments. + Mention, + /// Someone commented on the user's discussion. + Reply, +} + +impl DiscussionReason { + /// The stored name. + pub fn as_str(self) -> &'static str { + match self { + DiscussionReason::Mention => "mention", + DiscussionReason::Reply => "reply", + } + } + + /// The reason with this stored name, if any. + pub fn parse(name: &str) -> Option { + match name { + "mention" => Some(DiscussionReason::Mention), + "reply" => Some(DiscussionReason::Reply), + _ => None, + } + } +} + +/// One inbox row for a discussion, joined with its repo and title for the notifications page. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DiscussionNotification { + pub discussion_id: String, + pub repo_id: String, + pub repo_owner: String, + pub repo_name: String, + pub number: i64, + pub title: String, + pub reason: DiscussionReason, + /// Username of the last person who acted, if the account still exists. + pub last_actor_name: Option, + pub unread: bool, + pub updated_at: String, +} + +/// One comment. A top-level comment has no `parent_id`; a reply names a top-level comment of the +/// same discussion. A deleted comment has `deleted` set and an empty body. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DiscussionComment { + pub id: String, + pub discussion_id: String, + pub parent_id: Option, + pub author_id: String, + pub body: String, + pub created_at: String, + pub updated_at: String, + pub deleted: bool, +} + +/// Filters and paging for the discussion list. `category: None` lists every category. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DiscussionFilter { + pub category: Option, + pub page: u32, + pub per_page: u32, +} + +/// Validates a discussion title (trimmed, returned) and body. +pub fn validate_discussion(title: &str, body: &str) -> Result { + let title = crate::issues::validate_title(title)?; + crate::issues::validate_body(body)?; + Ok(title) +} + +/// Validates a comment body: not blank, and within the body limit. +pub fn validate_comment(body: &str) -> Result<()> { + crate::issues::validate_body(body)?; + if body.trim().is_empty() { + return Err(Error::Invalid("comment is empty".into())); + } + Ok(()) +} diff --git a/crates/forge-core/src/error.rs b/crates/forge-core/src/error.rs new file mode 100644 index 0000000..63dfca0 --- /dev/null +++ b/crates/forge-core/src/error.rs @@ -0,0 +1,29 @@ +//! The error type shared across forge crates. + +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("io error: {0}")] + Io(#[from] std::io::Error), + #[error("database error: {0}")] + Database(String), + #[error("migration error: {0}")] + Migration(String), + #[error("config error: {0}")] + Config(String), + #[error("crypto error: {0}")] + Crypto(String), + #[error("invalid name: {0}")] + InvalidName(String), + #[error("git error: {0}")] + Git(String), + #[error("not found")] + NotFound, + #[error("conflict: {0}")] + Conflict(String), + #[error("forbidden: {0}")] + Forbidden(String), + #[error("invalid value: {0}")] + Invalid(String), +} + +pub type Result = std::result::Result; diff --git a/crates/forge-core/src/issue_refs.rs b/crates/forge-core/src/issue_refs.rs new file mode 100644 index 0000000..7cb9e00 --- /dev/null +++ b/crates/forge-core/src/issue_refs.rs @@ -0,0 +1,219 @@ +//! Parsing of issue references (`#12`) and closing keywords (`fixes #12`) in free text. +//! Hand-written scanner, no regex. Pure, no IO. + +use std::ops::Range; + +/// Keywords that close an issue when followed by a `#N` reference. Compared case-insensitively. +const CLOSING_KEYWORDS: [&str; 9] = [ + "close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved", +]; + +/// Maximum number of digits in an issue number. +const MAX_DIGITS: usize = 9; + +/// Byte range (including the `#`) and value of every valid `#N` reference in `text`, in order. +/// Duplicates are kept. Used to link references in rendered markdown with the same rules. +pub fn issue_ref_spans(text: &str) -> Vec<(Range, i64)> { + scan_refs(text) +} + +/// Every `#N` reference in `text`, deduplicated, in order of first appearance. +/// +/// A reference is `#` followed by 1 to 9 digits. It is not recognised when the `#` is preceded by +/// an alphanumeric char, `&` or `/`, or when the digits are followed by an alphanumeric char. +/// `#0` is not an issue number and is ignored. +pub fn find_issue_refs(text: &str) -> Vec { + let mut out: Vec = Vec::new(); + for (_, n) in scan_refs(text) { + if !out.contains(&n) { + out.push(n); + } + } + out +} + +/// Issue numbers closed by closing keywords in `text`, deduplicated, in order. +/// +/// The keyword (case-insensitive, whole word) must directly precede the reference, optionally +/// separated by a `:`, with at least one whitespace char between the keyword (or colon) and `#`. +/// Example: `"Fixes: #3, closes #4"` gives `[3, 4]`; `"unfixes #2"` gives nothing. +pub fn find_closing_refs(text: &str) -> Vec { + let mut out: Vec = Vec::new(); + for (range, n) in scan_refs(text) { + if !preceded_by_closing_keyword(&text[..range.start]) { + continue; + } + if !out.contains(&n) { + out.push(n); + } + } + out +} + +/// Byte range of each valid `#N` reference and its value, in order of appearance. +fn scan_refs(text: &str) -> Vec<(Range, i64)> { + let bytes = text.as_bytes(); + let mut refs = Vec::new(); + let mut i = 0; + while i < bytes.len() { + if bytes[i] != b'#' { + i += 1; + continue; + } + let hash = i; + i += 1; + let digits_start = i; + while i < bytes.len() && bytes[i].is_ascii_digit() { + i += 1; + } + let digits = &bytes[digits_start..i]; + if digits.is_empty() || digits.len() > MAX_DIGITS { + continue; + } + if let Some(next) = text[i..].chars().next() + && next.is_alphanumeric() + { + continue; + } + if let Some(prev) = text[..hash].chars().next_back() + && (prev.is_alphanumeric() || prev == '&' || prev == '/') + { + continue; + } + let n = digits + .iter() + .fold(0i64, |acc, d| acc * 10 + i64::from(d - b'0')); + if n == 0 { + continue; + } + refs.push((hash..i, n)); + } + refs +} + +/// True when `before` (the text preceding a `#N` reference) ends with a closing keyword, +/// an optional `:`, and at least one whitespace char. +fn preceded_by_closing_keyword(before: &str) -> bool { + let trimmed = before.trim_end(); + if trimmed.len() == before.len() { + // No whitespace between the keyword and the reference. + return false; + } + let word_part = trimmed.strip_suffix(':').unwrap_or(trimmed); + let lower = word_part.to_ascii_lowercase(); + CLOSING_KEYWORDS.iter().any(|kw| { + lower.ends_with(kw) + && word_part[..word_part.len() - kw.len()] + .chars() + .next_back() + .is_none_or(|c| !c.is_alphanumeric()) + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn plain_reference() { + assert_eq!(find_issue_refs("fixes #12"), vec![12]); + } + + #[test] + fn multiple_references_in_order() { + assert_eq!(find_issue_refs("Fixes: #3, closes #4"), vec![3, 4]); + } + + #[test] + fn prefix_before_hash_is_not_a_reference() { + assert!(find_issue_refs("prefix#5").is_empty()); + } + + #[test] + fn html_entity_is_not_a_reference() { + assert!(find_issue_refs("'").is_empty()); + } + + #[test] + fn slash_before_hash_is_not_a_reference() { + assert!(find_issue_refs("a/#7").is_empty()); + } + + #[test] + fn leading_zeros_are_parsed() { + assert_eq!(find_issue_refs("#0012"), vec![12]); + } + + #[test] + fn ten_digits_is_not_a_reference() { + assert!(find_issue_refs("#1234567890").is_empty()); + } + + #[test] + fn nine_digits_is_a_reference() { + assert_eq!(find_issue_refs("#123456789"), vec![123_456_789]); + } + + #[test] + fn zero_is_not_a_reference() { + assert!(find_issue_refs("#0").is_empty()); + } + + #[test] + fn parentheses_are_allowed_around_reference() { + assert_eq!(find_issue_refs("(#8)"), vec![8]); + } + + #[test] + fn trailing_punctuation_is_allowed() { + assert_eq!(find_issue_refs("#9."), vec![9]); + } + + #[test] + fn alphanumeric_suffix_is_not_a_reference() { + assert!(find_issue_refs("#12abc").is_empty()); + } + + #[test] + fn duplicates_are_removed() { + assert_eq!(find_issue_refs("#2 and #1 and #2"), vec![2, 1]); + assert_eq!(find_closing_refs("fixes #2, closes #2"), vec![2]); + } + + #[test] + fn unfixes_is_not_closing() { + assert!(find_closing_refs("unfixes #2").is_empty()); + assert_eq!(find_issue_refs("unfixes #2"), vec![2]); + } + + #[test] + fn fixed_is_closing() { + assert_eq!(find_closing_refs("fixed #2"), vec![2]); + } + + #[test] + fn all_keywords_are_case_insensitive() { + for kw in [ + "close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved", + ] { + let text = format!("{}: #5", kw.to_uppercase()); + assert_eq!(find_closing_refs(&text), vec![5], "{kw}"); + } + } + + #[test] + fn keyword_needs_whitespace_before_hash() { + assert!(find_closing_refs("fixes#2").is_empty()); + assert!(find_closing_refs("fixes:#2").is_empty()); + } + + #[test] + fn plain_reference_is_not_closing() { + assert!(find_closing_refs("see #2").is_empty()); + } + + #[test] + fn keyword_must_be_a_whole_word() { + assert!(find_closing_refs("prefixes #2").is_empty()); + } +} diff --git a/crates/forge-core/src/issues.rs b/crates/forge-core/src/issues.rs new file mode 100644 index 0000000..d93a528 --- /dev/null +++ b/crates/forge-core/src/issues.rs @@ -0,0 +1,369 @@ +//! Issue, comment, label and milestone types, and their validation. Stored shapes are in +//! migrations/0004_issues.sql; the store functions live in store/issues.rs and store/labels.rs. + +use crate::error::{Error, Result}; +use crate::model::Id; + +/// Longest accepted issue title, in characters. +pub const MAX_TITLE: usize = 256; +/// Largest accepted issue, comment or edit body, in bytes. +pub const MAX_BODY: usize = 65536; +/// Longest accepted label name, in characters. +pub const MAX_LABEL_NAME: usize = 50; +/// Most assignees one issue can have. +pub const MAX_ASSIGNEES: usize = 10; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum IssueState { + Open, + Closed, +} + +impl IssueState { + pub fn as_str(&self) -> &'static str { + match self { + IssueState::Open => "open", + IssueState::Closed => "closed", + } + } +} + +impl std::str::FromStr for IssueState { + type Err = Error; + + fn from_str(s: &str) -> Result { + match s { + "open" => Ok(IssueState::Open), + "closed" => Ok(IssueState::Closed), + other => Err(Error::Invalid(format!("issue state {other:?}"))), + } + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum StateReason { + Completed, + NotPlanned, +} + +impl StateReason { + pub fn as_str(&self) -> &'static str { + match self { + StateReason::Completed => "completed", + StateReason::NotPlanned => "not_planned", + } + } +} + +impl std::str::FromStr for StateReason { + type Err = Error; + + fn from_str(s: &str) -> Result { + match s { + "completed" => Ok(StateReason::Completed), + "not_planned" => Ok(StateReason::NotPlanned), + other => Err(Error::Invalid(format!("state reason {other:?}"))), + } + } +} + +#[derive(Debug, Clone, PartialEq)] +pub struct Issue { + pub id: Id, + pub repo_id: Id, + pub number: i64, + pub title: String, + pub body: String, + pub state: IssueState, + pub state_reason: Option, + pub author_id: Id, + pub milestone_id: Option, + pub comment_count: i64, + pub created_at: String, + pub updated_at: String, + pub closed_at: Option, + /// Locked conversations accept writes only from collaborators with Triage or higher. + pub locked: bool, + /// One of `LOCK_REASONS`, or `None` when no reason was given. + pub lock_reason: Option, +} + +/// Reasons accepted when locking a conversation. +pub const LOCK_REASONS: &[&str] = &["off_topic", "too_heated", "resolved", "spam"]; + +#[derive(Debug, Clone, PartialEq)] +pub struct Comment { + pub id: Id, + pub issue_id: Id, + pub author_id: Id, + pub body: String, + pub created_at: String, + pub updated_at: String, + pub edited: bool, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct IssueEvent { + pub id: Id, + pub issue_id: Id, + /// `None` for system events. + pub actor_id: Option, + pub kind: String, + pub data: serde_json::Value, + pub created_at: String, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct Label { + pub id: Id, + pub repo_id: Id, + pub name: String, + /// Lowercase `#rrggbb`. + pub color: String, + pub description: String, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct Milestone { + pub id: Id, + pub repo_id: Id, + pub title: String, + pub description: String, + /// `YYYY-MM-DD` or `None`. + pub due_on: Option, + pub state: IssueState, + pub created_at: String, + pub closed_at: Option, + /// Counts filled by list/get queries. + pub open_issues: i64, + pub closed_issues: i64, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct IssueFilter { + pub state: Option, + /// Label name. + pub label: Option, + /// Milestone title. + pub milestone: Option, + /// Author username. + pub author: Option, + /// Assignee username. + pub assignee: Option, + /// Substring of the title, case-insensitive. + pub query: Option, + pub sort: IssueSort, + /// 1-based. + pub page: u32, + pub per_page: u32, +} + +impl Default for IssueFilter { + fn default() -> Self { + IssueFilter { + state: Some(IssueState::Open), + label: None, + milestone: None, + author: None, + assignee: None, + query: None, + sort: IssueSort::Newest, + page: 1, + per_page: 25, + } + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum IssueSort { + #[default] + Newest, + Oldest, + RecentlyUpdated, +} + +impl IssueSort { + /// The value used in the `sort` query parameter. + pub fn as_str(&self) -> &'static str { + match self { + IssueSort::Newest => "newest", + IssueSort::Oldest => "oldest", + IssueSort::RecentlyUpdated => "updated", + } + } +} + +impl std::str::FromStr for IssueSort { + type Err = Error; + + fn from_str(s: &str) -> Result { + match s { + "newest" => Ok(IssueSort::Newest), + "oldest" => Ok(IssueSort::Oldest), + "updated" => Ok(IssueSort::RecentlyUpdated), + other => Err(Error::Invalid(format!("sort {other:?}"))), + } + } +} + +#[derive(Debug, Clone, PartialEq)] +pub struct IssueListItem { + pub issue: Issue, + /// Display username of the author. + pub author: String, + pub labels: Vec