diff --git a/.gitignore b/.gitignore index 6ee6054..3b38429 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,6 @@ -# Dependencies -node_modules/ - -# Build output -dist/ - -# Test coverage -coverage/ +# Rust build output +/target +**/target/ # IDE .idea/ @@ -25,14 +20,11 @@ Thumbs.db # Logs *.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* # Local config files lore.config.json -# beads +# beads viewer cache .bv/ # SQLite databases (local development) @@ -40,7 +32,8 @@ lore.config.json *.db-wal *.db-shm - -# Added by cargo - -/target +# Profiling / benchmarks +perf.data +perf.data.old +flamegraph.svg +*.profraw diff --git a/crates/lore-tui/Cargo.lock b/crates/lore-tui/Cargo.lock new file mode 100644 index 0000000..62c6d69 --- /dev/null +++ b/crates/lore-tui/Cargo.lock @@ -0,0 +1,3168 @@ +# 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 = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +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 = "anyhow" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cc" +version = "1.2.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "clap" +version = "4.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_complete" +version = "4.5.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c757a3b7e39161a4e56f9365141ada2a6c915a8622c408ab6bb4b5d047371031" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "comfy-table" +version = "7.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47" +dependencies = [ + "crossterm 0.29.0", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "console" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.2", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +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 = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix 0.38.44", + "signal-hook 0.3.18", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix 1.1.3", + "signal-hook 0.3.18", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "deranged" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc3dc5ad92c2e2d1c193bbbbdf2ea477cb81331de4f3103f267ca18368b988c4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "dialoguer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f104b501bf2364e78d0d3974cbc774f738f5865306ed128e1e0d7499c0ad96" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[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 = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "ftui" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e797adc957e0548e465d76046b1214d7127fae5f3e2b20a6ac9fe880d403cf" +dependencies = [ + "ftui-core", + "ftui-extras", + "ftui-layout", + "ftui-render", + "ftui-runtime", + "ftui-style", + "ftui-text", + "ftui-widgets", +] + +[[package]] +name = "ftui-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cc0116641860c7ba9ab003c66eb357f97de7c8f81eabdd748d6b5ffa2ea00b" +dependencies = [ + "bitflags", + "crossterm 0.29.0", + "signal-hook 0.4.3", + "unicode-display-width", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "ftui-extras" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc5fa8ecd7e4cd4255688fff8cc3b6cbbd6f1f3b2c7d4faa913082fca170625" +dependencies = [ + "ftui-runtime", +] + +[[package]] +name = "ftui-i18n" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd509411d8314ff3e0d63fa422b267d52a0e560f9046c30c1347f88b1a12276d" + +[[package]] +name = "ftui-layout" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea21724327201dcfcf869c03a4142b62d0dcc8bc548c4417352411c76187b98" +dependencies = [ + "ftui-core", +] + +[[package]] +name = "ftui-render" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d4800f2a3699eced76e9480109a7a707cc253c06435b4a11ae2828049c3bc" +dependencies = [ + "bitflags", + "ftui-core", + "memchr", + "smallvec", + "unicode-display-width", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "ftui-runtime" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3a58ae1fda1e517f18a2b67a824e471d7e1eb95967b52813cce609d481dcd8" +dependencies = [ + "crossterm 0.29.0", + "ftui-core", + "ftui-i18n", + "ftui-layout", + "ftui-render", + "ftui-style", + "ftui-text", + "tracing", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "ftui-style" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dad76916d9567978b6f84586bfb398258463adf3e3c5e100990b190ccb54554" +dependencies = [ + "ftui-render", + "tracing", +] + +[[package]] +name = "ftui-text" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026e14a0b9411e3693a2557f12a716a7dcf4be6c2fbd34aaa1d92e87e1f57263" +dependencies = [ + "ftui-core", + "ftui-layout", + "ftui-render", + "ftui-style", + "lru", + "ropey", + "rustc-hash", + "smallvec", + "tracing", + "unicode-segmentation", +] + +[[package]] +name = "ftui-widgets" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8977421e7e9b2260a22b4f8a44e2ad3399e9172048a202db67161fb8686988" +dependencies = [ + "bitflags", + "ftui-core", + "ftui-layout", + "ftui-render", + "ftui-style", + "ftui-text", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashlink" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +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 = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[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_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "indicatif" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.181" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" + +[[package]] +name = "libredox" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +dependencies = [ + "bitflags", + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b4103cffefa72eb8428cb6b47d6627161e51c2739fc5e3b734584157bc642a" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[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.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lore" +version = "0.7.0" +dependencies = [ + "async-stream", + "chrono", + "clap", + "clap_complete", + "comfy-table", + "console", + "dialoguer", + "dirs", + "flate2", + "futures", + "httpdate", + "indicatif", + "libc", + "open", + "rand", + "regex", + "reqwest", + "rusqlite", + "serde", + "serde_json", + "sha2", + "sqlite-vec", + "strsim", + "thiserror", + "tokio", + "tracing", + "tracing-appender", + "tracing-subscriber", + "url", + "urlencoding", + "uuid", +] + +[[package]] +name = "lore-tui" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "clap", + "crossterm 0.28.1", + "dirs", + "ftui", + "lore", + "regex", + "rusqlite", +] + +[[package]] +name = "lru" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cdede44f9a69cab2899a2049e2c3bd49bf911a157f6a3353d4a91c61abbce44" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[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-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "open" +version = "5.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43bb73a7fa3799b198970490a51174027ba0d4ec504b03cd08caf513d40024bc" +dependencies = [ + "is-wsl", + "libc", + "pathdiff", +] + +[[package]] +name = "openssl" +version = "0.10.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[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 = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[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", +] + +[[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 = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[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", + "windows-sys 0.52.0", +] + +[[package]] +name = "ropey" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93411e420bcd1a75ddd1dc3caf18c23155eda2c090631a85af21ba19e97093b5" +dependencies = [ + "smallvec", + "str_indices", +] + +[[package]] +name = "rsqlite-vfs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a1f2315036ef6b1fbacd1972e8ee7688030b0a2121edfc2a6550febd41574d" +dependencies = [ + "hashbrown 0.16.1", + "thiserror", +] + +[[package]] +name = "rusqlite" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1c93dd1c9683b438c392c492109cb702b8090b2bfc8fed6f6e4eb4523f17af3" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", + "sqlite-wasm-rs", +] + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[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 = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +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 = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b57709da74f9ff9f4a27dce9526eec25ca8407c45a7887243b031a58935fb8e" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook 0.3.18", +] + +[[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 = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "sqlite-vec" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec77b84fb8dd5f0f8def127226db83b5d1152c5bf367f09af03998b76ba554a" +dependencies = [ + "cc", +] + +[[package]] +name = "sqlite-wasm-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4206ed3a67690b9c29b77d728f6acc3ce78f16bf846d83c94f76400320181b" +dependencies = [ + "cc", + "js-sys", + "rsqlite-vfs", + "wasm-bindgen", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "str_indices" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12" +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.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +dependencies = [ + "fastrand", + "getrandom 0.4.1", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "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 = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "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", +] + +[[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-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-display-width" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a43273b656140aa2bb8e65351fe87c255f0eca706b2538a9bd4a590a3490bf3" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "unicode-ident" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.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 = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + +[[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 = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[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.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" +dependencies = [ + "getrandom 0.3.4", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +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.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +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 = "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-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[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-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[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", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[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 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +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 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/crates/lore-tui/Cargo.toml b/crates/lore-tui/Cargo.toml new file mode 100644 index 0000000..c47e29c --- /dev/null +++ b/crates/lore-tui/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "lore-tui" +version = "0.1.0" +edition = "2024" +description = "Terminal UI for Gitlore — local GitLab data explorer" +authors = ["Taylor Eernisse"] +license = "MIT" + +[[bin]] +name = "lore-tui" +path = "src/main.rs" + +[dependencies] +# FrankenTUI (Elm-architecture TUI framework) +ftui = "0.1.1" + +# Lore library (config, db, ingestion, search, etc.) +lore = { path = "../.." } + +# CLI +clap = { version = "4", features = ["derive", "env"] } + +# Error handling +anyhow = "1" + +# Time +chrono = { version = "0.4", features = ["serde"] } + +# Paths +dirs = "6" + +# Database (read-only queries from TUI) +rusqlite = { version = "0.38", features = ["bundled"] } + +# Terminal (crossterm for raw mode + event reading, used by ftui runtime) +crossterm = "0.28" + +# Regex (used by safety module for PII/secret redaction) +regex = "1" diff --git a/crates/lore-tui/rust-toolchain.toml b/crates/lore-tui/rust-toolchain.toml new file mode 100644 index 0000000..0924fbf --- /dev/null +++ b/crates/lore-tui/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "nightly-2026-02-08" +profile = "minimal" +components = ["rustfmt", "clippy"] diff --git a/crates/lore-tui/src/app.rs b/crates/lore-tui/src/app.rs new file mode 100644 index 0000000..76622d9 --- /dev/null +++ b/crates/lore-tui/src/app.rs @@ -0,0 +1,101 @@ +#![allow(dead_code)] // Phase 0: minimal scaffold, fleshed out in bd-6pmy + +//! Minimal FrankenTUI Model implementation for the lore TUI. +//! +//! This is the Phase 0 integration proof — validates that the ftui Model trait +//! compiles with our Msg type and produces basic output. The full LoreApp with +//! screen routing, navigation stack, and action dispatch comes in bd-6pmy. + +use ftui::{Cmd, Frame, Model}; + +use crate::message::Msg; + +// --------------------------------------------------------------------------- +// LoreApp +// --------------------------------------------------------------------------- + +/// Root model for the lore TUI. +/// +/// Phase 0: minimal scaffold that renders a placeholder and handles Quit. +/// Phase 1 (bd-6pmy) will add screen routing, DbManager, theme, and subscriptions. +pub struct LoreApp; + +impl Model for LoreApp { + type Message = Msg; + + fn init(&mut self) -> Cmd { + Cmd::none() + } + + fn update(&mut self, msg: Self::Message) -> Cmd { + match msg { + Msg::Quit => Cmd::quit(), + _ => Cmd::none(), + } + } + + fn view(&self, _frame: &mut Frame) { + // Phase 0: no-op view. Phase 1 will render screens via the frame. + } +} + +/// Verify that `App::fullscreen(LoreApp).run()` compiles. +/// +/// This is a compile-time check — we don't actually run it because that +/// would require a real TTY. The function exists solely to prove the wiring. +#[cfg(test)] +fn _assert_app_fullscreen_compiles() { + // This function is never called — it only needs to compile. + fn _inner() { + use ftui::App; + let _app_builder = App::fullscreen(LoreApp); + // _app_builder.run() would need a TTY, so we don't call it. + } +} + +/// Verify that `App::inline(LoreApp, 12).run()` compiles. +#[cfg(test)] +fn _assert_app_inline_compiles() { + fn _inner() { + use ftui::App; + let _app_builder = App::inline(LoreApp, 12); + } +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_lore_app_init_returns_none() { + let mut app = LoreApp; + let cmd = app.init(); + assert!(matches!(cmd, Cmd::None)); + } + + #[test] + fn test_lore_app_quit_returns_quit_cmd() { + let mut app = LoreApp; + let cmd = app.update(Msg::Quit); + assert!(matches!(cmd, Cmd::Quit)); + } + + #[test] + fn test_lore_app_tick_returns_none() { + let mut app = LoreApp; + let cmd = app.update(Msg::Tick); + assert!(matches!(cmd, Cmd::None)); + } + + #[test] + fn test_lore_app_navigate_returns_none() { + use crate::message::Screen; + let mut app = LoreApp; + let cmd = app.update(Msg::NavigateTo(Screen::Dashboard)); + assert!(matches!(cmd, Cmd::None)); + } +} diff --git a/crates/lore-tui/src/clock.rs b/crates/lore-tui/src/clock.rs new file mode 100644 index 0000000..7928a54 --- /dev/null +++ b/crates/lore-tui/src/clock.rs @@ -0,0 +1,151 @@ +//! Injected clock for deterministic time in tests and consistent frame timestamps. +//! +//! All relative-time rendering (e.g., "3h ago") uses [`Clock::now()`] rather +//! than wall-clock time directly. This enables: +//! - Deterministic snapshot tests via [`FakeClock`] +//! - Consistent timestamps within a single frame render pass + +use std::sync::{Arc, Mutex}; + +use chrono::{DateTime, TimeDelta, Utc}; + +/// Trait for obtaining the current time. +/// +/// Inject via `Arc` to allow swapping between real and fake clocks. +pub trait Clock: Send + Sync { + /// Returns the current time. + fn now(&self) -> DateTime; +} + +// --------------------------------------------------------------------------- +// SystemClock +// --------------------------------------------------------------------------- + +/// Real wall-clock time via `chrono::Utc::now()`. +#[derive(Debug, Clone, Copy)] +pub struct SystemClock; + +impl Clock for SystemClock { + fn now(&self) -> DateTime { + Utc::now() + } +} + +// --------------------------------------------------------------------------- +// FakeClock +// --------------------------------------------------------------------------- + +/// A controllable clock for tests. Returns a frozen time that can be +/// advanced or set explicitly. +/// +/// `FakeClock` is `Clone` (shares the inner `Arc`) and `Send + Sync` +/// for use across `Cmd::task` threads. +#[derive(Debug, Clone)] +pub struct FakeClock { + inner: Arc>>, +} + +impl FakeClock { + /// Create a fake clock frozen at the given time. + #[must_use] + pub fn new(time: DateTime) -> Self { + Self { + inner: Arc::new(Mutex::new(time)), + } + } + + /// Advance the clock by `duration`. Uses `checked_add` to handle overflow + /// gracefully — if the addition would overflow, the time is not changed. + pub fn advance(&self, duration: TimeDelta) { + let mut guard = self.inner.lock().expect("FakeClock mutex poisoned"); + if let Some(advanced) = guard.checked_add_signed(duration) { + *guard = advanced; + } + } + + /// Set the clock to an exact time. + pub fn set(&self, time: DateTime) { + let mut guard = self.inner.lock().expect("FakeClock mutex poisoned"); + *guard = time; + } +} + +impl Clock for FakeClock { + fn now(&self) -> DateTime { + *self.inner.lock().expect("FakeClock mutex poisoned") + } +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + use chrono::TimeZone; + + fn fixed_time() -> DateTime { + Utc.with_ymd_and_hms(2026, 2, 12, 12, 0, 0).unwrap() + } + + #[test] + fn test_fake_clock_frozen() { + let clock = FakeClock::new(fixed_time()); + let t1 = clock.now(); + let t2 = clock.now(); + assert_eq!(t1, t2); + assert_eq!(t1, fixed_time()); + } + + #[test] + fn test_fake_clock_advance() { + let clock = FakeClock::new(fixed_time()); + clock.advance(TimeDelta::hours(3)); + let expected = Utc.with_ymd_and_hms(2026, 2, 12, 15, 0, 0).unwrap(); + assert_eq!(clock.now(), expected); + } + + #[test] + fn test_fake_clock_set() { + let clock = FakeClock::new(fixed_time()); + let new_time = Utc.with_ymd_and_hms(2030, 1, 1, 0, 0, 0).unwrap(); + clock.set(new_time); + assert_eq!(clock.now(), new_time); + } + + #[test] + fn test_fake_clock_clone_shares_state() { + let clock1 = FakeClock::new(fixed_time()); + let clock2 = clock1.clone(); + clock1.advance(TimeDelta::minutes(30)); + // Both clones see the advanced time. + assert_eq!(clock1.now(), clock2.now()); + } + + #[test] + fn test_system_clock_returns_reasonable_time() { + let clock = SystemClock; + let now = clock.now(); + // Sanity: time should be after 2025. + assert!(now.year() >= 2025); + } + + #[test] + fn test_fake_clock_is_send_sync() { + fn assert_send_sync() {} + assert_send_sync::(); + assert_send_sync::(); + } + + #[test] + fn test_clock_trait_object_works() { + let fake: Arc = Arc::new(FakeClock::new(fixed_time())); + assert_eq!(fake.now(), fixed_time()); + + let real: Arc = Arc::new(SystemClock); + let _ = real.now(); // Just verify it doesn't panic. + } + + use chrono::Datelike; +} diff --git a/crates/lore-tui/src/db.rs b/crates/lore-tui/src/db.rs new file mode 100644 index 0000000..977ae7f --- /dev/null +++ b/crates/lore-tui/src/db.rs @@ -0,0 +1,270 @@ +#![allow(dead_code)] // Phase 0: types defined now, consumed in Phase 1+ + +//! Database access layer for the TUI. +//! +//! Provides a read pool (3 connections, round-robin) plus a dedicated writer +//! connection. All connections use WAL mode and busy_timeout for concurrency. +//! +//! The TUI operates read-heavy: parallel queries for dashboard, list views, +//! and prefetch. Writes are rare (TUI-local state: scroll positions, bookmarks). + +use std::path::Path; +use std::sync::Mutex; +use std::sync::atomic::{AtomicUsize, Ordering}; + +use anyhow::{Context, Result}; +use rusqlite::Connection; + +/// Number of reader connections in the pool. +const READER_COUNT: usize = 3; + +// --------------------------------------------------------------------------- +// DbManager +// --------------------------------------------------------------------------- + +/// Manages a pool of read-only connections plus a dedicated writer. +/// +/// Designed for `Arc` sharing across FrankenTUI's `Cmd::task` +/// background threads. Each reader is individually `Mutex`-protected so +/// concurrent tasks can query different readers without blocking. +pub struct DbManager { + readers: Vec>, + writer: Mutex, + next_reader: AtomicUsize, +} + +impl DbManager { + /// Open a database at `path` with 3 reader + 1 writer connections. + /// + /// All connections get WAL mode, 5000ms busy_timeout, and foreign keys. + /// Reader connections additionally set `query_only = ON` as a safety guard. + pub fn open(path: &Path) -> Result { + let mut readers = Vec::with_capacity(READER_COUNT); + for i in 0..READER_COUNT { + let conn = + open_connection(path).with_context(|| format!("opening reader connection {i}"))?; + conn.pragma_update(None, "query_only", "ON") + .context("setting query_only on reader")?; + readers.push(Mutex::new(conn)); + } + + let writer = open_connection(path).context("opening writer connection")?; + + Ok(Self { + readers, + writer: Mutex::new(writer), + next_reader: AtomicUsize::new(0), + }) + } + + /// Execute a read-only query against the pool. + /// + /// Selects the next reader via round-robin. The connection is borrowed + /// for the duration of `f` and cannot leak outside. + pub fn with_reader(&self, f: F) -> Result + where + F: FnOnce(&Connection) -> Result, + { + let idx = self.next_reader.fetch_add(1, Ordering::Relaxed) % READER_COUNT; + let conn = self.readers[idx].lock().expect("reader mutex poisoned"); + f(&conn) + } + + /// Execute a write operation against the dedicated writer. + /// + /// Serialized via a single `Mutex`. The TUI writes infrequently + /// (bookmarks, scroll state) so contention is negligible. + pub fn with_writer(&self, f: F) -> Result + where + F: FnOnce(&Connection) -> Result, + { + let conn = self.writer.lock().expect("writer mutex poisoned"); + f(&conn) + } +} + +// --------------------------------------------------------------------------- +// Connection setup +// --------------------------------------------------------------------------- + +/// Open a single SQLite connection with TUI-appropriate pragmas. +/// +/// Mirrors lore's `create_connection` pragmas (WAL, busy_timeout, etc.) +/// but skips the sqlite-vec extension registration — the TUI reads standard +/// tables only, never vec0 virtual tables. +fn open_connection(path: &Path) -> Result { + let conn = Connection::open(path).context("opening SQLite database")?; + + conn.pragma_update(None, "journal_mode", "WAL")?; + conn.pragma_update(None, "synchronous", "NORMAL")?; + conn.pragma_update(None, "foreign_keys", "ON")?; + conn.pragma_update(None, "busy_timeout", 5000)?; + conn.pragma_update(None, "temp_store", "MEMORY")?; + + Ok(conn) +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + use std::sync::Arc; + + /// Create a temporary database file for testing. + /// + /// Uses an atomic counter + thread ID to guarantee unique paths even + /// when tests run in parallel. + fn test_db_path() -> std::path::PathBuf { + use std::sync::atomic::AtomicU64; + static COUNTER: AtomicU64 = AtomicU64::new(0); + let n = COUNTER.fetch_add(1, Ordering::Relaxed); + let dir = std::env::temp_dir().join("lore-tui-tests"); + std::fs::create_dir_all(&dir).expect("create test dir"); + dir.join(format!( + "test-{}-{:?}-{n}.db", + std::process::id(), + std::thread::current().id(), + )) + } + + fn create_test_table(conn: &Connection) { + conn.execute_batch( + "CREATE TABLE IF NOT EXISTS test_items (id INTEGER PRIMARY KEY, name TEXT);", + ) + .expect("create test table"); + } + + #[test] + fn test_dbmanager_opens_successfully() { + let path = test_db_path(); + let db = DbManager::open(&path).expect("open"); + // Writer creates the test table + db.with_writer(|conn| { + create_test_table(conn); + Ok(()) + }) + .expect("create table via writer"); + } + + #[test] + fn test_reader_is_query_only() { + let path = test_db_path(); + let db = DbManager::open(&path).expect("open"); + + // Create table via writer first + db.with_writer(|conn| { + create_test_table(conn); + Ok(()) + }) + .unwrap(); + + // Attempt INSERT via reader — should fail + let result = db.with_reader(|conn| { + conn.execute("INSERT INTO test_items (name) VALUES ('boom')", []) + .map_err(|e| anyhow::anyhow!(e))?; + Ok(()) + }); + assert!(result.is_err(), "reader should reject writes"); + } + + #[test] + fn test_writer_allows_mutations() { + let path = test_db_path(); + let db = DbManager::open(&path).expect("open"); + + db.with_writer(|conn| { + create_test_table(conn); + conn.execute("INSERT INTO test_items (name) VALUES ('hello')", [])?; + let count: i64 = conn.query_row("SELECT COUNT(*) FROM test_items", [], |r| r.get(0))?; + assert_eq!(count, 1); + Ok(()) + }) + .expect("writer should allow mutations"); + } + + #[test] + fn test_round_robin_rotates_readers() { + let path = test_db_path(); + let db = DbManager::open(&path).expect("open"); + + // Call with_reader 6 times — should cycle through readers 0,1,2,0,1,2 + for expected_cycle in 0..2 { + for expected_idx in 0..READER_COUNT { + let current = db.next_reader.load(Ordering::Relaxed); + assert_eq!( + current % READER_COUNT, + (expected_cycle * READER_COUNT + expected_idx) % READER_COUNT, + ); + db.with_reader(|_conn| Ok(())).unwrap(); + } + } + } + + #[test] + fn test_reader_can_read_writer_data() { + let path = test_db_path(); + let db = DbManager::open(&path).expect("open"); + + db.with_writer(|conn| { + create_test_table(conn); + conn.execute("INSERT INTO test_items (name) VALUES ('visible')", [])?; + Ok(()) + }) + .unwrap(); + + let name: String = db + .with_reader(|conn| { + let n: String = + conn.query_row("SELECT name FROM test_items WHERE id = 1", [], |r| r.get(0))?; + Ok(n) + }) + .expect("reader should see writer's data"); + + assert_eq!(name, "visible"); + } + + #[test] + fn test_dbmanager_is_send_sync() { + fn assert_send_sync() {} + assert_send_sync::(); + } + + #[test] + fn test_concurrent_reads() { + let path = test_db_path(); + let db = Arc::new(DbManager::open(&path).expect("open")); + + db.with_writer(|conn| { + create_test_table(conn); + for i in 0..10 { + conn.execute( + "INSERT INTO test_items (name) VALUES (?1)", + [format!("item-{i}")], + )?; + } + Ok(()) + }) + .unwrap(); + + let mut handles = Vec::new(); + for _ in 0..6 { + let db = Arc::clone(&db); + handles.push(std::thread::spawn(move || { + db.with_reader(|conn| { + let count: i64 = + conn.query_row("SELECT COUNT(*) FROM test_items", [], |r| r.get(0))?; + assert_eq!(count, 10); + Ok(()) + }) + .expect("concurrent read should succeed"); + })); + } + + for h in handles { + h.join().expect("thread should not panic"); + } + } +} diff --git a/crates/lore-tui/src/lib.rs b/crates/lore-tui/src/lib.rs new file mode 100644 index 0000000..8a62f80 --- /dev/null +++ b/crates/lore-tui/src/lib.rs @@ -0,0 +1,58 @@ +#![forbid(unsafe_code)] + +//! Gitlore TUI — terminal interface for exploring GitLab data locally. +//! +//! Built on FrankenTUI (Elm architecture): Model, update, view. +//! The `lore` CLI spawns `lore-tui` via PATH lookup at runtime. + +use anyhow::Result; + +// Phase 0 modules. +pub mod clock; // Clock trait: SystemClock + FakeClock (bd-2lg6) +pub mod message; // Msg, Screen, EntityKey, AppError, InputMode (bd-c9gk) + +pub mod safety; // Terminal safety: sanitize + URL policy + redact (bd-3ir1) + +pub mod db; // DbManager: read pool + dedicated writer (bd-2kop) +pub mod theme; // Flexoki theme: build_theme, state_color, label_style (bd-5ofk) + +pub mod app; // LoreApp Model trait impl (Phase 0 proof: bd-2emv, full: bd-6pmy) + +/// Options controlling how the TUI launches. +#[derive(Debug, Clone)] +pub struct LaunchOptions { + /// Path to lore config file. + pub config_path: Option, + /// Run a background sync before displaying data. + pub sync_on_start: bool, + /// Clear cached TUI state and start fresh. + pub fresh: bool, + /// Render backend: "crossterm" or "native". + pub render_mode: String, + /// Use ASCII-only box drawing characters. + pub ascii: bool, + /// Disable alternate screen (render inline). + pub no_alt_screen: bool, +} + +/// Launch the TUI in browse mode (no sync). +/// +/// Loads config from `options.config_path` (or default location), +/// opens the database read-only, and enters the FrankenTUI event loop. +pub fn launch_tui(options: LaunchOptions) -> Result<()> { + let _options = options; + // Phase 1 will wire this to LoreApp + App::fullscreen().run() + eprintln!("lore-tui: browse mode not yet implemented (Phase 1)"); + Ok(()) +} + +/// Launch the TUI with an initial sync pass. +/// +/// Runs `lore sync` in the background while displaying a progress screen, +/// then transitions to browse mode once sync completes. +pub fn launch_sync_tui(options: LaunchOptions) -> Result<()> { + let _options = options; + // Phase 2 will implement the sync progress screen + eprintln!("lore-tui: sync mode not yet implemented (Phase 2)"); + Ok(()) +} diff --git a/crates/lore-tui/src/main.rs b/crates/lore-tui/src/main.rs new file mode 100644 index 0000000..b199c22 --- /dev/null +++ b/crates/lore-tui/src/main.rs @@ -0,0 +1,53 @@ +#![forbid(unsafe_code)] + +use anyhow::Result; +use clap::Parser; +use lore_tui::LaunchOptions; + +/// Terminal UI for Gitlore — explore GitLab issues, MRs, and search locally. +#[derive(Parser, Debug)] +#[command(name = "lore-tui", version, about)] +struct TuiCli { + /// Path to lore config file (default: ~/.config/lore/config.json). + #[arg(short, long, env = "LORE_CONFIG_PATH")] + config: Option, + + /// Run a sync before launching the TUI. + #[arg(long)] + sync: bool, + + /// Clear cached state and start fresh. + #[arg(long)] + fresh: bool, + + /// Render mode: "crossterm" (default) or "native". + #[arg(long, default_value = "crossterm")] + render_mode: String, + + /// Use ASCII-only drawing characters (no Unicode box drawing). + #[arg(long)] + ascii: bool, + + /// Disable alternate screen (render inline). + #[arg(long)] + no_alt_screen: bool, +} + +fn main() -> Result<()> { + let cli = TuiCli::parse(); + + let options = LaunchOptions { + config_path: cli.config, + sync_on_start: cli.sync, + fresh: cli.fresh, + render_mode: cli.render_mode, + ascii: cli.ascii, + no_alt_screen: cli.no_alt_screen, + }; + + if options.sync_on_start { + lore_tui::launch_sync_tui(options) + } else { + lore_tui::launch_tui(options) + } +} diff --git a/crates/lore-tui/src/message.rs b/crates/lore-tui/src/message.rs new file mode 100644 index 0000000..3510ba0 --- /dev/null +++ b/crates/lore-tui/src/message.rs @@ -0,0 +1,523 @@ +#![allow(dead_code)] // Phase 0: types defined now, consumed in Phase 1+ + +//! Core types for the lore-tui Elm architecture. +//! +//! - [`Msg`] — every user action and async result flows through this enum. +//! - [`Screen`] — navigation targets. +//! - [`EntityKey`] — safe cross-project entity identity. +//! - [`AppError`] — structured error display in the TUI. +//! - [`InputMode`] — controls key dispatch routing. + +use std::fmt; +use std::time::Instant; + +use ftui::Event; + +// --------------------------------------------------------------------------- +// EntityKind +// --------------------------------------------------------------------------- + +/// Distinguishes issue vs merge request in an [`EntityKey`]. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum EntityKind { + Issue, + MergeRequest, +} + +// --------------------------------------------------------------------------- +// EntityKey +// --------------------------------------------------------------------------- + +/// Uniquely identifies an entity (issue or MR) across projects. +/// +/// Bare `iid` is unsafe in multi-project datasets — equality requires +/// project_id + iid + kind. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct EntityKey { + pub project_id: i64, + pub iid: i64, + pub kind: EntityKind, +} + +impl EntityKey { + #[must_use] + pub fn issue(project_id: i64, iid: i64) -> Self { + Self { + project_id, + iid, + kind: EntityKind::Issue, + } + } + + #[must_use] + pub fn mr(project_id: i64, iid: i64) -> Self { + Self { + project_id, + iid, + kind: EntityKind::MergeRequest, + } + } +} + +impl fmt::Display for EntityKey { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let prefix = match self.kind { + EntityKind::Issue => "#", + EntityKind::MergeRequest => "!", + }; + write!(f, "p{}:{}{}", self.project_id, prefix, self.iid) + } +} + +// --------------------------------------------------------------------------- +// Screen +// --------------------------------------------------------------------------- + +/// Navigation targets within the TUI. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Screen { + Dashboard, + IssueList, + IssueDetail(EntityKey), + MrList, + MrDetail(EntityKey), + Search, + Timeline, + Who, + Sync, + Stats, + Doctor, + Bootstrap, +} + +impl Screen { + /// Human-readable label for breadcrumbs and status bar. + #[must_use] + pub fn label(&self) -> &str { + match self { + Self::Dashboard => "Dashboard", + Self::IssueList => "Issues", + Self::IssueDetail(_) => "Issue", + Self::MrList => "Merge Requests", + Self::MrDetail(_) => "Merge Request", + Self::Search => "Search", + Self::Timeline => "Timeline", + Self::Who => "Who", + Self::Sync => "Sync", + Self::Stats => "Stats", + Self::Doctor => "Doctor", + Self::Bootstrap => "Bootstrap", + } + } + + /// Whether this screen shows a specific entity detail view. + #[must_use] + pub fn is_detail_or_entity(&self) -> bool { + matches!(self, Self::IssueDetail(_) | Self::MrDetail(_)) + } +} + +// --------------------------------------------------------------------------- +// AppError +// --------------------------------------------------------------------------- + +/// Structured error types for user-facing display in the TUI. +#[derive(Debug, Clone)] +pub enum AppError { + /// Database is busy (WAL contention). + DbBusy, + /// Database corruption detected. + DbCorruption(String), + /// GitLab rate-limited; retry after N seconds (if header present). + NetworkRateLimited { retry_after_secs: Option }, + /// Network unavailable. + NetworkUnavailable, + /// GitLab authentication failed. + AuthFailed, + /// Data parsing error. + ParseError(String), + /// Internal / unexpected error. + Internal(String), +} + +impl fmt::Display for AppError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::DbBusy => write!(f, "Database is busy — another process holds the lock"), + Self::DbCorruption(detail) => write!(f, "Database corruption: {detail}"), + Self::NetworkRateLimited { + retry_after_secs: Some(secs), + } => write!(f, "Rate limited by GitLab — retry in {secs}s"), + Self::NetworkRateLimited { + retry_after_secs: None, + } => write!(f, "Rate limited by GitLab — try again shortly"), + Self::NetworkUnavailable => write!(f, "Network unavailable — working offline"), + Self::AuthFailed => write!(f, "GitLab authentication failed — check your token"), + Self::ParseError(detail) => write!(f, "Parse error: {detail}"), + Self::Internal(detail) => write!(f, "Internal error: {detail}"), + } + } +} + +// --------------------------------------------------------------------------- +// InputMode +// --------------------------------------------------------------------------- + +/// Controls how keystrokes are routed through the key dispatch pipeline. +#[derive(Debug, Clone, Default)] +pub enum InputMode { + /// Standard navigation mode — keys dispatch to screen-specific handlers. + #[default] + Normal, + /// Text input focused (filter bar, search box). + Text, + /// Command palette is open. + Palette, + /// "g" prefix pressed — waiting for second key (500ms timeout). + GoPrefix { started_at: Instant }, +} + +// --------------------------------------------------------------------------- +// Msg +// --------------------------------------------------------------------------- + +/// Every user action and async result flows through this enum. +/// +/// Generation fields (`generation: u64`) on async result variants enable +/// stale-response detection: if the generation doesn't match the current +/// request generation, the result is silently dropped. +#[derive(Debug)] +pub enum Msg { + // --- Terminal events --- + /// Raw terminal event (key, mouse, paste, focus, clipboard). + RawEvent(Event), + /// Periodic tick from runtime subscription. + Tick, + /// Terminal resized. + Resize { + width: u16, + height: u16, + }, + + // --- Navigation --- + /// Navigate to a specific screen. + NavigateTo(Screen), + /// Go back in navigation history. + GoBack, + /// Go forward in navigation history. + GoForward, + /// Jump to the dashboard. + GoHome, + /// Jump back N screens in history. + JumpBack(usize), + /// Jump forward N screens in history. + JumpForward(usize), + + // --- Command palette --- + OpenCommandPalette, + CloseCommandPalette, + CommandPaletteInput(String), + CommandPaletteSelect(String), + + // --- Issue list --- + IssueListLoaded { + generation: u64, + rows: Vec, + }, + IssueListFilterChanged(String), + IssueListSortChanged, + IssueSelected(EntityKey), + + // --- MR list --- + MrListLoaded { + generation: u64, + rows: Vec, + }, + MrListFilterChanged(String), + MrSelected(EntityKey), + + // --- Issue detail --- + IssueDetailLoaded { + generation: u64, + key: EntityKey, + detail: Box, + }, + + // --- MR detail --- + MrDetailLoaded { + generation: u64, + key: EntityKey, + detail: Box, + }, + + // --- Discussions (shared by issue + MR detail) --- + DiscussionsLoaded { + generation: u64, + discussions: Vec, + }, + + // --- Search --- + SearchQueryChanged(String), + SearchRequestStarted { + generation: u64, + query: String, + }, + SearchExecuted { + generation: u64, + results: Vec, + }, + SearchResultSelected(EntityKey), + SearchModeChanged, + SearchCapabilitiesLoaded, + + // --- Timeline --- + TimelineLoaded { + generation: u64, + events: Vec, + }, + TimelineEntitySelected(EntityKey), + + // --- Who (people) --- + WhoResultLoaded { + generation: u64, + result: Box, + }, + WhoModeChanged, + + // --- Sync --- + SyncStarted, + SyncProgress { + stage: String, + current: u64, + total: u64, + }, + SyncProgressBatch { + stage: String, + batch_size: u64, + }, + SyncLogLine(String), + SyncBackpressureDrop, + SyncCompleted { + elapsed_ms: u64, + }, + SyncCancelled, + SyncFailed(String), + SyncStreamStats { + bytes: u64, + items: u64, + }, + + // --- Search debounce --- + SearchDebounceArmed { + generation: u64, + }, + SearchDebounceFired { + generation: u64, + }, + + // --- Dashboard --- + DashboardLoaded { + generation: u64, + data: Box, + }, + + // --- Global actions --- + Error(AppError), + ShowHelp, + ShowCliEquivalent, + OpenInBrowser, + BlurTextInput, + ScrollToTopCurrentScreen, + Quit, +} + +/// Convert terminal events into messages. +/// +/// FrankenTUI requires `From` on the message type so the runtime +/// can inject terminal events into the model's update loop. +impl From for Msg { + fn from(event: Event) -> Self { + match event { + Event::Resize { width, height } => Self::Resize { width, height }, + Event::Tick => Self::Tick, + other => Self::RawEvent(other), + } + } +} + +// --------------------------------------------------------------------------- +// Placeholder data types (will be fleshed out in Phase 1+) +// --------------------------------------------------------------------------- + +/// Placeholder for an issue row in list views. +#[derive(Debug, Clone)] +pub struct IssueRow { + pub key: EntityKey, + pub title: String, + pub state: String, +} + +/// Placeholder for a merge request row in list views. +#[derive(Debug, Clone)] +pub struct MrRow { + pub key: EntityKey, + pub title: String, + pub state: String, + pub draft: bool, +} + +/// Placeholder for issue detail payload. +#[derive(Debug, Clone)] +pub struct IssueDetail { + pub key: EntityKey, + pub title: String, + pub description: String, +} + +/// Placeholder for MR detail payload. +#[derive(Debug, Clone)] +pub struct MrDetail { + pub key: EntityKey, + pub title: String, + pub description: String, +} + +/// Placeholder for a discussion thread. +#[derive(Debug, Clone)] +pub struct Discussion { + pub id: String, + pub notes: Vec, +} + +/// Placeholder for a search result. +#[derive(Debug, Clone)] +pub struct SearchResult { + pub key: EntityKey, + pub title: String, + pub score: f64, +} + +/// Placeholder for a timeline event. +#[derive(Debug, Clone)] +pub struct TimelineEvent { + pub timestamp: String, + pub description: String, +} + +/// Placeholder for who/people intelligence result. +#[derive(Debug, Clone)] +pub struct WhoResult { + pub experts: Vec, +} + +/// Placeholder for dashboard summary data. +#[derive(Debug, Clone)] +pub struct DashboardData { + pub issue_count: u64, + pub mr_count: u64, +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_entity_key_equality() { + assert_eq!(EntityKey::issue(1, 42), EntityKey::issue(1, 42)); + assert_ne!(EntityKey::issue(1, 42), EntityKey::mr(1, 42)); + } + + #[test] + fn test_entity_key_different_projects() { + assert_ne!(EntityKey::issue(1, 42), EntityKey::issue(2, 42)); + } + + #[test] + fn test_entity_key_display() { + assert_eq!(EntityKey::issue(5, 123).to_string(), "p5:#123"); + assert_eq!(EntityKey::mr(5, 456).to_string(), "p5:!456"); + } + + #[test] + fn test_entity_key_hash_is_usable_in_collections() { + use std::collections::HashSet; + let mut set = HashSet::new(); + set.insert(EntityKey::issue(1, 1)); + set.insert(EntityKey::issue(1, 1)); // duplicate + set.insert(EntityKey::mr(1, 1)); + assert_eq!(set.len(), 2); + } + + #[test] + fn test_screen_labels() { + assert_eq!(Screen::Dashboard.label(), "Dashboard"); + assert_eq!(Screen::IssueList.label(), "Issues"); + assert_eq!(Screen::MrList.label(), "Merge Requests"); + assert_eq!(Screen::Search.label(), "Search"); + } + + #[test] + fn test_screen_is_detail_or_entity() { + assert!(Screen::IssueDetail(EntityKey::issue(1, 1)).is_detail_or_entity()); + assert!(Screen::MrDetail(EntityKey::mr(1, 1)).is_detail_or_entity()); + assert!(!Screen::Dashboard.is_detail_or_entity()); + assert!(!Screen::IssueList.is_detail_or_entity()); + assert!(!Screen::Search.is_detail_or_entity()); + } + + #[test] + fn test_app_error_display() { + let err = AppError::DbBusy; + assert!(err.to_string().contains("busy")); + + let err = AppError::NetworkRateLimited { + retry_after_secs: Some(30), + }; + assert!(err.to_string().contains("30s")); + + let err = AppError::NetworkRateLimited { + retry_after_secs: None, + }; + assert!(err.to_string().contains("shortly")); + + let err = AppError::AuthFailed; + assert!(err.to_string().contains("token")); + } + + #[test] + fn test_input_mode_default_is_normal() { + assert!(matches!(InputMode::default(), InputMode::Normal)); + } + + #[test] + fn test_msg_from_event_resize() { + let event = Event::Resize { + width: 80, + height: 24, + }; + let msg = Msg::from(event); + assert!(matches!( + msg, + Msg::Resize { + width: 80, + height: 24 + } + )); + } + + #[test] + fn test_msg_from_event_tick() { + let msg = Msg::from(Event::Tick); + assert!(matches!(msg, Msg::Tick)); + } + + #[test] + fn test_msg_from_event_focus_wraps_raw() { + let msg = Msg::from(Event::Focus(true)); + assert!(matches!(msg, Msg::RawEvent(Event::Focus(true)))); + } +} diff --git a/crates/lore-tui/src/safety.rs b/crates/lore-tui/src/safety.rs new file mode 100644 index 0000000..d0d2a0d --- /dev/null +++ b/crates/lore-tui/src/safety.rs @@ -0,0 +1,587 @@ +//! Terminal safety: sanitize untrusted text, URL policy, credential redaction. +//! +//! GitLab content can contain ANSI escapes, bidi overrides, OSC hyperlinks, +//! and C1 control codes that could corrupt terminal rendering. This module +//! strips dangerous sequences while preserving a safe SGR subset for readability. + +use std::fmt::Write; + +// --------------------------------------------------------------------------- +// UrlPolicy +// --------------------------------------------------------------------------- + +/// Controls how OSC 8 hyperlinks in input are handled. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum UrlPolicy { + /// Remove OSC 8 hyperlinks entirely, keeping only the link text. + #[default] + Strip, + /// Convert hyperlinks to numbered footnotes: `text [1]` with URL list appended. + Footnote, + /// Pass hyperlinks through unchanged (only for trusted content). + Passthrough, +} + +// --------------------------------------------------------------------------- +// RedactPattern +// --------------------------------------------------------------------------- + +/// Common patterns for PII/secret redaction. +#[derive(Debug, Clone)] +pub struct RedactPattern { + patterns: Vec, +} + +impl RedactPattern { + /// Create a default set of redaction patterns (tokens, emails, etc.). + #[must_use] + pub fn defaults() -> Self { + let patterns = vec![ + // GitLab personal access tokens + regex::Regex::new(r"glpat-[A-Za-z0-9_\-]{20,}").expect("valid regex"), + // Generic bearer/API tokens (long hex or base64-ish strings after common prefixes) + regex::Regex::new(r"(?i)(token|bearer|api[_-]?key)[\s:=]+\S{8,}").expect("valid regex"), + // Email addresses + regex::Regex::new(r"[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}") + .expect("valid regex"), + ]; + Self { patterns } + } + + /// Apply all redaction patterns to the input string. + #[must_use] + pub fn redact(&self, input: &str) -> String { + let mut result = input.to_string(); + for pattern in &self.patterns { + result = pattern.replace_all(&result, "[REDACTED]").into_owned(); + } + result + } +} + +// --------------------------------------------------------------------------- +// sanitize_for_terminal +// --------------------------------------------------------------------------- + +/// Sanitize untrusted text for safe terminal display. +/// +/// - Strips C1 control codes (0x80-0x9F) +/// - Strips OSC sequences (ESC ] ... ST) +/// - Strips cursor movement CSI sequences (CSI n A/B/C/D/E/F/G/H/J/K) +/// - Strips bidi overrides (U+202A-U+202E, U+2066-U+2069) +/// - Preserves safe SGR subset (bold, italic, underline, reset, standard colors) +/// +/// `url_policy` controls handling of OSC 8 hyperlinks. +#[must_use] +pub fn sanitize_for_terminal(input: &str, url_policy: UrlPolicy) -> String { + let mut output = String::with_capacity(input.len()); + let mut footnotes: Vec = Vec::new(); + let chars: Vec = input.chars().collect(); + let len = chars.len(); + let mut i = 0; + + while i < len { + let ch = chars[i]; + + // --- Bidi overrides --- + if is_bidi_override(ch) { + i += 1; + continue; + } + + // --- C1 control codes (U+0080-U+009F) --- + if ('\u{0080}'..='\u{009F}').contains(&ch) { + i += 1; + continue; + } + + // --- C0 control codes except tab, newline, carriage return --- + if ch.is_ascii_control() && ch != '\t' && ch != '\n' && ch != '\r' && ch != '\x1B' { + i += 1; + continue; + } + + // --- ESC sequences --- + if ch == '\x1B' { + if i + 1 < len { + match chars[i + 1] { + // CSI sequence: ESC [ + '[' => { + let (consumed, safe_seq) = parse_csi(&chars, i); + if let Some(seq) = safe_seq { + output.push_str(&seq); + } + i += consumed; + continue; + } + // OSC sequence: ESC ] + ']' => { + let (consumed, link_text, link_url) = parse_osc(&chars, i); + match url_policy { + UrlPolicy::Strip => { + if let Some(text) = link_text { + output.push_str(&text); + } + } + UrlPolicy::Footnote => { + if let (Some(text), Some(url)) = (link_text, link_url) { + footnotes.push(url); + let _ = write!(output, "{text} [{n}]", n = footnotes.len()); + } + } + UrlPolicy::Passthrough => { + // Reproduce the raw OSC sequence + for &ch_raw in &chars[i..len.min(i + consumed)] { + output.push(ch_raw); + } + } + } + i += consumed; + continue; + } + _ => { + // Unknown ESC sequence — skip ESC + next char + i += 2; + continue; + } + } + } else { + // Trailing ESC at end of input + i += 1; + continue; + } + } + + // --- Normal character --- + output.push(ch); + i += 1; + } + + // Append footnotes if any + if !footnotes.is_empty() { + output.push('\n'); + for (idx, url) in footnotes.iter().enumerate() { + let _ = write!(output, "\n[{}] {url}", idx + 1); + } + } + + output +} + +// --------------------------------------------------------------------------- +// Bidi check +// --------------------------------------------------------------------------- + +fn is_bidi_override(ch: char) -> bool { + matches!( + ch, + '\u{202A}' // LRE + | '\u{202B}' // RLE + | '\u{202C}' // PDF + | '\u{202D}' // LRO + | '\u{202E}' // RLO + | '\u{2066}' // LRI + | '\u{2067}' // RLI + | '\u{2068}' // FSI + | '\u{2069}' // PDI + ) +} + +// --------------------------------------------------------------------------- +// CSI parser +// --------------------------------------------------------------------------- + +/// Parse a CSI sequence starting at `chars[start]` (which should be ESC). +/// +/// Returns `(chars_consumed, Option)`. +/// If the CSI is a safe SGR, returns the full sequence string to preserve. +/// Otherwise returns None (strip it). +fn parse_csi(chars: &[char], start: usize) -> (usize, Option) { + // Minimum: ESC [ + debug_assert!(chars[start] == '\x1B'); + debug_assert!(start + 1 < chars.len() && chars[start + 1] == '['); + + let mut i = start + 2; // skip ESC [ + let len = chars.len(); + + // Collect parameter bytes (0x30-0x3F) and intermediate bytes (0x20-0x2F) + let param_start = i; + while i < len && (chars[i] as u32) >= 0x20 && (chars[i] as u32) <= 0x3F { + i += 1; + } + + // Collect intermediate bytes + while i < len && (chars[i] as u32) >= 0x20 && (chars[i] as u32) <= 0x2F { + i += 1; + } + + // Final byte (0x40-0x7E) + if i >= len || (chars[i] as u32) < 0x40 || (chars[i] as u32) > 0x7E { + // Malformed — consume what we've seen and strip + return (i.saturating_sub(start).max(2), None); + } + + let final_byte = chars[i]; + let consumed = i + 1 - start; + + // Only preserve SGR sequences (final byte 'm') + if final_byte == 'm' { + let param_str: String = chars[param_start..i].iter().collect(); + if is_safe_sgr(¶m_str) { + let full_seq: String = chars[start..start + consumed].iter().collect(); + return (consumed, Some(full_seq)); + } + } + + // Anything else (cursor movement A-H, erase J/K, etc.) is stripped + (consumed, None) +} + +/// Check if all SGR parameters in a sequence are in the safe subset. +/// +/// Safe: 0 (reset), 1 (bold), 3 (italic), 4 (underline), 22 (normal intensity), +/// 23 (not italic), 24 (not underline), 39 (default fg), 49 (default bg), +/// 30-37 (standard fg), 40-47 (standard bg), 90-97 (bright fg), 100-107 (bright bg). +fn is_safe_sgr(params: &str) -> bool { + if params.is_empty() { + return true; // ESC[m is reset + } + + for param in params.split(';') { + let param = param.trim(); + if param.is_empty() { + continue; // treat empty as 0 + } + let Ok(n) = param.parse::() else { + return false; + }; + if !is_safe_sgr_code(n) { + return false; + } + } + true +} + +fn is_safe_sgr_code(n: u32) -> bool { + matches!( + n, + 0 // reset + | 1 // bold + | 3 // italic + | 4 // underline + | 22 // normal intensity (turn off bold) + | 23 // not italic + | 24 // not underline + | 39 // default foreground + | 49 // default background + | 30..=37 // standard foreground colors + | 40..=47 // standard background colors + | 90..=97 // bright foreground colors + | 100..=107 // bright background colors + ) +} + +// --------------------------------------------------------------------------- +// OSC parser +// --------------------------------------------------------------------------- + +/// Parse an OSC sequence starting at `chars[start]` (ESC ]). +/// +/// Returns `(chars_consumed, link_text, link_url)`. +/// For OSC 8 hyperlinks: `ESC ] 8 ; params ; url ST text ESC ] 8 ; ; ST` +/// For other OSC: consumed without extracting link data. +fn parse_osc(chars: &[char], start: usize) -> (usize, Option, Option) { + debug_assert!(chars[start] == '\x1B'); + debug_assert!(start + 1 < chars.len() && chars[start + 1] == ']'); + + let len = chars.len(); + let i = start + 2; // skip ESC ] + + // Find ST (String Terminator): ESC \ or BEL (0x07) + let osc_end = find_st(chars, i); + + // Check if this is OSC 8 (hyperlink) + if i < len && chars[i] == '8' && i + 1 < len && chars[i + 1] == ';' { + // OSC 8 hyperlink: ESC ] 8 ; params ; url ST ... ESC ] 8 ; ; ST + let osc_content: String = chars[i..osc_end.0].iter().collect(); + let first_consumed = osc_end.1; + + // Extract URL from "8;params;url" + let url = extract_osc8_url(&osc_content); + + // Now find the link text (between first ST and second OSC 8) + let after_first_st = start + 2 + first_consumed; + let mut text = String::new(); + let mut j = after_first_st; + + // Collect text until we hit the closing OSC 8 or end of input + while j < len { + if j + 1 < len && chars[j] == '\x1B' && chars[j + 1] == ']' { + // Found another OSC — this should be the closing OSC 8 + let close_end = find_st(chars, j + 2); + return ( + j + close_end.1 - start + 2, + Some(text), + url.map(String::from), + ); + } + text.push(chars[j]); + j += 1; + } + + // Reached end without closing OSC 8 + return (j - start, Some(text), url.map(String::from)); + } + + // Non-OSC-8: just consume and strip + (osc_end.1 + (start + 2 - start), None, None) +} + +/// Find the String Terminator (ST) for an OSC sequence. +/// ST is either ESC \ (two chars) or BEL (0x07). +/// Returns (content_end_index, total_consumed_from_content_start). +fn find_st(chars: &[char], from: usize) -> (usize, usize) { + let len = chars.len(); + let mut i = from; + while i < len { + if chars[i] == '\x07' { + return (i, i - from + 1); + } + if i + 1 < len && chars[i] == '\x1B' && chars[i + 1] == '\\' { + return (i, i - from + 2); + } + i += 1; + } + // Unterminated — consume everything + (len, len - from) +} + +/// Extract URL from OSC 8 content "8;params;url". +fn extract_osc8_url(content: &str) -> Option<&str> { + // Format: "8;params;url" + let rest = content.strip_prefix("8;")?; + // Skip params (up to next ;) + let url_start = rest.find(';')? + 1; + let url = &rest[url_start..]; + if url.is_empty() { None } else { Some(url) } +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + + // --- CSI / cursor movement --- + + #[test] + fn test_strips_cursor_movement() { + // CSI 5A = cursor up 5 + let input = "before\x1B[5Aafter"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "beforeafter"); + } + + #[test] + fn test_strips_cursor_movement_all_directions() { + for dir in ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'] { + let input = format!("x\x1B[3{dir}y"); + let result = sanitize_for_terminal(&input, UrlPolicy::Strip); + assert_eq!(result, "xy", "failed for direction {dir}"); + } + } + + #[test] + fn test_strips_erase_sequences() { + // CSI 2J = erase display + let input = "before\x1B[2Jafter"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "beforeafter"); + } + + // --- SGR preservation --- + + #[test] + fn test_preserves_bold_italic_underline_reset() { + let input = "\x1B[1mbold\x1B[0m \x1B[3mitalic\x1B[0m \x1B[4munderline\x1B[0m"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, input); + } + + #[test] + fn test_preserves_standard_colors() { + // Red foreground, green background + let input = "\x1B[31mred\x1B[42m on green\x1B[0m"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, input); + } + + #[test] + fn test_preserves_bright_colors() { + let input = "\x1B[91mbright red\x1B[0m"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, input); + } + + #[test] + fn test_preserves_combined_safe_sgr() { + // Bold + red foreground in one sequence + let input = "\x1B[1;31mbold red\x1B[0m"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, input); + } + + #[test] + fn test_strips_unsafe_sgr() { + // SGR 8 = hidden text (not in safe list) + let input = "\x1B[8mhidden\x1B[0m"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + // SGR 8 stripped, SGR 0 preserved + assert_eq!(result, "hidden\x1B[0m"); + } + + // --- C1 control codes --- + + #[test] + fn test_strips_c1_control_codes() { + // U+008D = Reverse Index, U+009B = CSI (8-bit) + let input = format!("before{}middle{}after", '\u{008D}', '\u{009B}'); + let result = sanitize_for_terminal(&input, UrlPolicy::Strip); + assert_eq!(result, "beforemiddleafter"); + } + + // --- Bidi overrides --- + + #[test] + fn test_strips_bidi_overrides() { + let input = format!( + "normal{}reversed{}end", + '\u{202E}', // RLO + '\u{202C}' // PDF + ); + let result = sanitize_for_terminal(&input, UrlPolicy::Strip); + assert_eq!(result, "normalreversedend"); + } + + #[test] + fn test_strips_all_bidi_chars() { + let bidi_chars = [ + '\u{202A}', '\u{202B}', '\u{202C}', '\u{202D}', '\u{202E}', '\u{2066}', '\u{2067}', + '\u{2068}', '\u{2069}', + ]; + for ch in bidi_chars { + let input = format!("a{ch}b"); + let result = sanitize_for_terminal(&input, UrlPolicy::Strip); + assert_eq!(result, "ab", "failed for U+{:04X}", ch as u32); + } + } + + // --- OSC sequences --- + + #[test] + fn test_strips_osc_sequences() { + // OSC 0 (set title): ESC ] 0 ; title BEL + let input = "before\x1B]0;My Title\x07after"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "beforeafter"); + } + + // --- OSC 8 hyperlinks --- + + #[test] + fn test_url_policy_strip() { + // OSC 8 hyperlink: ESC]8;;url ST text ESC]8;; ST + let input = "click \x1B]8;;https://example.com\x07here\x1B]8;;\x07 done"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "click here done"); + } + + #[test] + fn test_url_policy_footnote() { + let input = "click \x1B]8;;https://example.com\x07here\x1B]8;;\x07 done"; + let result = sanitize_for_terminal(input, UrlPolicy::Footnote); + assert!(result.contains("here [1]")); + assert!(result.contains("[1] https://example.com")); + } + + // --- Redaction --- + + #[test] + fn test_redact_gitlab_token() { + let redactor = RedactPattern::defaults(); + let input = "My token is glpat-AbCdEfGhIjKlMnOpQrStUvWx"; + let result = redactor.redact(input); + assert_eq!(result, "My token is [REDACTED]"); + } + + #[test] + fn test_redact_email() { + let redactor = RedactPattern::defaults(); + let input = "Contact user@example.com for details"; + let result = redactor.redact(input); + assert_eq!(result, "Contact [REDACTED] for details"); + } + + #[test] + fn test_redact_bearer_token() { + let redactor = RedactPattern::defaults(); + let input = "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI"; + let result = redactor.redact(input); + assert!(result.contains("[REDACTED]")); + assert!(!result.contains("eyJ")); + } + + // --- Edge cases --- + + #[test] + fn test_empty_input() { + assert_eq!(sanitize_for_terminal("", UrlPolicy::Strip), ""); + } + + #[test] + fn test_safe_content_passthrough() { + let input = "Hello, world! This is normal text.\nWith newlines\tand tabs."; + assert_eq!(sanitize_for_terminal(input, UrlPolicy::Strip), input); + } + + #[test] + fn test_trailing_esc() { + let input = "text\x1B"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "text"); + } + + #[test] + fn test_malformed_csi_does_not_eat_text() { + // ESC [ without a valid final byte before next printable + let input = "a\x1B[b"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + // The malformed CSI is consumed but shouldn't eat "b" as text + // ESC[ is start, 'b' is final byte (0x62 is in 0x40-0x7E range) + // So this is CSI with final byte 'b' (cursor back) — gets stripped + assert_eq!(result, "a"); + } + + #[test] + fn test_utf8_adjacent_to_escapes() { + let input = "\x1B[1m日本語\x1B[0m text"; + let result = sanitize_for_terminal(input, UrlPolicy::Strip); + assert_eq!(result, "\x1B[1m日本語\x1B[0m text"); + } + + #[test] + fn test_fuzz_no_panic() { + // 1000 random-ish byte sequences — must not panic + for seed in 0u16..1000 { + let mut bytes = Vec::new(); + for j in 0..50 { + bytes.push(((seed.wrapping_mul(31).wrapping_add(j)) & 0xFF) as u8); + } + // Best-effort UTF-8 + let input = String::from_utf8_lossy(&bytes); + let _ = sanitize_for_terminal(&input, UrlPolicy::Strip); + } + } +} diff --git a/crates/lore-tui/src/theme.rs b/crates/lore-tui/src/theme.rs new file mode 100644 index 0000000..7e37e05 --- /dev/null +++ b/crates/lore-tui/src/theme.rs @@ -0,0 +1,251 @@ +#![allow(dead_code)] // Phase 0: types defined now, consumed in Phase 1+ + +//! Flexoki-based theme for the lore TUI. +//! +//! Uses FrankenTUI's `AdaptiveColor::adaptive(light, dark)` for automatic +//! light/dark mode switching. The palette is [Flexoki](https://stephango.com/flexoki) +//! by Steph Ango, designed in Oklab perceptual color space for balanced contrast. + +use ftui::{AdaptiveColor, Color, PackedRgba, Style, Theme}; + +// --------------------------------------------------------------------------- +// Flexoki palette constants +// --------------------------------------------------------------------------- + +// Base tones +const PAPER: Color = Color::rgb(0xFF, 0xFC, 0xF0); +const BASE_50: Color = Color::rgb(0xF2, 0xF0, 0xE5); +const BASE_100: Color = Color::rgb(0xE6, 0xE4, 0xD9); +const BASE_200: Color = Color::rgb(0xCE, 0xCD, 0xC3); +const BASE_300: Color = Color::rgb(0xB7, 0xB5, 0xAC); +const BASE_400: Color = Color::rgb(0x9F, 0x9D, 0x96); +const BASE_500: Color = Color::rgb(0x87, 0x85, 0x80); +const BASE_600: Color = Color::rgb(0x6F, 0x6E, 0x69); +const BASE_700: Color = Color::rgb(0x57, 0x56, 0x53); +const BASE_800: Color = Color::rgb(0x40, 0x3E, 0x3C); +const BASE_850: Color = Color::rgb(0x34, 0x33, 0x31); +const BASE_900: Color = Color::rgb(0x28, 0x27, 0x26); +const BLACK: Color = Color::rgb(0x10, 0x0F, 0x0F); + +// Accent colors — light-600 (for light mode) +const RED_600: Color = Color::rgb(0xAF, 0x30, 0x29); +const ORANGE_600: Color = Color::rgb(0xBC, 0x52, 0x15); +const YELLOW_600: Color = Color::rgb(0xAD, 0x83, 0x01); +const GREEN_600: Color = Color::rgb(0x66, 0x80, 0x0B); +const CYAN_600: Color = Color::rgb(0x24, 0x83, 0x7B); +const BLUE_600: Color = Color::rgb(0x20, 0x5E, 0xA6); +const PURPLE_600: Color = Color::rgb(0x5E, 0x40, 0x9D); + +// Accent colors — dark-400 (for dark mode) +const RED_400: Color = Color::rgb(0xD1, 0x4D, 0x41); +const ORANGE_400: Color = Color::rgb(0xDA, 0x70, 0x2C); +const YELLOW_400: Color = Color::rgb(0xD0, 0xA2, 0x15); +const GREEN_400: Color = Color::rgb(0x87, 0x9A, 0x39); +const CYAN_400: Color = Color::rgb(0x3A, 0xA9, 0x9F); +const BLUE_400: Color = Color::rgb(0x43, 0x85, 0xBE); +const PURPLE_400: Color = Color::rgb(0x8B, 0x7E, 0xC8); +const MAGENTA_400: Color = Color::rgb(0xCE, 0x5D, 0x97); + +// Muted fallback as PackedRgba (for Style::fg) +const MUTED_PACKED: PackedRgba = PackedRgba::rgb(0x87, 0x85, 0x80); + +// --------------------------------------------------------------------------- +// build_theme +// --------------------------------------------------------------------------- + +/// Build the lore TUI theme with Flexoki adaptive colors. +/// +/// Each of the 19 semantic slots gets an `AdaptiveColor::adaptive(light, dark)` +/// pair. FrankenTUI detects the terminal background and resolves accordingly. +#[must_use] +pub fn build_theme() -> Theme { + Theme::builder() + .primary(AdaptiveColor::adaptive(BLUE_600, BLUE_400)) + .secondary(AdaptiveColor::adaptive(CYAN_600, CYAN_400)) + .accent(AdaptiveColor::adaptive(PURPLE_600, PURPLE_400)) + .background(AdaptiveColor::adaptive(PAPER, BLACK)) + .surface(AdaptiveColor::adaptive(BASE_50, BASE_900)) + .overlay(AdaptiveColor::adaptive(BASE_100, BASE_850)) + .text(AdaptiveColor::adaptive(BASE_700, BASE_200)) + .text_muted(AdaptiveColor::adaptive(BASE_500, BASE_500)) + .text_subtle(AdaptiveColor::adaptive(BASE_400, BASE_600)) + .success(AdaptiveColor::adaptive(GREEN_600, GREEN_400)) + .warning(AdaptiveColor::adaptive(YELLOW_600, YELLOW_400)) + .error(AdaptiveColor::adaptive(RED_600, RED_400)) + .info(AdaptiveColor::adaptive(BLUE_600, BLUE_400)) + .border(AdaptiveColor::adaptive(BASE_300, BASE_700)) + .border_focused(AdaptiveColor::adaptive(BLUE_600, BLUE_400)) + .selection_bg(AdaptiveColor::adaptive(BASE_100, BASE_800)) + .selection_fg(AdaptiveColor::adaptive(BASE_700, BASE_100)) + .scrollbar_track(AdaptiveColor::adaptive(BASE_50, BASE_900)) + .scrollbar_thumb(AdaptiveColor::adaptive(BASE_300, BASE_700)) + .build() +} + +// --------------------------------------------------------------------------- +// State colors +// --------------------------------------------------------------------------- + +/// Map a GitLab entity state to a display color. +/// +/// Returns fixed (non-adaptive) colors — state indicators should be +/// consistent regardless of light/dark mode. +#[must_use] +pub fn state_color(state: &str) -> Color { + match state { + "opened" => GREEN_400, + "closed" => RED_400, + "merged" => PURPLE_400, + "locked" => YELLOW_400, + _ => BASE_500, + } +} + +// --------------------------------------------------------------------------- +// Event type colors +// --------------------------------------------------------------------------- + +/// Map a timeline event type to a display color. +#[must_use] +pub fn event_color(event_type: &str) -> Color { + match event_type { + "created" => GREEN_400, + "updated" => BLUE_400, + "closed" => RED_400, + "merged" => PURPLE_400, + "commented" => CYAN_400, + "labeled" => ORANGE_400, + "milestoned" => YELLOW_400, + _ => BASE_500, + } +} + +// --------------------------------------------------------------------------- +// Label styling +// --------------------------------------------------------------------------- + +/// Convert a GitLab label hex color (e.g., "#FF0000" or "FF0000") to a Style. +/// +/// Falls back to muted text color if the hex string is invalid. +#[must_use] +pub fn label_style(hex_color: &str) -> Style { + let packed = parse_hex_to_packed(hex_color).unwrap_or(MUTED_PACKED); + Style::default().fg(packed) +} + +/// Parse a hex color string like "#RRGGBB" or "RRGGBB" into a `PackedRgba`. +fn parse_hex_to_packed(s: &str) -> Option { + let hex = s.strip_prefix('#').unwrap_or(s); + if hex.len() != 6 { + return None; + } + let r = u8::from_str_radix(&hex[0..2], 16).ok()?; + let g = u8::from_str_radix(&hex[2..4], 16).ok()?; + let b = u8::from_str_radix(&hex[4..6], 16).ok()?; + Some(PackedRgba::rgb(r, g, b)) +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_build_theme_compiles() { + let theme = build_theme(); + // Resolve for dark mode — primary should be Blue-400 + let resolved = theme.resolve(true); + assert_eq!(resolved.primary, BLUE_400); + } + + #[test] + fn test_build_theme_light_mode() { + let theme = build_theme(); + let resolved = theme.resolve(false); + assert_eq!(resolved.primary, BLUE_600); + } + + #[test] + fn test_build_theme_all_slots_differ_between_modes() { + let theme = build_theme(); + let dark = theme.resolve(true); + let light = theme.resolve(false); + // Background should differ (Paper vs Black) + assert_ne!(dark.background, light.background); + // Text should differ + assert_ne!(dark.text, light.text); + } + + #[test] + fn test_state_color_opened_is_green() { + assert_eq!(state_color("opened"), GREEN_400); + } + + #[test] + fn test_state_color_closed_is_red() { + assert_eq!(state_color("closed"), RED_400); + } + + #[test] + fn test_state_color_merged_is_purple() { + assert_eq!(state_color("merged"), PURPLE_400); + } + + #[test] + fn test_state_color_unknown_returns_muted() { + assert_eq!(state_color("unknown"), BASE_500); + } + + #[test] + fn test_event_color_created_is_green() { + assert_eq!(event_color("created"), GREEN_400); + } + + #[test] + fn test_event_color_unknown_returns_muted() { + assert_eq!(event_color("whatever"), BASE_500); + } + + #[test] + fn test_label_style_valid_hex_with_hash() { + let style = label_style("#FF0000"); + assert_eq!(style.fg, Some(PackedRgba::rgb(0xFF, 0x00, 0x00))); + } + + #[test] + fn test_label_style_valid_hex_without_hash() { + let style = label_style("00FF00"); + assert_eq!(style.fg, Some(PackedRgba::rgb(0x00, 0xFF, 0x00))); + } + + #[test] + fn test_label_style_lowercase_hex() { + let style = label_style("#ff0000"); + assert_eq!(style.fg, Some(PackedRgba::rgb(0xFF, 0x00, 0x00))); + } + + #[test] + fn test_label_style_invalid_hex_fallback() { + let style = label_style("invalid"); + assert_eq!(style.fg, Some(MUTED_PACKED)); + } + + #[test] + fn test_label_style_empty_fallback() { + let style = label_style(""); + assert_eq!(style.fg, Some(MUTED_PACKED)); + } + + #[test] + fn test_parse_hex_short_string() { + assert!(parse_hex_to_packed("#FFF").is_none()); + } + + #[test] + fn test_parse_hex_non_hex_chars() { + assert!(parse_hex_to_packed("#GGHHII").is_none()); + } +}