From 54fd5432ade5b1023e900ac1e35e126d22daf845 Mon Sep 17 00:00:00 2001 From: Minecraft269 <176564132+Minecraft269@users.noreply.github.com> Date: Fri, 7 Aug 2026 19:36:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20Rust=20=E9=87=8D=E5=86=99=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E6=A1=86=E6=9E=B6=20(Phase=201-6:=20config/env/auth/l?= =?UTF-8?q?aunch/update/repair/rollback=20+=20I18N=20+=20CLI=20=E9=AA=A8?= =?UTF-8?q?=E6=9E=B6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置系统: TOML schema + 自动生成模板 + 校验 + Profile - 环境注入: 优先级链 + 快照回滚 + 模板替换 - 认证: 多源 API Key + daemon 绕过 + settings.json 注入-清理(自愈) - 启动编排: preflight + spawn + 崩溃检测 - 更新系统: 多源策略 + 分段多线程下载 + SHA-256 + 安装替换 - 修复/回滚: 熔断器 + 指数退避 + 原子回滚 + 版本清单 - I18N: 中英双语翻译 + 系统 locale 检测 - CI: style/build-test/config-validation/i18n-check 四个独立 workflow --- .github/workflows/style.yml | 48 + .gitignore | 29 +- Cargo.lock | 2791 +++++++++++++++++++++++++++++++++++ Cargo.toml | 76 + i18n/en-US.toml | 139 ++ i18n/zh-CN.toml | 139 ++ rustfmt.toml | 6 + src/auth/daemon_bypass.rs | 89 ++ src/auth/injector.rs | 200 +++ src/auth/key_manager.rs | 170 +++ src/auth/mod.rs | 9 + src/cli.rs | 184 +++ src/commands.rs | 119 ++ src/config/loader.rs | 228 +++ src/config/mod.rs | 11 + src/config/profiles.rs | 68 + src/config/schema.rs | 501 +++++++ src/config/template.toml | 216 +++ src/env/injector.rs | 150 ++ src/env/mod.rs | 8 + src/env/snapshot.rs | 80 + src/env/templates.rs | 41 + src/i18n/loader.rs | 153 ++ src/i18n/mod.rs | 7 + src/i18n/resolver.rs | 95 ++ src/launch/execute.rs | 109 ++ src/launch/mod.rs | 9 + src/launch/preflight.rs | 116 ++ src/launch/subprocess.rs | 67 + src/lib.rs | 19 + src/logging/init.rs | 131 ++ src/logging/mod.rs | 6 + src/logging/rotation.rs | 48 + src/main.rs | 63 + src/platform/mod.rs | 43 + src/platform/unix.rs | 32 + src/platform/windows.rs | 34 + src/repair/circuit.rs | 120 ++ src/repair/detector.rs | 121 ++ src/repair/mod.rs | 7 + src/rollback/atomic.rs | 82 + src/rollback/manifest.rs | 116 ++ src/rollback/mod.rs | 7 + src/update/channels.rs | 139 ++ src/update/download.rs | 290 ++++ src/update/install.rs | 100 ++ src/update/mod.rs | 13 + src/update/source.rs | 100 ++ src/update/verify.rs | 77 + src/util/fs.rs | 87 ++ src/util/mod.rs | 5 + src/util/paths.rs | 89 ++ src/util/version.rs | 103 ++ 53 files changed, 7686 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/style.yml create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 i18n/en-US.toml create mode 100644 i18n/zh-CN.toml create mode 100644 rustfmt.toml create mode 100644 src/auth/daemon_bypass.rs create mode 100644 src/auth/injector.rs create mode 100644 src/auth/key_manager.rs create mode 100644 src/auth/mod.rs create mode 100644 src/cli.rs create mode 100644 src/commands.rs create mode 100644 src/config/loader.rs create mode 100644 src/config/mod.rs create mode 100644 src/config/profiles.rs create mode 100644 src/config/schema.rs create mode 100644 src/config/template.toml create mode 100644 src/env/injector.rs create mode 100644 src/env/mod.rs create mode 100644 src/env/snapshot.rs create mode 100644 src/env/templates.rs create mode 100644 src/i18n/loader.rs create mode 100644 src/i18n/mod.rs create mode 100644 src/i18n/resolver.rs create mode 100644 src/launch/execute.rs create mode 100644 src/launch/mod.rs create mode 100644 src/launch/preflight.rs create mode 100644 src/launch/subprocess.rs create mode 100644 src/lib.rs create mode 100644 src/logging/init.rs create mode 100644 src/logging/mod.rs create mode 100644 src/logging/rotation.rs create mode 100644 src/main.rs create mode 100644 src/platform/mod.rs create mode 100644 src/platform/unix.rs create mode 100644 src/platform/windows.rs create mode 100644 src/repair/circuit.rs create mode 100644 src/repair/detector.rs create mode 100644 src/repair/mod.rs create mode 100644 src/rollback/atomic.rs create mode 100644 src/rollback/manifest.rs create mode 100644 src/rollback/mod.rs create mode 100644 src/update/channels.rs create mode 100644 src/update/download.rs create mode 100644 src/update/install.rs create mode 100644 src/update/mod.rs create mode 100644 src/update/source.rs create mode 100644 src/update/verify.rs create mode 100644 src/util/fs.rs create mode 100644 src/util/mod.rs create mode 100644 src/util/paths.rs create mode 100644 src/util/version.rs diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..0466d8e --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,48 @@ +# 代码风格检查: rustfmt + clippy +# 仅在修改核心源码/构建配置时运行 + +name: Code Style + +on: + push: + paths: + - 'src/**' + - 'Cargo.toml' + - 'Cargo.lock' + - 'rustfmt.toml' + - 'clippy.toml' + pull_request: + paths: + - 'src/**' + - 'Cargo.toml' + - 'Cargo.lock' + - 'rustfmt.toml' + - 'clippy.toml' + +env: + RUSTFLAGS: "-D warnings" + CARGO_TERM_COLOR: always + +jobs: + rustfmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: cargo fmt --all -- --check + run: cargo fmt --all -- --check + + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + - name: cargo clippy --all-targets -- -D warnings + run: cargo clippy --all-targets --all-features -- -D warnings diff --git a/.gitignore b/.gitignore index cabfafe..5af29e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,38 @@ -# Python +# ====================================================================== +# CCL-dev .gitignore +# 用户数据目录不上传: config/ 与 logs/ 为本地生成,不进版本库 +# ====================================================================== + +# Rust +target/ +*.rs.bk + +# Config & Logs (user data, not tracked) — 仅根目录, 不影响 src/config/ +/config/ +/logs/ + +# Tauri (GUI 构建产物) +src-tauri/target/ +*.dmg +*.msi +*.AppImage + +# Node (GUI 前端) +node_modules/ +src/gui/frontend/dist/ + +# Python (遗留参考,若清理则删除以下) __pycache__/ *.py[cod] *.egg-info/ dist/ build/ - -# Virtual env venv/ .venv/ # IDE -.vscode/ .idea/ +.vscode/ *.swp *.swo diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..75f6ee0 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2791 @@ +# 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 = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[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 = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cc-launcher" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "clap", + "ctrlc", + "directories", + "glob", + "hex", + "keyring", + "regex", + "reqwest", + "serde", + "serde_json", + "serial_test", + "sha2", + "tempfile", + "thiserror 1.0.69", + "tokio", + "toml", + "tracing", + "tracing-subscriber", + "which", + "windows-sys 0.59.0", + "zip", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[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 = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[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-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[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 = "ctrlc" +version = "3.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" +dependencies = [ + "dispatch2", + "nix", + "windows-sys 0.61.2", +] + +[[package]] +name = "deflate64" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + +[[package]] +name = "derive_arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[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 = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[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", + "libz-ng-sys", + "miniz_oxide", +] + +[[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 = "futures-channel" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-executor" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" + +[[package]] +name = "futures-macro" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "futures-sink" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "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", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "rand_core", + "wasm-bindgen", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +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 = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +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.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[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.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "keyring" +version = "3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" +dependencies = [ + "byteorder", + "log", + "windows-sys 0.60.2", + "zeroize", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libredox" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa" +dependencies = [ + "libc", +] + +[[package]] +name = "libz-ng-sys" +version = "1.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879917b256f6317769b9f374b435805a8697013098aacce5a38ac106cd6a9469" +dependencies = [ + "cmake", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[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.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "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 = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[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.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.19", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.19", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", +] + +[[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 = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serial_test" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" +dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[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.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[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.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +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 2.0.119", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[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-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "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 = "wasm-bindgen" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +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 = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "which" +version = "6.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +dependencies = [ + "either", + "home", + "rustix 0.38.44", + "winsafe", +] + +[[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 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-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.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zip" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap", + "lzma-rs", + "num_enum", + "pbkdf2", + "sha1", + "thiserror 1.0.69", + "time", + "zopfli", + "zstd", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7fb7f2b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,76 @@ +[package] +name = "cc-launcher" +version = "0.1.0" +edition = "2024" +description = "Configuration-driven CLI+TUI+GUI launcher for Claude Code with auto-update, repair, environment injection, and I18N" +license = "MIT" +authors = ["Minecraft269"] + +[[bin]] +name = "cc-launcher" +path = "src/main.rs" + +[lib] +name = "cc_launcher" +path = "src/lib.rs" + +[dependencies] +# ---- CLI ---- +clap = { version = "4", features = ["derive", "env"] } + +# ---- Config & Serialization ---- +serde = { version = "1", features = ["derive"] } +serde_json = "1" +toml = "0.8" + +# ---- Error Handling ---- +anyhow = "1" +thiserror = "1" + +# ---- Logging ---- +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "time"] } + +# ---- Time ---- +chrono = { version = "0.4", features = ["serde"] } + +# ---- Template & Glob ---- +regex = "1" +glob = "0.3" + +# ---- Platform dirs (as path fallback) ---- +directories = "5" + +# ---- Async Runtime ---- +tokio = { version = "1", features = ["full"] } + +# ---- HTTP Client ---- +reqwest = { version = "0.12", features = ["stream", "json", "rustls-tls"], default-features = false } + +# ---- Hashing & Archive ---- +sha2 = "0.10" +hex = "0.4" +zip = "1" + +# ---- Credentials (keyring fallback) ---- +keyring = { version = "3", features = ["windows-native"] } + +# ---- Command resolution ---- +which = "6" + +# ---- Signal handling (Ctrl+C cleanup) ---- +ctrlc = "3" + +# ---- Windows process creation flags ---- +[target.'cfg(windows)'.dependencies] +windows-sys = { version = "0.59", features = ["Win32_System_Threading"] } + +[dev-dependencies] +tempfile = "3" +serial_test = "3" + +[profile.release] +opt-level = 3 +lto = true +codegen-units = 1 +strip = true diff --git a/i18n/en-US.toml b/i18n/en-US.toml new file mode 100644 index 0000000..315a781 --- /dev/null +++ b/i18n/en-US.toml @@ -0,0 +1,139 @@ +# English translation +# All keys MUST be identical to zh-CN.toml (verified by CI) + +[app] +name = "CC Launcher" +version = "Version" +help = "Help" +about = "Config-driven launcher for Claude Code: multi-source updates, self-healing repair, env injection, I18N" + +[general] +ok = "OK" +fail = "FAIL" +warn = "WARN" +error = "ERROR" +cancelled = "Cancelled" +yes = "Yes" +no = "No" +confirm = "Confirm" +skip = "Skip" +unknown = "Unknown" +none = "None" +checking = "Checking..." + +[launch] +starting = "Starting Claude Code..." +ready = "Launch ready" +api_key_missing = "No API key found; CC may fail authentication. Configure api_key_source or pass -k." +binary_not_found = "Claude Code executable not found. Run `cc-launcher repair` to fix." +binary_damaged = "Claude Code binary is unhealthy (corrupted or too small). Run `cc-launcher repair`." +update_prompt = "Update available {current} -> {latest}. Upgrade now? [Y/n]" +repair_prompt = "Binary issue detected. Repair now? [Y/n]" +skip_check_used = "Pre-launch checks skipped" +dry_run_banner = "========== Preview mode (dry-run) ==========" +dry_run_cc_args = "CC passthrough args: {args}" +dry_run_model = "Model: {model}" +dry_run_workdir = "Working directory: {dir}" +dry_run_env_count = "Injected env vars: {count}" +dry_run_exe = "Executable: {exe}" +dry_run_backend = "Backend: {backend}" + +[update] +checking = "Checking for updates..." +latest = "Already up to date: v{version}" +update_available = "New version available: {current} -> {latest}" +downloading = "Downloading {version}..." +downloading_chunk = "Chunk {done}/{total} downloaded" +progress_line = "Progress: {percent}% | {speed}/s | avg {avg}/s | ETA {eta}" +channel_trying = "Trying channel {index}/{count}: {url}" +channel_failed = "Channel {url} unavailable: {reason}" +all_channels_failed = "All download channels failed" +manual_hint = "Auto-download failed. Download manually and run: cc-launcher update --file " +hash_verify_failed = "Hash mismatch: expected {expected}, got {actual}" +hash_ok = "Hash verified" +size_mismatch = "Size mismatch: expected {expected}, got {actual}" +install_success = "Install success: v{version}" +install_failed = "Install failed: {reason}" +restore_from_backup = "Restored previous version from backup" +version_pinned = "Pinned version: {version}" +source_native = "Source: CC self-update" +source_github = "Source: GitHub Releases" +source_mirror = "Source: accelerated channel" + +[repair] +crash_detected = "CC crashed (exit code {code}, ran {elapsed}s)" +repairing = "Auto-repairing..." +repair_success = "Repair succeeded" +repair_failed = "Repair failed: {reason}" +circuit_opened = "Circuit breaker OPEN after {count} consecutive failures. Run `cc-launcher repair` manually." +circuit_reset = "Circuit breaker auto-reset" +backoff_waiting = "Backoff: retrying in {delay}s" +max_retries_exceeded = "Max retries ({max}) exceeded, giving up auto-repair" +relaunching = "Repair complete, relaunching CC..." + +[check] +title = "========== Full Diagnostic Check ==========" +version_ok = "Version OK: v{version}" +version_mismatch = "Upgrade available: {current} -> {latest}" +binary_health_ok = "Binary healthy" +binary_health_fail = "Binary unhealthy" +plugin_updates = "Plugin updates: {count} available" +plugin_up_to_date = "Plugins up to date" +skills_ok = "Skills complete: {count} dirs, {with_skill} with SKILL.md" +skills_warn = "Skills warning: {count} dirs missing SKILL.md" +config_valid = "Config validation passed" +config_invalid = "Config validation failed: {error}" +summary = "========== Diagnostic Summary ==========" + +[reset] +title = "========== Cache Cleanup ==========" +found_items = "Found {count} items to clean" +confirm_prompt = "Confirm cleaning above items? [y/N]" +cleaned = "Cleaned {ok} items, {fail} failed" +nothing_to_clean = "Nothing to clean" + +[env] +title = "========== Environment Variables ==========" +masked = "***" +source_cli = "CLI" +source_config = "config" +source_system = "system" +source_default = "default" +unset = "(unset)" + +[logs] +title = "========== Logs ==========" +none_found = "No log files found" +showing_tail = "Showing last {lines} lines of {file}:" + +[config_path] +title = "========== Paths Overview ==========" +status_ok = "OK" +status_missing = "MISSING" + +[rollback] +rollbacking = "Rolling back to previous version: {version}" +no_previous = "No previous version to roll back to" +version_installed = "Installed version {version}" +rollback_failed = "Rollback failed: {reason}" +restored_previous = "Rollback failed; restored original version" +version_not_found = "Version not found: {version}" + +[gui] +title = "CC Launcher" +dashboard = "Dashboard" +launch_tab = "Launch" +env_tab = "Environment" +plugins_tab = "Plugins" +skills_tab = "Skills" +diagnostics_tab = "Diagnostics" +settings_tab = "Settings" +refresh = "Refresh" +quit = "Quit" + +[tui] +tab_overview = "Overview" +tab_download = "Download/Update" +tab_diagnostics = "Diagnostics" +tab_logs = "Logs" +quit_hint = "q/Esc quit | Tab switch | r refresh" diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml new file mode 100644 index 0000000..b75dadd --- /dev/null +++ b/i18n/zh-CN.toml @@ -0,0 +1,139 @@ +# 简体中文翻译 +# 所有 key 必须与 en-US.toml 完全一致 (CI 验证) + +[app] +name = "CC Launcher" +version = "版本" +help = "帮助" +about = "Claude Code 配置驱动启动器: 多源更新、自愈修复、环境注入、国际化" + +[general] +ok = "正常" +fail = "失败" +warn = "警告" +error = "错误" +cancelled = "已取消" +yes = "是" +no = "否" +confirm = "确认" +skip = "跳过" +unknown = "未知" +none = "无" +checking = "检查中..." + +[launch] +starting = "正在启动 Claude Code..." +ready = "启动完成" +api_key_missing = "未找到 API Key, CC 可能无法通过认证。请配置 api_key_source 或使用 -k 指定。" +binary_not_found = "未找到 Claude Code 可执行文件。请运行 cc-launcher repair 修复。" +binary_damaged = "Claude Code 二进制文件异常 (损坏或过小)。建议运行 cc-launcher repair。" +update_prompt = "发现新版本 {current} -> {latest}, 是否现在升级? [Y/n]" +repair_prompt = "检测到二进制异常, 是否现在修复? [Y/n]" +skip_check_used = "已跳过启动前检查" +dry_run_banner = "========== 预览模式 (dry-run) ==========" +dry_run_cc_args = "CC 透传参数: {args}" +dry_run_model = "模型: {model}" +dry_run_workdir = "工作目录: {dir}" +dry_run_env_count = "注入环境变量: {count} 个" +dry_run_exe = "可执行文件: {exe}" +dry_run_backend = "后端: {backend}" + +[update] +checking = "正在检查更新..." +latest = "已是最新版本 {version}" +update_available = "发现新版本 {current} -> {latest}" +downloading = "正在下载 {version}..." +downloading_chunk = "分块 {done}/{total} 已下载" +progress_line = "进度: {percent}% | {speed}/s | 平均 {avg}/s | 剩余 {eta}" +channel_trying = "尝试通道 {index}/{count}: {url}" +channel_failed = "通道 {url} 不可用: {reason}" +all_channels_failed = "所有下载通道均失败" +manual_hint = "自动下载失败, 请手动下载后使用: cc-launcher update --file " +hash_verify_failed = "哈希校验失败: 期望 {expected}, 实际 {actual}" +hash_ok = "哈希校验通过" +size_mismatch = "文件大小不符: 期望 {expected}, 实际 {actual}" +install_success = "安装成功: v{version}" +install_failed = "安装失败: {reason}" +restore_from_backup = "已从备份恢复原版本" +version_pinned = "指定版本: {version}" +source_native = "更新源: CC 自更新" +source_github = "更新源: GitHub Releases" +source_mirror = "更新源: 加速通道" + +[repair] +crash_detected = "检测到 CC 异常退出 (退出码 {code}, 运行 {elapsed} 秒)" +repairing = "正在自动修复..." +repair_success = "修复成功" +repair_failed = "修复失败: {reason}" +circuit_opened = "熔断器已打开: 连续 {count} 次失败, 需手动运行 cc-launcher repair" +circuit_reset = "熔断器已自动重置" +backoff_waiting = "退避等待 {delay} 秒后重试" +max_retries_exceeded = "超过最大重试次数 {max}, 放弃自动修复" +relaunching = "修复完成, 重新启动 CC..." + +[check] +title = "========== 全面诊断检查 ==========" +version_ok = "版本正常: v{version}" +version_mismatch = "版本可升级: {current} -> {latest}" +binary_health_ok = "二进制状态正常" +binary_health_fail = "二进制状态异常" +plugin_updates = "插件更新: {count} 个可用" +plugin_up_to_date = "插件已是最新" +skills_ok = "Skills 完整: {count} 个, 含 SKILL.md {with_skill} 个" +skills_warn = "Skills 警告: {count} 个目录缺少 SKILL.md" +config_valid = "配置校验通过" +config_invalid = "配置校验失败: {error}" +summary = "========== 诊断总结 ==========" + +[reset] +title = "========== 清理缓存 ==========" +found_items = "发现 {count} 项可清理" +confirm_prompt = "确认清理以上项目? [y/N]" +cleaned = "已清理 {ok} 项, 失败 {fail} 项" +nothing_to_clean = "没有需要清理的内容" + +[env] +title = "========== 环境变量 ==========" +masked = "***" +source_cli = "CLI" +source_config = "config" +source_system = "system" +source_default = "default" +unset = "(未设置)" + +[logs] +title = "========== 日志 ==========" +none_found = "未找到日志文件" +showing_tail = "显示 {file} 末尾 {lines} 行:" + +[config_path] +title = "========== 路径一览 ==========" +status_ok = "正常" +status_missing = "缺失" + +[rollback] +rollbacking = "正在回退到上一版本: {version}" +no_previous = "没有可回退的版本" +version_installed = "已安装版本 {version}" +rollback_failed = "回滚失败: {reason}" +restored_previous = "回滚失败, 已恢复原版本" +version_not_found = "指定版本不存在: {version}" + +[gui] +title = "CC Launcher" +dashboard = "概览" +launch_tab = "启动" +env_tab = "环境变量" +plugins_tab = "插件" +skills_tab = "Skills" +diagnostics_tab = "诊断" +settings_tab = "设置" +refresh = "刷新" +quit = "退出" + +[tui] +tab_overview = "概览" +tab_download = "下载/更新" +tab_diagnostics = "诊断" +tab_logs = "日志" +quit_hint = "q/Esc 退出 | Tab 切换 | r 刷新" diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..66b541e --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,6 @@ +# Rust 代码风格配置 (与 CI 中 cargo fmt --check 一致) +max_width = 100 +tab_spaces = 4 +edition = "2024" +newline_style = "Auto" +use_small_heuristics = "Max" diff --git a/src/auth/daemon_bypass.rs b/src/auth/daemon_bypass.rs new file mode 100644 index 0000000..d397827 --- /dev/null +++ b/src/auth/daemon_bypass.rs @@ -0,0 +1,89 @@ +//! Daemon OAuth 绕过: 设置 ANTHROPIC_AUTH_TOKEN + CLAUDE_CODE_SIMPLE=1。 + +use super::key_manager::ResolvedKey; +use crate::config::AppConfig; +use crate::env::EnvManager; +use std::collections::HashMap; + +/// 计算 Daemon 绕过所需的环境变量注入。 +/// +/// 对非 Anthropic 后端 (DeepSeek/OpenAI/custom) 绕过 CC daemon 的 OAuth 流程: +/// - `ANTHROPIC_AUTH_TOKEN` = API Key (Bearer 认证) +/// - `ANTHROPIC_API_KEY` = API Key (X-Api-Key, 兼容旧版) +/// - `CLAUDE_CODE_SIMPLE` = "1" (跳过 OAuth/Keychain + skills 发现) +pub fn compute_daemon_bypass(key: &ResolvedKey, config: &AppConfig) -> HashMap { + let mut env = HashMap::new(); + let backend = config.backend.backend.as_str(); + // 仅对非 anthropic 后端注入绕过 (anthropic 走官方 OAuth) + if backend != "anthropic" { + env.insert("ANTHROPIC_AUTH_TOKEN".to_string(), key.value.clone()); + env.insert("ANTHROPIC_API_KEY".to_string(), key.value.clone()); + env.insert("CLAUDE_CODE_SIMPLE".to_string(), "1".to_string()); + } + // 根据后端设置 base URL + let base_url = backend_base_url(config); + if let Some(url) = base_url { + env.insert("ANTHROPIC_BASE_URL".to_string(), url); + } + env +} + +/// 计算后端对应的 ANTHROPIC_BASE_URL (null = 使用 SDK 默认)。 +pub fn backend_base_url(config: &AppConfig) -> Option { + if let Some(url) = &config.backend.base_url + && !url.is_empty() + { + return Some(url.clone()); + } + match config.backend.backend.as_str() { + "deepseek" => Some("https://api.deepseek.com/anthropic".to_string()), + "openai" => Some("https://api.openai.com/v1".to_string()), + "anthropic" => None, + _ => None, + } +} + +/// 应用 Daemon 绕过到当前进程环境 (供 launch 调用)。 +pub fn setup_daemon_bypass(env_manager: &mut EnvManager, key: &ResolvedKey, config: &AppConfig) { + let _ = env_manager; + let bypass = compute_daemon_bypass(key, config); + for (k, v) in bypass { + unsafe { std::env::set_var(&k, &v) }; + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn key() -> ResolvedKey { + ResolvedKey { value: "sk-test".to_string(), source: "env".to_string() } + } + + #[test] + fn deepseek_gets_bypass() { + let cfg = AppConfig::default(); // backend = deepseek + let env = compute_daemon_bypass(&key(), &cfg); + assert_eq!(env.get("ANTHROPIC_AUTH_TOKEN").unwrap(), "sk-test"); + assert_eq!(env.get("CLAUDE_CODE_SIMPLE").unwrap(), "1"); + assert_eq!(env.get("ANTHROPIC_BASE_URL").unwrap(), "https://api.deepseek.com/anthropic"); + } + + #[test] + fn anthropic_no_bypass() { + let mut cfg = AppConfig::default(); + cfg.backend.backend = "anthropic".to_string(); + let env = compute_daemon_bypass(&key(), &cfg); + assert!(!env.contains_key("ANTHROPIC_AUTH_TOKEN")); + assert!(!env.contains_key("CLAUDE_CODE_SIMPLE")); + } + + #[test] + fn custom_backend_url() { + let mut cfg = AppConfig::default(); + cfg.backend.backend = "custom".to_string(); + cfg.backend.base_url = Some("https://my.proxy/v1".to_string()); + let env = compute_daemon_bypass(&key(), &cfg); + assert_eq!(env.get("ANTHROPIC_BASE_URL").unwrap(), "https://my.proxy/v1"); + } +} diff --git a/src/auth/injector.rs b/src/auth/injector.rs new file mode 100644 index 0000000..ba1d7ce --- /dev/null +++ b/src/auth/injector.rs @@ -0,0 +1,200 @@ +//! settings.json 注入-清理: 启动前写入 API Key, 退出时恢复原状。 +//! +//! 特性: +//! - 启动前自检: 若存在上次残留的注入 Key, 先擦除再注入。 +//! - 备份原文件内容, 退出时精确恢复 (无论正常退出还是 panic)。 +//! - 安装 SIGTERM/Ctrl+C 处理器, 保证异常终止也清理。 + +use anyhow::{Context, Result}; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Arc, Mutex}; + +/// 注入到 settings.json 的 Key (避免与用户自定义 Key 冲突)。 +const INJECTED_KEY: &str = "ANTHROPIC_AUTH_TOKEN"; + +/// 全局注入状态 (供信号处理器读取)。 +struct InjectorState { + settings_path: PathBuf, + original_content: Option, + active: AtomicBool, +} + +/// 进程级单例注入状态。 +static STATE: Mutex>> = Mutex::new(None); + +/// settings.json 注入-清理上下文管理器。 +pub struct ApiKeyInjector { + settings_path: PathBuf, + original_content: Option, + started: bool, +} + +impl ApiKeyInjector { + /// 基于配置目录创建注入器。 + pub fn new(config_dir: &Path) -> Self { + Self { + settings_path: config_dir.join("settings.json"), + original_content: None, + started: false, + } + } + + /// 进入注入: 自检残留 → 备份 → 写入 → 注册信号处理器。 + pub fn start(&mut self, api_key: &str) -> Result<()> { + // 1. 自检: 清理上次残留的注入 Key + self.cleanup_stale()?; + + // 2. 备份原始内容 + let content = std::fs::read_to_string(&self.settings_path).context("read settings.json")?; + self.original_content = Some(content.clone()); + + // 3. 注入 Key + let mut settings: serde_json::Value = + serde_json::from_str(&content).unwrap_or(serde_json::json!({})); + if !settings.is_object() { + settings = serde_json::json!({}); + } + if settings.get("env").map(|e| !e.is_object()).unwrap_or(true) { + settings["env"] = serde_json::json!({}); + } + settings["env"][INJECTED_KEY] = serde_json::Value::String(api_key.to_string()); + let new_content = + serde_json::to_string_pretty(&settings).context("serialize settings.json")?; + crate::util::fs::atomic_write_str(&self.settings_path, &new_content) + .context("write injected settings.json")?; + + // 4. 注册信号处理器 + self.register_cleanup(); + self.started = true; + Ok(()) + } + + /// 清理上次运行可能残留的注入 Key。 + fn cleanup_stale(&self) -> Result<()> { + if !self.settings_path.exists() { + return Ok(()); + } + let content = std::fs::read_to_string(&self.settings_path) + .context("read settings.json for stale cleanup")?; + let mut settings: serde_json::Value = match serde_json::from_str(&content) { + Ok(v) => v, + Err(_) => return Ok(()), // 非 JSON, 跳过 + }; + if let Some(env) = settings.get_mut("env") + && env.as_object().map(|o| o.contains_key(INJECTED_KEY)).unwrap_or(false) + { + env.as_object_mut().map(|o| o.remove(INJECTED_KEY)); + let new_content = serde_json::to_string_pretty(&settings) + .context("serialize settings after stale cleanup")?; + crate::util::fs::atomic_write_str(&self.settings_path, &new_content) + .context("write cleaned settings.json")?; + } + Ok(()) + } + + /// 注册 SIGTERM/Ctrl+C 处理器: 退出前恢复原文件。 + fn register_cleanup(&self) { + let settings_path = self.settings_path.clone(); + let original = self.original_content.clone(); + *STATE.lock().unwrap() = Some(Arc::new(InjectorState { + settings_path, + original_content: original, + active: AtomicBool::new(true), + })); + + let state = STATE.lock().unwrap().clone(); + if let Some(state) = state { + ctrlc::set_handler(move || { + restore_from_state(&state); + std::process::exit(130); + }) + .ok(); + } + } + + /// 退出清理: 恢复原始 settings.json 内容。 + pub fn stop(&mut self) { + if !self.started { + return; + } + match &self.original_content { + Some(orig) => { + let _ = crate::util::fs::atomic_write_str(&self.settings_path, orig); + } + None => { + let _ = self.cleanup_stale(); + } + } + if let Some(s) = STATE.lock().unwrap().as_ref() { + s.active.store(false, Ordering::SeqCst); + } + self.started = false; + } +} + +/// 从全局状态恢复 settings.json (供信号处理器调用)。 +fn restore_from_state(state: &InjectorState) { + if !state.active.load(Ordering::SeqCst) { + return; + } + match &state.original_content { + Some(orig) => { + let _ = crate::util::fs::atomic_write_str(&state.settings_path, orig); + } + None => { + let _ = crate::util::fs::remove_if_exists(&state.settings_path); + } + } +} + +/// 全局恢复入口 (供正常退出路径兜底)。 +pub fn global_restore() { + if let Ok(guard) = STATE.lock() + && let Some(s) = guard.as_ref() + { + restore_from_state(s); + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn inject_and_restore() { + let dir = tempfile::tempdir().unwrap(); + let settings = dir.path().join("settings.json"); + let original = r#"{"env":{"MY_VAR":"x"},"theme":"dark"}"#; + std::fs::write(&settings, original).unwrap(); + + let mut inj = ApiKeyInjector::new(dir.path()); + inj.start("sk-test").unwrap(); + + let after = std::fs::read_to_string(&settings).unwrap(); + assert!(after.contains("sk-test")); + assert!(after.contains(INJECTED_KEY)); + + inj.stop(); + let restored = std::fs::read_to_string(&settings).unwrap(); + let orig_v: serde_json::Value = serde_json::from_str(original).unwrap(); + let rest_v: serde_json::Value = serde_json::from_str(&restored).unwrap(); + assert_eq!(orig_v, rest_v); + assert!(!restored.contains("sk-test")); + } + + #[test] + fn stale_key_cleaned_on_start() { + let dir = tempfile::tempdir().unwrap(); + let settings = dir.path().join("settings.json"); + let stale = format!(r#"{{"env":{{"{}":"stale-token"}}}}"#, INJECTED_KEY); + std::fs::write(&settings, &stale).unwrap(); + + let mut inj = ApiKeyInjector::new(dir.path()); + inj.start("new-token").unwrap(); + let after = std::fs::read_to_string(&settings).unwrap(); + assert!(after.contains("new-token")); + assert!(!after.contains("stale-token")); + inj.stop(); + } +} diff --git a/src/auth/key_manager.rs b/src/auth/key_manager.rs new file mode 100644 index 0000000..42f1647 --- /dev/null +++ b/src/auth/key_manager.rs @@ -0,0 +1,170 @@ +//! API Key 多源查找: CLI -k > 环境变量 > keyring > .api_key 文件。 + +use crate::config::AppConfig; +use crate::util::paths; +use std::path::PathBuf; + +/// API Key 解析结果。 +#[derive(Debug, Clone)] +pub struct ResolvedKey { + /// 明文 Key。 + pub value: String, + /// 来源描述 (用于日志)。 + pub source: String, +} + +/// 多源解析 API Key。 +/// +/// 优先级: +/// 1. 显式 `-k` 参数 +/// 2. 配置 `api_key_source` 指定: +/// - `env:VAR` 从环境变量读取 +/// - `file:path` 从配置文件同目录下文件读取 +/// - `keyring` 从系统凭据管理器读取 +/// 3. 通用环境变量 (`ANTHROPIC_API_KEY` / `DEEPSEEK_API_KEY`) +/// 4. 配置文件同目录的 `.api_key` 文件 +pub fn resolve_api_key( + config: &AppConfig, + cli_key: Option<&str>, + config_dir: Option<&std::path::Path>, +) -> Option { + // 1. CLI 显式 + if let Some(k) = cli_key + && !k.is_empty() + { + return Some(ResolvedKey { value: k.to_string(), source: "cli".to_string() }); + } + + // 2. 配置指定的来源 + let source_spec = config.backend.api_key_source.clone(); + if let Some(key) = resolve_spec(&source_spec, config_dir) { + return Some(key); + } + + // 3. 通用环境变量 + for var in ["ANTHROPIC_API_KEY", "DEEPSEEK_API_KEY"] { + if let Ok(v) = std::env::var(var) + && !v.is_empty() + { + return Some(ResolvedKey { value: v, source: format!("env:{var}") }); + } + } + + // 4. .api_key 文件 (配置目录) + let base = config_dir.map(std::path::Path::to_path_buf).unwrap_or_else(paths::config_dir); + let f = base.join(".api_key"); + if let Ok(contents) = std::fs::read_to_string(&f) { + let trimmed = contents.trim().to_string(); + if !trimmed.is_empty() { + return Some(ResolvedKey { value: trimmed, source: format!("file:{}", f.display()) }); + } + } + + None +} + +/// 解析单个来源说明 (env:VAR | file:path | keyring)。 +fn resolve_spec(spec: &str, config_dir: Option<&std::path::Path>) -> Option { + if spec.is_empty() { + return None; + } + if let Some(var) = spec.strip_prefix("env:") { + if let Ok(v) = std::env::var(var) + && !v.is_empty() + { + return Some(ResolvedKey { value: v, source: format!("env:{var}") }); + } + return None; + } + if let Some(rel) = spec.strip_prefix("file:") { + let base = config_dir.map(std::path::Path::to_path_buf).unwrap_or_else(paths::config_dir); + let f = if std::path::Path::new(rel).is_absolute() { + PathBuf::from(rel) + } else { + base.join(rel) + }; + if let Ok(contents) = std::fs::read_to_string(&f) { + let trimmed = contents.trim().to_string(); + if !trimmed.is_empty() { + return Some(ResolvedKey { + value: trimmed, + source: format!("file:{}", f.display()), + }); + } + } + return None; + } + if spec == "keyring" { + return keyring_lookup(); + } + None +} + +/// 从系统凭据管理器读取。失败静默返回 None。 +fn keyring_lookup() -> Option { + let entry = keyring::Entry::new("cc-launcher", "anthropic-api-key").ok()?; + entry.get_password().ok().map(|v| ResolvedKey { value: v, source: "keyring".to_string() }) +} + +/// 存储 API Key 到 keyring (失败时回退 .api_key 文件)。 +pub fn store_api_key(config: &AppConfig, key: &str) -> Result<(), String> { + if let Ok(entry) = keyring::Entry::new("cc-launcher", "anthropic-api-key") + && entry.set_password(key).is_ok() + { + return Ok(()); + } + let dir = paths::config_dir(); + std::fs::create_dir_all(&dir).map_err(|e| e.to_string())?; + let f = dir.join(".api_key"); + std::fs::write(&f, key).map_err(|e| e.to_string())?; + let _ = config; + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + use serial_test::serial; + + #[test] + #[serial(env)] + fn cli_key_highest_priority() { + let cfg = AppConfig::default(); + let r = resolve_api_key(&cfg, Some("cli-key"), None); + assert_eq!(r.unwrap().source, "cli"); + } + + #[test] + #[serial(env)] + fn env_source_spec() { + let mut cfg = AppConfig::default(); + cfg.backend.api_key_source = "env:CCL_TEST_KEY".to_string(); + unsafe { std::env::set_var("CCL_TEST_KEY", "env-value") }; + let r = resolve_api_key(&cfg, None, None); + assert_eq!(r.unwrap().value, "env-value"); + unsafe { std::env::remove_var("CCL_TEST_KEY") }; + } + + #[test] + #[serial(env)] + fn common_env_fallback() { + let mut cfg = AppConfig::default(); + cfg.backend.api_key_source = "env:CCL_NO_SUCH_KEY".to_string(); + // 清空系统可能已有的通用变量, 确保只命中测试值 + unsafe { std::env::remove_var("ANTHROPIC_API_KEY") }; + unsafe { std::env::set_var("DEEPSEEK_API_KEY", "deepseek-value") }; + let r = resolve_api_key(&cfg, None, None); + assert_eq!(r.unwrap().value, "deepseek-value"); + unsafe { std::env::remove_var("DEEPSEEK_API_KEY") }; + } + + #[test] + #[serial(env)] + fn none_when_all_missing() { + let mut cfg = AppConfig::default(); + cfg.backend.api_key_source = "env:CCL_NO_SUCH_KEY".to_string(); + unsafe { std::env::remove_var("ANTHROPIC_API_KEY") }; + unsafe { std::env::remove_var("DEEPSEEK_API_KEY") }; + assert!(resolve_api_key(&cfg, None, None).is_none()); + } +} diff --git a/src/auth/mod.rs b/src/auth/mod.rs new file mode 100644 index 0000000..00070fe --- /dev/null +++ b/src/auth/mod.rs @@ -0,0 +1,9 @@ +//! 认证: API Key 多源查找、Daemon OAuth 绕过、settings.json 注入-清理。 + +pub mod daemon_bypass; +pub mod injector; +pub mod key_manager; + +pub use daemon_bypass::{backend_base_url, compute_daemon_bypass, setup_daemon_bypass}; +pub use injector::{ApiKeyInjector, global_restore}; +pub use key_manager::{ResolvedKey, resolve_api_key, store_api_key}; diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..8a9ad54 --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,184 @@ +//! CLI 参数定义 (clap derive)。帮助文本中英双语。 +//! +//! 子命令分组: 无子命令 = 启动 CC; 有子命令 = 管理操作。 + +use clap::{Args, Parser, Subcommand, ValueEnum}; +use std::path::PathBuf; + +/// Claude Code 配置驱动启动器: 多源更新、自愈修复、环境注入、国际化 +/// / Config-driven launcher for Claude Code: updates, repair, env, I18N +#[derive(Parser, Debug)] +#[command( + name = "cc-launcher", + version, + about = "Claude Code 配置驱动启动器 | Config-driven CC launcher", + long_about = None, + propagate_version = true +)] +pub struct Cli { + /// 全局选项 / Global options + #[command(flatten)] + pub global: GlobalArgs, + + /// 启动选项 (无子命令时生效) / Launch options (used when no subcommand) + #[command(flatten)] + pub launch: LaunchArgs, + + /// 透传给 CC 的参数 (位于 `--` 之后) / Args passed through to CC (after `--`) + #[arg(trailing_var_arg = true, allow_hyphen_values = true, hide = true)] + pub passthru: Vec, + + /// 管理子命令 / Management subcommands + #[command(subcommand)] + pub command: Option, +} + +/// 全局选项 / Global options +#[derive(Args, Debug, Default)] +pub struct GlobalArgs { + /// 指定配置文件路径 (默认 config/config.toml) + /// / Path to config file (default: config/config.toml) + #[arg(short = 'c', long = "config", global = true)] + pub config: Option, + + /// 激活命名配置预设 / Activate a named profile + #[arg(short = 'p', long = "profile", global = true)] + pub profile: Option, + + /// 详细输出 (等价日志级别 debug) + /// / Verbose output (equivalent to log level debug) + #[arg(short = 'v', long = "verbose", global = true)] + pub verbose: bool, + + /// 强制界面语言 (zh-CN | en-US | auto) + /// / Force UI language (zh-CN | en-US | auto) + #[arg(short = 'L', long = "lang", global = true)] + pub lang: Option, +} + +/// 启动选项 / Launch options +#[derive(Args, Debug, Default)] +pub struct LaunchArgs { + /// 覆盖 AI 模型 / Override AI model + #[arg(short = 'm', long = "model")] + pub model: Option, + + /// 临时指定 API Key (最高优先级, 退出后不保留) + /// / Temporarily set API key (highest priority, not persisted) + #[arg(short = 'k', long = "api-key")] + pub api_key: Option, + + /// 指定工作目录 / Working directory + #[arg(short = 'd', long = "dir")] + pub dir: Option, + + /// 设置 Effort 等级 (low|medium|high|xhigh) + /// / Set effort level (low|medium|high|xhigh) + #[arg(short = 'e', long = "effort")] + pub effort: Option, + + /// 在新窗口中运行 CC / Run CC in a separate window + #[arg(long = "separate-window")] + pub separate_window: bool, + + /// 启动前检查策略: prompt|notify|auto|off + /// / Pre-launch check strategy: prompt|notify|auto|off + #[arg(long = "pre-launch")] + pub pre_launch: Option, + + /// 跳过所有启动前检查 / Skip all pre-launch checks + #[arg(short = 's', long = "skip-check")] + pub skip_check: bool, + + /// 预览模式 (解析配置但不启动) / Preview mode (parse config, don't launch) + #[arg(short = 'n', long = "dry-run")] + pub dry_run: bool, + + /// 初始化项目 (透传 CC --init) / Init project (passthrough CC --init) + #[arg(long = "init")] + pub init: bool, +} + +/// 补全目标 Shell +#[derive(ValueEnum, Debug, Clone, Copy, PartialEq, Eq)] +pub enum Shell { + Bash, + Zsh, + Fish, + Powershell, + Elvish, +} + +/// 管理子命令 / Management subcommands +#[derive(Subcommand, Debug)] +pub enum Command { + /// 升级/安装 Claude Code / Upgrade or install Claude Code + Update { + /// 安装指定版本 (如 2.1.220) / Install specific version (e.g. 2.1.220) + #[arg(long = "version")] + version: Option, + + /// 使用本地 zip 安装 / Install from a local zip file + #[arg(long = "file")] + file: Option, + + /// 强制更新源: native|github|mirror + /// / Force update source: native|github|mirror + #[arg(long = "source")] + source: Option, + }, + + /// 修复 CC 二进制 / Repair CC binary + Repair { + /// 使用本地 zip 修复 / Repair from a local zip file + #[arg(long = "file")] + file: Option, + }, + + /// 回退到上一个版本 / Roll back to previous version + Rollback, + + /// 全面诊断检查 / Full diagnostic check + Check, + + /// 环境诊断 (check 别名) / Environment diagnostic (alias of check) + Doctor, + + /// 清理缓存和会话数据 / Clear cache and session data + Reset { + /// 跳过确认提示 / Skip confirmation prompt + #[arg(long = "force", short = 'f')] + force: bool, + }, + + /// 显示 CC 环境变量 / Show CC environment variables + Env, + + /// 查看启动器日志 / View launcher logs + Logs { + /// 显示最后 N 行 (默认 20) / Show last N lines (default 20) + #[arg(long = "lines", default_value = "20")] + lines: usize, + }, + + /// 显示配置和路径信息 / Show config paths + #[command(name = "config-path")] + ConfigPath, + + /// 生成 Shell 补全脚本 / Generate shell completions + Completions { + /// bash | zsh | fish | powershell | elvish + #[arg(value_enum)] + shell: Shell, + }, + + /// 启动 TUI 仪表盘 / Launch TUI dashboard + Tui { + /// 初始面板: overview|download|diagnostics|logs + #[arg(default_value = "overview")] + tab: String, + }, + + /// 启动 GUI / Launch GUI + Gui, +} diff --git a/src/commands.rs b/src/commands.rs new file mode 100644 index 0000000..4b5ad4d --- /dev/null +++ b/src/commands.rs @@ -0,0 +1,119 @@ +//! 子命令与启动路由。 +//! +//! Phase 1 骨架: dry-run / check / doctor 可用, 其余子命令在 Phase 8 完善。 + +use cc_launcher::cli::{Cli, Command}; +use cc_launcher::config::AppConfig; +use cc_launcher::i18n::I18n; +use cc_launcher::util::paths; +use std::path::PathBuf; + +/// 默认启动路径 (无子命令时)。 +pub fn run_launch(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result { + if cli.launch.dry_run { + return dry_run(cli, config, i18n); + } + + // 1. 启动前检查 (根据策略 prompt/notify/auto/off) + let status = cc_launcher::launch::preflight::check_binary_health( + &cc_launcher::launch::resolve_exe(config), + ); + let binary_ok = status == cc_launcher::launch::PreflightStatus::Ok; + match status { + cc_launcher::launch::PreflightStatus::Ok => { + tracing::info!("二进制正常 | binary OK"); + } + cc_launcher::launch::PreflightStatus::Missing => { + println!(" [FAIL] {}", i18n.t("launch.binary_not_found")); + } + _ => { + println!(" [WARN] {}", i18n.t("launch.binary_damaged")); + } + } + + let skip_checks = cli.launch.skip_check || cli.launch.pre_launch.as_deref() == Some("off"); + if !binary_ok && !skip_checks { + anyhow::bail!("CC 二进制不可用, 请运行 `cc-launcher repair`"); + } + + // 2. 执行完整启动 (env + auth + spawn + wait) + let exit_code = cc_launcher::launch::launch_cc(config, cli, |_| {})?; + Ok(exit_code as u8) +} + +/// 子命令路由。 +pub fn run_subcommand( + cli: &Cli, + cmd: &Command, + config: &AppConfig, + i18n: &I18n, +) -> anyhow::Result { + match cmd { + Command::Check | Command::Doctor => run_check(cli, config, i18n), + Command::Reset { .. } => Err(not_impl("reset")), + Command::Env => Err(not_impl("env")), + Command::Logs { .. } => Err(not_impl("logs")), + Command::ConfigPath => Err(not_impl("config-path")), + Command::Update { .. } => Err(not_impl("update")), + Command::Repair { .. } => Err(not_impl("repair")), + Command::Rollback => Err(not_impl("rollback")), + Command::Completions { .. } => Err(not_impl("completions")), + Command::Tui { .. } => Err(not_impl("tui")), + Command::Gui => Err(not_impl("gui")), + } +} + +fn not_impl(name: &str) -> anyhow::Error { + anyhow::anyhow!( + "子命令 {name} 尚未实现 (Phase 8) | subcommand {name} not yet implemented (Phase 8)" + ) +} + +/// 预览模式: 打印将要执行的操作。 +fn dry_run(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result { + println!("{}", i18n.t("launch.dry_run_banner")); + let exe = config.paths.cc_exe.clone().unwrap_or_else(|| "auto-detect".to_string()); + println!("{}", i18n.tr("launch.dry_run_exe", &[("exe", &exe)])); + println!("{}", i18n.tr("launch.dry_run_backend", &[("backend", &config.backend.backend)])); + let model = &config.backend.models.default; + println!("{}", i18n.tr("launch.dry_run_model", &[("model", model)])); + let dir = cli.launch.dir.clone().unwrap_or_else(|| PathBuf::from(".")).display().to_string(); + println!("{}", i18n.tr("launch.dry_run_workdir", &[("dir", &dir)])); + let count = config.env.len().to_string(); + println!("{}", i18n.tr("launch.dry_run_env_count", &[("count", &count)])); + if !cli.passthru.is_empty() { + let args = cli.passthru.join(" "); + println!("{}", i18n.tr("launch.dry_run_cc_args", &[("args", &args)])); + } + Ok(0) +} + +/// 全面诊断检查 (Phase 1 最小实现: 配置 + 路径)。 +fn run_check(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result { + println!("{}", i18n.t("check.title")); + match cc_launcher::config::loader::validate(config) { + Ok(()) => println!(" [OK] {}", i18n.t("check.config_valid")), + Err(e) => { + println!(" [FAIL] {}", i18n.tr("check.config_invalid", &[("error", &e)])); + return Ok(1); + } + } + let paths_list = [("config", paths::config_file()), ("logs", paths::logs_dir())]; + for (name, p) in &paths_list { + let status = if p.exists() { + i18n.t("config_path.status_ok") + } else { + i18n.t("config_path.status_missing") + }; + println!(" [{}] {}: {}", status, name, p.display()); + } + let src = cli + .global + .config + .as_ref() + .map(|p| p.display().to_string()) + .unwrap_or_else(|| "(default)".to_string()); + println!(" 配置文件 | config file: {}", src); + let _ = config; + Ok(0) +} diff --git a/src/config/loader.rs b/src/config/loader.rs new file mode 100644 index 0000000..fc1664d --- /dev/null +++ b/src/config/loader.rs @@ -0,0 +1,228 @@ +//! 配置加载: 路径查找、模板自动生成、解析、校验、Profile 应用。 + +use super::profiles; +use super::schema::AppConfig; +use crate::util::paths; +use anyhow::{Context, Result}; +use std::fs; +use std::path::{Path, PathBuf}; +use thiserror::Error; + +/// 配置相关错误。 +#[derive(Debug, Error)] +pub enum ConfigError { + #[error("配置解析失败 {path}: {source}")] + Parse { path: PathBuf, source: toml::de::Error }, + #[error("配置校验失败: {0}")] + Validation(String), + #[error("未知的 profile: {0}")] + UnknownProfile(String), +} + +/// 加载选项。 +#[derive(Debug, Clone)] +pub struct LoadOptions { + /// 显式配置文件路径 (来自 `-c/--config`)。None = 使用默认位置。 + pub config_path: Option, + /// 要应用的 profile 名称 (来自 `-p/--profile`)。 + pub profile: Option, + /// 是否自动创建缺失的模板文件。默认 true。 + pub create_if_missing: bool, +} + +impl Default for LoadOptions { + fn default() -> Self { + Self { config_path: None, profile: None, create_if_missing: true } + } +} + +impl LoadOptions { + pub fn new() -> Self { + Self::default() + } +} + +/// 解析配置目录 (settings.json 所在): 配置 > 默认 `config/`。 +pub fn resolve_config_dir(config: &AppConfig) -> PathBuf { + if let Some(d) = &config.paths.config_dir + && !d.is_empty() + { + return crate::util::paths::resolve_path(d); + } + crate::util::paths::config_dir() +} + +/// 解析配置文件路径: 显式 > 环境变量 `CCL_CONFIG` > 默认 `config/config.toml`。 +pub fn resolve_config_path(explicit: Option<&Path>) -> PathBuf { + if let Some(p) = explicit { + return p.to_path_buf(); + } + if let Ok(p) = std::env::var("CCL_CONFIG") + && !p.is_empty() + { + return PathBuf::from(p); + } + paths::config_file() +} + +/// 加载配置。首次运行自动生成全注释模板文件 (不包含默认值)。 +pub fn load_config(options: &LoadOptions) -> Result { + let path = resolve_config_path(options.config_path.as_deref()); + + if !path.exists() && options.create_if_missing { + ensure_template(&path).context("generate config template")?; + } + + let mut config = if path.exists() { parse_config_file(&path)? } else { AppConfig::default() }; + + validate(&config).map_err(ConfigError::Validation).context("config validation")?; + + if let Some(profile) = &options.profile { + config = profiles::apply_profile(config, profile).map_err(ConfigError::UnknownProfile)? + } + + Ok(config) +} + +/// 解析单个配置文件为 AppConfig (缺失字段由 serde 默认补齐)。 +fn parse_config_file(path: &Path) -> Result { + let content = + fs::read_to_string(path).with_context(|| format!("read config file {}", path.display()))?; + toml::from_str::(&content) + .map_err(|source| ConfigError::Parse { path: path.to_path_buf(), source }) + .context("parse config") +} + +/// 若配置文件不存在, 复制内嵌模板并创建目录。 +fn ensure_template(path: &Path) -> Result<()> { + if let Some(parent) = path.parent() { + fs::create_dir_all(parent) + .with_context(|| format!("create config dir {}", parent.display()))?; + } + let template = include_str!("template.toml"); + fs::write(path, template) + .with_context(|| format!("write config template {}", path.display()))?; + Ok(()) +} + +/// 配置校验: 检查非法值/越界, 返回首个错误描述。 +pub fn validate(config: &AppConfig) -> std::result::Result<(), String> { + if config.update.max_threads == 0 { + return Err("update.max_threads 必须 >= 1".into()); + } + if config.update.chunk_size == 0 { + return Err("update.chunk_size 必须 >= 1".into()); + } + if config.update.connect_timeout_secs == 0 { + return Err("update.connect_timeout_secs 必须 >= 1".into()); + } + if config.update.retry_count == 0 { + return Err("update.retry_count 必须 >= 1".into()); + } + if config.repair.backoff_multiplier < 1.0 { + return Err("repair.backoff_multiplier 必须 >= 1.0".into()); + } + if config.repair.grace_period_secs == 0 { + return Err("repair.grace_period_secs 必须 >= 1".into()); + } + if config.logging.retention_days == 0 { + return Err("logging.retention_days 必须 >= 1".into()); + } + match config.launch.pre_launch.as_str() { + "prompt" | "notify" | "auto" | "off" => {} + other => { + return Err(format!("launch.pre_launch 非法值: {other} (应为 prompt/notify/auto/off)")); + } + } + match config.update.strategy.as_str() { + "auto" | "native-only" | "github-only" | "mirror-first" => {} + other => { + return Err(format!( + "update.strategy 非法值: {other} (应为 auto/native-only/github-only/mirror-first)" + )); + } + } + match config.backend.backend.as_str() { + "deepseek" | "anthropic" | "openai" | "custom" => {} + other => { + return Err(format!( + "backend.backend 非法值: {other} (应为 deepseek/anthropic/openai/custom)" + )); + } + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + use std::io::Write; + + fn write_cfg(dir: &Path, content: &str) -> PathBuf { + let p = dir.join("config.toml"); + let mut f = fs::File::create(&p).unwrap(); + f.write_all(content.as_bytes()).unwrap(); + p + } + + #[test] + fn load_without_file_uses_defaults() { + let dir = tempfile::tempdir().unwrap(); + let opts = LoadOptions { + config_path: Some(dir.path().join("nonexistent.toml")), + create_if_missing: false, + ..LoadOptions::new() + }; + let cfg = load_config(&opts).unwrap(); + assert_eq!(cfg.backend.backend, "deepseek"); + assert_eq!(cfg.update.max_threads, 8); + } + + #[test] + fn create_template_on_first_run() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("config.toml"); + let opts = LoadOptions { config_path: Some(path.clone()), ..LoadOptions::new() }; + let _cfg = load_config(&opts).unwrap(); + assert!(path.exists()); + let content = fs::read_to_string(&path).unwrap(); + assert!(content.contains("[i18n]")); + } + + #[test] + fn parse_valid_toml_overrides_defaults() { + let dir = tempfile::tempdir().unwrap(); + let path = write_cfg( + dir.path(), + "[update]\nmax_threads = 16\n[backend]\nbackend = \"anthropic\"\n", + ); + let cfg = parse_config_file(&path).unwrap(); + assert_eq!(cfg.update.max_threads, 16); + assert_eq!(cfg.backend.backend, "anthropic"); + assert_eq!(cfg.update.chunk_size, 8 * 1024 * 1024); + } + + #[test] + fn invalid_toml_reports_error() { + let dir = tempfile::tempdir().unwrap(); + let path = write_cfg(dir.path(), "not valid toml [[["); + let err = parse_config_file(&path); + assert!(err.is_err()); + } + + #[test] + fn validation_rejects_zero_threads() { + let dir = tempfile::tempdir().unwrap(); + let path = write_cfg(dir.path(), "[update]\nmax_threads = 0\n"); + let cfg = parse_config_file(&path).unwrap(); + assert!(validate(&cfg).is_err()); + } + + #[test] + fn validation_rejects_bad_pre_launch() { + let dir = tempfile::tempdir().unwrap(); + let path = write_cfg(dir.path(), "[launch]\npre_launch = \"bogus\"\n"); + let cfg = parse_config_file(&path).unwrap(); + assert!(validate(&cfg).is_err()); + } +} diff --git a/src/config/mod.rs b/src/config/mod.rs new file mode 100644 index 0000000..004b1fb --- /dev/null +++ b/src/config/mod.rs @@ -0,0 +1,11 @@ +//! 配置系统: schema、加载、校验、Profile。 +//! +//! 设计目标: 零硬编码, 所有可配置值从 `config/config.toml` 读取, +//! 缺省时使用代码内置默认值。首次运行自动创建全部为注释的模板文件。 + +pub mod loader; +pub mod profiles; +pub mod schema; + +pub use loader::{ConfigError, LoadOptions, load_config, resolve_config_dir, resolve_config_path}; +pub use schema::*; diff --git a/src/config/profiles.rs b/src/config/profiles.rs new file mode 100644 index 0000000..d4108f6 --- /dev/null +++ b/src/config/profiles.rs @@ -0,0 +1,68 @@ +//! 命名配置预设 (Profile) 应用。 + +use super::schema::{AppConfig, ProfileConfig}; + +/// 将命名 profile 覆盖到全局配置上。 +/// +/// 只覆盖 profile 中明确写出的字段, 未写出的继承全局配置。 +pub fn apply_profile(mut config: AppConfig, name: &str) -> Result { + let profile = + config.profiles.get(name).cloned().ok_or_else(|| format!("未知的 profile: {name}"))?; + apply_profile_config(&mut config, &profile); + Ok(config) +} + +/// 应用单个 ProfileConfig 的字段覆盖。 +pub fn apply_profile_config(config: &mut AppConfig, profile: &ProfileConfig) { + if let Some(backend) = &profile.backend { + config.backend.backend = backend.clone(); + } + if let Some(model) = &profile.model { + config.backend.models.default = model.clone(); + } + if let Some(launch) = &profile.launch { + config.launch = launch.clone(); + } + for (k, v) in &profile.env { + config.env.insert(k.clone(), v.clone()); + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::collections::HashMap; + + fn quick_profile(backend: &str, model: Option<&str>) -> ProfileConfig { + ProfileConfig { + backend: Some(backend.to_string()), + model: model.map(|m| m.to_string()), + launch: None, + env: HashMap::new(), + } + } + + #[test] + fn apply_overrides_backend_and_model() { + let mut cfg = AppConfig::default(); + let prof = quick_profile("openai", Some("gpt-4")); + apply_profile_config(&mut cfg, &prof); + assert_eq!(cfg.backend.backend, "openai"); + assert_eq!(cfg.backend.models.default, "gpt-4"); + } + + #[test] + fn apply_unknown_profile_errors() { + let cfg = AppConfig::default(); + assert!(apply_profile(cfg, "nope").is_err()); + } + + #[test] + fn apply_keeps_unset_fields() { + let mut cfg = AppConfig::default(); + let prof = quick_profile("openai", None); + apply_profile_config(&mut cfg, &prof); + assert_eq!(cfg.backend.models.default, "deepseek-v4-pro[1m]"); + assert_eq!(cfg.update.max_threads, 8); + } +} diff --git a/src/config/schema.rs b/src/config/schema.rs new file mode 100644 index 0000000..d9810fa --- /dev/null +++ b/src/config/schema.rs @@ -0,0 +1,501 @@ +//! 配置结构定义 (serde 反序列化目标) 与内置默认值。 + +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// 平台检测结果。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Platform { + Windows, + MacOs, + Linux, + Other, +} + +impl Platform { + /// 从编译目标推导当前平台。 + pub fn current() -> Self { + #[cfg(target_os = "windows")] + { + Platform::Windows + } + #[cfg(target_os = "macos")] + { + Platform::MacOs + } + #[cfg(target_os = "linux")] + { + Platform::Linux + } + #[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))] + { + Platform::Other + } + } + + /// 该平台对应的 GitHub Release 资源文件名 (内置默认, 可被配置覆盖)。 + pub fn default_asset_name(self) -> &'static str { + match self { + Platform::Windows => "claude-win32-x64.zip", + Platform::MacOs => "claude-darwin-arm64.zip", + Platform::Linux => "claude-linux-x64.tar.gz", + Platform::Other => "claude", + } + } +} + +/// 顶层应用配置。 +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +pub struct AppConfig { + #[serde(default)] + pub i18n: I18nConfig, + #[serde(default)] + pub paths: PathsConfig, + #[serde(default)] + pub backend: BackendConfig, + #[serde(default)] + pub env: HashMap, + #[serde(default)] + pub launch: LaunchConfig, + #[serde(default)] + pub update: UpdateConfig, + #[serde(default)] + pub channels: Vec, + #[serde(default)] + pub geo: GeoConfig, + #[serde(default)] + pub repair: RepairConfig, + #[serde(default)] + pub logging: LoggingConfig, + #[serde(default)] + pub plugins: PluginsConfig, + #[serde(default)] + pub profiles: HashMap, +} + +/// 本地化配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct I18nConfig { + /// `auto` 跟随系统 locale; 否则为语言代码 (zh-CN / en-US)。 + #[serde(default = "default_lang")] + pub lang: String, +} + +impl Default for I18nConfig { + fn default() -> Self { + Self { lang: default_lang() } + } +} + +fn default_lang() -> String { + "auto".to_string() +} + +/// 路径配置。 +#[derive(Debug, Clone, Deserialize, Serialize, Default)] +pub struct PathsConfig { + /// CC 可执行文件路径。空 = 自动查找。 + #[serde(default)] + pub cc_exe: Option, + /// CC 配置目录 (settings.json 等)。 + #[serde(default)] + pub config_dir: Option, + /// 插件目录。 + #[serde(default)] + pub plugins_dir: Option, + /// Skills 目录。 + #[serde(default)] + pub skills_dir: Option, + /// CC 主安装目录。 + #[serde(default)] + pub main_dir: Option, +} + +/// 后端 API 配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct BackendConfig { + /// deepseek | anthropic | openai | custom + #[serde(default = "default_backend")] + pub backend: String, + /// API 基础 URL。空 = 使用该后端默认。 + #[serde(default)] + pub base_url: Option, + /// API Key 来源: `env:VAR` | `file:path` | `keyring`。 + #[serde(default = "default_api_key_source")] + pub api_key_source: String, + #[serde(default)] + pub models: ModelsConfig, +} + +impl Default for BackendConfig { + fn default() -> Self { + Self { + backend: default_backend(), + base_url: None, + api_key_source: default_api_key_source(), + models: ModelsConfig::default(), + } + } +} + +fn default_backend() -> String { + "deepseek".to_string() +} + +fn default_api_key_source() -> String { + "env:DEEPSEEK_API_KEY".to_string() +} + +/// 各 tier 的模型标识符。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct ModelsConfig { + #[serde(default = "default_model")] + pub default: String, + #[serde(default = "default_model")] + pub opus: String, + #[serde(default = "default_model")] + pub sonnet: String, + #[serde(default = "default_haiku_model")] + pub haiku: String, + #[serde(default = "default_haiku_model")] + pub subagent: String, +} + +impl Default for ModelsConfig { + fn default() -> Self { + Self { + default: default_model(), + opus: default_model(), + sonnet: default_model(), + haiku: default_haiku_model(), + subagent: default_haiku_model(), + } + } +} + +fn default_model() -> String { + "deepseek-v4-pro[1m]".to_string() +} + +fn default_haiku_model() -> String { + "deepseek-v4-flash[1m]".to_string() +} + +/// 启动行为配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct LaunchConfig { + /// prompt | notify | auto | off + #[serde(default = "default_pre_launch")] + pub pre_launch: String, + /// 是否在新窗口运行 CC。 + #[serde(default)] + pub separate_window: bool, + /// notify 模式检查间隔 (小时)。 + #[serde(default = "default_check_interval")] + pub check_interval_hours: u32, +} + +impl Default for LaunchConfig { + fn default() -> Self { + Self { + pre_launch: default_pre_launch(), + separate_window: false, + check_interval_hours: default_check_interval(), + } + } +} + +fn default_pre_launch() -> String { + "prompt".to_string() +} + +fn default_check_interval() -> u32 { + 24 +} + +/// 更新系统配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct UpdateConfig { + /// auto | native-only | github-only | mirror-first + #[serde(default = "default_update_strategy")] + pub strategy: String, + /// 分块大小 (字节)。 + #[serde(default = "default_chunk_size")] + pub chunk_size: u64, + /// 并发下载线程数。 + #[serde(default = "default_max_threads")] + pub max_threads: usize, + /// 连接超时 (秒)。 + #[serde(default = "default_connect_timeout")] + pub connect_timeout_secs: u64, + /// 停滞超时 (秒)。 + #[serde(default = "default_stall_timeout")] + pub stall_timeout_secs: u64, + /// 总超时 (秒)。 + #[serde(default = "default_total_timeout")] + pub total_timeout_secs: u64, + /// 每分块重试次数。 + #[serde(default = "default_retry_count")] + pub retry_count: u32, + /// 跨通道重试基础延迟 (毫秒)。 + #[serde(default = "default_retry_delay")] + pub retry_base_delay_ms: u64, + /// 下载地址模板 (${version}, ${asset})。 + #[serde(default = "default_download_template")] + pub download_url_template: String, + /// 版本检查 API URL。 + #[serde(default = "default_version_check_url")] + pub version_check_url: String, + /// 保留的历史版本数 (回滚)。 + #[serde(default = "default_keep_versions")] + pub keep_versions: usize, +} + +impl Default for UpdateConfig { + fn default() -> Self { + Self { + strategy: default_update_strategy(), + chunk_size: default_chunk_size(), + max_threads: default_max_threads(), + connect_timeout_secs: default_connect_timeout(), + stall_timeout_secs: default_stall_timeout(), + total_timeout_secs: default_total_timeout(), + retry_count: default_retry_count(), + retry_base_delay_ms: default_retry_delay(), + download_url_template: default_download_template(), + version_check_url: default_version_check_url(), + keep_versions: default_keep_versions(), + } + } +} + +fn default_update_strategy() -> String { + "auto".to_string() +} +fn default_chunk_size() -> u64 { + 8 * 1024 * 1024 +} +fn default_max_threads() -> usize { + 8 +} +fn default_connect_timeout() -> u64 { + 10 +} +fn default_stall_timeout() -> u64 { + 20 +} +fn default_total_timeout() -> u64 { + 600 +} +fn default_retry_count() -> u32 { + 3 +} +fn default_retry_delay() -> u64 { + 1000 +} +fn default_download_template() -> String { + "https://github.com/anthropics/claude-code/releases/download/v${version}/${asset}".to_string() +} +fn default_version_check_url() -> String { + "https://api.github.com/repos/anthropics/claude-code/releases/latest".to_string() +} +fn default_keep_versions() -> usize { + 3 +} + +/// 下载通道配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct ChannelConfig { + /// 代理/镜像 URL。空 = 直连。 + #[serde(default)] + pub url: String, + /// 环境检测匹配标签 (如 `cn-optimized`)。 + #[serde(default)] + pub tags: Vec, + /// 优先级 (越小越先尝试)。 + #[serde(default)] + pub priority: u32, +} + +/// 环境检测配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct GeoConfig { + /// 是否启用自动环境检测。 + #[serde(default = "default_true")] + pub enabled: bool, + /// 手动强制通道标签 (空 = 自动检测)。 + #[serde(default)] + pub force_tag: String, +} + +impl Default for GeoConfig { + fn default() -> Self { + Self { enabled: default_true(), force_tag: String::new() } + } +} + +fn default_true() -> bool { + true +} + +/// 修复系统配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct RepairConfig { + /// 崩溃检测宽限期 (秒)。运行少于此时长退出 = 异常。 + #[serde(default = "default_grace_period")] + pub grace_period_secs: u32, + /// 最大自动修复重试次数。 + #[serde(default = "default_max_retries")] + pub max_retries: u32, + /// 指数退避乘数。 + #[serde(default = "default_backoff_multiplier")] + pub backoff_multiplier: f64, + /// 熔断器打开阈值 (连续失败次数)。 + #[serde(default = "default_circuit_threshold")] + pub circuit_breaker_threshold: u32, + /// 熔断器自动重置时间 (秒)。 + #[serde(default = "default_circuit_reset")] + pub circuit_breaker_reset_secs: u64, +} + +impl Default for RepairConfig { + fn default() -> Self { + Self { + grace_period_secs: default_grace_period(), + max_retries: default_max_retries(), + backoff_multiplier: default_backoff_multiplier(), + circuit_breaker_threshold: default_circuit_threshold(), + circuit_breaker_reset_secs: default_circuit_reset(), + } + } +} + +fn default_grace_period() -> u32 { + 5 +} +fn default_max_retries() -> u32 { + 3 +} +fn default_backoff_multiplier() -> f64 { + 2.0 +} +fn default_circuit_threshold() -> u32 { + 5 +} +fn default_circuit_reset() -> u64 { + 300 +} + +/// 日志系统配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct LoggingConfig { + /// trace | debug | info | warn | error + #[serde(default = "default_log_level")] + pub level: String, + /// 日志文件保留天数。 + #[serde(default = "default_retention_days")] + pub retention_days: u32, + /// 写入日志文件。 + #[serde(default = "default_true")] + pub file_enabled: bool, + /// 终端输出。 + #[serde(default = "default_true")] + pub console_enabled: bool, +} + +impl Default for LoggingConfig { + fn default() -> Self { + Self { + level: default_log_level(), + retention_days: default_retention_days(), + file_enabled: default_true(), + console_enabled: default_true(), + } + } +} + +fn default_log_level() -> String { + "info".to_string() +} +fn default_retention_days() -> u32 { + 30 +} + +/// 插件更新配置。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct PluginsConfig { + /// git pull 更新的插件目录列表。 + #[serde(default)] + pub git_dirs: Vec, + /// 检查间隔 (秒)。0 = 每次启动。 + #[serde(default = "default_plugin_interval")] + pub check_interval_secs: u64, +} + +impl Default for PluginsConfig { + fn default() -> Self { + Self { git_dirs: Vec::new(), check_interval_secs: default_plugin_interval() } + } +} + +fn default_plugin_interval() -> u64 { + 86400 +} + +/// 命名配置预设。 +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct ProfileConfig { + /// 该预设的后端。 + #[serde(default)] + pub backend: Option, + /// 该预设的模型 (None = 使用默认模型)。 + #[serde(default)] + pub model: Option, + /// 启动行为覆盖。 + #[serde(default)] + pub launch: Option, + /// 额外环境变量覆盖。 + #[serde(default)] + pub env: HashMap, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_config_all_fields_valid() { + let cfg = AppConfig::default(); + assert_eq!(cfg.backend.backend, "deepseek"); + assert_eq!(cfg.update.max_threads, 8); + assert_eq!(cfg.update.chunk_size, 8 * 1024 * 1024); + assert_eq!(cfg.logging.retention_days, 30); + assert!(cfg.repair.max_retries >= 1); + assert!(cfg.repair.backoff_multiplier >= 1.0); + assert!(cfg.launch.check_interval_hours >= 1); + } + + #[test] + fn default_models_non_empty() { + let m = ModelsConfig::default(); + assert!(!m.default.is_empty()); + assert!(!m.haiku.is_empty()); + assert!(!m.subagent.is_empty()); + } + + #[test] + fn platform_asset_names() { + assert_eq!(Platform::Windows.default_asset_name(), "claude-win32-x64.zip"); + assert_eq!(Platform::MacOs.default_asset_name(), "claude-darwin-arm64.zip"); + assert_eq!(Platform::Linux.default_asset_name(), "claude-linux-x64.tar.gz"); + } + + #[test] + fn toml_roundtrip() { + let cfg = AppConfig::default(); + let text = toml::to_string(&cfg).unwrap(); + let parsed: AppConfig = toml::from_str(&text).unwrap(); + assert_eq!(parsed.backend.backend, cfg.backend.backend); + assert_eq!(parsed.update.max_threads, cfg.update.max_threads); + } +} diff --git a/src/config/template.toml b/src/config/template.toml new file mode 100644 index 0000000..8f80466 --- /dev/null +++ b/src/config/template.toml @@ -0,0 +1,216 @@ +# ============================================================================= +# CCL-dev 配置文件 | Configuration File +# ----------------------------------------------------------------------------- +# CN: 本文件由 cc-launcher 首次运行时自动生成。全部配置项均为注释形式, +# 程序会使用代码内置的合理默认值运行。取消注释并修改即可自定义。 +# EN: Auto-generated on first run by cc-launcher. All options are commented out; +# the program runs with sensible built-in defaults. Uncomment to customize. +# +# CN: 模板变量: ${EXE_DIR} ${APP_ROOT} ${HOME} ${USERPROFILE} ${TEMP} +# EN: Template variables: ${EXE_DIR} ${APP_ROOT} ${HOME} ${USERPROFILE} ${TEMP} +# +# CN: 配置优先级: 命令行参数 > 此配置文件 > 内置默认值 +# EN: Priority: CLI args > this file > built-in defaults +# ============================================================================= + +# ============================================================================= +# [i18n] 本地化 / Localization +# CN: 控制 CLI/TUI/GUI 的显示语言。auto = 跟随系统 locale。 +# EN: Controls display language of CLI/TUI/GUI. auto = follow system locale. +# ============================================================================= +# [i18n] +# CN: 支持值: auto | zh-CN | en-US。语言文件缺失时自动降级 en-US。 +# EN: Values: auto | zh-CN | en-US. Falls back to en-US if file missing. +# lang = "auto" + +# ============================================================================= +# [paths] 路径 / Paths +# CN: CC 相关文件和目录位置。设为 null 则自动查找。 +# EN: CC-related file/dir locations. null = auto-detect. +# ============================================================================= +# [paths] +# CN: CC 可执行文件路径 (null=自动查找常见安装位置)。 +# EN: CC executable path (null = auto-detect common locations). +# cc_exe = null +# CN: CC 配置目录 (settings.json, sessions/ 等)。 +# EN: CC config directory. +# config_dir = null +# CN: 插件目录 (MCP 服务器, 插件)。 +# EN: Plugins directory. +# plugins_dir = null +# CN: Skills 目录。 +# EN: Skills directory. +# skills_dir = null +# CN: CC 主安装目录。 +# EN: CC main installation directory. +# main_dir = null + +# ============================================================================= +# [backend] 后端 API / Backend API +# CN: CC 连接的目标 AI 服务商。 +# EN: AI provider for CC. +# ============================================================================= +# [backend] +# CN: 支持值: deepseek | anthropic | openai | custom。 +# EN: Values: deepseek | anthropic | openai | custom. +# backend = "deepseek" +# CN: API 地址。custom 时必填; 其余后端留空使用默认地址。 +# EN: API base URL. Required for custom; empty = provider default. +# base_url = "" +# CN: Key 来源格式: env:VAR | file:相对路径 | keyring。 +# EN: Key source format: env:VAR | file:rel-path | keyring. +# api_key_source = "env:DEEPSEEK_API_KEY" + +# [backend.models] +# CN: 传递给 CC 的模型标识符, 不同后端格式不同。 +# EN: Model identifiers passed to CC, format varies by provider. +# default = "" +# opus = "" +# sonnet = "" +# haiku = "" +# subagent = "" + +# ============================================================================= +# [env] 环境变量注入 / Env Injection +# CN: 启动 CC 时注入的环境变量 (键值对), 支持 ${VAR} 引用系统变量。 +# EN: Env vars injected when launching CC (key=value), ${VAR} supported. +# ============================================================================= +# [env] +# CLAUDE_LANGUAGE = "zh" +# MY_CUSTOM_VAR = "${HOME}/my-project" + +# ============================================================================= +# [launch] 启动行为 / Launch Behavior +# ============================================================================= +# [launch] +# CN: 启动前检查策略: prompt=交互确认 | notify=后台通知 | auto=自动 | off=跳过。 +# EN: Pre-launch check: prompt | notify | auto | off. +# pre_launch = "prompt" +# CN: 在新窗口运行 CC (启动器保留在当前窗口)。 +# EN: Run CC in a separate window. +# separate_window = false +# CN: notify 模式下的检查间隔 (小时)。 +# EN: Check interval in notify mode (hours). +# check_interval_hours = 24 + +# ============================================================================= +# [update] 更新系统 / Update System +# ============================================================================= +# [update] +# CN: 更新策略: auto | native-only | github-only | mirror-first。 +# EN: Update strategy: auto | native-only | github-only | mirror-first. +# strategy = "auto" +# CN: 分段下载分块大小 (字节)。 +# EN: Chunk size in bytes. +# chunk_size = 8388608 +# CN: 并发下载线程数。 +# EN: Concurrent download threads. +# max_threads = 8 +# CN: 单次连接超时 (秒)。 +# EN: Per-connection timeout (s). +# connect_timeout_secs = 10 +# CN: 下载停滞超时 (秒)。 +# EN: Stall timeout (s). +# stall_timeout_secs = 20 +# CN: 总下载超时 (秒)。 +# EN: Total download timeout (s). +# total_timeout_secs = 600 +# CN: 每分块重试次数。 +# EN: Retries per chunk. +# retry_count = 3 +# CN: 跨通道重试基础延迟 (毫秒)。 +# EN: Base retry delay (ms). +# retry_base_delay_ms = 1000 +# CN: 下载地址模板, ${version}=版本号, ${asset}=平台资源名。 +# EN: Download URL template, ${version} and ${asset} placeholders. +# download_url_template = "https://github.com/anthropics/claude-code/releases/download/v${version}/${asset}" +# CN: 版本检查 API。 +# EN: Version check API. +# version_check_url = "https://api.github.com/repos/anthropics/claude-code/releases/latest" +# CN: 保留的历史版本数 (用于回滚)。 +# EN: Historical versions to keep (for rollback). +# keep_versions = 3 + +# ============================================================================= +# [[channels]] 下载通道 / Download Channels +# CN: 按顺序尝试, 失败自动切换下一个。标签用于环境检测匹配。 +# EN: Tried in order with auto-failover. Tags used for geo-detection. +# ============================================================================= +# CN: 国内加速通道示例 / Example: CN-optimized channel +# [[channels]] +# url = "https://gh.jasonzeng.dev" +# tags = ["cn-optimized"] +# priority = 1 +# CN: 直连兜底始终存在, 无需配置。 +# EN: Direct fallback is always available, no config needed. + +# ============================================================================= +# [geo] 环境检测 / Geo Detection +# CN: 自动检测系统 locale/时区, 匹配最优下载通道。 +# EN: Auto-detect system locale/timezone for optimal channel. +# ============================================================================= +# [geo] +# enabled = true +# CN: 手动强制通道标签 (空 = 自动检测)。 +# EN: Force channel tag (empty = auto-detect). +# force_tag = "" + +# ============================================================================= +# [repair] 修复系统 / Repair System +# CN: CC 崩溃后的自动修复行为。 +# EN: Auto-repair behavior after CC crash. +# ============================================================================= +# [repair] +# CN: 崩溃宽限期 (秒), 运行少于此时长退出 = 异常。 +# EN: Crash grace period (s). +# grace_period_secs = 5 +# CN: 最大自动修复尝试次数。 +# EN: Max auto-repair attempts. +# max_retries = 3 +# CN: 指数退避乘数。 +# EN: Exponential backoff multiplier. +# backoff_multiplier = 2.0 +# CN: 熔断器打开阈值 (连续失败次数)。 +# EN: Circuit breaker threshold. +# circuit_breaker_threshold = 5 +# CN: 熔断器自动重置时间 (秒)。 +# EN: Circuit breaker reset time (s). +# circuit_breaker_reset_secs = 300 + +# ============================================================================= +# [logging] 日志 / Logging +# ============================================================================= +# [logging] +# CN: 级别: trace | debug | info | warn | error。 +# EN: Level: trace | debug | info | warn | error. +# level = "info" +# CN: 日志文件保留天数。 +# EN: Log file retention days. +# retention_days = 30 +# CN: 写入 logs/ 目录。 +# EN: Write to logs/ directory. +# file_enabled = true +# CN: 同时输出到终端 (stderr)。 +# EN: Also output to terminal (stderr). +# console_enabled = true + +# ============================================================================= +# [plugins] 插件 / Plugins +# ============================================================================= +# [plugins] +# CN: git pull 更新的插件目录列表。 +# EN: Plugin directories to git-pull. +# git_dirs = [] +# CN: 检查间隔 (秒), 0 = 每次启动。 +# EN: Check interval (s), 0 = always. +# check_interval_secs = 86400 + +# ============================================================================= +# [profiles] 预设 / Profiles +# CN: 通过 --profile <名称> 一键切换。未写出的字段继承全局。 +# EN: Switch via --profile . Unset fields inherit global. +# ============================================================================= +# [profiles.quick] +# backend = "deepseek" +# model = "deepseek-v4-flash[1m]" +# launch = { skip_checks = true } diff --git a/src/env/injector.rs b/src/env/injector.rs new file mode 100644 index 0000000..fe75f98 --- /dev/null +++ b/src/env/injector.rs @@ -0,0 +1,150 @@ +//! 环境变量注入: 优先级链 (CLI 参数 > 配置文件 > 系统环境 > 内置默认)。 + +use super::templates::expand_map; +use crate::cli::LaunchArgs; +use crate::config::AppConfig; +use std::collections::HashMap; + +/// CC 相关环境变量的来源标记。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum EnvSource { + Cli, + Config, + System, + Default, +} + +/// 环境变量管理器: 应用配置、计算最终注入集、记录来源。 +#[derive(Debug)] +pub struct EnvManager { + /// 所有待注入变量的最终值 (展开后)。 + vars: HashMap, + /// 来源标记 (用于显示)。 + sources: HashMap, +} + +impl EnvManager { + /// 从配置 + CLI 覆盖计算最终环境注入集。 + /// + /// 优先级: CLI 覆盖 > 配置 env 块 > 配置后端默认 (模型/URL) > 系统环境。 + pub fn from_config(config: &AppConfig, cli: &LaunchArgs) -> Self { + let mut vars: HashMap = HashMap::new(); + let mut sources: HashMap = HashMap::new(); + + // 1. 配置文件 env 块 (优先级较低, 会被 CLI 覆盖) + for (k, v) in expand_map(&config.env) { + vars.insert(k.clone(), v); + sources.insert(k, EnvSource::Config); + } + + // 2. 后端相关默认 (仅当未被配置覆盖时) + let model = cli.model.clone().unwrap_or_else(|| config.backend.models.default.clone()); + vars.insert("ANTHROPIC_MODEL".to_string(), model.clone()); + sources.insert("ANTHROPIC_MODEL".to_string(), EnvSource::Default); + + // 3. CLI 覆盖 (最高优先级) + if let Some(m) = &cli.model { + vars.insert("ANTHROPIC_MODEL".to_string(), m.clone()); + sources.insert("ANTHROPIC_MODEL".to_string(), EnvSource::Cli); + } + if let Some(e) = &cli.effort { + vars.insert("CLAUDE_CODE_EFFORT_LEVEL".to_string(), e.clone()); + sources.insert("CLAUDE_CODE_EFFORT_LEVEL".to_string(), EnvSource::Cli); + } + if let Some(k) = &cli.api_key { + vars.insert("ANTHROPIC_API_KEY".to_string(), k.clone()); + sources.insert("ANTHROPIC_API_KEY".to_string(), EnvSource::Cli); + } + + Self { vars, sources } + } + + /// 应用配置到当前进程环境 (会覆盖进程已有值)。 + pub fn apply(&self) { + for (k, v) in &self.vars { + unsafe { std::env::set_var(k, v) }; + } + } + + /// 待注入变量的完整映射 (key -> 已展开 value)。 + pub fn vars(&self) -> &HashMap { + &self.vars + } + + /// 单个变量的值。 + pub fn get(&self, key: &str) -> Option<&String> { + self.vars.get(key) + } + + /// 变量来源标记。 + pub fn source(&self, key: &str) -> Option { + self.sources.get(key).copied() + } + + /// 构建一个子进程使用的完整环境 (继承当前进程 + 注入集)。 + pub fn for_subprocess(&self) -> HashMap { + let mut env: HashMap = std::env::vars().collect(); + for (k, v) in &self.vars { + env.insert(k.clone(), v.clone()); + } + env + } +} + +/// 将 CLI 启动参数中的覆盖应用到已计算的环境映射上。 +pub fn apply_env_overrides(env: &mut HashMap, cli: &LaunchArgs) { + if let Some(m) = &cli.model { + env.insert("ANTHROPIC_MODEL".to_string(), m.clone()); + } + if let Some(e) = &cli.effort { + env.insert("CLAUDE_CODE_EFFORT_LEVEL".to_string(), e.clone()); + } + if let Some(k) = &cli.api_key { + env.insert("ANTHROPIC_API_KEY".to_string(), k.clone()); + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn test_config() -> AppConfig { + AppConfig::default() + } + + fn default_launch() -> LaunchArgs { + LaunchArgs::default() + } + + #[test] + fn default_model_injected() { + let m = EnvManager::from_config(&test_config(), &default_launch()); + assert!(m.get("ANTHROPIC_MODEL").is_some()); + assert_eq!(m.source("ANTHROPIC_MODEL"), Some(EnvSource::Default)); + } + + #[test] + fn cli_model_overrides() { + let mut cli = default_launch(); + cli.model = Some("gpt-4".to_string()); + let m = EnvManager::from_config(&test_config(), &cli); + assert_eq!(m.get("ANTHROPIC_MODEL").unwrap(), "gpt-4"); + assert_eq!(m.source("ANTHROPIC_MODEL"), Some(EnvSource::Cli)); + } + + #[test] + fn config_env_applied() { + let mut cfg = test_config(); + cfg.env.insert("MY_VAR".to_string(), "${APP_ROOT}/x".to_string()); + let m = EnvManager::from_config(&cfg, &default_launch()); + assert!(m.get("MY_VAR").unwrap().ends_with("/x")); + assert_eq!(m.source("MY_VAR"), Some(EnvSource::Config)); + } + + #[test] + fn for_subprocess_contains_injected() { + let m = EnvManager::from_config(&test_config(), &default_launch()); + let sub = m.for_subprocess(); + assert!(sub.contains_key("ANTHROPIC_MODEL")); + } +} diff --git a/src/env/mod.rs b/src/env/mod.rs new file mode 100644 index 0000000..d69f4a5 --- /dev/null +++ b/src/env/mod.rs @@ -0,0 +1,8 @@ +//! 环境变量管理: 注入、快照、回滚、模板替换。 + +pub mod injector; +pub mod snapshot; +pub mod templates; + +pub use injector::{EnvManager, apply_env_overrides}; +pub use snapshot::EnvSnapshot; diff --git a/src/env/snapshot.rs b/src/env/snapshot.rs new file mode 100644 index 0000000..963fcb0 --- /dev/null +++ b/src/env/snapshot.rs @@ -0,0 +1,80 @@ +//! 环境变量快照: 启动前保存当前状态, 失败/退出时恢复。 + +use std::collections::HashMap; + +/// 环境变量快照: 记录每个变量的原始值 (None = 原本未设置)。 +#[derive(Debug, Clone, Default)] +pub struct EnvSnapshot { + saved: HashMap>, +} + +impl EnvSnapshot { + /// 记录当前进程环境变量中指定键的原始值。 + pub fn capture(&mut self, keys: &[&str]) { + for &k in keys { + self.saved.insert(k.to_string(), std::env::var(k).ok()); + } + } + + /// 记录所有以指定前缀开头的环境变量。 + pub fn capture_prefix(&mut self, prefix: &str) { + for (k, _) in std::env::vars() { + if k.starts_with(prefix) && !self.saved.contains_key(&k) { + self.saved.insert(k.clone(), std::env::var(&k).ok()); + } + } + } + + /// 恢复所有已捕获变量的原始值 (移除原本未设置的, 还原原本已设置的)。 + pub fn restore(&self) { + for (k, original) in &self.saved { + match original { + Some(v) => unsafe { std::env::set_var(k, v) }, + None => unsafe { std::env::remove_var(k) }, + } + } + } + + /// 已捕获的键数量。 + pub fn len(&self) -> usize { + self.saved.len() + } + + /// 是否为空快照。 + pub fn is_empty(&self) -> bool { + self.saved.is_empty() + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serial_test::serial; + + #[test] + #[serial(env)] + fn capture_and_restore() { + let mut snap = EnvSnapshot::default(); + let test_key = "CCL_TEST_SNAP_VAR"; + unsafe { std::env::remove_var(test_key) }; + snap.capture(&[test_key]); + unsafe { std::env::set_var(test_key, "new-value") }; + assert_eq!(std::env::var(test_key).unwrap(), "new-value"); + snap.restore(); + assert!(std::env::var(test_key).is_err(), "restore should remove originally-unset var"); + unsafe { std::env::remove_var(test_key) }; + } + + #[test] + #[serial(env)] + fn restore_existing_value() { + let mut snap = EnvSnapshot::default(); + let test_key = "CCL_TEST_SNAP_VAR2"; + unsafe { std::env::set_var(test_key, "orig") }; + snap.capture(&[test_key]); + unsafe { std::env::set_var(test_key, "changed") }; + snap.restore(); + assert_eq!(std::env::var(test_key).unwrap(), "orig"); + unsafe { std::env::remove_var(test_key) }; + } +} diff --git a/src/env/templates.rs b/src/env/templates.rs new file mode 100644 index 0000000..dc98dac --- /dev/null +++ b/src/env/templates.rs @@ -0,0 +1,41 @@ +//! 环境变量模板替换: `${VAR}` 展开。 + +use crate::util::paths; +use std::collections::HashMap; + +/// 展开字符串中的 `${VAR}` 模板。 +/// +/// 支持的内置变量: `${EXE_DIR}` `${APP_ROOT}` `${HOME}`。 +/// 其余 `${X}` 从当前进程环境变量读取; 缺失时保留原样。 +pub fn expand(template: &str) -> String { + paths::expand_template(template) +} + +/// 展开一个环境变量映射的所有值 (key 不做展开)。 +pub fn expand_map(map: &HashMap) -> HashMap { + map.iter().map(|(k, v)| (k.clone(), expand(v))).collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn expand_known() { + assert!(!expand("${EXE_DIR}/x").is_empty()); + assert!(!expand("${APP_ROOT}/y").is_empty()); + } + + #[test] + fn expand_missing_preserved() { + assert_eq!(expand("${NOPE_XYZ}"), "${NOPE_XYZ}"); + } + + #[test] + fn expand_map_values() { + let mut m = HashMap::new(); + m.insert("A".to_string(), "${EXE_DIR}/bin".to_string()); + let out = expand_map(&m); + assert!(out["A"].ends_with("/bin")); + } +} diff --git a/src/i18n/loader.rs b/src/i18n/loader.rs new file mode 100644 index 0000000..3a2c876 --- /dev/null +++ b/src/i18n/loader.rs @@ -0,0 +1,153 @@ +//! 翻译加载: 将 TOML 翻译文件拍平为 `section.key -> text` 映射, +//! 提供占位符替换 (`{var}`) 的查询接口。 + +use std::collections::HashMap; + +/// 当前语言代码。支持 zh-CN / en-US。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Language { + ZhCn, + EnUs, +} + +impl Language { + /// 语言代码字符串。 + pub fn code(self) -> &'static str { + match self { + Language::ZhCn => "zh-CN", + Language::EnUs => "en-US", + } + } +} + +/// 国际化实例: 持有当前语言的字符串表。 +#[derive(Debug, Clone)] +pub struct I18n { + lang: Language, + table: HashMap, +} + +impl I18n { + /// 加载指定语言。语言文件缺失或解析失败时降级 en-US。 + pub fn load(lang: Language) -> Self { + let (table, resolved) = match lang { + Language::ZhCn => { + let parsed = parse_bundled(include_str!("../../i18n/zh-CN.toml")); + match parsed { + Ok(t) => (t, Language::ZhCn), + Err(_) => ( + parse_bundled(include_str!("../../i18n/en-US.toml")).unwrap_or_default(), + Language::EnUs, + ), + } + } + Language::EnUs => ( + parse_bundled(include_str!("../../i18n/en-US.toml")).unwrap_or_default(), + Language::EnUs, + ), + }; + Self { lang: resolved, table } + } + + /// 当前生效的语言代码。 + pub fn lang(&self) -> Language { + self.lang + } + + /// 按 `section.key` 取翻译文本。缺失 key 时返回原始 key (便于发现问题)。 + pub fn t(&self, key: &str) -> String { + self.table.get(key).cloned().unwrap_or_else(|| key.to_string()) + } + + /// 取翻译并替换 `{var}` 占位符。 + pub fn tr(&self, key: &str, vars: &[(&str, &str)]) -> String { + let mut out = self.t(key); + if vars.is_empty() { + return out; + } + for (k, v) in vars { + out = out.replace(&format!("{{{k}}}"), v); + } + out + } +} + +/// 解析 TOML 翻译内容为拍平映射。 +fn parse_bundled(content: &str) -> Result, toml::de::Error> { + let value: toml::Value = toml::from_str(content)?; + let mut map = HashMap::new(); + flatten("", &value, &mut map); + Ok(map) +} + +/// 递归拍平嵌套 table 为 `section.key` 形式。 +fn flatten(prefix: &str, value: &toml::Value, out: &mut HashMap) { + match value { + toml::Value::Table(t) => { + for (k, v) in t { + let key = if prefix.is_empty() { k.clone() } else { format!("{prefix}.{k}") }; + flatten(&key, v, out); + } + } + toml::Value::String(s) => { + out.insert(prefix.to_string(), s.clone()); + } + other => { + out.insert(prefix.to_string(), other.to_string()); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn zh_loaded() { + let i18n = I18n::load(Language::ZhCn); + assert_eq!(i18n.lang(), Language::ZhCn); + assert_eq!(i18n.t("general.ok"), "正常"); + } + + #[test] + fn en_loaded() { + let i18n = I18n::load(Language::EnUs); + assert_eq!(i18n.lang(), Language::EnUs); + assert_eq!(i18n.t("general.ok"), "OK"); + } + + #[test] + fn missing_key_returns_key() { + let i18n = I18n::load(Language::EnUs); + assert_eq!(i18n.t("no.such.key"), "no.such.key"); + } + + #[test] + fn placeholder_substitution() { + let i18n = I18n::load(Language::ZhCn); + let out = i18n.tr("launch.update_prompt", &[("current", "2.1.1"), ("latest", "2.1.2")]); + assert!(out.contains("2.1.1")); + assert!(out.contains("2.1.2")); + } + + #[test] + fn all_keys_identical_between_langs() { + let zh = I18n::load(Language::ZhCn); + let en = I18n::load(Language::EnUs); + let mut zh_keys: Vec<_> = zh.table.keys().cloned().collect(); + let mut en_keys: Vec<_> = en.table.keys().cloned().collect(); + zh_keys.sort(); + en_keys.sort(); + assert_eq!(zh_keys, en_keys, "zh-CN 与 en-US 的 key 集合必须完全一致"); + } + + #[test] + fn zh_and_en_have_expected_sections() { + for i18n in [I18n::load(Language::ZhCn), I18n::load(Language::EnUs)] { + assert!(!i18n.t("launch.starting").is_empty()); + assert!(!i18n.t("update.checking").is_empty()); + assert!(!i18n.t("repair.repairing").is_empty()); + assert!(!i18n.t("tui.tab_overview").is_empty()); + } + } +} diff --git a/src/i18n/mod.rs b/src/i18n/mod.rs new file mode 100644 index 0000000..f45f1eb --- /dev/null +++ b/src/i18n/mod.rs @@ -0,0 +1,7 @@ +//! 国际化: 加载翻译文件, 按系统 locale 自动选择语言, 支持降级。 + +pub mod loader; +pub mod resolver; + +pub use loader::I18n; +pub use resolver::resolve_lang; diff --git a/src/i18n/resolver.rs b/src/i18n/resolver.rs new file mode 100644 index 0000000..8f0f9d4 --- /dev/null +++ b/src/i18n/resolver.rs @@ -0,0 +1,95 @@ +//! 语言解析: 跟随系统 locale, 支持显式覆盖。 + +use super::loader::Language; + +/// 解析最终语言。 +/// +/// 优先级: 显式 lang (来自 `-L/--lang` 或配置) > 系统 locale > en-US 降级。 +pub fn resolve_lang(config_lang: Option<&str>) -> Language { + if let Some(lang) = config_lang + && !lang.is_empty() + && lang != "auto" + { + return parse_lang(lang); + } + detect_system_lang() +} + +/// 将语言代码字符串解析为 Language。未知代码返回 en-US。 +pub fn parse_lang(code: &str) -> Language { + match code.trim().to_ascii_lowercase().as_str() { + "zh-cn" | "zh" | "zh_cn" | "chinese" => Language::ZhCn, + _ => Language::EnUs, + } +} + +/// 检测系统语言。读取常见环境变量; Windows 下读取用户默认区域。 +fn detect_system_lang() -> Language { + for var in ["LC_ALL", "LC_MESSAGES", "LANG"] { + if let Ok(v) = std::env::var(var) { + if v.to_ascii_lowercase().starts_with("zh") { + return Language::ZhCn; + } + if !v.is_empty() { + return Language::EnUs; + } + } + } + #[cfg(target_os = "windows")] + { + if let Some(lang) = windows_locale() { + return lang; + } + } + Language::EnUs +} + +/// Windows 系统区域: 读取用户默认 UI 文化。 +#[cfg(target_os = "windows")] +fn windows_locale() -> Option { + use std::os::windows::process::CommandExt; + use std::process::Command; + let out = Command::new("powershell") + .args([ + "-NoProfile", + "-Command", + "[System.Globalization.CultureInfo]::CurrentUICulture.Name", + ]) + .creation_flags(0x08000000) // CREATE_NO_WINDOW + .output() + .ok()?; + let s = String::from_utf8_lossy(&out.stdout).trim().to_ascii_lowercase(); + if s.starts_with("zh") { Some(Language::ZhCn) } else { Some(Language::EnUs) } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_known_codes() { + assert_eq!(parse_lang("zh-CN"), Language::ZhCn); + assert_eq!(parse_lang("zh"), Language::ZhCn); + assert_eq!(parse_lang("zh_CN"), Language::ZhCn); + assert_eq!(parse_lang("en-US"), Language::EnUs); + assert_eq!(parse_lang("en"), Language::EnUs); + } + + #[test] + fn parse_unknown_falls_back_en() { + assert_eq!(parse_lang("fr-FR"), Language::EnUs); + assert_eq!(parse_lang("ja-JP"), Language::EnUs); + } + + #[test] + fn explicit_overrides_auto() { + assert_eq!(resolve_lang(Some("zh-CN")), Language::ZhCn); + assert_eq!(resolve_lang(Some("en-US")), Language::EnUs); + } + + #[test] + fn auto_uses_system() { + let _ = resolve_lang(Some("auto")); + let _ = resolve_lang(None); + } +} diff --git a/src/launch/execute.rs b/src/launch/execute.rs new file mode 100644 index 0000000..90a4ac5 --- /dev/null +++ b/src/launch/execute.rs @@ -0,0 +1,109 @@ +//! 启动编排核心: 环境注入 + spawn + 等待 + 崩溃检测。 + +use super::preflight::{PreflightStatus, resolve_exe}; +use super::subprocess::{SpawnConfig, spawn_cc}; +use crate::auth::{ApiKeyInjector, compute_daemon_bypass, resolve_api_key}; +use crate::cli::{Cli, LaunchArgs}; +use crate::config::AppConfig; +use crate::env::EnvManager; +use std::collections::HashMap; +use std::time::Instant; + +/// 启动结果。 +#[derive(Debug, Clone)] +pub struct LaunchOutcome { + pub exit_code: i32, + pub crashed: bool, + pub elapsed_secs: f64, + pub api_key_missing: bool, +} + +/// 计算完整子进程环境 (配置注入 + daemon 绕过)。 +pub fn build_env(config: &AppConfig, cli: &LaunchArgs) -> HashMap { + let env_manager = EnvManager::from_config(config, cli); + let mut env = env_manager.for_subprocess(); + + if let Some(key) = resolve_api_key(config, cli.api_key.as_deref(), None) { + for (k, v) in compute_daemon_bypass(&key, config) { + env.insert(k, v); + } + } + env +} + +/// 执行一次 CC 启动 (spawn + wait), 并检测是否崩溃。 +pub fn execute_once( + config: &AppConfig, + cli: &Cli, + env: &HashMap, +) -> anyhow::Result { + let exe = resolve_exe(config); + let spawn = SpawnConfig { + exe, + args: vec![], + env: env.clone(), + work_dir: cli.launch.dir.clone(), + separate_window: cli.launch.separate_window, + passthru: cli.passthru.clone(), + }; + + let start = Instant::now(); + let mut child = spawn_cc(config, &spawn)?; + let status = child.wait().map_err(|e| anyhow::anyhow!("等待 CC 退出失败: {e}"))?; + let elapsed = start.elapsed().as_secs_f64(); + + let exit_code = status.code().unwrap_or(-1); + let grace = config.repair.grace_period_secs; + let crashed = crate::repair::detector::is_crash(exit_code, elapsed, grace); + let api_key_missing = resolve_api_key(config, cli.launch.api_key.as_deref(), None).is_none(); + + Ok(LaunchOutcome { exit_code, crashed, elapsed_secs: elapsed, api_key_missing }) +} + +/// 完整启动流程 (含 API Key 注入-清理)。 +/// +/// 由 commands 层调用。返回 CC 退出码。 +pub fn launch_cc( + config: &AppConfig, + cli: &Cli, + on_preflight: impl FnOnce(&PreflightStatus), +) -> anyhow::Result { + // 1. 启动前检查 + let status = crate::launch::preflight::check_binary_health(&resolve_exe(config)); + on_preflight(&status); + if status == PreflightStatus::Missing || status == PreflightStatus::Unhealthy { + anyhow::bail!("CC 二进制不可用 (status: {status:?})"); + } + + // 2. 计算环境 + let env = build_env(config, &cli.launch); + + // 3. API Key 注入 settings.json (daemon 读取) + let config_dir = crate::config::resolve_config_dir(config); + let mut injector = ApiKeyInjector::new(&config_dir); + if let Some(key) = resolve_api_key(config, cli.launch.api_key.as_deref(), Some(&config_dir)) { + injector.start(&key.value)?; + } + + // 4. 启动 + 等待 + let outcome = execute_once(config, cli, &env); + + // 5. 清理注入 + injector.stop(); + + let outcome = outcome?; + Ok(outcome.exit_code) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn build_env_includes_model_and_bypass() { + let cfg = AppConfig::default(); + let cli = LaunchArgs::default(); + let env = build_env(&cfg, &cli); + assert!(env.contains_key("ANTHROPIC_MODEL")); + } +} diff --git a/src/launch/mod.rs b/src/launch/mod.rs new file mode 100644 index 0000000..c6ecf12 --- /dev/null +++ b/src/launch/mod.rs @@ -0,0 +1,9 @@ +//! 启动编排: 子进程管理、启动前检查、完整启动流程。 + +pub mod execute; +pub mod preflight; +pub mod subprocess; + +pub use execute::{LaunchOutcome, build_env, execute_once, launch_cc}; +pub use preflight::{PreflightResult, PreflightStatus, check_binary_health, resolve_exe}; +pub use subprocess::{SpawnConfig, spawn_cc}; diff --git a/src/launch/preflight.rs b/src/launch/preflight.rs new file mode 100644 index 0000000..329f19b --- /dev/null +++ b/src/launch/preflight.rs @@ -0,0 +1,116 @@ +//! 启动前检查: 二进制健康、CC 路径解析。 + +use crate::config::AppConfig; +use crate::util::paths; +use std::path::PathBuf; + +/// 二进制健康状态。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PreflightStatus { + Ok, + Missing, + TooSmall, + Unhealthy, +} + +/// 启动前检查结果。 +#[derive(Debug, Clone)] +pub struct PreflightResult { + pub exe: PathBuf, + pub status: PreflightStatus, + pub version: Option, +} + +/// 解析 CC 可执行文件路径 (配置 > 自动探测)。 +pub fn resolve_exe(config: &AppConfig) -> PathBuf { + if let Some(p) = &config.paths.cc_exe + && !p.is_empty() + { + let resolved = paths::resolve_path(p); + if resolved.exists() { + return resolved; + } + } + auto_detect_exe() +} + +/// 自动探测 CC 可执行文件: 常见安装位置 + PATH。 +fn auto_detect_exe() -> PathBuf { + let root = paths::app_root(); + let platform = crate::config::schema::Platform::current(); + let main_dir = root.join("claude-code-main"); + let candidates: Vec = match platform { + crate::config::schema::Platform::Windows => { + vec![main_dir.join("claude.exe"), root.join("claude.exe")] + } + _ => vec![main_dir.join("claude"), root.join("claude")], + }; + for c in candidates { + if c.exists() { + return c; + } + } + if let Ok(found) = which::which("claude") { + return found; + } + if platform == crate::config::schema::Platform::Windows { + main_dir.join("claude.exe") + } else { + main_dir.join("claude") + } +} + +/// 二进制健康检查: 存在 + 大小 > 1MB + --version 可运行。 +pub fn check_binary_health(exe: &std::path::Path) -> PreflightStatus { + if !exe.exists() { + return PreflightStatus::Missing; + } + let Ok(meta) = std::fs::metadata(exe) else { + return PreflightStatus::Unhealthy; + }; + if meta.len() < 1024 * 1024 { + return PreflightStatus::TooSmall; + } + let output = std::process::Command::new(exe) + .arg("--version") + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) + .status(); + match output { + Ok(status) if status.success() => PreflightStatus::Ok, + _ => PreflightStatus::Unhealthy, + } +} + +/// 执行完整启动前检查 (解析路径 + 健康检查 + 版本探测)。 +pub fn run_preflight(config: &AppConfig) -> PreflightResult { + let exe = resolve_exe(config); + let status = check_binary_health(&exe); + let version = if status == PreflightStatus::Ok { get_version(&exe) } else { None }; + PreflightResult { exe, status, version } +} + +/// 获取 CC 版本 (通过 --version 输出解析)。 +pub fn get_version(exe: &std::path::Path) -> Option { + let out = std::process::Command::new(exe).arg("--version").output().ok()?; + let text = String::from_utf8_lossy(&out.stdout).to_string(); + crate::util::version::Version::extract(&text).map(|v| v.to_string()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn resolve_uses_config() { + let mut cfg = AppConfig::default(); + cfg.paths.cc_exe = Some("${EXE_DIR}/__nonexistent__.exe".to_string()); + let _ = resolve_exe(&cfg); + } + + #[test] + fn missing_binary_reports_missing() { + let p = std::path::Path::new("Z:/definitely/not/here/claude.exe"); + assert_eq!(check_binary_health(p), PreflightStatus::Missing); + } +} diff --git a/src/launch/subprocess.rs b/src/launch/subprocess.rs new file mode 100644 index 0000000..e086b35 --- /dev/null +++ b/src/launch/subprocess.rs @@ -0,0 +1,67 @@ +//! 子进程管理: 启动 CC 并透传 stdio。 + +use crate::config::AppConfig; +use crate::platform; +use std::collections::HashMap; +use std::process::Stdio; + +/// CC 子进程配置。 +#[derive(Debug, Clone)] +pub struct SpawnConfig { + pub exe: std::path::PathBuf, + pub args: Vec, + pub env: HashMap, + pub work_dir: Option, + pub separate_window: bool, + pub passthru: Vec, +} + +/// 启动 CC 进程 (透传 stdio)。返回子进程句柄。 +pub fn spawn_cc(config: &AppConfig, spawn: &SpawnConfig) -> anyhow::Result { + let mut cmd = std::process::Command::new(&spawn.exe); + + // 参数: 透传参数在前, 其余 args 在后 + let mut all_args: Vec = Vec::new(); + all_args.extend(spawn.passthru.clone()); + all_args.extend(spawn.args.clone()); + cmd.args(&all_args); + + // 工作目录 + if let Some(dir) = &spawn.work_dir { + cmd.current_dir(dir); + } + + // 环境: 继承当前 + 注入集 + let mut env = std::env::vars().collect::>(); + for (k, v) in &spawn.env { + env.insert(k.clone(), v.clone()); + } + cmd.envs(&env); + + // stdio 透传 + cmd.stdin(Stdio::inherit()).stdout(Stdio::inherit()).stderr(Stdio::inherit()); + + // 新窗口 + platform::configure_new_console(&mut cmd, spawn.separate_window); + + let _ = config; + cmd.spawn().map_err(|e| anyhow::anyhow!("启动 CC 失败 | spawn CC failed: {e}")) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn spawn_config_is_constructible() { + let s = SpawnConfig { + exe: std::path::PathBuf::from("x"), + args: vec![], + env: HashMap::new(), + work_dir: None, + separate_window: false, + passthru: vec![], + }; + assert_eq!(s.exe.as_os_str(), "x"); + } +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..d47daab --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,19 @@ +//! cc-launcher 库入口: 声明所有模块。 +//! +//! 核心库代码被 CLI、TUI、GUI 共享。 + +pub mod auth; +pub mod cli; +pub mod config; +pub mod env; +pub mod i18n; +pub mod launch; +pub mod logging; +pub mod platform; +pub mod repair; +pub mod rollback; +pub mod update; +pub mod util; + +/// 应用版本常量 (与 Cargo.toml 保持一致)。 +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/src/logging/init.rs b/src/logging/init.rs new file mode 100644 index 0000000..b9030d0 --- /dev/null +++ b/src/logging/init.rs @@ -0,0 +1,131 @@ +//! tracing 初始化: 每次运行创建新日志文件, 格式 `[时间] [级别] [模块] 消息`。 + +use crate::util::paths; +use anyhow::{Context, Result}; +use std::fs; +use std::io::IsTerminal; +use std::path::PathBuf; +use tracing_subscriber::fmt::format::FmtSpan; +use tracing_subscriber::layer::{Layer, SubscriberExt}; +use tracing_subscriber::util::SubscriberInitExt; +use tracing_subscriber::{EnvFilter, fmt}; + +use super::rotation; + +/// 日志初始化选项。 +#[derive(Debug, Clone)] +pub struct LoggingOptions { + /// 日志级别: trace/debug/info/warn/error。 + pub level: String, + /// 是否写入文件。 + pub file_enabled: bool, + /// 是否控制台输出。 + pub console_enabled: bool, + /// 日志保留天数 (自动轮转)。 + pub retention_days: u32, +} + +impl Default for LoggingOptions { + fn default() -> Self { + Self { level: "info".into(), file_enabled: true, console_enabled: true, retention_days: 30 } + } +} + +/// 当前会话的日志文件路径。 +static CURRENT_LOG: std::sync::OnceLock = std::sync::OnceLock::new(); + +/// 初始化日志系统。 +pub fn init_logging(opts: &LoggingOptions) -> Result { + let filter = EnvFilter::new(resolve_level(&opts.level)); + + // 使用动态分发 (Box) 避免链式叠加导致的类型不匹配。 + let mut layers: Vec + Send + Sync>> = + Vec::new(); + + if opts.console_enabled { + let console = fmt::layer() + .with_ansi(std::io::stderr().is_terminal()) + .with_target(false) + .with_writer(std::io::stderr) + .boxed(); + layers.push(console); + } + + let log_path = if opts.file_enabled { + let path = create_log_file()?; + let file_path = path.clone(); + let file_layer = fmt::layer() + .with_ansi(false) + .with_target(false) + .with_writer(move || { + fs::File::options().append(true).open(&file_path).expect("open log file") + }) + .with_span_events(FmtSpan::NEW | FmtSpan::CLOSE) + .boxed(); + layers.push(file_layer); + Some(path) + } else { + None + }; + + layers.push(Box::new(filter)); + + tracing_subscriber::registry().with(layers).try_init().context("init tracing subscriber")?; + + if opts.file_enabled { + rotation::rotate_old_logs(opts.retention_days); + } + + if let Some(p) = &log_path { + let _ = CURRENT_LOG.set(p.clone()); + } + + Ok(log_path.unwrap_or_default()) +} + +/// 当前日志文件路径 (若已启用文件日志)。 +pub fn current_log_path() -> Option { + CURRENT_LOG.get().cloned() +} + +/// 创建本次运行的日志文件: `logs/cc-launcher-YYYY-MM-DDTHH-mm-ss.log`。 +fn create_log_file() -> Result { + let dir = paths::logs_dir(); + fs::create_dir_all(&dir).context("create logs dir")?; + let stamp = chrono::Local::now().format("%Y-%m-%dT%H-%M-%S"); + let path = dir.join(format!("cc-launcher-{stamp}.log")); + fs::write(&path, "")?; + Ok(path) +} + +/// 将配置的级别名解析为 EnvFilter 支持的 directive。 +fn resolve_level(level: &str) -> String { + match level.to_ascii_lowercase().as_str() { + "trace" => "trace".to_string(), + "debug" => "debug".to_string(), + "warn" => "warn".to_string(), + "error" => "error".to_string(), + _ => "info".to_string(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn level_resolution() { + assert_eq!(resolve_level("info"), "info"); + assert_eq!(resolve_level("DEBUG"), "debug"); + assert_eq!(resolve_level("trace"), "trace"); + assert_eq!(resolve_level("bogus"), "info"); + } + + #[test] + fn log_filename_format() { + let stamp = chrono::Local::now().format("%Y-%m-%dT%H-%M-%S"); + let name = format!("cc-launcher-{stamp}.log"); + assert!(name.starts_with("cc-launcher-")); + assert!(name.ends_with(".log")); + } +} diff --git a/src/logging/mod.rs b/src/logging/mod.rs new file mode 100644 index 0000000..2d69c19 --- /dev/null +++ b/src/logging/mod.rs @@ -0,0 +1,6 @@ +//! 日志系统: tracing 初始化、文件+控制台输出、按天数轮转。 + +pub mod init; +pub mod rotation; + +pub use init::{LoggingOptions, init_logging}; diff --git a/src/logging/rotation.rs b/src/logging/rotation.rs new file mode 100644 index 0000000..224dad8 --- /dev/null +++ b/src/logging/rotation.rs @@ -0,0 +1,48 @@ +//! 日志轮转: 删除超过 N 天的旧日志文件。 + +use crate::util::paths; +use std::fs; +use std::time::{Duration, SystemTime}; + +/// 删除 logs/ 目录下超过 `retention_days` 天的 `cc-launcher-*.log` 文件。 +pub fn rotate_old_logs(retention_days: u32) { + if retention_days == 0 { + return; + } + let dir = paths::logs_dir(); + let cutoff = SystemTime::now() - Duration::from_secs(u64::from(retention_days) * 86400); + let Ok(entries) = fs::read_dir(&dir) else { + return; + }; + for entry in entries.flatten() { + let path = entry.path(); + let is_log = path + .file_name() + .and_then(|n| n.to_str()) + .map(|n| n.starts_with("cc-launcher-") && n.ends_with(".log")) + .unwrap_or(false); + if !is_log { + continue; + } + let modified = + entry.metadata().and_then(|m| m.modified()).unwrap_or(SystemTime::UNIX_EPOCH); + if modified < cutoff { + let _ = fs::remove_file(&path); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn zero_retention_is_noop() { + rotate_old_logs(0); + } + + #[test] + fn missing_dir_is_noop() { + rotate_old_logs(30); + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..86e2cbb --- /dev/null +++ b/src/main.rs @@ -0,0 +1,63 @@ +//! cc-launcher 二进制入口。 +//! +//! 流程: 解析 CLI → 初始化日志 → 加载配置 (自动生成模板) → 路由到子命令 / 启动。 + +use cc_launcher::cli::Cli; +use cc_launcher::config::{LoadOptions, load_config}; +use cc_launcher::i18n::{I18n, resolve_lang}; +use cc_launcher::logging::{LoggingOptions, init_logging}; +use clap::Parser; +use std::process::ExitCode; + +fn main() -> ExitCode { + let cli = Cli::parse(); + match run(cli) { + Ok(code) => ExitCode::from(code), + Err(err) => { + eprintln!("错误 | Error: {err:#}"); + ExitCode::from(1) + } + } +} + +/// 顶层运行逻辑。返回进程退出码。 +fn run(cli: Cli) -> anyhow::Result { + // 1. 加载配置 (自动生成模板文件) + let opts = LoadOptions { + config_path: cli.global.config.clone(), + profile: cli.global.profile.clone(), + create_if_missing: true, + }; + let config = load_config(&opts)?; + + // 2. 解析语言: CLI -L > config i18n.lang > 系统 locale + let lang = resolve_lang(cli.global.lang.as_deref().or(Some(&config.i18n.lang))); + let i18n = I18n::load(lang); + + // 3. 初始化日志 + let mut log_opts = LoggingOptions { + level: config.logging.level.clone(), + file_enabled: config.logging.file_enabled, + console_enabled: config.logging.console_enabled, + retention_days: config.logging.retention_days, + }; + if cli.global.verbose { + log_opts.level = "debug".to_string(); + } + let log_path = init_logging(&log_opts)?; + tracing::info!( + "启动 | Started: version={}, lang={}, log={}", + cc_launcher::VERSION, + i18n.lang().code(), + log_path.display() + ); + + // 4. 路由 + match &cli.command { + Some(cmd) => crate::commands::run_subcommand(&cli, cmd, &config, &i18n), + None => crate::commands::run_launch(&cli, &config, &i18n), + } +} + +// commands 模块在 Phase 6 完善; 此处定义骨架占位, 逐步填充。 +mod commands; diff --git a/src/platform/mod.rs b/src/platform/mod.rs new file mode 100644 index 0000000..fe6e558 --- /dev/null +++ b/src/platform/mod.rs @@ -0,0 +1,43 @@ +//! 平台抽象: 跨平台差异 (进程标志、新窗口、进程终止)。 + +use crate::config::schema::Platform; +use std::process::Command; + +#[cfg(unix)] +mod unix; +#[cfg(windows)] +mod windows; + +/// 当前平台。 +pub fn current() -> Platform { + Platform::current() +} + +/// 为子进程设置"新控制台/新窗口"标志 (若平台支持)。 +pub fn configure_new_console(cmd: &mut Command, separate: bool) { + if !separate { + return; + } + #[cfg(windows)] + windows::set_new_console_flag(cmd); + #[cfg(unix)] + unix::set_new_terminal(cmd); +} + +/// 平台可用的进程终止信号 (用于停止运行中的 CC)。 +pub fn terminate_processes(name: &str) { + #[cfg(windows)] + windows::kill_processes(name); + #[cfg(unix)] + unix::kill_processes(name); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn current_platform_detected() { + let _ = current(); + } +} diff --git a/src/platform/unix.rs b/src/platform/unix.rs new file mode 100644 index 0000000..b5031b5 --- /dev/null +++ b/src/platform/unix.rs @@ -0,0 +1,32 @@ +//! Unix 平台实现 (macOS/Linux): 新终端、进程终止。 + +use std::process::Command; + +/// 在独立终端中运行子进程 (尽力而为)。 +pub fn set_new_terminal(cmd: &mut Command) { + // 通过终端包装器启动; 具体逻辑在 spawn 侧处理, + // 这里仅为保持接口一致 (Command 已被创建)。 + let _ = cmd; +} + +/// 终止所有匹配名称的进程。 +pub fn kill_processes(name: &str) { + let _ = Command::new("pkill") + .arg("-f") + .arg(name) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) + .status(); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn noop_ok() { + let mut cmd = Command::new("sh"); + set_new_terminal(&mut cmd); + drop(cmd); + } +} diff --git a/src/platform/windows.rs b/src/platform/windows.rs new file mode 100644 index 0000000..4f30a32 --- /dev/null +++ b/src/platform/windows.rs @@ -0,0 +1,34 @@ +//! Windows 平台实现: 新控制台标志、进程终止。 + +use std::process::Command; + +/// 设置 CREATE_NEW_CONSOLE 标志, 让子进程在独立窗口运行。 +pub fn set_new_console_flag(cmd: &mut Command) { + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + const CREATE_NEW_CONSOLE: u32 = 0x0000_0010; + cmd.creation_flags(CREATE_NEW_CONSOLE); + } +} + +/// 终止所有匹配名称的进程 (如 `claude`)。 +pub fn kill_processes(name: &str) { + let _ = Command::new("taskkill") + .args(["/F", "/IM", &format!("{name}.exe")]) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) + .status(); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn new_console_flag_is_noop() { + let mut cmd = Command::new("cmd"); + set_new_console_flag(&mut cmd); + drop(cmd); + } +} diff --git a/src/repair/circuit.rs b/src/repair/circuit.rs new file mode 100644 index 0000000..e2519c9 --- /dev/null +++ b/src/repair/circuit.rs @@ -0,0 +1,120 @@ +//! 熔断器: 连续失败计数、开关状态、持久化到磁盘。 + +use crate::config::RepairConfig; +use anyhow::Result; +use serde::{Deserialize, Serialize}; + +/// 修复状态 (可持久化)。 +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +pub struct RepairState { + /// 连续失败次数。 + pub consecutive_failures: u32, + /// 最近一次失败时间 (unix 秒)。 + pub last_failure_time: Option, + /// 熔断器是否打开。 + pub circuit_open: bool, + /// 熔断器打开时间 (unix 秒)。 + pub circuit_opened_at: Option, +} + +/// 熔断器: 基于 RepairConfig 决策是否允许继续尝试。 +#[derive(Debug, Clone)] +pub struct CircuitBreaker { + state: RepairState, + config: RepairConfig, +} + +impl CircuitBreaker { + pub fn new(config: RepairConfig) -> Self { + Self { state: RepairState::default(), config } + } + + pub fn state(&self) -> &RepairState { + &self.state + } + + /// 记录一次失败。达到阈值时打开熔断器。 + pub fn record_failure(&mut self, now_unix: u64) { + self.state.consecutive_failures += 1; + self.state.last_failure_time = Some(now_unix); + if self.state.consecutive_failures >= self.config.circuit_breaker_threshold { + self.state.circuit_open = true; + self.state.circuit_opened_at = Some(now_unix); + } + } + + /// 记录一次成功, 重置状态。 + pub fn record_success(&mut self) { + self.state = RepairState::default(); + } + + /// 熔断器是否打开。 + pub fn is_open(&self) -> bool { + self.state.circuit_open + } + + /// 是否已过熔断器的自动重置期。 + pub fn can_reset(&self, now_unix: u64) -> bool { + match self.state.circuit_opened_at { + Some(opened) => { + now_unix.saturating_sub(opened) >= self.config.circuit_breaker_reset_secs + } + None => false, + } + } + + /// 从磁盘加载状态。 + pub fn load(path: &std::path::Path) -> Result { + let config = RepairConfig::default(); + let content = std::fs::read_to_string(path)?; + let state = toml::from_str(&content)?; + Ok(Self { state, config }) + } + + /// 保存状态到磁盘。 + pub fn save(&self, path: &std::path::Path) -> Result<()> { + let content = toml::to_string(&self.state)?; + crate::util::fs::atomic_write_str(path, &content)?; + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn threshold_opens_circuit() { + let cfg = RepairConfig::default(); + let mut cb = CircuitBreaker::new(cfg); + for _ in 0..4 { + cb.record_failure(1000); + } + assert!(!cb.is_open()); + cb.record_failure(1000); + assert!(cb.is_open()); + assert_eq!(cb.state().consecutive_failures, 5); + } + + #[test] + fn success_resets() { + let cfg = RepairConfig::default(); + let mut cb = CircuitBreaker::new(cfg); + cb.record_failure(1000); + cb.record_success(); + assert_eq!(cb.state().consecutive_failures, 0); + assert!(!cb.is_open()); + } + + #[test] + fn reset_period() { + let cfg = RepairConfig::default(); + let mut cb = CircuitBreaker::new(cfg); + for _ in 0..5 { + cb.record_failure(1000); + } + assert!(cb.is_open()); + assert!(!cb.can_reset(1200)); + assert!(cb.can_reset(1301)); + } +} diff --git a/src/repair/detector.rs b/src/repair/detector.rs new file mode 100644 index 0000000..26515e1 --- /dev/null +++ b/src/repair/detector.rs @@ -0,0 +1,121 @@ +//! 崩溃检测: 退出码 + 宽限期判断。 + +use crate::config::RepairConfig; +use crate::repair::RepairState; + +/// 判断 CC 进程退出是否为异常崩溃。 +/// +/// 规则: +/// - 退出码非 0 → 崩溃 +/// - 退出码为 0 但运行时间 < 宽限期 → 视为崩溃 (启动即退) +/// - 退出码为 0 且运行时间 >= 宽限期 → 正常退出 +pub fn is_crash(exit_code: i32, elapsed_secs: f64, grace_period_secs: u32) -> bool { + if exit_code != 0 { + return true; + } + elapsed_secs < grace_period_secs as f64 +} + +/// 记录一次崩溃到修复状态, 并更新熔断器。 +pub fn record_crash(state: &mut RepairState, now_unix: u64) { + state.consecutive_failures += 1; + state.last_failure_time = Some(now_unix); +} + +/// 是否应该尝试自动修复。 +/// +/// 熔断器打开且未过重置期 → 不应修复 (需人工干预)。 +/// 连续失败超过最大重试 → 不应修复。 +pub fn should_repair(state: &RepairState, config: &RepairConfig, now_unix: u64) -> bool { + if state.circuit_open { + if let Some(opened) = state.circuit_opened_at + && now_unix.saturating_sub(opened) >= config.circuit_breaker_reset_secs + { + return true; + } + return false; + } + if state.consecutive_failures > config.max_retries { + return false; + } + true +} + +/// 计算指数退避延迟 (秒): base * multiplier^failures。 +pub fn backoff_delay(config: &RepairConfig, failures: u32) -> u64 { + let base = 1.0; + let multiplier = config.backoff_multiplier.max(1.0); + (base * multiplier.powi(failures as i32)).round() as u64 +} + +/// 打开熔断器。 +pub fn open_circuit(state: &mut RepairState, now_unix: u64) { + state.circuit_open = true; + state.circuit_opened_at = Some(now_unix); +} + +/// 成功修复后重置状态。 +pub fn reset_after_success(state: &mut RepairState) { + state.consecutive_failures = 0; + state.last_failure_time = None; + state.circuit_open = false; + state.circuit_opened_at = None; +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::repair::circuit::RepairState; + + #[test] + fn nonzero_exit_is_crash() { + assert!(is_crash(1, 60.0, 5)); + assert!(is_crash(255, 60.0, 5)); + } + + #[test] + fn fast_zero_exit_is_crash() { + assert!(is_crash(0, 1.0, 5)); + assert!(!is_crash(0, 10.0, 5)); + } + + #[test] + fn normal_exit_not_crash() { + assert!(!is_crash(0, 30.0, 5)); + } + + #[test] + fn should_repair_respects_circuit() { + let cfg = RepairConfig::default(); + let mut state = RepairState::default(); + assert!(should_repair(&state, &cfg, 1000)); + state.circuit_open = true; + state.circuit_opened_at = Some(1000); + assert!(!should_repair(&state, &cfg, 1100)); + assert!(should_repair(&state, &cfg, 1500)); + } + + #[test] + fn should_repair_respects_max_retries() { + let cfg = RepairConfig::default(); + let state = RepairState { consecutive_failures: 4, ..RepairState::default() }; + assert!(!should_repair(&state, &cfg, 0)); + } + + #[test] + fn backoff_grows() { + let cfg = RepairConfig::default(); + let d0 = backoff_delay(&cfg, 0); + let d2 = backoff_delay(&cfg, 2); + assert!(d2 > d0); + } + + #[test] + fn reset_clears_state() { + let mut state = + RepairState { consecutive_failures: 5, circuit_open: true, ..RepairState::default() }; + reset_after_success(&mut state); + assert_eq!(state.consecutive_failures, 0); + assert!(!state.circuit_open); + } +} diff --git a/src/repair/mod.rs b/src/repair/mod.rs new file mode 100644 index 0000000..8185923 --- /dev/null +++ b/src/repair/mod.rs @@ -0,0 +1,7 @@ +//! 修复系统: 崩溃检测、指数退避、熔断器。 + +pub mod circuit; +pub mod detector; + +pub use circuit::{CircuitBreaker, RepairState}; +pub use detector::{is_crash, record_crash, should_repair}; diff --git a/src/rollback/atomic.rs b/src/rollback/atomic.rs new file mode 100644 index 0000000..540e74c --- /dev/null +++ b/src/rollback/atomic.rs @@ -0,0 +1,82 @@ +//! 原子回滚: 替换失败时恢复原版本。 + +use anyhow::{Context, Result}; +use std::path::Path; + +/// 原子替换可执行文件。 +/// +/// 流程: 备份当前 → 写入新文件 → 校验 → 删除备份。 +/// 任一步失败 → 从备份恢复当前。 +pub fn atomic_swap( + current: &Path, + new_content: &[u8], + verify: impl FnOnce(&Path) -> bool, +) -> Result<()> { + let had_backup = current.exists(); + let backup = if had_backup { + let bak = current.with_extension("previous"); + std::fs::copy(current, &bak).with_context(|| "备份当前可执行文件")?; + Some(bak) + } else { + None + }; + + let write_result = + crate::util::fs::atomic_write(current, new_content).with_context(|| "写入新可执行文件"); + if let Err(e) = write_result { + restore(backup.as_deref(), current, had_backup)?; + return Err(e); + } + + if !verify(current) { + restore(backup.as_deref(), current, had_backup)?; + anyhow::bail!("新可执行文件校验失败, 已恢复原版本"); + } + + if let Some(bak) = backup { + let _ = crate::util::fs::remove_if_exists(&bak); + } + Ok(()) +} + +/// 从备份恢复 (无备份且原文件不存在时, 删除当前)。 +fn restore(backup: Option<&Path>, current: &Path, had_backup: bool) -> Result<()> { + match backup { + Some(bak) => crate::util::fs::restore(bak, current).context("恢复备份"), + None if had_backup => Ok(()), + None => crate::util::fs::remove_if_exists(current), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn successful_swap() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("bin.exe"); + std::fs::write(&f, b"old").unwrap(); + atomic_swap(&f, b"new", |p| p.metadata().map(|m| m.len() == 3).unwrap_or(false)).unwrap(); + assert_eq!(std::fs::read(&f).unwrap(), b"new"); + assert!(!f.with_extension("previous").exists()); + } + + #[test] + fn verify_failure_restores() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("bin.exe"); + std::fs::write(&f, b"old-data").unwrap(); + let res = atomic_swap(&f, b"bad", |_| false); + assert!(res.is_err()); + assert_eq!(std::fs::read(&f).unwrap(), b"old-data"); + } + + #[test] + fn swap_when_missing_creates() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("new.exe"); + atomic_swap(&f, b"hello", |p| p.exists()).unwrap(); + assert_eq!(std::fs::read(&f).unwrap(), b"hello"); + } +} diff --git a/src/rollback/manifest.rs b/src/rollback/manifest.rs new file mode 100644 index 0000000..bea1bb2 --- /dev/null +++ b/src/rollback/manifest.rs @@ -0,0 +1,116 @@ +//! 版本清单: 已安装 CC 版本历史 (带时间戳), 支持回滚。 + +use anyhow::{Context, Result}; +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use std::path::{Path, PathBuf}; + +/// 单个版本条目。 +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct VersionEntry { + /// 版本号。 + pub version: String, + /// 安装时间 (ISO 8601)。 + pub installed_at: DateTime, + /// 备份的可执行文件路径。 + pub binary_path: PathBuf, +} + +/// 版本清单 (TOML 持久化)。 +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +pub struct VersionManifest { + /// 当前版本。 + pub current: String, + /// 历史版本列表 (新→旧排序)。 + pub history: Vec, +} + +impl VersionManifest { + /// 从文件加载; 不存在时返回空清单。 + pub fn load(path: &Path) -> Result { + if !path.exists() { + return Ok(Self::default()); + } + let content = std::fs::read_to_string(path) + .with_context(|| format!("read manifest {}", path.display()))?; + Ok(toml::from_str(&content).unwrap_or_default()) + } + + /// 保存到文件 (原子写入)。 + pub fn save(&self, path: &Path) -> Result<()> { + let content = toml::to_string(self)?; + crate::util::fs::atomic_write_str(path, &content) + .with_context(|| format!("write manifest {}", path.display())) + } + + /// 记录一个新版本为当前, 并将旧当前版本加入历史。 + pub fn record_install(&mut self, new_version: &str, old_binary: &Path) { + if !self.current.is_empty() && !self.current.eq_ignore_ascii_case(new_version) { + self.history.insert( + 0, + VersionEntry { + version: self.current.clone(), + installed_at: Utc::now(), + binary_path: old_binary.to_path_buf(), + }, + ); + } + self.current = new_version.to_string(); + } + + /// 获取上一个版本 (最新的历史条目)。 + pub fn previous(&self) -> Option<&VersionEntry> { + self.history.first() + } + + /// 修剪历史, 只保留最近的 N 个条目。 + pub fn prune(&mut self, keep: usize) { + if self.history.len() > keep { + self.history.truncate(keep); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn record_and_previous() { + let mut m = VersionManifest::default(); + let exe = std::path::Path::new("D:/claude/claude.exe"); + m.record_install("2.1.5", exe); + assert_eq!(m.current, "2.1.5"); + m.record_install("2.1.6", exe); + assert_eq!(m.current, "2.1.6"); + assert_eq!(m.previous().unwrap().version, "2.1.5"); + } + + #[test] + fn save_load_roundtrip() { + let dir = tempfile::tempdir().unwrap(); + let p = dir.path().join("manifest.toml"); + let mut m = VersionManifest::default(); + m.record_install("2.1.5", std::path::Path::new("x")); + m.save(&p).unwrap(); + let loaded = VersionManifest::load(&p).unwrap(); + assert_eq!(loaded.current, "2.1.5"); + } + + #[test] + fn load_missing_is_empty() { + let m = VersionManifest::load(Path::new("Z:/nonexistent.toml")).unwrap(); + assert!(m.current.is_empty()); + } + + #[test] + fn prune_limits_history() { + let mut m = VersionManifest::default(); + let exe = std::path::Path::new("x"); + for v in ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4"] { + m.record_install(v, exe); + } + m.prune(2); + assert!(m.history.len() <= 2); + } +} diff --git a/src/rollback/mod.rs b/src/rollback/mod.rs new file mode 100644 index 0000000..e3c580f --- /dev/null +++ b/src/rollback/mod.rs @@ -0,0 +1,7 @@ +//! 回滚系统: 版本清单、原子回滚。 + +pub mod atomic; +pub mod manifest; + +pub use atomic::atomic_swap; +pub use manifest::{VersionEntry, VersionManifest}; diff --git a/src/update/channels.rs b/src/update/channels.rs new file mode 100644 index 0000000..afeedb8 --- /dev/null +++ b/src/update/channels.rs @@ -0,0 +1,139 @@ +//! 下载通道: 环境检测排序 + 回退。 + +use crate::config::AppConfig; + +/// 下载通道 (含排序后的顺序信息)。 +#[derive(Debug, Clone)] +pub struct Channel { + /// 代理/镜像 URL。空 = 直连。 + pub url: String, + /// 标签 (用于环境匹配)。 + pub tags: Vec, + /// 配置优先级 (越小越先)。 + pub priority: u32, + /// 环境检测匹配得分 (越高越优先)。 + pub geo_score: u32, +} + +/// 按环境检测对配置通道排序, 并始终追加直连兜底。 +/// +/// 匹配规则: +/// - `geo.force_tag` 非空时只保留带该标签的通道。 +/// - 否则根据系统 locale/时区检测地区, 匹配 `cn-optimized` 等标签。 +/// - 排序: geo_score 降序 → priority 升序。 +pub fn geo_rank_channels(config: &AppConfig) -> Vec { + let region = detect_region(&config.geo.force_tag); + + let mut channels: Vec = config + .channels + .iter() + .filter(|c| region.is_empty() || c.tags.iter().any(|t| t == ®ion)) + .map(|c| { + let geo_score = if region.is_empty() { 0 } else { 1 }; + Channel { url: c.url.clone(), tags: c.tags.clone(), priority: c.priority, geo_score } + }) + .collect(); + + channels.sort_by(|a, b| b.geo_score.cmp(&a.geo_score).then(a.priority.cmp(&b.priority))); + + let has_direct = channels.iter().any(|c| c.url.is_empty()); + if !has_direct { + channels.push(Channel { + url: String::new(), + tags: vec!["global".to_string()], + priority: u32::MAX, + geo_score: 0, + }); + } + channels +} + +/// 检测地区标签: force_tag 优先, 否则从 locale/时区推导。 +fn detect_region(force_tag: &str) -> String { + if !force_tag.is_empty() { + return force_tag.to_string(); + } + for var in ["LC_ALL", "LC_MESSAGES", "LANG"] { + if let Ok(v) = std::env::var(var) { + let lower = v.to_ascii_lowercase(); + if lower.contains("zh") || lower.contains("cn") { + return "cn-optimized".to_string(); + } + } + } + #[cfg(target_os = "windows")] + { + use std::os::windows::process::CommandExt; + use std::process::Command; + if let Ok(out) = Command::new("powershell") + .args([ + "-NoProfile", + "-Command", + "[System.Globalization.CultureInfo]::CurrentUICulture.Name", + ]) + .creation_flags(0x08000000) + .output() + { + let s = String::from_utf8_lossy(&out.stdout).to_ascii_lowercase(); + if s.contains("zh") || s.contains("cn") { + return "cn-optimized".to_string(); + } + } + } + String::new() +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::config::ChannelConfig; + + fn cfg_with_channels() -> AppConfig { + AppConfig { + channels: vec![ + ChannelConfig { + url: "https://gh.jasonzeng.dev".to_string(), + tags: vec!["cn-optimized".to_string()], + priority: 1, + }, + ChannelConfig { + url: "".to_string(), + tags: vec!["global".to_string()], + priority: 99, + }, + ], + ..Default::default() + } + } + + #[test] + fn force_tag_filters_channels() { + let mut cfg = cfg_with_channels(); + cfg.geo.force_tag = "global".to_string(); + let ranked = geo_rank_channels(&cfg); + assert_eq!(ranked.len(), 1); + assert_eq!(ranked[0].url, ""); + } + + #[test] + fn direct_fallback_appended() { + let cfg = AppConfig { + channels: vec![ChannelConfig { + url: "https://gh.proxy".to_string(), + tags: vec!["global".to_string()], + priority: 1, + }], + ..Default::default() + }; + let ranked = geo_rank_channels(&cfg); + assert!(ranked.iter().any(|c| c.url.is_empty())); + } + + #[test] + fn empty_config_yields_direct_only() { + let cfg = AppConfig::default(); + let ranked = geo_rank_channels(&cfg); + assert_eq!(ranked.len(), 1); + assert_eq!(ranked[0].url, ""); + } +} diff --git a/src/update/download.rs b/src/update/download.rs new file mode 100644 index 0000000..9dd8c7c --- /dev/null +++ b/src/update/download.rs @@ -0,0 +1,290 @@ +//! 分段多线程下载: Range 请求 + 动态分块 + 进度监控 + 停滞检测。 + +use crate::config::UpdateConfig; +use anyhow::{Context, Result}; +use std::io::Write; +use std::path::Path; +use std::sync::Arc; +use std::time::{Duration, Instant}; +use tokio::sync::mpsc; + +/// 下载进度事件。 +#[derive(Debug, Clone)] +pub struct DownloadProgress { + pub bytes_downloaded: u64, + pub total_bytes: u64, + pub speed_bytes_per_sec: f64, + pub eta_secs: f64, + pub active_threads: usize, + pub percent: f64, +} + +/// 探测服务器是否支持 Range, 并获取文件总大小。 +/// +/// 发送 `Range: bytes=0-0` 请求, 期望 HTTP 206 和 Content-Range 头。 +async fn probe_range(client: &reqwest::Client, url: &str, timeout: Duration) -> Result { + let resp = client + .get(url) + .header("Range", "bytes=0-0") + .timeout(timeout) + .send() + .await + .context("range probe request")?; + let status = resp.status(); + if status != reqwest::StatusCode::PARTIAL_CONTENT { + anyhow::bail!("服务器不支持 Range 分块 (HTTP {status})"); + } + let total = resp + .headers() + .get("content-range") + .and_then(|v| v.to_str().ok()) + .and_then(parse_content_range_total) + .context("无法从 Content-Range 解析总大小")?; + if total == 0 { + anyhow::bail!("无法获取文件大小"); + } + Ok(total) +} + +/// 从 `bytes 0-0/12345` 解析总大小。 +fn parse_content_range_total(value: &str) -> Option { + value.rsplit('/').next()?.trim().parse().ok() +} + +/// 执行分段多线程下载。 +/// +/// - 探测 Range → 按 `max_threads` 动态分块 +/// - 每块独立下载到 `{output}.part{N}`, 带重试 +/// - 监控循环: 速度 / ETA / 停滞检测 / 总超时 +/// - 合并分块 → 校验总大小 +pub async fn segmented_download( + url: &str, + output: &Path, + config: &UpdateConfig, + mut progress_tx: Option>, +) -> Result<()> { + let client = reqwest::Client::builder() + .connect_timeout(Duration::from_secs(config.connect_timeout_secs.max(1))) + .user_agent("cc-launcher/0.1") + .build() + .context("build http client")?; + + // Phase 1: Range 探测 + let total = + probe_range(&client, url, Duration::from_secs(config.connect_timeout_secs.max(1))).await?; + + // Phase 2: 动态分块 + let threads = config.max_threads.max(1); + let chunk_size = total.div_ceil(threads as u64).max(1); + let chunks: Vec<(u64, u64, usize)> = (0..threads) + .filter_map(|i| { + let start = (i as u64) * chunk_size; + if start >= total { + return None; + } + let end = (start + chunk_size - 1).min(total - 1); + Some((start, end, i)) + }) + .collect(); + + // Phase 3: 并发下载每个分块 + let url = Arc::new(url.to_string()); + let client = Arc::new(client); + let output = Arc::new(output.to_path_buf()); + + let handles: Vec<_> = chunks + .iter() + .map(|(start, end, idx)| { + let client = Arc::clone(&client); + let url = Arc::clone(&url); + let output = Arc::clone(&output); + let (s, e) = (*start, *end); + let idx = *idx; + let retries = config.retry_count.max(1); + tokio::spawn( + async move { download_chunk(&client, &url, &output, s, e, idx, retries).await }, + ) + }) + .collect(); + + // Phase 4: 监控循环 + let start = Instant::now(); + let mut last_bytes: u64 = 0; + let mut last_time = start; + let mut stall_start: Option = None; + let mut timed_out = false; + + loop { + tokio::time::sleep(Duration::from_millis(250)).await; + + let done = sum_part_files(output.as_ref(), chunks.len()).unwrap_or(0); + let now = Instant::now(); + let elapsed = now.duration_since(start).as_secs_f64(); + let delta = now.duration_since(last_time).as_secs_f64().max(0.001); + let speed = ((done.saturating_sub(last_bytes)) as f64) / delta; + let avg_speed = if elapsed > 0.0 { done as f64 / elapsed } else { 0.0 }; + let percent = (done as f64 * 100.0 / total as f64).min(100.0); + let eta = if speed > 0.5 && done < total { (total - done) as f64 / speed } else { 0.0 }; + + if let Some(tx) = &mut progress_tx { + let evt = DownloadProgress { + bytes_downloaded: done, + total_bytes: total, + speed_bytes_per_sec: avg_speed, + eta_secs: eta, + active_threads: chunks.len(), + percent, + }; + let _ = tx.send(evt).await; + } + + // 停滞检测 + if done > last_bytes { + stall_start = None; + } else if stall_start.is_none() { + stall_start = Some(now); + } else if stall_start.unwrap().elapsed() > Duration::from_secs(config.stall_timeout_secs) { + timed_out = true; + break; + } + + // 总超时 + if elapsed > config.total_timeout_secs as f64 { + timed_out = true; + break; + } + + // 全部完成 + let all_done = chunks.iter().all(|(_, _, i)| { + let p = output.with_extension(format!("part{i}")); + p.exists() && p.metadata().map(|m| m.len() > 0).unwrap_or(false) + }); + if all_done && done >= total { + break; + } + + last_bytes = done; + last_time = now; + } + + if timed_out { + anyhow::bail!("下载超时 (总时长 > {}s)", config.total_timeout_secs); + } + + // Phase 5: 收集分块结果 + for h in handles { + h.await.context("await chunk task")?.context("chunk download failed")?; + } + + // Phase 6: 合并分块 + merge_chunks(output.as_ref(), chunks.len())?; + + // Phase 7: 大小校验 + let final_len = std::fs::metadata(output.as_ref()).map(|m| m.len()).unwrap_or(0); + if final_len != total { + anyhow::bail!("文件大小不符: 期望 {total}, 实际 {final_len}"); + } + Ok(()) +} + +/// 下载单个分块到 `{output}.part{idx}`。 +async fn download_chunk( + client: &reqwest::Client, + url: &str, + output: &Path, + start: u64, + end: u64, + idx: usize, + retries: u32, +) -> Result<()> { + let part_path = output.with_extension(format!("part{idx}")); + let range = format!("bytes={start}-{end}"); + let mut last_err: Option = None; + + for attempt in 0..retries { + match fetch_chunk_once(client, url, &range, &part_path).await { + Ok(()) => return Ok(()), + Err(e) => { + last_err = Some(e); + if attempt + 1 < retries { + tokio::time::sleep(Duration::from_millis(300)).await; + } + } + } + } + Err(last_err.unwrap_or_else(|| anyhow::anyhow!("分块 {idx} 下载失败"))) +} + +/// 单次请求下载分块内容到文件。 +async fn fetch_chunk_once( + client: &reqwest::Client, + url: &str, + range: &str, + part_path: &Path, +) -> Result<()> { + let resp = client.get(url).header("Range", range).send().await.context("chunk request")?; + let status = resp.status(); + if !status.is_success() && status != reqwest::StatusCode::PARTIAL_CONTENT { + anyhow::bail!("chunk HTTP {status}"); + } + let bytes = resp.bytes().await.context("read chunk body")?; + let mut f = std::fs::File::create(part_path).context("create part file")?; + f.write_all(&bytes).context("write part file")?; + Ok(()) +} + +/// 汇总所有分块文件的大小。 +fn sum_part_files(output: &Path, count: usize) -> Option { + let mut total = 0u64; + for i in 0..count { + let p = output.with_extension(format!("part{i}")); + let len = std::fs::metadata(&p).ok()?.len(); + total += len; + } + Some(total) +} + +/// 按顺序合并分块到最终文件, 并删除分块。 +fn merge_chunks(output: &Path, count: usize) -> Result<()> { + let mut final_f = std::fs::File::create(output).context("create final file")?; + for i in 0..count { + let p = output.with_extension(format!("part{i}")); + let data = std::fs::read(&p).with_context(|| format!("read part{i}"))?; + final_f.write_all(&data).context("write to final file")?; + let _ = std::fs::remove_file(&p); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_content_range() { + assert_eq!(parse_content_range_total("bytes 0-0/12345"), Some(12345)); + assert_eq!(parse_content_range_total("bytes 0-0/0"), Some(0)); + assert_eq!(parse_content_range_total("garbage"), None); + } + + #[test] + fn chunk_splitting_math() { + let total = 100u64; + let threads = 8usize; + let cs = total.div_ceil(threads as u64).max(1); + let chunks: Vec<(u64, u64)> = (0..threads) + .filter_map(|i| { + let s = (i as u64) * cs; + if s >= total { + return None; + } + Some((s, (s + cs - 1).min(total - 1))) + }) + .collect(); + assert_eq!(chunks[0].0, 0); + assert_eq!(chunks.last().unwrap().1, total - 1); + for w in chunks.windows(2) { + assert_eq!(w[0].1 + 1, w[1].0); + } + } +} diff --git a/src/update/install.rs b/src/update/install.rs new file mode 100644 index 0000000..eaf7125 --- /dev/null +++ b/src/update/install.rs @@ -0,0 +1,100 @@ +//! 安装替换: 解压 zip → 备份 → 替换 → 健康校验 → 恢复。 + +use anyhow::{Context, Result}; +use std::path::Path; + +/// 安装新 CC 二进制: 解压 zip 到主目录, 备份原二进制, 校验健康。 +/// +/// 失败时恢复原版本。 +pub fn install_zip(zip_path: &Path, main_dir: &Path, exe_path: &Path) -> Result<()> { + // 1. 打开 zip + let file = std::fs::File::open(zip_path).context("open zip file")?; + let mut archive = zip::ZipArchive::new(file).context("read zip archive")?; + + if archive.is_empty() { + anyhow::bail!("zip 为空"); + } + + // 2. 备份原可执行文件 + let backup = crate::util::fs::backup(exe_path) + .context("backup current executable")? + .ok_or_else(|| anyhow::anyhow!("当前可执行文件不存在: {}", exe_path.display()))?; + + // 3. 解压 + let extract_result = extract_zip_into(&mut archive, main_dir); + if let Err(e) = extract_result { + let _ = crate::util::fs::restore(&backup, exe_path); + let _ = crate::util::fs::remove_if_exists(&backup); + return Err(e.context("extract failed, restored backup")); + } + + // 4. 健康校验 + let status = crate::launch::preflight::check_binary_health(exe_path); + if status != crate::launch::preflight::PreflightStatus::Ok { + let _ = crate::util::fs::restore(&backup, exe_path); + let _ = crate::util::fs::remove_if_exists(&backup); + anyhow::bail!("新二进制不健康 (status: {status:?}), 已恢复原版本"); + } + + // 5. 清理备份 + let _ = crate::util::fs::remove_if_exists(&backup); + Ok(()) +} + +/// 将 zip 全部条目解压到目标目录 (路径穿越保护)。 +fn extract_zip_into(archive: &mut zip::ZipArchive, dest: &Path) -> Result<()> { + std::fs::create_dir_all(dest).context("create dest dir")?; + for i in 0..archive.len() { + let mut entry = archive.by_index(i).context("read zip entry")?; + let out_path = match entry.enclosed_name() { + Some(p) => dest.join(p), + None => continue, + }; + if entry.is_dir() { + std::fs::create_dir_all(&out_path).context("create entry dir")?; + } else { + if let Some(parent) = out_path.parent() { + std::fs::create_dir_all(parent).context("create entry parent")?; + } + let mut out = std::fs::File::create(&out_path).context("create entry file")?; + std::io::copy(&mut entry, &mut out).context("write entry")?; + } + } + Ok(()) +} + +/// 仅检查 zip 可读性 (不实际安装)。用于 --file 校验。 +pub fn validate_zip(zip_path: &Path) -> Result<()> { + let file = std::fs::File::open(zip_path).context("open zip file")?; + let archive = zip::ZipArchive::new(file).context("read zip archive")?; + if archive.is_empty() { + anyhow::bail!("zip 为空"); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + use std::io::Write; + + #[test] + fn validate_invalid_zip_fails() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("bad.zip"); + std::fs::write(&f, b"not a zip").unwrap(); + assert!(validate_zip(&f).is_err()); + } + + #[test] + fn validate_valid_zip_ok() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("good.zip"); + let mut w = zip::ZipWriter::new(std::fs::File::create(&f).unwrap()); + let opts = zip::write::SimpleFileOptions::default(); + w.start_file("claude.txt", opts).unwrap(); + w.write_all(b"fake exe").unwrap(); + w.finish().unwrap(); + assert!(validate_zip(&f).is_ok()); + } +} diff --git a/src/update/mod.rs b/src/update/mod.rs new file mode 100644 index 0000000..4b15700 --- /dev/null +++ b/src/update/mod.rs @@ -0,0 +1,13 @@ +//! 更新系统: 多源更新 (CC 自更新 / GitHub Releases / 加速通道)、 +//! 分段下载、SHA-256 校验、安装替换。 + +pub mod channels; +pub mod download; +pub mod install; +pub mod source; +pub mod verify; + +pub use channels::{Channel, geo_rank_channels}; +pub use download::DownloadProgress; +pub use source::{UpdateSource, fetch_latest_version, resolve_update_sources}; +pub use verify::{fetch_expected_hash, verify_sha256}; diff --git a/src/update/source.rs b/src/update/source.rs new file mode 100644 index 0000000..e3dba72 --- /dev/null +++ b/src/update/source.rs @@ -0,0 +1,100 @@ +//! 更新源解析: CC 自更新 / GitHub Releases / 加速通道。 + +use crate::config::{AppConfig, Platform}; +use crate::util::version::Version; +use anyhow::{Context, Result}; +use std::time::Duration; + +/// 更新源类型。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum UpdateSource { + /// CC 自更新 (`claude install`)。 + Native, + /// GitHub Releases 直链。 + Github, + /// 加速通道 (代理/镜像)。 + Mirror, +} + +/// 根据策略解析要尝试的更新源顺序。 +pub fn resolve_update_sources(config: &AppConfig) -> Vec { + match config.update.strategy.as_str() { + "native-only" => vec![UpdateSource::Native], + "github-only" => vec![UpdateSource::Github], + "mirror-first" => vec![UpdateSource::Mirror, UpdateSource::Github], + _ => vec![UpdateSource::Native, UpdateSource::Mirror, UpdateSource::Github], + } +} + +/// 查询 GitHub Releases 最新版本号。 +pub async fn fetch_latest_version(config: &AppConfig) -> Result { + let url = &config.update.version_check_url; + let client = reqwest::Client::builder() + .timeout(Duration::from_secs(config.update.connect_timeout_secs.max(1))) + .user_agent("cc-launcher/0.1") + .build() + .context("build http client")?; + let resp = client.get(url).send().await.context("request latest version")?; + let status = resp.status(); + if !status.is_success() { + anyhow::bail!("版本检查 HTTP {status}"); + } + let json: serde_json::Value = resp.json().await.context("parse release json")?; + let tag = + json.get("tag_name").and_then(|t| t.as_str()).context("missing tag_name in response")?; + let v = Version::parse(tag).context("parse version tag")?; + Ok(v.to_string()) +} + +/// 构建某版本 + 某平台的下载 URL (用模板 + 通道前缀)。 +pub fn build_download_url( + config: &AppConfig, + base: &str, + version: &str, + platform: Platform, +) -> String { + let asset = platform.default_asset_name(); + let template = config.update.download_url_template.clone(); + let url = template.replace("${version}", version).replace("${asset}", asset); + if base.is_empty() { url } else { format!("{base}/{url}") } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn strategy_resolution() { + let mut cfg = AppConfig::default(); + cfg.update.strategy = "native-only".to_string(); + assert_eq!(resolve_update_sources(&cfg), vec![UpdateSource::Native]); + cfg.update.strategy = "github-only".to_string(); + assert_eq!(resolve_update_sources(&cfg), vec![UpdateSource::Github]); + cfg.update.strategy = "mirror-first".to_string(); + assert_eq!(resolve_update_sources(&cfg), vec![UpdateSource::Mirror, UpdateSource::Github]); + cfg.update.strategy = "auto".to_string(); + assert_eq!( + resolve_update_sources(&cfg), + vec![UpdateSource::Native, UpdateSource::Mirror, UpdateSource::Github] + ); + } + + #[test] + fn url_template_substitution() { + let mut cfg = AppConfig::default(); + cfg.update.download_url_template = + "https://github.com/x/y/releases/download/v${version}/${asset}".to_string(); + let url = build_download_url(&cfg, "", "2.1.5", Platform::Windows); + assert!(url.contains("v2.1.5")); + assert!(url.contains("claude-win32-x64.zip")); + } + + #[test] + fn channel_prefix_prepended() { + let mut cfg = AppConfig::default(); + cfg.update.download_url_template = + "https://github.com/x/y/releases/download/v${version}/${asset}".to_string(); + let url = build_download_url(&cfg, "https://gh.proxy", "2.1.5", Platform::Windows); + assert!(url.starts_with("https://gh.proxy/")); + } +} diff --git a/src/update/verify.rs b/src/update/verify.rs new file mode 100644 index 0000000..4de2f0f --- /dev/null +++ b/src/update/verify.rs @@ -0,0 +1,77 @@ +//! SHA-256 校验: 本地文件哈希 + 从远端获取期望哈希。 + +use anyhow::{Context, Result}; +use sha2::{Digest, Sha256}; +use std::io::Read; +use std::path::Path; + +/// 计算文件 SHA-256 十六进制。 +pub fn sha256_file(path: &Path) -> Result { + let mut f = std::fs::File::open(path).with_context(|| format!("open {}", path.display()))?; + let mut hasher = Sha256::new(); + let mut buf = [0u8; 64 * 1024]; + loop { + let n = f.read(&mut buf).context("read file for hashing")?; + if n == 0 { + break; + } + hasher.update(&buf[..n]); + } + Ok(hex::encode(hasher.finalize())) +} + +/// 校验文件 SHA-256 是否匹配期望值。 +pub fn verify_sha256(path: &Path, expected: &str) -> Result<()> { + let actual = sha256_file(path)?; + if !actual.eq_ignore_ascii_case(expected.trim()) { + anyhow::bail!("SHA-256 不匹配: 期望 {expected}, 实际 {actual}"); + } + Ok(()) +} + +/// 从远端获取期望哈希 (URL 直接返回哈希内容)。 +pub async fn fetch_expected_hash(url: &str, timeout_secs: u64) -> Result { + let client = reqwest::Client::builder() + .timeout(std::time::Duration::from_secs(timeout_secs.max(1))) + .user_agent("cc-launcher/0.1") + .build() + .context("build http client")?; + let resp = client.get(url).send().await.context("fetch expected hash")?; + let status = resp.status(); + if !status.is_success() { + anyhow::bail!("获取哈希 HTTP {status}"); + } + let text = resp.text().await.context("read hash body")?; + let hash = text.split_whitespace().next().context("empty hash response")?; + Ok(hash.to_string()) +} + +#[cfg(test)] +mod tests { + use super::*; + use std::io::Write; + + #[test] + fn sha256_matches_known() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("a.txt"); + let mut file = std::fs::File::create(&f).unwrap(); + file.write_all(b"hello").unwrap(); + drop(file); + let hash = sha256_file(&f).unwrap(); + assert_eq!(hash, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"); + } + + #[test] + fn verify_ok_and_fail() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("b.bin"); + std::fs::write(&f, b"data").unwrap(); + let good = sha256_file(&f).unwrap(); + assert!(verify_sha256(&f, &good).is_ok()); + assert!( + verify_sha256(&f, "0000000000000000000000000000000000000000000000000000000000000000") + .is_err() + ); + } +} diff --git a/src/util/fs.rs b/src/util/fs.rs new file mode 100644 index 0000000..5c85f79 --- /dev/null +++ b/src/util/fs.rs @@ -0,0 +1,87 @@ +//! 文件系统辅助: 原子写入、备份恢复。 + +use anyhow::{Context, Result}; +use std::fs; +use std::path::{Path, PathBuf}; + +/// 原子写入文件: 先写临时文件, 再 rename 替换, 避免写一半崩溃留下损坏文件。 +pub fn atomic_write(path: &Path, contents: &[u8]) -> Result<()> { + let parent = path.parent().context("path has no parent")?; + fs::create_dir_all(parent).context("create parent dir")?; + let tmp = parent.join(format!( + ".{}.tmp-{}", + path.file_name().and_then(|n| n.to_str()).unwrap_or("file"), + std::process::id() + )); + fs::write(&tmp, contents).context("write temp file")?; + fs::rename(&tmp, path).context("rename temp file to target")?; + Ok(()) +} + +/// 原子写入文本文件。 +pub fn atomic_write_str(path: &Path, contents: &str) -> Result<()> { + atomic_write(path, contents.as_bytes()) +} + +/// 创建带时间戳的备份: `.bak-`。 +pub fn backup(path: &Path) -> Result> { + if !path.exists() { + return Ok(None); + } + let stamp = chrono::Local::now().format("%Y%m%d-%H%M%S"); + let backup_path = path.with_extension(format!( + "{}.bak-{}", + path.extension().and_then(|e| e.to_str()).unwrap_or("bin"), + stamp + )); + fs::copy(path, &backup_path).context("copy file to backup")?; + Ok(Some(backup_path)) +} + +/// 从备份恢复文件到目标位置。 +pub fn restore(backup: &Path, target: &Path) -> Result<()> { + if let Some(parent) = target.parent() { + fs::create_dir_all(parent).context("create target parent dir")?; + } + fs::copy(backup, target).context("copy backup to target")?; + Ok(()) +} + +/// 安全删除文件: 不存在时静默成功。 +pub fn remove_if_exists(path: &Path) -> Result<()> { + match fs::remove_file(path) { + Ok(()) => Ok(()), + Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), + Err(e) => Err(e).context("remove file"), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn atomic_write_roundtrip() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("a.txt"); + atomic_write_str(&f, "hello").unwrap(); + assert_eq!(fs::read_to_string(&f).unwrap(), "hello"); + } + + #[test] + fn backup_and_restore() { + let dir = tempfile::tempdir().unwrap(); + let f = dir.path().join("x.bin"); + fs::write(&f, b"orig").unwrap(); + let bak = backup(&f).unwrap().unwrap(); + fs::write(&f, b"new").unwrap(); + restore(&bak, &f).unwrap(); + assert_eq!(fs::read(&f).unwrap(), b"orig"); + } + + #[test] + fn remove_missing_is_ok() { + let dir = tempfile::tempdir().unwrap(); + remove_if_exists(&dir.path().join("nope.txt")).unwrap(); + } +} diff --git a/src/util/mod.rs b/src/util/mod.rs new file mode 100644 index 0000000..4a1d4bb --- /dev/null +++ b/src/util/mod.rs @@ -0,0 +1,5 @@ +//! 通用工具模块: 路径解析、文件系统辅助、版本比较。 + +pub mod fs; +pub mod paths; +pub mod version; diff --git a/src/util/paths.rs b/src/util/paths.rs new file mode 100644 index 0000000..d02c787 --- /dev/null +++ b/src/util/paths.rs @@ -0,0 +1,89 @@ +//! 路径解析: 基于可执行文件位置推导 config/、logs/、CC 相关目录。 +//! +//! 便携式部署要求 config/ 与 logs/ 紧邻二进制所在目录, 不依赖系统目录。 + +use std::env; +use std::path::{Path, PathBuf}; + +/// 程序自身所在目录 (即二进制文件所在目录)。 +pub fn exe_dir() -> PathBuf { + env::current_exe() + .ok() + .and_then(|p| p.parent().map(|p| p.to_path_buf())) + .unwrap_or_else(|| env::current_dir().unwrap_or_else(|_| PathBuf::from("."))) +} + +/// 程序根目录: 默认为 exe_dir 的父目录 (便于 `dist/` 打包布局)。 +pub fn app_root() -> PathBuf { + exe_dir().parent().map(Path::to_path_buf).unwrap_or_else(exe_dir) +} + +/// 配置目录: `/config`。 +pub fn config_dir() -> PathBuf { + app_root().join("config") +} + +/// 日志目录: `/logs`。 +pub fn logs_dir() -> PathBuf { + app_root().join("logs") +} + +/// 用户配置文件路径: `/config.toml`。 +pub fn config_file() -> PathBuf { + config_dir().join("config.toml") +} + +/// 展开 `${VAR}` / `${HOME}` 等模板变量。 +/// +/// 支持的内置占位符: +/// - `${EXE_DIR}` 二进制所在目录 +/// - `${APP_ROOT}` 程序根目录 +/// - `${HOME}` 用户主目录 +/// - 其余 `${X}` 从当前进程环境变量读取, 缺失则保留原样。 +pub fn expand_template(template: &str) -> String { + let re = regex::Regex::new(r"\$\{([^}]+)\}").expect("static template regex"); + re.replace_all(template, |caps: ®ex::Captures| { + let name = &caps[1]; + match name { + "EXE_DIR" => exe_dir().to_string_lossy().to_string(), + "APP_ROOT" => app_root().to_string_lossy().to_string(), + "HOME" | "USERPROFILE" => env::var("HOME") + .or_else(|_| env::var("USERPROFILE")) + .unwrap_or_else(|_| name.to_string()), + other => env::var(other).unwrap_or_else(|_| format!("${{{other}}}")), + } + }) + .to_string() +} + +/// 将路径字符串展开模板后解析为 PathBuf。 +pub fn resolve_path(template: &str) -> PathBuf { + PathBuf::from(expand_template(template)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn exe_dir_is_absolute() { + assert!(exe_dir().is_absolute()); + } + + #[test] + fn config_dir_is_under_app_root() { + assert!(config_dir().starts_with(app_root())); + } + + #[test] + fn expand_known_vars() { + assert!(!expand_template("${EXE_DIR}/x").is_empty()); + assert!(!expand_template("${APP_ROOT}/y").is_empty()); + } + + #[test] + fn expand_unknown_var_preserved() { + let out = expand_template("${NO_SUCH_VAR_XYZ}/p"); + assert!(out.contains("NO_SUCH_VAR_XYZ")); + } +} diff --git a/src/util/version.rs b/src/util/version.rs new file mode 100644 index 0000000..152e781 --- /dev/null +++ b/src/util/version.rs @@ -0,0 +1,103 @@ +//! 版本号解析与比较 (Semver 子集: `X.Y.Z`)。 + +use std::cmp::Ordering; +use std::fmt; + +/// 语义化版本 `X.Y.Z`。 +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Version { + pub major: u64, + pub minor: u64, + pub patch: u64, +} + +impl Version { + /// 从字符串解析版本号。接受 `X.Y.Z`、`vX.Y.Z`、`^X.Y.Z`、`~X.Y.Z` 前缀。 + pub fn parse(input: &str) -> Option { + let trimmed = input.trim().trim_start_matches(['v', '^', '~', '=']); + let mut parts = trimmed.split('.'); + let major = parts.next()?.trim().parse().ok()?; + let minor = parts.next()?.trim().parse().ok()?; + let patch = parts.next()?.trim().parse().ok()?; + Some(Self { major, minor, patch }) + } + + /// 从版本字符串列表/输出中提取第一个版本号。 + pub fn extract(input: &str) -> Option { + Self::parse(input).or_else(|| { + let re = regex::Regex::new(r"(\d+)\.(\d+)\.(\d+)").expect("static version regex"); + let caps = re.captures(input)?; + Some(Self { + major: caps[1].parse().ok()?, + minor: caps[2].parse().ok()?, + patch: caps[3].parse().ok()?, + }) + }) + } +} + +impl PartialOrd for Version { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for Version { + fn cmp(&self, other: &Self) -> Ordering { + (self.major, self.minor, self.patch).cmp(&(other.major, other.minor, other.patch)) + } +} + +impl fmt::Display for Version { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}.{}.{}", self.major, self.minor, self.patch) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_plain() { + assert_eq!(Version::parse("2.1.220"), Some(Version { major: 2, minor: 1, patch: 220 })); + } + + #[test] + fn parse_with_prefix() { + assert_eq!(Version::parse("v2.1.220"), Some(Version { major: 2, minor: 1, patch: 220 })); + assert_eq!(Version::parse("^2.1.220"), Some(Version { major: 2, minor: 1, patch: 220 })); + assert_eq!(Version::parse("~2.1.220"), Some(Version { major: 2, minor: 1, patch: 220 })); + } + + #[test] + fn parse_invalid_returns_none() { + assert_eq!(Version::parse("abc"), None); + assert_eq!(Version::parse("2.1"), None); + assert_eq!(Version::parse(""), None); + } + + #[test] + fn extract_from_text() { + assert_eq!( + Version::extract("v2.1.220 (latest)"), + Some(Version { major: 2, minor: 1, patch: 220 }) + ); + assert_eq!(Version::extract("no version here"), None); + } + + #[test] + fn ordering() { + let a = Version::parse("2.1.200").unwrap(); + let b = Version::parse("2.1.220").unwrap(); + let c = Version::parse("2.2.0").unwrap(); + assert!(a < b); + assert!(b < c); + assert!(c > a); + } + + #[test] + fn display() { + assert_eq!(Version::parse("1.2.3").unwrap().to_string(), "1.2.3"); + } +} From f8157d410699a88f9b6958a91522ef776a1d29cb Mon Sep 17 00:00:00 2001 From: Minecraft269 <176564132+Minecraft269@users.noreply.github.com> Date: Fri, 7 Aug 2026 20:00:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=AE=8C=E6=95=B4=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=AE=A1=E7=90=86=E5=91=BD=E4=BB=A4=20+=20TUI=20+=20G?= =?UTF-8?q?UI=20(Phase=207-10)=20+=20=E5=8F=8C=E8=AF=AD=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CLI 管理命令: update/repair/rollback/check/reset/env/logs/config-path/completions - TUI: ratatui 4 Tab 仪表盘 (概览/下载更新/诊断/日志) - GUI: Tauri 2 + React + Tailwind (独立 src-tauri crate, 7 页面) - 前端构建验证通过 (npm build) - 路径改进: 开发时 config/logs 落在项目根 - 本地 config/config.toml (排除出仓库) - 文档: README 中英双语 + 配置项表 + CLAUDE.md 更新 - workspace 配置: src-tauri 排除 (不拖慢主库 CI) --- .gitignore | 4 +- CLAUDE.md | 144 +- Cargo.lock | 299 +- Cargo.toml | 10 + README.zh-CN.md | 126 + src-tauri/Cargo.lock | 5754 ++++++++++++++++++++++++++ src-tauri/Cargo.toml | 21 + src-tauri/build.rs | 3 + src-tauri/capabilities/default.json | 9 + src-tauri/frontend/index.html | 12 + src-tauri/frontend/package-lock.json | 2758 ++++++++++++ src-tauri/frontend/package.json | 26 + src-tauri/frontend/src/App.tsx | 224 + src-tauri/frontend/src/main.tsx | 10 + src-tauri/frontend/src/styles.css | 16 + src-tauri/frontend/tsconfig.json | 20 + src-tauri/frontend/vite.config.ts | 16 + src-tauri/icons/128x128.png | Bin 0 -> 371 bytes src-tauri/icons/32x32.png | Bin 0 -> 114 bytes src-tauri/src/commands.rs | 85 + src-tauri/src/lib.rs | 18 + src-tauri/src/main.rs | 6 + src-tauri/tauri.conf.json | 35 + src/commands.rs | 436 +- src/lib.rs | 1 + src/tui.rs | 230 + src/util/paths.rs | 15 +- 27 files changed, 10167 insertions(+), 111 deletions(-) create mode 100644 README.zh-CN.md create mode 100644 src-tauri/Cargo.lock create mode 100644 src-tauri/Cargo.toml create mode 100644 src-tauri/build.rs create mode 100644 src-tauri/capabilities/default.json create mode 100644 src-tauri/frontend/index.html create mode 100644 src-tauri/frontend/package-lock.json create mode 100644 src-tauri/frontend/package.json create mode 100644 src-tauri/frontend/src/App.tsx create mode 100644 src-tauri/frontend/src/main.tsx create mode 100644 src-tauri/frontend/src/styles.css create mode 100644 src-tauri/frontend/tsconfig.json create mode 100644 src-tauri/frontend/vite.config.ts create mode 100644 src-tauri/icons/128x128.png create mode 100644 src-tauri/icons/32x32.png create mode 100644 src-tauri/src/commands.rs create mode 100644 src-tauri/src/lib.rs create mode 100644 src-tauri/src/main.rs create mode 100644 src-tauri/tauri.conf.json create mode 100644 src/tui.rs diff --git a/.gitignore b/.gitignore index 5af29e7..457268f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,13 +13,15 @@ target/ # Tauri (GUI 构建产物) src-tauri/target/ +src-tauri/gen/ *.dmg *.msi *.AppImage # Node (GUI 前端) node_modules/ -src/gui/frontend/dist/ +src-tauri/frontend/dist/ +src-tauri/frontend/node_modules/ # Python (遗留参考,若清理则删除以下) __pycache__/ diff --git a/CLAUDE.md b/CLAUDE.md index 27d06f0..7cd4453 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,105 +6,89 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - **GitHub 操作**:使用 `gh` CLI,不用浏览器手动操作 - **提交信息**:不要包含 `Co-Authored-By` 尾注 -- **个人排除项**:不要编辑 `.gitignore`,用户通过 `.git/info/exclude` 自行管理 -- **代码修改**:始终先 `EnterWorktree` 隔离工作,提交后推送并创建 draft PR +- **代码修改**:始终先 `EnterWorktree` 隔离工作 +- **提交策略**:仅在最终提交时合并 PR 到主目录并清理 worktree(非每次提交) +- **隐私**:提交前必须检查无本地私人文件进仓库(API keys、settings.json、config/、logs/ 等) ## 项目概述 -Claude Code Custom Launcher — Claude Code 的 Python 通用启动器,支持多后端切换、环境变量管理、插件更新和配置 GUI。不是一个 pip 包,通过 `python -m claude_custom` 直接运行。要求 Python 3.10+。 +Claude Code 的 Rust 配置驱动启动器(`cc-launcher`)。零硬编码,所有行为由 `config/config.toml` 控制。便携式部署:程序 + `config/` + `logs/` 同目录。 -**三个入口点:** -- `claude-custom.cmd` → 普通用户 CLI 入口(设置 PYTHONPATH 后调用 `python -m claude_custom`) -- `python -m claude_custom` → 开发者直接调用 -- `claude-config.pyw` → GUI 独立入口(双击启动,无控制台窗口) +**三个 UI 形态:** +- **CLI**(clap 子命令)→ 默认入口,无子命令时启动 CC +- **TUI**(ratatui 4 Tab)→ `cc-launcher tui` +- **GUI**(Tauri 2 + React)→ `cc-launcher gui`(独立 `src-tauri/` crate,可选构建) ## 常用命令 ```bash -# 首次安装依赖 -pip install -r requirements.txt +# 构建 + 测试 + 风格 + lint +cargo build +cargo test +cargo fmt --check +cargo clippy --all-targets --all-features -- -D warnings + +# 启动 Claude Code(默认) +cargo run -- + +# 管理命令 +cargo run -- update +cargo run -- repair +cargo run -- rollback +cargo run -- check +cargo run -- tui + +# GUI(独立构建) +cd src-tauri && cargo build ``` -```bash -# 直接启动 -python -m claude_custom - -# 预览模式(查看配置但不启动) -python -m claude_custom -n - -# 运行诊断检查 -python -m claude_custom --check - -# 启动 GUI -python -m claude_custom --gui # CLI 触发 -python claude-config.pyw # 双击启动(无控制台窗口) - -# 本地导入测试 -python -c "import sys; sys.path.insert(0, '.'); from claude_custom import config" -``` - -本项目无测试套件、无 linter 配置、无构建步骤。验证方式:直接运行 `python -m claude_custom --help` 和 `python -m claude_custom --check`。 - ## 核心架构 -### 启动流程(无参启动路径) - -``` -__main__.py:main() - → 参数分类(自定义 FLAGS vs 透传 CC 参数) - → 无管理参数时 → launch_cc() - → config.get_claude_exe() # 查找 CC 可执行文件 - → env_manager.apply() # 应用 user_config.yaml 中的环境变量 - → auth_manager.setup_daemon_bypass() # 注入 ANTHROPIC_AUTH_TOKEN + CLAUDE_CODE_SIMPLE - → _prelaunch_interactive_check() # 交互式更新/修复确认(-s 跳过) - → ApiKeyInjector 上下文注入 API Key - → subprocess.run(claude.exe) # 透传 stdio -``` - ### 模块职责 | 模块 | 职责 | |------|------| -| `__main__.py` | CLI 入口,参数路由。`--` 分隔自定义参数和 CC 透传参数 | -| `config.py` | 路径推导(基于 `__file__` + 环境变量覆盖 + `user_config.yaml`)+ YAML 配置读写 | -| `launcher.py` | subprocess 启动 CC、启动前交互式检查、二进制健康检查 | -| `auth_manager.py` | Daemon OAuth 绕过:设置 `ANTHROPIC_AUTH_TOKEN`+`CLAUDE_CODE_SIMPLE` | -| `env_manager.py` | 环境变量分层管理(快照/回滚),支持 `user_config.yaml` 中 `env:` 块 | -| `settings_manager.py` | `settings.json` 安全读写(原子写入 + 备份);`ApiKeyInjector` 上下文管理器(进入注入 API Key,退出清理) | -| `credential_manager.py` | 多源 API Key 查找:命令行 `-k` → 环境变量 → keyring → `.api_key` 文件 | -| `updater.py` | CC 二进制升级/修复、插件/Skills 更新,支持镜像源回退 | -| `diagnostics.py` | `--check`/`--doctor`/`--reset`/`--env`/`--logs`/`--config` 等管理操作 | -| `network.py` | HTTP GET(带重试 + 指数退避 + 镜像回退) | -| `gui/` | PySide6 配置 GUI(7 个标签页),`claude-config.pyw` 独立入口 | - -### 路径推导 - -所有路径基于 `__file__` 相对推导,按优先级可被覆盖: -- `CLAUDECODE_ROOT` → `ROOT_DIR` -- `CLAUDECODE_MAIN_DIR` → `MAIN_DIR`(CC npm 包所在目录) -- `CLAUDECODE_CONFIG_DIR` → `CONFIG_DIR` -- `CLAUDECODE_EXE_PATH` → CC 可执行文件路径(最高优先级) -- `user_config.yaml` 中 `custom_exe_path` → 次优先级 - -## 关键设计模式 +| `cli.rs` | clap 子命令定义(help 中英双语) | +| `config/` | TOML schema + 加载/校验 + 自动生成模板 + Profile | +| `launch/` | preflight 检查 + 环境注入 + spawn + 崩溃检测 | +| `env/` | 环境变量优先级链 + 快照回滚 + 模板替换 | +| `auth/` | 多源 API Key + daemon 绕过 + settings.json 注入-清理(自愈) | +| `update/` | 多源更新(自更新/GitHub/镜像)+ 分段下载 + SHA-256 | +| `repair/` | 崩溃检测 + 指数退避 + 熔断器 | +| `rollback/` | 版本清单 + 原子替换 | +| `logging/` | tracing 日志(文件+控制台)+ 按天轮转 | +| `i18n/` | 中英双语翻译 + 系统 locale 检测 | +| `tui.rs` | ratatui 4 Tab 仪表盘 | +| `src-tauri/` | Tauri 2 GUI(独立 crate,React 前端) | + +### 配置系统 + +- `config/config.toml`:首次运行自动生成全注释模板(不提供默认配置,用代码内置默认) +- 优先级:CLI 参数 > 配置文件 > 系统环境 > 内置默认 +- 校验:加载时检查类型/范围,无效则报具体错误 + +### 数据流 -### 参数透传 -`__main__.py:main()` 将参数分为三类:自定义 FLAGS(管理操作)、自定义 VALUED(`-m`/`-d`/`-k` 等)、其余全部透传给 CC。不识别 = 透传,无需在启动器中重复定义 CC 原生参数。 +``` +main() → 加载配置 + I18N + 日志 + → 无子命令: launch(preflight → env → auth 注入 → spawn → 崩溃检测/修复) + → 有子命令: update/repair/rollback/check/reset/env/logs/config-path/completions/tui/gui +``` -### API Key 安全 -`ApiKeyInjector` 上下文管理器在 subprocess 启动前将 API Key 注入 `settings.json`,进程退出后在 `__exit__` 中自动清除。支持 keyring 系统凭据管理器。 +## 关键设计模式 -### 错误处理 -- `launcher.py:launch_cc()` 在 `get_claude_exe()` 调用外捕获 `FileNotFoundError`,输出格式化错误信息(问题描述 + 修复步骤 + 默认路径),返回退出码 1 -- `__main__.py:main()` 有顶层 `try/except` 兜底(`FileNotFoundError`/`KeyboardInterrupt`/`Exception`) -- `_run_management()` 使用 `except (RuntimeError, FileNotFoundError, TimeoutError)` 模式 -- `network.py` 使用返回 `None` 而非抛异常处理网络失败 +- **零硬编码**:所有路径/URL/超时/模型名从配置读取,内置默认在 `config/schema.rs` +- **多源更新**:`update.strategy` 控制 auto/native/github/mirror 顺序;通道按环境检测排序 +- **API Key 安全**:`ApiKeyInjector` 启动注入 settings.json、退出清理,带脏数据自愈 + 信号处理器 +- **错误处理**:库级 `thiserror`,应用级 `anyhow`,绝不静默崩溃 +- **自愈**:崩溃检测(宽限期)+ 熔断器防无限重装 -### 镜像回退 -`network.py` 和 `updater.py` 支持 `--mirror` 参数切换到国内 npm 镜像源。网络操作失败时自动尝试回退到官方源。 +## CI -## 配置 +GitHub Actions(`.github/workflows/`,全 YAML,独立 job 文件): +- `style.yml`:rustfmt + clippy(`-D warnings`) +- `build-test.yml`:3 OS 编译 + 测试 + 构建产物验证(--help/--version/--dry-run) +- `config-validation.yml`:配置 schema 测试 +- `i18n-check.yml`:语言文件 key 一致性 -- **Python**: 3.10+ -- `user_config.yaml`:用户可编辑,`backend`/`mirror`/`skip_check`/`custom_exe_path`/`env`/`launch_presets` -- 环境变量优先级:命令行参数 > `user_config.yaml` `env:` > 系统环境变量 > 代码内置默认值 +触发:仅核心文件变更(src/**, Cargo.toml, Cargo.lock, i18n/**)。 diff --git a/Cargo.lock b/Cargo.lock index 75f6ee0..ce693f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,6 +28,12 @@ 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.6" @@ -182,6 +188,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.4.0" @@ -201,11 +222,14 @@ dependencies = [ "anyhow", "chrono", "clap", + "clap_complete", + "crossterm", "ctrlc", "directories", "glob", "hex", "keyring", + "ratatui", "regex", "reqwest", "serde", @@ -292,6 +316,15 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_complete" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19" +dependencies = [ + "clap", +] + [[package]] name = "clap_derive" version = "4.6.4" @@ -325,6 +358,20 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +[[package]] +name = "compact_str" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd622ebbb56a5b2ccb651b32b911cdeb2a9b4b11776b2473bf26a26a286244e" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -385,6 +432,31 @@ version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +[[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", + "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" @@ -406,6 +478,40 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "darling" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.3", +] + +[[package]] +name = "darling_macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.3", +] + [[package]] name = "deflate64" version = "0.1.12" @@ -529,6 +635,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -652,6 +764,17 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "hashbrown" version = "0.17.1" @@ -892,6 +1015,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -920,7 +1049,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", ] [[package]] @@ -932,6 +1070,19 @@ dependencies = [ "generic-array", ] +[[package]] +name = "instability" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf84e73fa6f27f299dec58e13223cf70db80da872eb921d4f6138342a0eabc8" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "ipnet" version = "2.12.1" @@ -944,6 +1095,15 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1047,6 +1207,15 @@ version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + [[package]] name = "lru-slab" version = "0.1.2" @@ -1095,6 +1264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.61.2", ] @@ -1213,6 +1383,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -1371,6 +1547,27 @@ dependencies = [ "rand_core", ] +[[package]] +name = "ratatui" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" +dependencies = [ + "bitflags", + "cassowary", + "compact_str", + "crossterm", + "indoc", + "instability", + "itertools", + "lru", + "paste", + "strum", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.2.0", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -1686,6 +1883,27 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +[[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-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -1730,12 +1948,40 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.119", +] + [[package]] name = "subtle" version = "2.6.1" @@ -2148,6 +2394,35 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "untrusted" version = "0.9.0" @@ -2314,6 +2589,28 @@ dependencies = [ "winsafe", ] +[[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" diff --git a/Cargo.toml b/Cargo.toml index 7fb7f2b..4b92bd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,8 @@ +[workspace] +members = ["."] +# GUI 为独立 crate, 单独构建 (避免 Tauri 巨型依赖拖慢主库 CI) +exclude = ["src-tauri"] + [package] name = "cc-launcher" version = "0.1.0" @@ -17,6 +22,7 @@ path = "src/lib.rs" [dependencies] # ---- CLI ---- clap = { version = "4", features = ["derive", "env"] } +clap_complete = "4" # ---- Config & Serialization ---- serde = { version = "1", features = ["derive"] } @@ -61,6 +67,10 @@ which = "6" # ---- Signal handling (Ctrl+C cleanup) ---- ctrlc = "3" +# ---- TUI ---- +ratatui = "0.29" +crossterm = "0.28" + # ---- Windows process creation flags ---- [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.59", features = ["Win32_System_Threading"] } diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..2005ec7 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,126 @@ +# CC Launcher (cc-launcher) + +Claude Code 配置驱动启动器: 多源更新、自愈修复、环境注入、国际化。 + +> English: see [README.md](README.md) + +## 简介 + +基于 Rust 重写的 Claude Code 启动器, 替代旧的 Python / PowerShell 实现。 +零硬编码, 所有行为由 `config/config.toml` 配置控制。便携式部署: 程序 + `config/` + `logs/` 同目录。 + +## 特性 + +- **多源更新**: CC 自更新 (`claude install`) / GitHub Releases 直链 / 加速通道 (按环境检测排序) +- **分段下载**: 多线程 Range 下载 + 进度/速度/ETA + 停滞检测 + SHA-256 校验 +- **自愈修复**: 崩溃检测 (宽限期) + 指数退避 + 熔断器 (防无限重装) +- **环境注入**: CLI > 配置 > 系统 > 默认 优先级链 + 快照回滚 + 模板替换 +- **认证**: 多源 API Key (CLI/env/file/keyring) + Daemon OAuth 绕过 + settings.json 注入-清理 (自愈) +- **回滚**: 版本清单 + 原子替换 (失败恢复) +- **I18N**: 中英双语, 跟随系统 locale +- **UI**: CLI (clap) + TUI (ratatui 4 Tab) + GUI (Tauri 2 + React, 可选) + +## 快速开始 + +```bash +# 构建 +cargo build --release + +# 运行二进制 (首次运行自动生成 config/config.toml 模板) +./target/release/cc-launcher --help + +# 启动 Claude Code +./target/release/cc-launcher + +# 检查更新 / 修复 / 回滚 +./target/release/cc-launcher update +./target/release/cc-launcher repair +./target/release/cc-launcher rollback + +# 全面诊断 +./target/release/cc-launcher check + +# TUI 仪表盘 +./target/release/cc-launcher tui + +# GUI (需先构建 src-tauri) +./target/release/cc-launcher gui +``` + +## 配置 + +配置文件: `config/config.toml` (首次运行自动生成全注释模板)。 + +### 配置项参考 + +| 配置键 | 类型 | 默认值 | 说明 | +|--------|------|--------|------| +| `i18n.lang` | string | `"auto"` | 界面语言: auto / zh-CN / en-US | +| `paths.cc_exe` | string/null | null | CC 可执行文件路径 (null=自动查找) | +| `paths.config_dir` | string/null | null | CC 配置目录 (settings.json 等) | +| `paths.plugins_dir` | string/null | null | 插件目录 | +| `paths.skills_dir` | string/null | null | Skills 目录 | +| `paths.main_dir` | string/null | null | CC 主安装目录 | +| `backend.backend` | string | `"deepseek"` | 后端: deepseek / anthropic / openai / custom | +| `backend.base_url` | string/null | null | API 地址 (null=后端默认) | +| `backend.api_key_source` | string | `"env:DEEPSEEK_API_KEY"` | Key 来源: env:VAR / file:path / keyring | +| `backend.models.default` | string | `"deepseek-v4-pro[1m]"` | 默认模型 | +| `backend.models.opus` | string | `"deepseek-v4-pro[1m]"` | Opus 级模型 | +| `backend.models.sonnet` | string | `"deepseek-v4-pro[1m]"` | Sonnet 级模型 | +| `backend.models.haiku` | string | `"deepseek-v4-flash[1m]"` | Haiku 级模型 | +| `backend.models.subagent` | string | `"deepseek-v4-flash[1m]"` | 子代理模型 | +| `launch.pre_launch` | string | `"prompt"` | 检查策略: prompt / notify / auto / off | +| `launch.separate_window` | bool | `false` | 分离窗口运行 CC | +| `launch.check_interval_hours` | u32 | `24` | notify 模式检查间隔 (小时) | +| `update.strategy` | string | `"auto"` | 更新策略: auto / native-only / github-only / mirror-first | +| `update.chunk_size` | u64 | `8388608` | 分块大小 (字节, 8MB) | +| `update.max_threads` | usize | `8` | 并发下载线程数 | +| `update.connect_timeout_secs` | u64 | `10` | 连接超时 (秒) | +| `update.stall_timeout_secs` | u64 | `20` | 停滞超时 (秒) | +| `update.total_timeout_secs` | u64 | `600` | 总超时 (秒) | +| `update.retry_count` | u32 | `3` | 每分块重试次数 | +| `update.retry_base_delay_ms` | u64 | `1000` | 重试基础延迟 (毫秒) | +| `update.download_url_template` | string | GitHub URL | 下载地址模板 | +| `update.version_check_url` | string | GitHub API | 版本检查 URL | +| `update.keep_versions` | usize | `3` | 保留的历史版本数 | +| `channels[].url` | string | — | 代理/镜像 URL (空=直连) | +| `channels[].tags` | []string | — | 环境检测标签 | +| `channels[].priority` | u32 | — | 优先级 | +| `geo.enabled` | bool | `true` | 环境检测开关 | +| `geo.force_tag` | string | `""` | 强制通道标签 | +| `repair.grace_period_secs` | u32 | `5` | 崩溃宽限期 (秒) | +| `repair.max_retries` | u32 | `3` | 最大重试次数 | +| `repair.backoff_multiplier` | f64 | `2.0` | 退避乘数 | +| `repair.circuit_breaker_threshold` | u32 | `5` | 熔断器阈值 | +| `repair.circuit_breaker_reset_secs` | u64 | `300` | 熔断器重置时间 (秒) | +| `logging.level` | string | `"info"` | 日志级别 | +| `logging.retention_days` | u32 | `30` | 日志保留天数 | +| `logging.file_enabled` | bool | `true` | 写日志文件 | +| `logging.console_enabled` | bool | `true` | 终端输出 | +| `plugins.git_dirs` | []string | `[]` | git 插件目录 | +| `plugins.check_interval_secs` | u64 | `86400` | 插件检查间隔 | +| `profiles..*` | — | — | 命名配置预设 | +| `platforms..asset_name` | string | (平台默认) | Release 资源文件名 | + +## 开发 + +```bash +# 测试 + 风格 + lint +cargo test +cargo fmt --check +cargo clippy --all-targets --all-features -- -D warnings +``` + +CI (GitHub Actions, YAML): `.github/workflows/` — style / build-test / config-validation / i18n-check。 + +### GUI (可选) + +```bash +# 构建前端 + Tauri +cd src-tauri/frontend && npm install && npm run build +cd .. && cargo build # 需 Tauri 依赖 +``` + +## 隐私 + +`config/`、`logs/`、`target/`、`node_modules/` 等本地/构建产物不纳入版本库 (见 `.gitignore`)。 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock new file mode 100644 index 0000000..59c49e9 --- /dev/null +++ b/src-tauri/Cargo.lock @@ -0,0 +1,5754 @@ +# 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 = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] + +[[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 = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.19", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cc-launcher" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "clap", + "clap_complete", + "crossterm", + "ctrlc", + "directories", + "glob", + "hex", + "keyring", + "ratatui", + "regex", + "reqwest 0.12.28", + "serde", + "serde_json", + "sha2", + "thiserror 1.0.69", + "tokio", + "toml 0.8.23", + "tracing", + "tracing-subscriber", + "which", + "windows-sys 0.59.0", + "zip", +] + +[[package]] +name = "cc-launcher-gui" +version = "0.1.0" +dependencies = [ + "cc-launcher", + "serde", + "serde_json", + "tauri", + "tauri-build", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_complete" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "compact_str" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd622ebbb56a5b2ccb651b32b911cdeb2a9b4b11776b2473bf26a26a286244e" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[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.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.13.1", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "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 = "cssparser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ctor" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + +[[package]] +name = "ctrlc" +version = "3.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" +dependencies = [ + "dispatch2", + "nix", + "windows-sys 0.61.2", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + +[[package]] +name = "darling" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +dependencies = [ + "darling_core 0.24.0", + "darling_macro 0.24.0", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.3", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +dependencies = [ + "darling_core 0.24.0", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "deflate64" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys 0.5.0", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.4.6", + "windows-sys 0.48.0", +] + +[[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 0.5.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser", + "foldhash 0.2.0", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dtor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[package]] +name = "embed-resource" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.4+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[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", + "libz-ng-sys", + "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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[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 = "futures-channel" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-executor" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" + +[[package]] +name = "futures-macro" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "futures-sink" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[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", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core", + "wasm-bindgen", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "html5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" +dependencies = [ + "log", + "markup5ever", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +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 = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[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 = "ico" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instability" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf84e73fa6f27f299dec58e13223cf70db80da872eb921d4f6138342a0eabc8" +dependencies = [ + "darling 0.24.0", + "indoc", + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.13.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "keyring" +version = "3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" +dependencies = [ + "byteorder", + "log", + "windows-sys 0.60.2", + "zeroize", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa" +dependencies = [ + "libc", +] + +[[package]] +name = "libz-ng-sys" +version = "1.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879917b256f6317769b9f374b435805a8697013098aacce5a38ac106cd6a9469" +dependencies = [ + "cmake", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[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.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + +[[package]] +name = "markup5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[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.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags 2.13.1", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[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 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "plist" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +dependencies = [ + "base64 0.22.1", + "indexmap 2.14.0", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.1", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.19", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.19", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core", +] + +[[package]] +name = "ratatui" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" +dependencies = [ + "bitflags 2.13.1", + "cassowary", + "compact_str", + "crossterm", + "indoc", + "instability", + "itertools", + "lru", + "paste", + "strum", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.2.0", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.19", +] + +[[package]] +name = "ref-cast" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.2", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "reqwest" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.5.0", + "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 = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.23.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +dependencies = [ + "bitflags 2.13.1", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "phf", + "phf_codegen", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +dependencies = [ + "base64 0.22.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "schemars 0.9.0", + "schemars 1.2.2", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +dependencies = [ + "darling 0.23.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[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-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[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.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.119", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +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 2.0.119", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.23", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" +dependencies = [ + "bitflags 2.13.1", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "once_cell", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest 0.13.4", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.19", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png 0.17.16", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.19", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-runtime" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.19", + "toml 1.1.4+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.1.4+spec-1.1.0", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[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-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tray-icon" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[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", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[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.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.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.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.19", + "windows", + "windows-core 0.61.2", +] + +[[package]] +name = "which" +version = "6.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +dependencies = [ + "either", + "home", + "rustix", + "winsafe", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[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 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[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 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[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 0.2.1", + "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-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wry" +version = "0.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zip" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap 2.14.0", + "lzma-rs", + "num_enum", + "pbkdf2", + "sha1", + "thiserror 1.0.69", + "time", + "zopfli", + "zstd", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml new file mode 100644 index 0000000..24ba2b8 --- /dev/null +++ b/src-tauri/Cargo.toml @@ -0,0 +1,21 @@ +# 独立 workspace (不从属于主 crate) +[workspace] + +[package] +name = "cc-launcher-gui" +version = "0.1.0" +edition = "2024" +description = "Claude Code Launcher GUI (Tauri 2 + React)" + +[lib] +name = "cc_launcher_gui" +crate-type = ["staticlib", "cdylib", "rlib"] + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +tauri = { version = "2", features = [] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +cc_launcher = { package = "cc-launcher", path = ".." } diff --git a/src-tauri/build.rs b/src-tauri/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json new file mode 100644 index 0000000..9462b11 --- /dev/null +++ b/src-tauri/capabilities/default.json @@ -0,0 +1,9 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Default capability for the main window", + "windows": ["main"], + "permissions": [ + "core:default" + ] +} diff --git a/src-tauri/frontend/index.html b/src-tauri/frontend/index.html new file mode 100644 index 0000000..cb10ac6 --- /dev/null +++ b/src-tauri/frontend/index.html @@ -0,0 +1,12 @@ + + + + + + CC Launcher + + +
+ + + diff --git a/src-tauri/frontend/package-lock.json b/src-tauri/frontend/package-lock.json new file mode 100644 index 0000000..90546c8 --- /dev/null +++ b/src-tauri/frontend/package-lock.json @@ -0,0 +1,2758 @@ +{ + "name": "cc-launcher-frontend", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cc-launcher-frontend", + "version": "0.1.0", + "dependencies": { + "@tauri-apps/api": "^2", + "react": "^19", + "react-dom": "^19" + }, + "devDependencies": { + "@tailwindcss/vite": "^4", + "@tauri-apps/cli": "^2", + "@types/react": "^19", + "@types/react-dom": "^19", + "@vitejs/plugin-react": "^4", + "tailwindcss": "^4", + "typescript": "^5", + "vite": "^6" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.8", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.29.8.tgz", + "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.8", + "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.29.8.tgz", + "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.8", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmmirror.com/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmmirror.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.4.tgz", + "integrity": "sha512-RrPokAb7dmbxFoeO3TloqHyOjgye8RkBhSqmp4aJMIex4c9r46ZstPnleDQOq1t46VOVjwIuwNogIqbodV1Vvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.4.tgz", + "integrity": "sha512-JKuJc+pnpks2pjy7L/N3v/cAkZxYlnmuZoD840ldbMI5KDbC4iO9NKwPKYdjYFCMAIIlBzYSFHxIJVYzRo2/8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.4.tgz", + "integrity": "sha512-krw5uS2STmvJ02x0uTXHbqQNuz+9eZ1iw+qXk9dmW2gvV4jV7O2hEoOnuhFrpOPiel1mBFtqbxYZZtC46hXLOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.4.tgz", + "integrity": "sha512-wsTxtgApb4PrOsNJIm0FZ1h3WvCC+k9uxLJ4ad75hgoS4NiRes2SoJFlDAyMwiUY8IssDqGcHbXuN0sx1tfF1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.4.tgz", + "integrity": "sha512-GUOnQlyZe3yAXhWOtOMsn5Qkrv5E5mZXa0thbARWi5Ei2szlVXJFQhddZ4HbAzh8q92w5twp+CQvs/eFanz9YQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.4.tgz", + "integrity": "sha512-/Y7f3QuxjzPKsjA/rfEDa3+0vXqyjmJ50Ln8dPpCmWkKTrUoWHG1cWhTqaAMLob2m2nESWuC7yGrREz019Ztqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.4.tgz", + "integrity": "sha512-81wiiX3v7aqy+T+bT61TJ78yJjRquqFFTTbAPt08imfQQzkPIW8t6aJbkTagtCCrXMNc9D66+geqlK7ydLPNqA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.4.tgz", + "integrity": "sha512-9kmDIvNZqdoHOBZgNtpTBeLWYO/LVipM3H/j62P8848/l/VPEQL6N3uxU9pvP1oZAsXyC2MEnFP3ovRjo7WYNQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.4.tgz", + "integrity": "sha512-CcnXHWnXg69g+DX5VWL3FHts3qMRN2uVEHX+BZvGLdd07/gXkn3ePjYtO1LDJvxkGKVHMclKBRa1QUTH+6toYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.4.tgz", + "integrity": "sha512-iFOibiHnTRuhrWLlRsOQFdZJJIa7S8OwkneJr4ocALP16u5yk6lWLINFwhHaEqBFMsKDUZofLkGos7+CPzGB3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.4.tgz", + "integrity": "sha512-XnWYMI7euHlb5a871xPja+Gm7DRCFU+FGRrtS2sMq9N8FvqtpagUy6gD4YOemC5MRk9xbh8+jYMEJbigFQwsgA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.4.tgz", + "integrity": "sha512-qGDAlO0U8xedCcsdRm9oaoQY8DAx/QT7uIxJWhCdx0ceIWX783UC9QSYkdpzAe29wNiVfp24+bZdQmn49o45SQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.4.tgz", + "integrity": "sha512-ru4H6ezD7ysA5EiEK6qkkaEb4modH8CTej6kUy/gQi20u3kB3G7Zn8snXXkeJSCOFKG/rbPPtM/+9Wgas1961w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.4.tgz", + "integrity": "sha512-2W4MO5WQVJnbJaZdvDb9rhBDuFU1nKIepPFpJUBsTh2k1YY2g+ODViaWuyOAjQ5cOP7NvrvLzt3wvHOoiAvc7w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.4.tgz", + "integrity": "sha512-+fxjfuoAmVMCYV5QyjoIpu0cp5DOiOTeqYFk1AVaxGr+/ravWLX89XfQmptsoWcaVy/TGf2hexzbUOrCQIL1CQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.4.tgz", + "integrity": "sha512-jTn8JfHGL4djjFxPuM06LmNUJDsst2jeVlsd9OmIH6zc5sC9K6rIuO4YajXatLUpBmBKl6b35ro1QZocLi+tcA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.4.tgz", + "integrity": "sha512-oCJCJL4pXsoDcP2QZ+JVlPTIRc6266zsIaeJJsWImmF7HO0W8nb6HuSgZlMWxJwaPf8ehbSw8yo0EUw925hKsA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.4.tgz", + "integrity": "sha512-W69hukhZ3KKNRCaMIEzKvcFye42hh0FE1+YoYaf5+Ikacuftoco6yO/xouz0hc5d5W/s3yBro5jRiuEE/Q5vUw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.4.tgz", + "integrity": "sha512-qiXbGG2jkjXhzXpsFZSR2Xpb8DN/UaxYsbb/STbuR/6fpaDgRmmaq1B/LmtF2wQFOFOSsK2jdE0RZ3a0zHn4QA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.4.tgz", + "integrity": "sha512-nWeM//hxv8mIo6jD7Hu4o48DVmV9pbV6gsKaWU+4NFyqHoPKwrkRiZGLKUhOBk8qNmDmpwFtPKg80Bo/Tn4xiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.4.tgz", + "integrity": "sha512-s62SQ/vgsRSvMwDkOEfTqfgASF0f26ZNaQuTA6Aok5lrikf89yI2W0gFHvZb2Jpgc6N8JnOKZgCK2iciO3CsxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.4.tgz", + "integrity": "sha512-J6wGf8TVGbXJq+HH+ttTvrcfNKPbuZecV6KT1B8I18BC5IURUh5kl4Yl5OEP5eFIUoI5BWxCsyYMhFsDx8kekw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.4.tgz", + "integrity": "sha512-zmfrQd/0wu6oJs8Vq8KwY/YtsKSsLtKe/HwAP4Wqy8LhWjeT55fHRAkOhYQ12wI3ayS4Tt12d5CDRD7N96SAYQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.4.tgz", + "integrity": "sha512-qPzHqdj9rfUD+w79dtE07zi/kFwKyCJqplp5K5ygeLTp7jLpAoc16OAH39HSmRC9UpozaecsleI8uAdEj6v2yw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.4.tgz", + "integrity": "sha512-zD6NdeWEByGE9QF9vCrlJ5YQB4oq9q91kPZS37Jwj5hOkvR1lTBSpsKhKDw4IJtbQ35LsTS1HD9DZYGKIshU1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@tauri-apps/api": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/@tauri-apps/api/-/api-2.11.1.tgz", + "integrity": "sha512-M2FPuYND2m+wh5hfW9ZpSdxMPdEJovPBWwoHJmwUpysTYNHaOkVFN419m/K0LIgjb/7KU2vBgsUepJWugQCvAA==", + "license": "Apache-2.0 OR MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, + "node_modules/@tauri-apps/cli": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli/-/cli-2.11.4.tgz", + "integrity": "sha512-R8xGtMpwyetawSqm9kYOuMmEqkhUbvcUy8n0aNXIxollKBLESUu5f4Fx+64hgASYm1H+jSWq6jCW6zqTnH6hqQ==", + "dev": true, + "license": "Apache-2.0 OR MIT", + "bin": { + "tauri": "tauri.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + }, + "optionalDependencies": { + "@tauri-apps/cli-darwin-arm64": "2.11.4", + "@tauri-apps/cli-darwin-x64": "2.11.4", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.11.4", + "@tauri-apps/cli-linux-arm64-gnu": "2.11.4", + "@tauri-apps/cli-linux-arm64-musl": "2.11.4", + "@tauri-apps/cli-linux-riscv64-gnu": "2.11.4", + "@tauri-apps/cli-linux-x64-gnu": "2.11.4", + "@tauri-apps/cli-linux-x64-musl": "2.11.4", + "@tauri-apps/cli-win32-arm64-msvc": "2.11.4", + "@tauri-apps/cli-win32-ia32-msvc": "2.11.4", + "@tauri-apps/cli-win32-x64-msvc": "2.11.4" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.11.4.tgz", + "integrity": "sha512-1ryOF3ZhpZ/nemHV5zVwBQBz9jDGKmKPvWPADOhc83ig0P4bMc2iER4NbC6r9sjeIZ6RVQ4g3RZIYvezhcl4TQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.11.4.tgz", + "integrity": "sha512-uFsGQAAfuyz1k/yGLmkWfkBlgKAqZfxqlHmLWx81QU27RJWfmbNHCIq8T8w1e+VClleIuZUjpHWfoE4E3DLo3A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.11.4.tgz", + "integrity": "sha512-IaHZn5CdBL21oUmjiVOS1ctw6Ip1O0pjp70FwOWmYz1myWe0SY96ZIj2FYf7pT0m8bI2h/hrs5ZbEXXh44/MkQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.11.4.tgz", + "integrity": "sha512-N41/ukTRVe6XSuUTESuFdGeOW2i7k62tK+6gHK5Kd5/q5RPvvi19GaWAVPPb9u95HSGmTChSolBfzynUsssFaA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.11.4.tgz", + "integrity": "sha512-v277UnT/fB64xAfSroL5N3Km3tLmvATWqJJw/wRI+g6o+HkeD0slyE7gOhNs1MbjE41R7bQOTxMVoL3aomUJmw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.11.4.tgz", + "integrity": "sha512-qqgNkQ2u1yZHxjhxsZaxUtRDW8dIqIYm33rx/mzwQv0SfY9x1B+iraj8vWeFiXjjSVVhEMepXSOts1TqPzvXNQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.11.4.tgz", + "integrity": "sha512-2VRNWl84FOH0m2giiDkO2h0QXlcMJeX+zJDpI5kDIQAx6s+geF3v48F4DXfJez4GS/FdoDGnPnw1C2iYGbQ7bQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.11.4.tgz", + "integrity": "sha512-o9GyhYor/nc7xarmwDE3ka2szuW3uuZzXjHWh64Q8YX5AtSgxdQkFWzrY4O8KiGtVNvFBI14H3Q49Qj5TOIP/A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.11.4.tgz", + "integrity": "sha512-ld5Ehb598m0VkYyylRPNeCFsBe/km0jxis6KgMpl3IGY6I/i1RwQXO05I1AsXUXO2WC6AvB/Lw4qTf/asiuEiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.11.4.tgz", + "integrity": "sha512-12Hxi0XX/H5VFxO/bGgHkFWhml9VMgEOu9CidjeCeTNQ1l6fpUlbiGgSP7CLI3PFtW9/FfbeHieZ+kyWK5H7CA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.11.4", + "resolved": "https://registry.npmmirror.com/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.11.4.tgz", + "integrity": "sha512-+vDiqBIU5dMISg/wNvX3sF+ZHfgJGJ5T0AcO+EHNXV9GGAG+P5fzodlDXD3QdKCRgZxMoCm5PPvj3BqLNjBthw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmmirror.com/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmmirror.com/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmmirror.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.18", + "resolved": "https://registry.npmmirror.com/@types/react/-/react-19.2.18.tgz", + "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmmirror.com/@types/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmmirror.com/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.12", + "resolved": "https://registry.npmmirror.com/baseline-browser-mapping/-/baseline-browser-mapping-2.11.12.tgz", + "integrity": "sha512-r7WnVImvVCeFpf2DOXfy41aPWzeNg3H/A2X4dKmy1QL0MSyyk/e7z8ihJ3N6Nn2PsdhkVlqnEfnUE4a05P2aTA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.7", + "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.28.7.tgz", + "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.44", + "caniuse-lite": "^1.0.30001806", + "electron-to-chromium": "^1.5.393", + "node-releases": "^2.0.51", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001809", + "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001809.tgz", + "integrity": "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.402", + "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.402.tgz", + "integrity": "sha512-/oOpMaPT6Yg+6/1XQhyIPlzgj7Ye9zf+nNM2Uh6OcE2G2oNptWazFa+qB2Pdqqbsc9KnIDzgAntoYN0dbwOXwA==", + "dev": true, + "license": "ISC" + }, + "node_modules/enhanced-resolve": { + "version": "5.24.5", + "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz", + "integrity": "sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmmirror.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.17", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.17.tgz", + "integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.53", + "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.53.tgz", + "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "19.2.8", + "resolved": "https://registry.npmmirror.com/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.8", + "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.8" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.62.4", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.62.4.tgz", + "integrity": "sha512-RXOqwaPsBGjMNMa4sQjDjHieHEZDFoj/Rdr46l2MU5DfEs16wHJPC2RPTPHWhNl+M3aI472LLqFkFKut4SblOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.62.4", + "@rollup/rollup-android-arm64": "4.62.4", + "@rollup/rollup-darwin-arm64": "4.62.4", + "@rollup/rollup-darwin-x64": "4.62.4", + "@rollup/rollup-freebsd-arm64": "4.62.4", + "@rollup/rollup-freebsd-x64": "4.62.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.4", + "@rollup/rollup-linux-arm-musleabihf": "4.62.4", + "@rollup/rollup-linux-arm64-gnu": "4.62.4", + "@rollup/rollup-linux-arm64-musl": "4.62.4", + "@rollup/rollup-linux-loong64-gnu": "4.62.4", + "@rollup/rollup-linux-loong64-musl": "4.62.4", + "@rollup/rollup-linux-ppc64-gnu": "4.62.4", + "@rollup/rollup-linux-ppc64-musl": "4.62.4", + "@rollup/rollup-linux-riscv64-gnu": "4.62.4", + "@rollup/rollup-linux-riscv64-musl": "4.62.4", + "@rollup/rollup-linux-s390x-gnu": "4.62.4", + "@rollup/rollup-linux-x64-gnu": "4.62.4", + "@rollup/rollup-linux-x64-musl": "4.62.4", + "@rollup/rollup-openbsd-x64": "4.62.4", + "@rollup/rollup-openharmony-arm64": "4.62.4", + "@rollup/rollup-win32-arm64-msvc": "4.62.4", + "@rollup/rollup-win32-ia32-msvc": "4.62.4", + "@rollup/rollup-win32-x64-gnu": "4.62.4", + "@rollup/rollup-win32-x64-msvc": "4.62.4", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.3.0.tgz", + "integrity": "sha512-x/M6q3w4Ybp91CNaS4S69UnliqR3BzRpOT6LWbksjth0S/+jhfaPJsWjt/TewpT8j9eLIojUf5jr29WextHroA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "6.4.3", + "resolved": "https://registry.npmmirror.com/vite/-/vite-6.4.3.tgz", + "integrity": "sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/src-tauri/frontend/package.json b/src-tauri/frontend/package.json new file mode 100644 index 0000000..a9c7be7 --- /dev/null +++ b/src-tauri/frontend/package.json @@ -0,0 +1,26 @@ +{ + "name": "cc-launcher-frontend", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tauri-apps/api": "^2", + "react": "^19", + "react-dom": "^19" + }, + "devDependencies": { + "@tauri-apps/cli": "^2", + "@types/react": "^19", + "@types/react-dom": "^19", + "@vitejs/plugin-react": "^4", + "tailwindcss": "^4", + "@tailwindcss/vite": "^4", + "typescript": "^5", + "vite": "^6" + } +} diff --git a/src-tauri/frontend/src/App.tsx b/src-tauri/frontend/src/App.tsx new file mode 100644 index 0000000..b33517e --- /dev/null +++ b/src-tauri/frontend/src/App.tsx @@ -0,0 +1,224 @@ +import { useEffect, useState } from "react"; +import { invoke } from "@tauri-apps/api/core"; + +interface Status { + version: string; + backend: string; + binary_ok: boolean; + config_valid: boolean; +} + +type TabKey = + | "dashboard" + | "launch" + | "env" + | "plugins" + | "skills" + | "diagnostics" + | "settings"; + +const TABS: { key: TabKey; label: string }[] = [ + { key: "dashboard", label: "概览" }, + { key: "launch", label: "启动" }, + { key: "env", label: "环境变量" }, + { key: "plugins", label: "插件" }, + { key: "skills", label: "Skills" }, + { key: "diagnostics", label: "诊断" }, + { key: "settings", label: "设置" }, +]; + +export default function App() { + const [tab, setTab] = useState("dashboard"); + const [status, setStatus] = useState(null); + const [envVars, setEnvVars] = useState<[string, string][]>([]); + const [config, setConfig] = useState(""); + const [logs, setLogs] = useState([]); + + const refresh = async () => { + try { + const s = await invoke("get_status"); + setStatus(s); + const e = await invoke<[string, string][]>("get_env_vars"); + setEnvVars(e); + const c = await invoke("get_config"); + setConfig(c); + const l = await invoke("load_logs", { lines: 100 }); + setLogs(l); + } catch (err) { + console.error(err); + } + }; + + useEffect(() => { + refresh(); + }, []); + + return ( +
+ + +
+ {tab === "dashboard" && } + {tab === "launch" && } + {tab === "env" && } + {tab === "plugins" && } + {tab === "skills" && } + {tab === "diagnostics" && } + {tab === "settings" && } +
+
+ ); +} + +function Card({ title, children }: { title: string; children: React.ReactNode }) { + return ( +
+

{title}

+ {children} +
+ ); +} + +function Dashboard({ status }: { status: Status | null }) { + if (!status) return

加载中...

; + return ( +
+ +

{status.version}

+
+ +

{status.backend}

+
+ +

+ {status.binary_ok ? "正常" : "异常"} +

+
+ +

+ {status.config_valid ? "通过" : "失败"} +

+
+
+ ); +} + +function Launch() { + return ( +
+ +

+ 在终端运行 cc-launcher 启动 Claude Code。 +

+

+ 独立窗口: cc-launcher --separate-window +

+
+
+ ); +} + +function Env({ envVars }: { envVars: [string, string][] }) { + return ( + + + + + + + + + + {envVars.map(([k, v]) => ( + + + + + ))} + +
变量
{k} + {k.includes("KEY") || k.includes("TOKEN") ? "***" : v} +
+
+ ); +} + +function Plugins() { + return ( + +

+ 插件管理通过 CLI 完成: cc-launcher check /{" "} + cc-launcher repair +

+
+ ); +} + +function Skills() { + return ( + +

+ Skills 为本地文件, 通过 cc-launcher check 查看完整性。 +

+
+ ); +} + +function Diagnostics({ + status, + config, + logs, +}: { + status: Status | null; + config: string; + logs: string[]; +}) { + return ( +
+ +
{JSON.stringify(status, null, 2)}
+
+ +
+          {logs.join("\n") || "暂无日志"}
+        
+
+ +
{config}
+
+
+ ); +} + +function Settings({ config }: { config: string }) { + return ( + +

+ 配置文件位于 config/config.toml{" "} + (首次运行自动生成模板)。 +

+
{config}
+
+ ); +} diff --git a/src-tauri/frontend/src/main.tsx b/src-tauri/frontend/src/main.tsx new file mode 100644 index 0000000..fa1b97e --- /dev/null +++ b/src-tauri/frontend/src/main.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App"; +import "./styles.css"; + +ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( + + + +); diff --git a/src-tauri/frontend/src/styles.css b/src-tauri/frontend/src/styles.css new file mode 100644 index 0000000..254d8cf --- /dev/null +++ b/src-tauri/frontend/src/styles.css @@ -0,0 +1,16 @@ +@import "tailwindcss"; + +/* 全局基础 */ +html, +body, +#root { + margin: 0; + padding: 0; + height: 100%; +} + +body { + font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; + background-color: #09090b; + color: #f4f4f5; +} diff --git a/src-tauri/frontend/tsconfig.json b/src-tauri/frontend/tsconfig.json new file mode 100644 index 0000000..a4c834a --- /dev/null +++ b/src-tauri/frontend/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src-tauri/frontend/vite.config.ts b/src-tauri/frontend/vite.config.ts new file mode 100644 index 0000000..b32b514 --- /dev/null +++ b/src-tauri/frontend/vite.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react(), tailwindcss()], + clearScreen: false, + server: { + port: 1420, + strictPort: true, + watch: { + ignored: ["**/src-tauri/**"], + }, + }, +}); diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..65d1951af8869168c0da2ca280a06d0040cdc3ac GIT binary patch literal 371 zcmeAS@N?(olHy`uU=a26a0vp^K+pgt85%eswCDWdbOr`SJx>?Mkcv5PFDWuI81Nj} zaB^mS^ZcG>wifY{vhNp7_cI$XupMBKU|>#Q;Avnan^VZvVeBx6@ez+edV>Y?5lMw} d3`0=p8N(^%qa`A;&!ZWjz|+;wWt~$(696~yWe@-W literal 0 HcmV?d00001 diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..55bc3e88c57a9f8ff0040a63db3e1399f338e903 GIT binary patch literal 114 zcmeAS@N?(olHy`uU=a26a0vp^K%f9785B4mwCaSYb3m4^r;B4q#hkb26d4&9c$f?x rUD*FXp4r%N|CYT=IZ(kFX8yDfcYI>=cuFBgFfe$!`njxgN@xNA#U~g? literal 0 HcmV?d00001 diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs new file mode 100644 index 0000000..9a65fd7 --- /dev/null +++ b/src-tauri/src/commands.rs @@ -0,0 +1,85 @@ +//! Tauri 命令: 前端通过 `invoke()` 调用的后端函数。 + +use serde::Serialize; + +/// 应用版本。 +#[tauri::command] +pub fn get_version() -> String { + cc_launcher::VERSION.to_string() +} + +/// 状态摘要。 +#[derive(Serialize)] +pub struct StatusInfo { + pub version: String, + pub backend: String, + pub binary_ok: bool, + pub config_valid: bool, +} + +/// 获取运行状态。 +#[tauri::command] +pub fn get_status() -> StatusInfo { + let config = cc_launcher::config::load_config(&Default::default()).unwrap_or_default(); + let exe = cc_launcher::launch::resolve_exe(&config); + let binary_ok = + cc_launcher::launch::check_binary_health(&exe) == cc_launcher::launch::PreflightStatus::Ok; + let config_valid = cc_launcher::config::loader::validate(&config).is_ok(); + StatusInfo { + version: cc_launcher::VERSION.to_string(), + backend: config.backend.backend.clone(), + binary_ok, + config_valid, + } +} + +/// 环境变量列表。 +#[tauri::command] +pub fn get_env_vars() -> Vec<(String, String)> { + let config = cc_launcher::config::load_config(&Default::default()).unwrap_or_default(); + let manager = cc_launcher::env::EnvManager::from_config(&config, &Default::default()); + manager.vars().iter().map(|(k, v)| (k.clone(), v.clone())).collect() +} + +/// 配置摘要 (序列化为字符串)。 +#[tauri::command] +pub fn get_config() -> String { + let config = cc_launcher::config::load_config(&Default::default()).unwrap_or_default(); + toml::to_string(&config).unwrap_or_default() +} + +/// 二进制健康检查。 +#[tauri::command] +pub fn check_binary() -> String { + let config = cc_launcher::config::load_config(&Default::default()).unwrap_or_default(); + let exe = cc_launcher::launch::resolve_exe(&config); + let status = cc_launcher::launch::check_binary_health(&exe); + let ver = cc_launcher::launch::preflight::get_version(&exe).unwrap_or_default(); + format!("status={status:?}, version={ver}") +} + +/// 最近日志 (前 N 行)。 +#[tauri::command] +pub fn load_logs(lines: usize) -> Vec { + let dir = cc_launcher::util::paths::logs_dir(); + let mut logs: Vec<_> = std::fs::read_dir(&dir) + .map(|rd| { + rd.flatten() + .map(|e| e.path()) + .filter(|p| { + p.file_name() + .and_then(|n| n.to_str()) + .map(|n| n.starts_with("cc-launcher-") && n.ends_with(".log")) + .unwrap_or(false) + }) + .collect() + }) + .unwrap_or_default(); + logs.sort(); + if let Some(latest) = logs.last() { + if let Ok(content) = std::fs::read_to_string(latest) { + return content.lines().rev().take(lines).map(String::from).collect(); + } + } + Vec::new() +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs new file mode 100644 index 0000000..f142ca2 --- /dev/null +++ b/src-tauri/src/lib.rs @@ -0,0 +1,18 @@ +//! cc-launcher GUI 库: 注册 Tauri 命令并启动窗口。 + +pub mod commands; + +/// 启动 Tauri 应用。 +pub fn run() { + tauri::Builder::default() + .invoke_handler(tauri::generate_handler![ + commands::get_version, + commands::get_status, + commands::get_env_vars, + commands::get_config, + commands::check_binary, + commands::load_logs, + ]) + .run(tauri::generate_context!()) + .expect("error while running tauri application"); +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs new file mode 100644 index 0000000..97e00f0 --- /dev/null +++ b/src-tauri/src/main.rs @@ -0,0 +1,6 @@ +//! cc-launcher GUI 可执行入口。 +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + cc_launcher_gui::run() +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json new file mode 100644 index 0000000..80728a8 --- /dev/null +++ b/src-tauri/tauri.conf.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "cc-launcher", + "version": "0.1.0", + "identifier": "com.minecraft269.cc-launcher", + "build": { + "beforeDevCommand": "npm run dev --prefix frontend", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build --prefix frontend", + "frontendDist": "../frontend/dist" + }, + "app": { + "windows": [ + { + "title": "CC Launcher", + "width": 1000, + "height": 700, + "minWidth": 800, + "minHeight": 550 + } + ], + "security": { + "csp": null + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/icon.ico" + ] + } +} diff --git a/src/commands.rs b/src/commands.rs index 4b5ad4d..bba847f 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,9 +1,9 @@ //! 子命令与启动路由。 //! -//! Phase 1 骨架: dry-run / check / doctor 可用, 其余子命令在 Phase 8 完善。 +//! 实现所有管理子命令: update/repair/rollback/check/doctor/reset/env/logs/config-path/completions。 -use cc_launcher::cli::{Cli, Command}; -use cc_launcher::config::AppConfig; +use cc_launcher::cli::{Cli, Command, Shell}; +use cc_launcher::config::{AppConfig, Platform}; use cc_launcher::i18n::I18n; use cc_launcher::util::paths; use std::path::PathBuf; @@ -14,11 +14,10 @@ pub fn run_launch(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result< return dry_run(cli, config, i18n); } - // 1. 启动前检查 (根据策略 prompt/notify/auto/off) + // 启动前检查 (根据策略 prompt/notify/auto/off) let status = cc_launcher::launch::preflight::check_binary_health( &cc_launcher::launch::resolve_exe(config), ); - let binary_ok = status == cc_launcher::launch::PreflightStatus::Ok; match status { cc_launcher::launch::PreflightStatus::Ok => { tracing::info!("二进制正常 | binary OK"); @@ -32,11 +31,10 @@ pub fn run_launch(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result< } let skip_checks = cli.launch.skip_check || cli.launch.pre_launch.as_deref() == Some("off"); - if !binary_ok && !skip_checks { + if status != cc_launcher::launch::PreflightStatus::Ok && !skip_checks { anyhow::bail!("CC 二进制不可用, 请运行 `cc-launcher repair`"); } - // 2. 执行完整启动 (env + auth + spawn + wait) let exit_code = cc_launcher::launch::launch_cc(config, cli, |_| {})?; Ok(exit_code as u8) } @@ -50,22 +48,385 @@ pub fn run_subcommand( ) -> anyhow::Result { match cmd { Command::Check | Command::Doctor => run_check(cli, config, i18n), - Command::Reset { .. } => Err(not_impl("reset")), - Command::Env => Err(not_impl("env")), - Command::Logs { .. } => Err(not_impl("logs")), - Command::ConfigPath => Err(not_impl("config-path")), - Command::Update { .. } => Err(not_impl("update")), - Command::Repair { .. } => Err(not_impl("repair")), - Command::Rollback => Err(not_impl("rollback")), - Command::Completions { .. } => Err(not_impl("completions")), - Command::Tui { .. } => Err(not_impl("tui")), - Command::Gui => Err(not_impl("gui")), - } -} - -fn not_impl(name: &str) -> anyhow::Error { - anyhow::anyhow!( - "子命令 {name} 尚未实现 (Phase 8) | subcommand {name} not yet implemented (Phase 8)" + Command::Update { version, file, source } => { + run_update(config, i18n, version.as_deref(), file.as_deref(), source.as_deref()) + } + Command::Repair { file } => run_repair(config, i18n, file.as_deref()), + Command::Rollback => run_rollback(config, i18n), + Command::Reset { force } => run_reset(i18n, *force), + Command::Env => run_env(config, i18n), + Command::Logs { lines } => run_logs(i18n, *lines), + Command::ConfigPath => run_config_path(config, i18n), + Command::Completions { shell } => run_completions(*shell), + Command::Tui { tab } => run_tui(cli, config, i18n, tab), + Command::Gui => run_gui(), + } +} + +/// 执行一个 async 闭包 (用内部 tokio runtime)。 +fn with_runtime(f: impl std::future::Future>) -> anyhow::Result { + let rt = tokio::runtime::Runtime::new().context("创建 tokio runtime")?; + rt.block_on(f) +} + +use anyhow::Context; + +/// update 子命令: 升级/安装 CC。 +fn run_update( + config: &AppConfig, + i18n: &I18n, + version: Option<&str>, + file: Option<&std::path::Path>, + source_override: Option<&str>, +) -> anyhow::Result { + // 1. 若指定本地 zip, 直接校验 + 安装 + if let Some(zip) = file { + println!("{}", i18n.tr("update.version_pinned", &[("version", "local zip")])); + cc_launcher::update::install::validate_zip(zip)?; + let exe = cc_launcher::launch::resolve_exe(config); + let main_dir = exe.parent().unwrap_or_else(|| std::path::Path::new(".")); + cc_launcher::update::install::install_zip(zip, main_dir, &exe)?; + println!("{}", i18n.t("update.install_success")); + return Ok(0); + } + + // 2. 确定目标版本 + let target = match version { + Some(v) => v.to_string(), + None => with_runtime(cc_launcher::update::fetch_latest_version(config))?, + }; + println!("{}", i18n.tr("update.downloading", &[("version", &target)])); + + // 3. 解析更新源 + let mut sources = cc_launcher::update::resolve_update_sources(config); + if let Some(s) = source_override { + sources = vec![match s { + "native" => cc_launcher::update::UpdateSource::Native, + "github" => cc_launcher::update::UpdateSource::Github, + "mirror" => cc_launcher::update::UpdateSource::Mirror, + _ => anyhow::bail!("未知更新源: {s} (应为 native/github/mirror)"), + }]; + } + + // 4. 逐源尝试 + let platform = Platform::current(); + let tmp_dir = std::env::temp_dir().join(format!("cc-update-{target}")); + std::fs::create_dir_all(&tmp_dir).context("创建临时目录")?; + let asset = platform.default_asset_name(); + let zip_path = tmp_dir.join(asset); + + for src in &sources { + match try_source(config, *src, &target, &zip_path, platform) { + Ok(()) => { + let exe = cc_launcher::launch::resolve_exe(config); + let main_dir = exe.parent().unwrap_or_else(|| std::path::Path::new(".")); + cc_launcher::update::install::install_zip(&zip_path, main_dir, &exe)?; + println!("{}", i18n.tr("update.install_success", &[("version", &target)])); + let _ = std::fs::remove_dir_all(&tmp_dir); + return Ok(0); + } + Err(e) => { + tracing::warn!("更新源 {:?} 失败: {e:#}", src); + } + } + } + + println!("{}", i18n.t("update.all_channels_failed")); + println!("{}", i18n.t("update.manual_hint")); + let _ = std::fs::remove_dir_all(&tmp_dir); + Ok(1) +} + +/// 尝试单一更新源。 +fn try_source( + config: &AppConfig, + src: cc_launcher::update::UpdateSource, + version: &str, + zip_path: &std::path::Path, + platform: Platform, +) -> anyhow::Result<()> { + match src { + cc_launcher::update::UpdateSource::Native => { + tracing::info!("尝试 CC 自更新 | trying native update"); + // claude install 走原生二进制 + let exe = cc_launcher::launch::resolve_exe(config); + let status = std::process::Command::new(&exe) + .arg("install") + .status() + .context("运行 claude install")?; + if status.success() { + Ok(()) + } else { + anyhow::bail!("claude install 退出码 {:?}", status.code()) + } + } + cc_launcher::update::UpdateSource::Github => { + let url = + cc_launcher::update::source::build_download_url(config, "", version, platform); + tracing::info!("GitHub 直链: {url}"); + with_runtime(cc_launcher::update::download::segmented_download( + &url, + zip_path, + &config.update, + None, + )) + } + cc_launcher::update::UpdateSource::Mirror => { + let channels = cc_launcher::update::geo_rank_channels(config); + let mut last_err = None; + for ch in &channels { + let url = cc_launcher::update::source::build_download_url( + config, &ch.url, version, platform, + ); + tracing::info!("镜像通道: {url}"); + match with_runtime(cc_launcher::update::download::segmented_download( + &url, + zip_path, + &config.update, + None, + )) { + Ok(()) => return Ok(()), + Err(e) => last_err = Some(e), + } + } + Err(last_err.unwrap_or_else(|| anyhow::anyhow!("所有镜像通道失败"))) + } + } +} + +/// repair 子命令: 修复 CC 二进制。 +fn run_repair( + config: &AppConfig, + i18n: &I18n, + file: Option<&std::path::Path>, +) -> anyhow::Result { + println!("{}", i18n.t("repair.repairing")); + // 先尝试原生修复, 失败则走下载 + if file.is_none() { + let exe = cc_launcher::launch::resolve_exe(config); + if let Ok(status) = std::process::Command::new(&exe).arg("install").status() + && status.success() + && cc_launcher::launch::preflight::check_binary_health(&exe) + == cc_launcher::launch::PreflightStatus::Ok + { + println!("{}", i18n.t("repair.repair_success")); + return Ok(0); + } + } + // 回退: 下载当前版本 (或最新) 安装 + let version = + cc_launcher::launch::preflight::get_version(&cc_launcher::launch::resolve_exe(config)) + .unwrap_or_else(|| "latest".to_string()); + let v = if version == "latest" { + with_runtime(cc_launcher::update::fetch_latest_version(config))? + } else { + version + }; + run_update(config, i18n, Some(&v), file, Some("auto")) +} + +/// rollback 子命令: 回退到上一个版本。 +fn run_rollback(config: &AppConfig, i18n: &I18n) -> anyhow::Result { + let manifest_path = paths::config_dir().join("versions.toml"); + let mut manifest = cc_launcher::rollback::VersionManifest::load(&manifest_path)?; + let Some(prev) = manifest.previous().cloned() else { + println!("{}", i18n.t("rollback.no_previous")); + return Ok(1); + }; + println!("{}", i18n.tr("rollback.rollbacking", &[("version", &prev.version)])); + + // 从历史备份路径恢复 + if prev.binary_path.exists() { + let exe = cc_launcher::launch::resolve_exe(config); + cc_launcher::util::fs::restore(&prev.binary_path, &exe).context("恢复上一版本")?; + manifest.current = prev.version.clone(); + manifest.history.remove(0); + manifest.save(&manifest_path)?; + println!("{}", i18n.tr("rollback.version_installed", &[("version", &prev.version)])); + Ok(0) + } else { + // 备份不存在 → 重新下载上一版本 + run_update(config, i18n, Some(&prev.version), None, Some("auto")) + } +} + +/// reset 子命令: 清理缓存和会话。 +fn run_reset(i18n: &I18n, force: bool) -> anyhow::Result { + println!("{}", i18n.t("reset.title")); + let targets: Vec<(&str, PathBuf)> = vec![ + ("cache", paths::config_dir().join("cache")), + ("sessions", paths::config_dir().join("sessions")), + ("history", paths::config_dir().join("history.jsonl")), + ("telemetry", paths::config_dir().join("telemetry")), + ("paste-cache", paths::config_dir().join("paste-cache")), + ("file-history", paths::config_dir().join("file-history")), + ]; + let existing: Vec<_> = targets.into_iter().filter(|(_, p)| p.exists()).collect(); + if existing.is_empty() { + println!("{}", i18n.t("reset.nothing_to_clean")); + return Ok(0); + } + println!("{}", i18n.tr("reset.found_items", &[("count", &existing.len().to_string())])); + for (name, p) in &existing { + println!(" - {name}: {}", p.display()); + } + if !force { + print!("{}", i18n.t("reset.confirm_prompt")); + std::io::Write::flush(&mut std::io::stdout()).ok(); + let mut input = String::new(); + std::io::stdin().read_line(&mut input)?; + if !input.trim().eq_ignore_ascii_case("y") { + println!("{}", i18n.t("general.cancelled")); + return Ok(0); + } + } + let mut ok = 0; + let mut fail = 0; + for (_, p) in &existing { + if p.is_dir() { + match std::fs::remove_dir_all(p) { + Ok(()) => ok += 1, + Err(_) => fail += 1, + } + } else if std::fs::remove_file(p).is_ok() { + ok += 1; + } else { + fail += 1; + } + } + println!( + "{}", + i18n.tr("reset.cleaned", &[("ok", &ok.to_string()), ("fail", &fail.to_string())]) + ); + Ok(0) +} + +/// env 子命令: 显示 CC 环境变量。 +fn run_env(config: &AppConfig, i18n: &I18n) -> anyhow::Result { + println!("{}", i18n.t("env.title")); + let env_manager = cc_launcher::env::EnvManager::from_config(config, &Default::default()); + for (k, v) in env_manager.vars() { + let masked = k.contains("KEY") || k.contains("TOKEN"); + let display = if masked { i18n.t("env.masked") } else { v.clone() }; + println!(" {k} = {display}"); + } + Ok(0) +} + +/// logs 子命令: 查看日志。 +fn run_logs(i18n: &I18n, lines: usize) -> anyhow::Result { + println!("{}", i18n.t("logs.title")); + let dir = paths::logs_dir(); + let mut logs: Vec = std::fs::read_dir(&dir) + .map(|rd| { + rd.flatten() + .map(|e| e.path()) + .filter(|p| { + p.file_name() + .and_then(|n| n.to_str()) + .map(|n| n.starts_with("cc-launcher-") && n.ends_with(".log")) + .unwrap_or(false) + }) + .collect() + }) + .unwrap_or_default(); + if logs.is_empty() { + println!("{}", i18n.t("logs.none_found")); + return Ok(0); + } + logs.sort(); + let latest = logs.last().unwrap().clone(); + println!( + "{}", + i18n.tr( + "logs.showing_tail", + &[("file", &latest.display().to_string()), ("lines", &lines.to_string())] + ) + ); + let content = std::fs::read_to_string(&latest)?; + let tail: Vec<&str> = content.lines().rev().take(lines).collect(); + for line in tail.iter().rev() { + println!(" {line}"); + } + Ok(0) +} + +/// config-path 子命令: 显示路径。 +fn run_config_path(config: &AppConfig, i18n: &I18n) -> anyhow::Result { + println!("{}", i18n.t("config_path.title")); + let items = [ + ("config", paths::config_file()), + ("logs", paths::logs_dir()), + ("config_dir", cc_launcher::config::resolve_config_dir(config)), + ]; + for (name, p) in &items { + let status = if p.exists() { + i18n.t("config_path.status_ok") + } else { + i18n.t("config_path.status_missing") + }; + println!(" [{}] {name}: {}", status, p.display()); + } + Ok(0) +} + +/// completions 子命令: 生成补全脚本。 +fn run_completions(shell: Shell) -> anyhow::Result { + use clap::CommandFactory; + let mut cmd = Cli::command(); + let mut stdout = std::io::stdout(); + match shell { + Shell::Bash => clap_complete::generate( + clap_complete::shells::Bash, + &mut cmd, + "cc-launcher", + &mut stdout, + ), + Shell::Zsh => clap_complete::generate( + clap_complete::shells::Zsh, + &mut cmd, + "cc-launcher", + &mut stdout, + ), + Shell::Fish => clap_complete::generate( + clap_complete::shells::Fish, + &mut cmd, + "cc-launcher", + &mut stdout, + ), + Shell::Powershell => clap_complete::generate( + clap_complete::shells::PowerShell, + &mut cmd, + "cc-launcher", + &mut stdout, + ), + Shell::Elvish => clap_complete::generate( + clap_complete::shells::Elvish, + &mut cmd, + "cc-launcher", + &mut stdout, + ), + } + Ok(0) +} + +/// TUI 子命令。 +fn run_tui(cli: &Cli, config: &AppConfig, i18n: &I18n, tab: &str) -> anyhow::Result { + let _ = cli; + cc_launcher::tui::run_tui(config, i18n, tab) +} + +/// GUI 子命令: 尝试启动独立 GUI 二进制。 +fn run_gui() -> anyhow::Result { + let gui_bin = + std::path::Path::new("src-tauri").join("target").join("debug").join("cc-launcher-gui"); + if gui_bin.exists() { + let status = std::process::Command::new(&gui_bin).status().context("启动 GUI")?; + return Ok(status.code().unwrap_or(1) as u8); + } + anyhow::bail!( + "GUI 未构建。请运行: cd src-tauri && cargo build (需要 Tauri 依赖)。\ + | GUI not built. Run: cd src-tauri && cargo build" ) } @@ -88,25 +449,44 @@ fn dry_run(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result { Ok(0) } -/// 全面诊断检查 (Phase 1 最小实现: 配置 + 路径)。 +/// 全面诊断检查。 fn run_check(cli: &Cli, config: &AppConfig, i18n: &I18n) -> anyhow::Result { println!("{}", i18n.t("check.title")); + + // 配置校验 match cc_launcher::config::loader::validate(config) { Ok(()) => println!(" [OK] {}", i18n.t("check.config_valid")), Err(e) => { println!(" [FAIL] {}", i18n.tr("check.config_invalid", &[("error", &e)])); - return Ok(1); } } - let paths_list = [("config", paths::config_file()), ("logs", paths::logs_dir())]; - for (name, p) in &paths_list { + + // 二进制健康 + let exe = cc_launcher::launch::resolve_exe(config); + match cc_launcher::launch::check_binary_health(&exe) { + cc_launcher::launch::PreflightStatus::Ok => { + let ver = cc_launcher::launch::preflight::get_version(&exe) + .unwrap_or_else(|| "?".to_string()); + println!(" [OK] {}", i18n.tr("check.version_ok", &[("version", &ver)])); + } + cc_launcher::launch::PreflightStatus::Missing => { + println!(" [FAIL] {}", i18n.t("check.binary_health_fail")); + } + _ => { + println!(" [WARN] {}", i18n.t("check.binary_health_fail")); + } + } + + // 路径 + for (name, p) in [("config", paths::config_file()), ("logs", paths::logs_dir())] { let status = if p.exists() { i18n.t("config_path.status_ok") } else { i18n.t("config_path.status_missing") }; - println!(" [{}] {}: {}", status, name, p.display()); + println!(" [{}] {name}: {}", status, p.display()); } + let src = cli .global .config diff --git a/src/lib.rs b/src/lib.rs index d47daab..808bf1f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ pub mod logging; pub mod platform; pub mod repair; pub mod rollback; +pub mod tui; pub mod update; pub mod util; diff --git a/src/tui.rs b/src/tui.rs new file mode 100644 index 0000000..5200979 --- /dev/null +++ b/src/tui.rs @@ -0,0 +1,230 @@ +//! TUI 仪表盘: 概览 / 下载更新 / 诊断 / 日志 (4 个 Tab)。 + +use crate::config::AppConfig; +use crate::i18n::I18n; +use anyhow::Context; +use crossterm::event::{self, Event, KeyCode, KeyEventKind}; +use crossterm::execute; +use crossterm::terminal::{ + EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode, enable_raw_mode, +}; +use ratatui::Frame; +use ratatui::Terminal; +use ratatui::backend::CrosstermBackend; +use ratatui::layout::{Constraint, Direction, Layout, Rect}; +use ratatui::style::{Modifier, Style}; +use ratatui::text::{Line, Span}; +use ratatui::widgets::{Block, Borders, List, ListItem, Paragraph, Tabs}; + +/// TUI Tab 枚举。 +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum Tab { + Overview, + Download, + Diagnostics, + Logs, +} + +impl Tab { + fn all() -> [Tab; 4] { + [Tab::Overview, Tab::Download, Tab::Diagnostics, Tab::Logs] + } + fn index(self) -> usize { + match self { + Tab::Overview => 0, + Tab::Download => 1, + Tab::Diagnostics => 2, + Tab::Logs => 3, + } + } +} + +/// 运行 TUI 仪表盘。`initial` 指定初始面板。 +pub fn run_tui(config: &AppConfig, i18n: &I18n, initial: &str) -> anyhow::Result { + let initial_tab = match initial { + "download" => Tab::Download, + "diagnostics" => Tab::Diagnostics, + "logs" => Tab::Logs, + _ => Tab::Overview, + }; + let mut app = App::new(config, i18n, initial_tab); + app.run() +} + +/// TUI 应用状态。 +struct App<'a> { + config: &'a AppConfig, + i18n: &'a I18n, + current_tab: Tab, + log_lines: Vec, +} + +impl<'a> App<'a> { + fn new(config: &'a AppConfig, i18n: &'a I18n, tab: Tab) -> Self { + Self { config, i18n, current_tab: tab, log_lines: Vec::new() } + } + + fn run(&mut self) -> anyhow::Result { + enable_raw_mode().context("启用 raw mode")?; + let mut stdout = std::io::stdout(); + execute!(stdout, EnterAlternateScreen).context("进入备用屏幕")?; + + let backend = CrosstermBackend::new(stdout); + let mut terminal = Terminal::new(backend).context("创建终端")?; + let res = self.event_loop(&mut terminal); + + disable_raw_mode().ok(); + execute!(terminal.backend_mut(), LeaveAlternateScreen).ok(); + terminal.show_cursor().ok(); + + res + } + + fn event_loop( + &mut self, + terminal: &mut Terminal>, + ) -> anyhow::Result { + loop { + terminal.draw(|f| self.draw(f))?; + match event::read()? { + Event::Key(key) if key.kind == KeyEventKind::Press => match key.code { + KeyCode::Char('q') | KeyCode::Esc => return Ok(0), + KeyCode::Char('1') => self.current_tab = Tab::Overview, + KeyCode::Char('2') => self.current_tab = Tab::Download, + KeyCode::Char('3') => self.current_tab = Tab::Diagnostics, + KeyCode::Char('4') => self.current_tab = Tab::Logs, + KeyCode::Tab => { + let tabs = Tab::all(); + let next = (self.current_tab.index() + 1) % tabs.len(); + self.current_tab = tabs[next]; + } + KeyCode::Char('r') => self.refresh(), + _ => {} + }, + Event::Resize(_, _) => {} + _ => {} + } + } + } + + fn refresh(&mut self) { + let dir = crate::util::paths::logs_dir(); + if let Ok(rd) = std::fs::read_dir(&dir) { + let mut logs: Vec<_> = rd + .flatten() + .map(|e| e.path()) + .filter(|p| { + p.file_name() + .and_then(|n| n.to_str()) + .map(|n| n.starts_with("cc-launcher-") && n.ends_with(".log")) + .unwrap_or(false) + }) + .collect(); + logs.sort(); + if let Some(latest) = logs.last() + && let Ok(content) = std::fs::read_to_string(latest) + { + self.log_lines = content.lines().rev().take(100).map(String::from).collect(); + self.log_lines.reverse(); + } + } + } + + fn draw(&self, f: &mut Frame) { + let chunks = Layout::default() + .direction(Direction::Vertical) + .margin(1) + .constraints([Constraint::Length(3), Constraint::Min(0)].as_ref()) + .split(f.area()); + + self.draw_tabs(f, chunks[0]); + match self.current_tab { + Tab::Overview => self.draw_overview(f, chunks[1]), + Tab::Download => self.draw_download(f, chunks[1]), + Tab::Diagnostics => self.draw_diagnostics(f, chunks[1]), + Tab::Logs => self.draw_logs(f, chunks[1]), + } + } + + fn tab_titles(&self) -> Vec> { + let names = [ + self.i18n.t("tui.tab_overview"), + self.i18n.t("tui.tab_download"), + self.i18n.t("tui.tab_diagnostics"), + self.i18n.t("tui.tab_logs"), + ]; + names + .into_iter() + .map(|n| Line::from(Span::styled(n, Style::default().add_modifier(Modifier::BOLD)))) + .collect() + } + + fn draw_tabs(&self, f: &mut Frame, area: Rect) { + let tabs = Tabs::new(self.tab_titles()) + .select(self.current_tab.index()) + .block(Block::default().borders(Borders::ALL).title("cc-launcher")); + f.render_widget(tabs, area); + } + + fn draw_overview(&self, f: &mut Frame, area: Rect) { + let mut lines = vec![ + Line::from(format!("Version: {}", crate::VERSION)), + Line::from(format!("Backend: {}", self.config.backend.backend)), + Line::from(format!("Model: {}", self.config.backend.models.default)), + Line::from(""), + ]; + for (k, v) in &self.config.env { + lines.push(Line::from(format!("{k} = {v}"))); + } + let para = Paragraph::new(lines).block(Block::default().borders(Borders::ALL)); + f.render_widget(para, area); + } + + fn draw_download(&self, f: &mut Frame, area: Rect) { + let channels = crate::update::geo_rank_channels(self.config); + let items: Vec = channels + .iter() + .enumerate() + .map(|(i, ch)| { + let url = if ch.url.is_empty() { "direct".to_string() } else { ch.url.clone() }; + ListItem::new(format!("[{i}] {url} (prio {})", ch.priority)) + }) + .collect(); + let list = List::new(items).block(Block::default().borders(Borders::ALL).title("channels")); + f.render_widget(list, area); + } + + fn draw_diagnostics(&self, f: &mut Frame, area: Rect) { + let exe = crate::launch::resolve_exe(self.config); + let status = crate::launch::check_binary_health(&exe); + let status_str = match status { + crate::launch::PreflightStatus::Ok => "OK", + crate::launch::PreflightStatus::Missing => "MISSING", + crate::launch::PreflightStatus::TooSmall => "TOO SMALL", + crate::launch::PreflightStatus::Unhealthy => "UNHEALTHY", + }; + let mut items = vec![ + ListItem::new(format!("Executable: {}", exe.display())), + ListItem::new(format!("Binary status: {status_str}")), + ListItem::new(format!( + "Config dir: {}", + crate::config::resolve_config_dir(self.config).display() + )), + ListItem::new(format!("Logs dir: {}", crate::util::paths::logs_dir().display())), + ]; + if let Some(v) = crate::launch::preflight::get_version(&exe) { + items.push(ListItem::new(format!("CC version: {v}"))); + } + let list = + List::new(items).block(Block::default().borders(Borders::ALL).title("diagnostics")); + f.render_widget(list, area); + } + + fn draw_logs(&self, f: &mut Frame, area: Rect) { + let items: Vec = + self.log_lines.iter().map(|l| ListItem::new(l.clone())).collect(); + let list = List::new(items) + .block(Block::default().borders(Borders::ALL).title("logs (r to refresh)")); + f.render_widget(list, area); + } +} diff --git a/src/util/paths.rs b/src/util/paths.rs index d02c787..7d725bd 100644 --- a/src/util/paths.rs +++ b/src/util/paths.rs @@ -13,8 +13,21 @@ pub fn exe_dir() -> PathBuf { .unwrap_or_else(|| env::current_dir().unwrap_or_else(|_| PathBuf::from("."))) } -/// 程序根目录: 默认为 exe_dir 的父目录 (便于 `dist/` 打包布局)。 +/// 程序根目录。 +/// +/// 向上查找第一个包含 `Cargo.toml` (开发) 或 `config/` (部署) 的目录, +/// 使 `config/`、`logs/` 在开发时落在项目根, 部署时落在应用目录。 pub fn app_root() -> PathBuf { + let mut dir = exe_dir(); + for _ in 0..5 { + if dir.join("Cargo.toml").exists() || dir.join("config").exists() { + return dir; + } + match dir.parent() { + Some(parent) => dir = parent.to_path_buf(), + None => break, + } + } exe_dir().parent().map(Path::to_path_buf).unwrap_or_else(exe_dir) }