diff --git a/.github/workflows/desktop_cd.yaml b/.github/workflows/desktop_cd.yaml index e470071206..675404a466 100644 --- a/.github/workflows/desktop_cd.yaml +++ b/.github/workflows/desktop_cd.yaml @@ -104,6 +104,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + KEYGEN_ACCOUNT_ID: ${{ secrets.KEYGEN_ACCOUNT_ID }} + KEYGEN_VERIFY_KEY: ${{ secrets.KEYGEN_VERIFY_KEY }} APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} diff --git a/Cargo.lock b/Cargo.lock index 3ec97c65a2..66ee8665fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,7 +56,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.9.1", + "rand 0.9.2", "sha1", "smallvec 1.15.1", "tokio", @@ -100,7 +100,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "socket2", + "socket2 0.5.10", "tokio", "tracing", ] @@ -158,7 +158,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec 1.15.1", - "socket2", + "socket2 0.5.10", "time", "tracing", "url", @@ -618,13 +618,16 @@ dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.9.1", + "rand 0.9.2", "raw-window-handle", "serde", "serde_repr", "tokio", "url", - "zbus 5.8.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "zbus 5.9.0", ] [[package]] @@ -713,9 +716,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.25" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f6024f3f856663b45fd0c9b6f2024034a702f453549449e0d84a305900dad4" +checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" dependencies = [ "flate2", "futures-core", @@ -740,9 +743,9 @@ dependencies = [ [[package]] name = "async-fs" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" dependencies = [ "async-lock", "blocking", @@ -751,9 +754,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" +checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" dependencies = [ "async-lock", "cfg-if", @@ -762,10 +765,9 @@ dependencies = [ "futures-lite 2.6.0", "parking", "polling", - "rustix 1.0.7", + "rustix 1.0.8", "slab", - "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -819,9 +821,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc" +checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" dependencies = [ "async-channel 2.5.0", "async-io", @@ -832,8 +834,7 @@ dependencies = [ "cfg-if", "event-listener 5.4.0", "futures-lite 2.6.0", - "rustix 1.0.7", - "tracing", + "rustix 1.0.8", ] [[package]] @@ -849,9 +850,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d" +checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" dependencies = [ "async-io", "async-lock", @@ -859,10 +860,10 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.0.7", + "rustix 1.0.8", "signal-hook-registry", "slab", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1024,9 +1025,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-config" -version = "1.8.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c18d005c70d2b9c0c1ea8876c039db0ec7fb71164d25c73ccea21bf41fd02171" +checksum = "c0baa720ebadea158c5bda642ac444a2af0cdf7bb66b46d1e4533de5d1f449d0" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1054,9 +1055,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.3" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687bc16bc431a8533fe0097c7f0182874767f920989d7260950172ae8e3c4465" +checksum = "b68c2194a190e1efc999612792e25b1ab3abfefe4306494efaaabc25933c0cbe" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -1066,9 +1067,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b5d4e069cbc868041a64bd68dc8cb39a0d79585cd6c5a24caa8c2d622121be" +checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" dependencies = [ "aws-lc-sys", "zeroize", @@ -1089,9 +1090,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.8" +version = "1.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6c68419d8ba16d9a7463671593c54f81ba58cab466e9b759418da606dcc2e2" +checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -1114,9 +1115,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.96.0" +version = "1.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e25d24de44b34dcdd5182ac4e4c6f07bcec2661c505acef94c0d293b65505fe" +checksum = "8c5eafbdcd898114b839ba68ac628e31c4cfc3e11dfca38dc1b2de2f35bb6270" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1148,9 +1149,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.74.0" +version = "1.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a69de9c1b9272da2872af60c7402683e7f45c06267735b4332deacb203239b" +checksum = "dbd7bc4bd34303733bded362c4c997a39130eac4310257c79aae8484b1c4b724" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1170,9 +1171,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.75.0" +version = "1.79.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b161d836fac72bdd5ac1a4cd1cdc38ab888c7af26cfd95f661be4409505e63" +checksum = "77358d25f781bb106c1a69531231d4fd12c6be904edb0c47198c604df5a2dbca" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1192,9 +1193,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.76.0" +version = "1.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1cd79a3412751a341a28e2cd0d6fa4345241976da427b075a0c0cd5409f886" +checksum = "06e3ed2a9b828ae7763ddaed41d51724d2661a50c45f845b08967e52f4939cfc" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1254,9 +1255,9 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.63.4" +version = "0.63.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244f00666380d35c1c76b90f7b88a11935d11b84076ac22a4c014ea0939627af" +checksum = "5ab9472f7a8ec259ddb5681d2ef1cb1cf16c0411890063e67cdc7b62562cc496" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -1274,9 +1275,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.9" +version = "0.60.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338a3642c399c0a5d157648426110e199ca7fd1c689cc395676b81aa563700c4" +checksum = "604c7aec361252b8f1c871a7641d5e0ba3a7f5a586e51b66bc9510a5519594d9" dependencies = [ "aws-smithy-types", "bytes", @@ -1285,9 +1286,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.1" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99335bec6cdc50a346fda1437f9fefe33abf8c99060739a546a16457f2862ca9" +checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -1325,7 +1326,7 @@ dependencies = [ "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -1363,9 +1364,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.8.4" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3aaec682eb189e43c8a19c3dab2fe54590ad5f2cc2d26ab27608a20f2acf81c" +checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1387,9 +1388,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.8.3" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852b9226cb60b78ce9369022c0df678af1cac231c882d5da97a0c4e03be6e67" +checksum = "937a49ecf061895fca4a6dd8e864208ed9be7546c0527d04bc07d502ec5fba1c" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -1439,9 +1440,9 @@ dependencies = [ [[package]] name = "aws-types" -version = "1.3.7" +version = "1.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a322fec39e4df22777ed3ad8ea868ac2f94cd15e1a55f6ee8d8d6305057689a" +checksum = "b069d19bf01e46298eaedd7c6f283fe565a59263e53eebec945f3e6398f42390" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1851,15 +1852,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -1940,7 +1932,7 @@ dependencies = [ "hyperlocal", "log", "pin-project-lite", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -2044,9 +2036,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.9.3" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" +checksum = "441473f2b4b0459a68628c744bc61d23e730fb00128b841d30fa4bb3972257e4" dependencies = [ "proc-macro2", "quote", @@ -2214,7 +2206,7 @@ dependencies = [ "memmap2", "num-traits", "num_cpus", - "rand 0.9.1", + "rand 0.9.2", "rand_distr", "rayon", "safetensors", @@ -2250,7 +2242,7 @@ dependencies = [ "candle-nn", "fancy-regex 0.13.0", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rayon", "serde", "serde_json", @@ -2289,12 +2281,12 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.22.1" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" dependencies = [ "serde", - "toml 0.8.23", + "toml 0.9.2", ] [[package]] @@ -2305,9 +2297,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "castaway" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" dependencies = [ "rustversion", ] @@ -2323,9 +2315,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.29" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "jobserver", "libc", @@ -2592,9 +2584,9 @@ dependencies = [ [[package]] name = "clipboard-win" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" dependencies = [ "error-code", ] @@ -2700,16 +2692,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" -[[package]] -name = "colored" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" -dependencies = [ - "lazy_static", - "windows-sys 0.59.0", -] - [[package]] name = "colored" version = "3.0.0" @@ -2995,15 +2977,15 @@ dependencies = [ "crc", "digest 0.10.7", "libc", - "rand 0.9.1", + "rand 0.9.2", "regex", ] [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -3214,17 +3196,31 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.0" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "darling" version = "0.20.11" @@ -3543,26 +3539,27 @@ dependencies = [ [[package]] name = "deepgram" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818713217b9075f8676e4a1290d84fa6ae9eea2b43ad0482de3eff43c018a079" +checksum = "b7e55d68eeaf55308feb5cb6e948d49efa8564d0536a7375d8a9e06acbb5773a" dependencies = [ "anyhow", "bytes", "futures", - "http 0.2.12", + "http 1.3.1", "pin-project", - "reqwest 0.11.27", + "reqwest 0.12.22", "serde", "serde_json", "serde_urlencoded", "sha256", - "thiserror 1.0.69", + "thiserror 2.0.12", "tokio", "tokio-stream", - "tokio-tungstenite 0.20.1", + "tokio-tungstenite 0.27.0", "tokio-util", - "tungstenite 0.20.1", + "tracing", + "tungstenite 0.27.0", "url", "uuid", ] @@ -3593,6 +3590,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ + "const-oid 0.9.6", "pem-rfc7468", "zeroize", ] @@ -3709,7 +3707,7 @@ dependencies = [ "bytemuck_derive", "hashbrown 0.15.4", "regex-syntax 0.8.5", - "strum 0.27.1", + "strum 0.27.2", ] [[package]] @@ -3749,11 +3747,11 @@ dependencies = [ "tauri-plugin-fs", "tauri-plugin-global-shortcut", "tauri-plugin-http", + "tauri-plugin-keygen", "tauri-plugin-listener", "tauri-plugin-local-llm", "tauri-plugin-local-stt", "tauri-plugin-machine-uid", - "tauri-plugin-membership", "tauri-plugin-misc", "tauri-plugin-notification", "tauri-plugin-obsidian", @@ -3809,15 +3807,6 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" @@ -3908,18 +3897,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dispatch2" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0" -dependencies = [ - "bitflags 2.9.1", - "block2 0.6.1", - "libc", - "objc2 0.6.1", -] - [[package]] name = "dispatch2" version = "0.3.0" @@ -3927,6 +3904,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags 2.9.1", + "block2 0.6.1", + "libc", "objc2 0.6.1", ] @@ -3941,6 +3920,15 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.8", +] + [[package]] name = "dlopen2" version = "0.7.0" @@ -4037,9 +4025,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "dyn-stack" @@ -4081,29 +4069,31 @@ dependencies = [ "der 0.6.1", "elliptic-curve", "rfc6979", - "signature", + "signature 1.6.4", ] [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "signature", + "pkcs8 0.10.2", + "serde", + "signature 2.2.0", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", - "rand 0.7.3", "serde", - "sha2 0.9.9", + "sha2 0.10.9", + "subtle", "zeroize", ] @@ -4126,7 +4116,7 @@ dependencies = [ "ff", "generic-array", "group", - "pkcs8", + "pkcs8 0.9.0", "rand_core 0.6.4", "sec1", "subtle", @@ -4415,6 +4405,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "field-offset" version = "0.3.6" @@ -4764,7 +4760,7 @@ dependencies = [ name = "gbnf" version = "0.1.0" dependencies = [ - "colored 3.0.0", + "colored", "gbnf-validator", "indoc", "insta", @@ -5143,7 +5139,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55" dependencies = [ - "rustix 1.0.7", + "rustix 1.0.8", "windows-targets 0.52.6", ] @@ -5750,9 +5746,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.10.18" +version = "0.10.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567f65fec4ef10dfab97ae71f26a27fd4d7fe7b8e3f90c8a58551c41ff3fb65b" +checksum = "c6279d323d925ad4790602105ae27df4b915e7a7d81e4cdba2603121c03ad111" dependencies = [ "bstr", "gix-trace", @@ -5955,9 +5951,9 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" +checksum = "e2ccaf54b0b1743a695b482ca0ab9d7603744d8d10b2e5d1a332fef337bee658" [[package]] name = "gix-transport" @@ -6464,7 +6460,7 @@ dependencies = [ "cfg-if", "crunchy", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rand_distr", ] @@ -6603,7 +6599,7 @@ dependencies = [ "log", "native-tls", "num_cpus", - "rand 0.9.1", + "rand 0.9.2", "reqwest 0.12.22", "serde", "serde_json", @@ -6814,7 +6810,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -6901,13 +6897,13 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "log", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls 0.26.2", "tower-service", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] @@ -6966,9 +6962,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64 0.22.1", "bytes", @@ -6982,7 +6978,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "system-configuration 0.6.1", "tokio", "tower-service", @@ -7322,9 +7318,9 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ "bitflags 2.9.1", "cfg-if", @@ -7682,59 +7678,19 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "keygen" -version = "0.1.0" -dependencies = [ - "reqwest 0.12.22", - "serde", - "serde_json", - "url", -] - -[[package]] -name = "keygen-rs" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cb5af35d20c15ebe6fd6c6adec46b0829466400bf4fbaf2ead68cc25404195d" -dependencies = [ - "aes-gcm", - "async-trait", - "base64 0.21.7", - "chrono", - "dotenv", - "ed25519-dalek", - "futures", - "futures-timer", - "hex", - "hostname", - "lazy_static", - "log", - "mockito", - "num_cpus", - "rand 0.7.3", - "reqwest 0.11.27", - "serde", - "serde_json", - "serde_urlencoded", - "sha2 0.10.9", - "thiserror 1.0.69", - "tokio", - "url", -] - [[package]] name = "keyring" -version = "3.6.2" +version = "3.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1961983669d57bdfe6c0f3ef8e4c229b5ef751afcc7d87e4271d2f71f6ccfa8b" +checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" dependencies = [ "byteorder", "dbus-secret-service", "log", "security-framework 2.11.1", "security-framework 3.2.0", - "windows-sys 0.59.0", + "windows-sys 0.60.2", + "zeroize", ] [[package]] @@ -7943,20 +7899,20 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.13", + "redox_syscall 0.5.16", ] [[package]] name = "libsql" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d445da25d61b9413dae38d481799cfe5054502fb849c18f7a4a1ffeff39ef19" +checksum = "c92f460194a673c29e82520a061a82f83892faca9ce6881db93d591cd38cb3dc" dependencies = [ "anyhow", "async-stream", @@ -7994,9 +7950,9 @@ dependencies = [ [[package]] name = "libsql-ffi" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a6c4c1d1ff03ed18f10ce9d1ee6b3820b0ef77e5656ccbfdb02388c025937d" +checksum = "64691b229b9d5c0754115f59a0e5c0d1bcc102bfe402b96f2bbf9d5150a4ab3c" dependencies = [ "bindgen 0.66.1", "cc", @@ -8006,9 +7962,9 @@ dependencies = [ [[package]] name = "libsql-hrana" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9d38212a209cbecb16dabd681afaa3cd4498c5ccef46d838ad7162aed9a86c" +checksum = "c18b78daf4af8603c048f584faada18c8970f4f3af16df0c3319a92c90d0d696" dependencies = [ "base64 0.21.7", "bytes", @@ -8018,9 +7974,9 @@ dependencies = [ [[package]] name = "libsql-rusqlite" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310b02070aa2098e6706ccade6b6bbb3c696b207bf23cd20e9635c4a2dbabde0" +checksum = "c502ebc6fd1a7ba1b686c47226016fb8e913080c4021491bda33ca33c6fa1ab4" dependencies = [ "bitflags 2.9.1", "fallible-iterator 0.2.0", @@ -8050,9 +8006,9 @@ dependencies = [ [[package]] name = "libsql-sys" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec1127725da9cfb9fc473b281ee09c1a8a3e103785e663b2e8391f11f0c119f" +checksum = "9e7b9ab82fa6122efe2b2fe066043d6330aa4a7aa656b4ec0df9768ffd1ea6a0" dependencies = [ "bytes", "libsql-ffi", @@ -8064,9 +8020,9 @@ dependencies = [ [[package]] name = "libsql_replication" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff72eb531eb84fa38d6683f5af31668ea59fd52ac1b461515e82bcf4b21ba98f" +checksum = "aa911faee7c1e039a44aeced5e61b5106fb714782e26d89216c87c83eb1ce410" dependencies = [ "aes 0.8.4", "async-stream", @@ -8123,9 +8079,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "litrs" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" +checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" [[package]] name = "llama" @@ -8143,7 +8099,7 @@ dependencies = [ "llama-cpp-2", "llama-cpp-sys-2", "llguidance", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_json", "template", @@ -8183,9 +8139,9 @@ dependencies = [ [[package]] name = "llguidance" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774e5b64a925b938af54dd53a8dd767e1d6575ea8b8cc850a483d6e42d437d64" +checksum = "5ed44400c69591dcf106e666fb4504d35598eaaafbf78237ebc9d4e1ee3a51cf" dependencies = [ "anyhow", "derivre", @@ -8441,9 +8397,9 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" dependencies = [ "libc", "stable_deref_trait", @@ -8606,24 +8562,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "mockito" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f9fece9bd97ab74339fe19f4bcaf52b76dcc18e5364c7977c1838f76b38de9" -dependencies = [ - "assert-json-diff", - "colored 2.2.0", - "httparse", - "lazy_static", - "log", - "rand 0.8.5", - "regex", - "serde_json", - "serde_urlencoded", - "similar", -] - [[package]] name = "monostate" version = "0.1.14" @@ -9264,7 +9202,7 @@ checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ "bitflags 2.9.1", "block2 0.6.1", - "dispatch2 0.3.0", + "dispatch2", "libc", "objc2 0.6.1", ] @@ -9276,7 +9214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ "bitflags 2.9.1", - "dispatch2 0.3.0", + "dispatch2", "objc2 0.6.1", "objc2-core-foundation", "objc2-io-surface", @@ -9332,7 +9270,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "159be6e4cd366c7d236d798daa2aa71855230e5691cde045a0670ce01a06d664" dependencies = [ - "dispatch2 0.3.0", + "dispatch2", "objc2 0.6.1", "objc2-core-foundation", "objc2-security", @@ -10006,7 +9944,7 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.13", + "redox_syscall 0.5.16", "smallvec 1.15.1", "windows-targets 0.52.6", ] @@ -10367,7 +10305,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der 0.6.1", - "spki", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.10", + "spki 0.7.3", ] [[package]] @@ -10438,17 +10386,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.8.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" +checksum = "8ee9b2fa7a4517d2c91ff5bc6c297a427a96749d15f98fcdbb22c05571a4d4b7" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.0.7", - "tracing", - "windows-sys 0.59.0", + "rustix 1.0.8", + "windows-sys 0.60.2", ] [[package]] @@ -10521,9 +10468,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", "syn 2.0.104", @@ -10807,8 +10754,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", - "rustls 0.23.29", - "socket2", + "rustls 0.23.30", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -10824,10 +10771,10 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring 0.17.14", "rustc-hash 2.1.1", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-pki-types", "slab", "thiserror 2.0.12", @@ -10845,7 +10792,7 @@ dependencies = [ "cfg_aliases 0.2.1", "libc", "once_cell", - "socket2", + "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] @@ -10892,9 +10839,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -10964,7 +10911,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" dependencies = [ "num-traits", - "rand 0.9.1", + "rand 0.9.2", ] [[package]] @@ -11090,9 +11037,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" dependencies = [ "bitflags 2.9.1", ] @@ -11215,9 +11162,9 @@ dependencies = [ [[package]] name = "regress" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ef7fa9ed0256d64a688a3747d0fef7a88851c18a5e1d57f115f38ec2e09366" +checksum = "145bb27393fe455dd64d6cbc8d059adfa392590a45eadf079c01b11857e7b010" dependencies = [ "hashbrown 0.15.4", "memchr", @@ -11270,12 +11217,10 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "webpki-roots 0.25.4", "winreg 0.50.0", @@ -11312,7 +11257,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-pki-types", "serde", "serde_json", @@ -11330,7 +11275,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] @@ -11499,8 +11444,8 @@ dependencies = [ "jsonptr 0.5.1", "pin-project-lite", "prettyplease", - "rand 0.9.1", - "regress 0.10.3", + "rand 0.9.2", + "regress 0.10.4", "restate-sdk-macros", "restate-sdk-shared-core", "serde", @@ -11541,7 +11486,7 @@ dependencies = [ "ring 0.17.14", "serde", "sha2 0.11.0-pre.3", - "strum 0.27.1", + "strum 0.27.2", "thiserror 2.0.12", "tracing", ] @@ -11585,13 +11530,13 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c844748fdc82aae252ee4594a89b6e7ebef1063de7951545564cbc4e57075d" +checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" dependencies = [ "ashpd", "block2 0.6.1", - "dispatch2 0.2.0", + "dispatch2", "glib-sys", "gobject-sys", "gtk-sys", @@ -11705,9 +11650,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -11768,15 +11713,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -11807,9 +11752,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "069a8df149a16b1a12dcc31497c3396a173844be3cac4bd40c9e7671fef96671" dependencies = [ "aws-lc-rs", "log", @@ -12081,6 +12026,12 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -12119,9 +12070,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f5557d2bbddd5afd236ba7856b0e494f5acc7ce805bb0774cc5674b20a06b4" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" [[package]] name = "seahash" @@ -12138,7 +12089,7 @@ dependencies = [ "base16ct", "der 0.6.1", "generic-array", - "pkcs8", + "pkcs8 0.9.0", "subtle", "zeroize", ] @@ -12344,7 +12295,7 @@ version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7426d4beec270cfdbb50f85f0bb2ce176ea57eed0b11741182a163055a558187" dependencies = [ - "rand 0.9.1", + "rand 0.9.2", "sentry-types 0.38.1", "serde", "serde_json", @@ -12451,7 +12402,7 @@ checksum = "04b6c9287202294685cb1f749b944dbbce8160b81a1061ecddc073025fed129f" dependencies = [ "debugid", "hex", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_json", "thiserror 2.0.12", @@ -12554,9 +12505,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "indexmap 2.10.0", "itoa", @@ -12823,19 +12774,6 @@ dependencies = [ "sha1", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.9" @@ -12956,6 +12894,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "silero" version = "0.1.0" @@ -13056,7 +13003,7 @@ dependencies = [ "lazy_static", "mime", "mime_guess", - "rand 0.9.1", + "rand 0.9.2", "rsb_derive", "rvstruct", "serde", @@ -13137,6 +13084,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "socks" version = "0.3.4" @@ -13164,7 +13121,7 @@ dependencies = [ "objc2-foundation 0.2.2", "objc2-quartz-core 0.2.2", "raw-window-handle", - "redox_syscall 0.5.13", + "redox_syscall 0.5.16", "wasm-bindgen", "web-sys", "windows-sys 0.59.0", @@ -13267,6 +13224,16 @@ dependencies = [ "der 0.6.1", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.10", +] + [[package]] name = "spm_precompiled" version = "0.1.4" @@ -13392,11 +13359,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros 0.27.1", + "strum_macros 0.27.2", ] [[package]] @@ -13427,14 +13394,13 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "rustversion", "syn 2.0.104", ] @@ -13877,9 +13843,9 @@ dependencies = [ [[package]] name = "tauri" -version = "2.6.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124e129c9c0faa6bec792c5948c89e86c90094133b0b9044df0ce5f0a8efaa0d" +checksum = "352a4bc7bf6c25f5624227e3641adf475a6535707451b09bb83271df8b7a6ac7" dependencies = [ "anyhow", "bytes", @@ -13929,9 +13895,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f025c389d3adb83114bec704da973142e82fc6ec799c7c750c5e21cefaec83" +checksum = "182d688496c06bf08ea896459bf483eb29cdff35c1c4c115fb14053514303064" dependencies = [ "anyhow", "cargo_toml", @@ -13951,9 +13917,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5df493a1075a241065bc865ed5ef8d0fbc1e76c7afdc0bf0eccfaa7d4f0e406" +checksum = "b54a99a6cd8e01abcfa61508177e6096a4fe2681efecee9214e962f2f073ae4a" dependencies = [ "base64 0.22.1", "brotli", @@ -13978,9 +13944,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f237fbea5866fa5f2a60a21bea807a2d6e0379db070d89c3a10ac0f2d4649bbc" +checksum = "7945b14dc45e23532f2ded6e120170bbdd4af5ceaa45784a6b33d250fbce3f9e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -14008,9 +13974,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9a0bd00bf1930ad1a604d08b0eb6b2a9c1822686d65d7f4731a7723b8901d3" +checksum = "5bd5c1e56990c70a906ef67a9851bbdba9136d26075ee9a2b19c8b46986b3e02" dependencies = [ "anyhow", "glob", @@ -14160,9 +14126,9 @@ dependencies = [ [[package]] name = "tauri-plugin-deep-link" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab261eb006db10ab478e3fbb5a4e2692df3f7eb3e28300ee2b64428979167ed0" +checksum = "1fec67f32d7a06d80bd3dc009fdb678c35a66116d9cb8cd2bb32e406c2b5bbd2" dependencies = [ "dunce", "rust-ini", @@ -14180,9 +14146,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aefb14219b492afb30b12647b5b1247cadd2c0603467310c36e0f7ae1698c28" +checksum = "05bedd4c3cf6f7aa97918a8814a736bd3695c9ddf3ede2d50eda6069c3290edc" dependencies = [ "log", "raw-window-handle", @@ -14213,9 +14179,9 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c341290d31991dbca38b31d412c73dfbdb070bb11536784f19dd2211d13b778f" +checksum = "8c6ef84ee2f2094ce093e55106d90d763ba343fad57566992962e8f76d113f99" dependencies = [ "anyhow", "dunce", @@ -14252,9 +14218,9 @@ dependencies = [ [[package]] name = "tauri-plugin-http" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c1a38da944b357ffa23bafd563b1579f18e6fbd118fcd84769406d35dcc5c7" +checksum = "fcde333d97e565a7765aad82f32d8672458f7bd77b6ee653830d5dded9d7b5c2" dependencies = [ "bytes", "cookie_store", @@ -14274,6 +14240,29 @@ dependencies = [ "urlpattern", ] +[[package]] +name = "tauri-plugin-keygen" +version = "2.0.0" +source = "git+https://github.com/bagindo/tauri-plugin-keygen?branch=v2#e0de03a76a5c82c36adb347e43e4bff4f78c87de" +dependencies = [ + "aes-gcm", + "base64 0.21.7", + "chrono", + "ed25519-dalek", + "hex", + "machine-uid", + "reqwest 0.12.22", + "serde", + "serde_json", + "sha2 0.10.9", + "tauri", + "tauri-plugin", + "tauri-plugin-os", + "thiserror 1.0.69", + "tokio", + "whoami", +] + [[package]] name = "tauri-plugin-listener" version = "0.1.0" @@ -14410,25 +14399,6 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "tauri-plugin-membership" -version = "0.1.0" -dependencies = [ - "keygen-rs", - "schemars 0.8.22", - "serde", - "serde_json", - "specta", - "specta-typescript", - "strum 0.26.3", - "tauri", - "tauri-plugin", - "tauri-plugin-store", - "tauri-plugin-store2", - "tauri-specta", - "thiserror 2.0.12", -] - [[package]] name = "tauri-plugin-misc" version = "0.1.0" @@ -14524,7 +14494,7 @@ dependencies = [ "thiserror 2.0.12", "url", "windows 0.61.3", - "zbus 5.8.0", + "zbus 5.9.0", ] [[package]] @@ -14554,7 +14524,7 @@ dependencies = [ "bitflags 2.9.1", "itertools 0.14.0", "serde", - "strum 0.27.1", + "strum 0.27.2", "tauri", "tauri-plugin", "thiserror 2.0.12", @@ -14627,9 +14597,9 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b441b6d5d1a194e9fee0b358fe0d602ded845d0f580e1f8c8ef78ebc3c8b225d" +checksum = "50a0e5a4ce43cb3a733c3aef85e8478bc769dac743c615e26639cbf5d953faf7" dependencies = [ "serde", "serde_json", @@ -14638,7 +14608,7 @@ dependencies = [ "thiserror 2.0.12", "tracing", "windows-sys 0.60.2", - "zbus 5.8.0", + "zbus 5.9.0", ] [[package]] @@ -14730,6 +14700,7 @@ dependencies = [ name = "tauri-plugin-tray" version = "0.1.0" dependencies = [ + "serde_json", "specta", "specta-typescript", "tauri", @@ -14776,9 +14747,9 @@ dependencies = [ [[package]] name = "tauri-plugin-window-state" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3d22b21b9cec73601b512a868f7c74f93c044d44fd6ca1c84e9d6afb6b1559" +checksum = "2d5f6fe3291bfa609c7e0b0ee3bedac294d94c7018934086ce782c1d0f2a468e" dependencies = [ "bitflags 2.9.1", "log", @@ -14798,6 +14769,7 @@ dependencies = [ "objc2-foundation 0.3.1", "once_cell", "serde", + "serde_json", "specta", "specta-typescript", "strum 0.26.3", @@ -14815,9 +14787,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7bb73d1bceac06c20b3f755b2c8a2cb13b20b50083084a8cf3700daf397ba4" +checksum = "2b1cc885be806ea15ff7b0eb47098a7b16323d9228876afda329e34e2d6c4676" dependencies = [ "cookie", "dpi", @@ -14837,9 +14809,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902b5aa9035e16f342eb64f8bf06ccdc2808e411a2525ed1d07672fa4e780bad" +checksum = "fe653a2fbbef19fe898efc774bc52c8742576342a33d3d028c189b57eb1d2439" dependencies = [ "gtk", "http 1.3.1", @@ -14892,9 +14864,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41743bbbeb96c3a100d234e5a0b60a46d5aa068f266160862c7afdbf828ca02e" +checksum = "9330c15cabfe1d9f213478c9e8ec2b0c76dab26bb6f314b8ad1c8a568c1d186e" dependencies = [ "anyhow", "brotli", @@ -14955,7 +14927,7 @@ dependencies = [ "fastrand 2.3.0", "getrandom 0.3.3", "once_cell", - "rustix 1.0.7", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -15211,7 +15183,7 @@ dependencies = [ "monostate", "onig", "paste", - "rand 0.9.1", + "rand 0.9.2", "rayon", "rayon-cond", "regex", @@ -15227,9 +15199,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" dependencies = [ "backtrace", "bytes", @@ -15240,17 +15212,17 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2", + "socket2 0.6.0", "tokio-macros", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "tokio-io-timeout" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76" dependencies = [ "pin-project-lite", "tokio", @@ -15304,7 +15276,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.29", + "rustls 0.23.30", "tokio", ] @@ -15334,21 +15306,6 @@ dependencies = [ "xattr", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", - "tungstenite 0.20.1", - "webpki-roots 0.25.4", -] - [[package]] name = "tokio-tungstenite" version = "0.26.2" @@ -15371,12 +15328,13 @@ checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" dependencies = [ "futures-util", "log", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls 0.26.2", "tungstenite 0.27.0", + "webpki-roots 0.26.11", ] [[package]] @@ -15394,9 +15352,9 @@ dependencies = [ [[package]] name = "toktrie" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747b19d4f97f841cc720aaffb1fa3dbf08bc72abd9199dcf34b0fad7b1a3691c" +checksum = "1c01fe70e9a91498c029fb6d5aacf9a648bb1bf30a5db4c344d3effb6367b1f3" dependencies = [ "anyhow", "bytemuck", @@ -15407,9 +15365,9 @@ dependencies = [ [[package]] name = "toktrie_hf_downloader" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a8a6313b9f5701d44ceb4e70529b7fe9e1cdb3d86b8d2e88eea1b29e543fb5" +checksum = "3f3c731f3d9ecd85cadc5cac6556bc71de2e67aa384327f5bba9f8fbb16f0999" dependencies = [ "anyhow", "hf-hub 0.4.3", @@ -15420,9 +15378,9 @@ dependencies = [ [[package]] name = "toktrie_hf_tokenizers" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f942aa9bcd67f39dfeec0d5b80a40ae32e5ae38c0c58777b7d47fa393177f" +checksum = "759491ad9b56050f817e24d68f48eb7f13bee5f8b48127ba3a9079a579726f40" dependencies = [ "anyhow", "log", @@ -15584,7 +15542,7 @@ dependencies = [ "prost 0.13.5", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", - "socket2", + "socket2 0.5.10", "tokio", "tokio-rustls 0.26.2", "tokio-stream", @@ -15895,26 +15853,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.21.12", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.26.2" @@ -15927,7 +15865,7 @@ dependencies = [ "httparse", "log", "native-tls", - "rand 0.9.1", + "rand 0.9.2", "sha1", "thiserror 2.0.12", "utf-8", @@ -15944,8 +15882,8 @@ dependencies = [ "http 1.3.1", "httparse", "log", - "rand 0.9.1", - "rustls 0.23.29", + "rand 0.9.2", + "rustls 0.23.30", "rustls-pki-types", "sha1", "thiserror 2.0.12", @@ -16076,7 +16014,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "470dbf6591da1b39d43c14523b2b469c86879a53e8b758c8e090a470fe7b1fbe" dependencies = [ - "rand 0.9.1", + "rand 0.9.2", "uuid", "web-time", ] @@ -16259,7 +16197,7 @@ dependencies = [ "log", "native-tls", "once_cell", - "rustls 0.23.29", + "rustls 0.23.30", "rustls-pki-types", "serde", "serde_json", @@ -16355,7 +16293,7 @@ checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ "getrandom 0.3.3", "js-sys", - "rand 0.9.1", + "rand 0.9.2", "serde", "wasm-bindgen", ] @@ -16509,6 +16447,12 @@ dependencies = [ "wit-bindgen-rt", ] +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -16617,6 +16561,7 @@ dependencies = [ "cc", "downcast-rs", "rustix 0.38.44", + "scoped-tls", "smallvec 1.15.1", "wayland-sys", ] @@ -16675,6 +16620,8 @@ version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ + "dlib", + "log", "pkg-config", ] @@ -16748,14 +16695,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" dependencies = [ - "webpki-root-certs 1.0.1", + "webpki-root-certs 1.0.2", ] [[package]] name = "webpki-root-certs" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86138b15b2b7d561bc4469e77027b8dd005a43dc502e9031d1f5afc8ce1f280e" +checksum = "4e4ffd8df1c57e87c325000a3d6ef93db75279dc3a231125aac571650f22b12a" dependencies = [ "rustls-pki-types", ] @@ -16772,14 +16719,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -16963,6 +16910,17 @@ dependencies = [ "fs_extra", ] +[[package]] +name = "whoami" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +dependencies = [ + "redox_syscall 0.5.16", + "wasite", + "web-sys", +] + [[package]] name = "widestring" version = "1.2.0" @@ -17826,7 +17784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af3a19837351dc82ba89f8a125e22a3c475f05aba604acc023d62b2739ae2909" dependencies = [ "libc", - "rustix 1.0.7", + "rustix 1.0.8", ] [[package]] @@ -17972,9 +17930,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.8.0" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597f45e98bc7e6f0988276012797855613cd8269e23b5be62cc4e5d28b7e515d" +checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad" dependencies = [ "async-broadcast", "async-executor", @@ -17999,7 +17957,7 @@ dependencies = [ "uds_windows", "windows-sys 0.59.0", "winnow 0.7.12", - "zbus_macros 5.8.0", + "zbus_macros 5.9.0", "zbus_names 4.2.0", "zvariant 5.6.0", ] @@ -18019,9 +17977,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.8.0" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c8e4e14dcdd9d97a98b189cd1220f30e8394ad271e8c987da84f73693862c2" +checksum = "ef9859f68ee0c4ee2e8cde84737c78e3f4c54f946f2a38645d0d4c7a95327659" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -18122,20 +18080,6 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] [[package]] name = "zerotrie" diff --git a/Cargo.toml b/Cargo.toml index fef7572b9d..42c26e0bbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,7 +93,6 @@ tauri-plugin-flags = { path = "plugins/flags" } tauri-plugin-listener = { path = "plugins/listener" } tauri-plugin-local-llm = { path = "plugins/local-llm" } tauri-plugin-local-stt = { path = "plugins/local-stt" } -tauri-plugin-membership = { path = "plugins/membership" } tauri-plugin-misc = { path = "plugins/misc" } tauri-plugin-notification = { path = "plugins/notification" } tauri-plugin-obsidian = { path = "plugins/obsidian" } diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 4aabd09199..add8e2023f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -28,7 +28,6 @@ "@hypr/plugin-listener": "workspace:^", "@hypr/plugin-local-llm": "workspace:^", "@hypr/plugin-local-stt": "workspace:^", - "@hypr/plugin-membership": "workspace:^", "@hypr/plugin-misc": "workspace:^", "@hypr/plugin-notification": "workspace:^", "@hypr/plugin-obsidian": "workspace:^", @@ -93,6 +92,7 @@ "remixicon": "^4.6.0", "sonner": "^1.7.4", "tailwind-merge": "^2.6.0", + "tauri-plugin-keygen-api": "github:bagindo/tauri-plugin-keygen#v2", "tauri-plugin-sentry-api": "^0.4.1", "tippy.js": "^6.3.7", "zod": "^3.25.46", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 05b9f9d6fe..afb428f189 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -37,7 +37,6 @@ tauri-plugin-listener = { workspace = true } tauri-plugin-local-llm = { workspace = true } tauri-plugin-local-stt = { workspace = true } tauri-plugin-machine-uid = { workspace = true } -tauri-plugin-membership = { workspace = true } tauri-plugin-misc = { workspace = true } tauri-plugin-notification = { workspace = true } tauri-plugin-obsidian = { workspace = true } @@ -58,6 +57,7 @@ tauri-plugin-dialog = { workspace = true } tauri-plugin-fs = { workspace = true, features = ["watch"] } tauri-plugin-global-shortcut = "2" tauri-plugin-http = { workspace = true } +tauri-plugin-keygen = { git = "https://github.com/bagindo/tauri-plugin-keygen", branch = "v2" } tauri-plugin-os = "2" tauri-plugin-prevent-default = { version = "1.2", features = ["unstable-windows"] } tauri-plugin-process = "2" diff --git a/apps/desktop/src-tauri/capabilities/default.json b/apps/desktop/src-tauri/capabilities/default.json index 4c1a00bb04..ea1ef2f3d9 100644 --- a/apps/desktop/src-tauri/capabilities/default.json +++ b/apps/desktop/src-tauri/capabilities/default.json @@ -48,8 +48,8 @@ "notification:default", "fs:default", "task:default", - "membership:default", "obsidian:default", + "keygen:default", { "identifier": "opener:allow-open-url", "allow": [{ "url": "https://**" }, { "url": "mailto:*" }, { "url": "obsidian://**" }] diff --git a/apps/desktop/src-tauri/src/deeplink.rs b/apps/desktop/src-tauri/src/deeplink.rs index a2493a036a..ddb2314395 100644 --- a/apps/desktop/src-tauri/src/deeplink.rs +++ b/apps/desktop/src-tauri/src/deeplink.rs @@ -24,8 +24,12 @@ pub fn parse(url: String) -> Vec { }; let dests = match parsed_url.path() { + // Specified in notification related codebase "/notification" => parse_notification_query(&parsed_url), + // Specified in /apps/admin "/register" => parse_register_query(&parsed_url), + // Specified in email template + "/license" => parse_license_query(&parsed_url), _ => vec![Destination::default()], }; @@ -80,6 +84,29 @@ fn parse_register_query(parsed_url: &url::Url) -> Vec { ] } +fn parse_license_query(parsed_url: &url::Url) -> Vec { + let main_url = "/app".to_string(); + + let settings_url = match parsed_url.query() { + Some(query) => match serde_qs::from_str::(query) { + Ok(params) => format!("/app/settings?tab=billing&key={}", params.key), + Err(_) => "/app/settings".to_string(), + }, + None => "/app/settings".to_string(), + }; + + vec![ + Destination { + window: HyprWindow::Main, + url: main_url, + }, + Destination { + window: HyprWindow::Settings, + url: settings_url, + }, + ] +} + #[derive(serde::Serialize, serde::Deserialize)] struct NotificationQuery { event_id: Option, @@ -91,6 +118,11 @@ struct RegisterQuery { api_key: String, } +#[derive(serde::Serialize, serde::Deserialize)] +struct LicenseQuery { + key: String, +} + #[cfg(test)] mod tests { use super::*; @@ -100,7 +132,7 @@ mod tests { let url = "hypr://hyprnote.com/register?base_url=http://localhost:3000&api_key=123"; let dests = parse(url.to_string()); - assert_eq!(dests.len(), 1); + assert_eq!(dests.len(), 2); let dest = dests.first().unwrap(); assert_eq!(dest.window, HyprWindow::Main); @@ -109,4 +141,16 @@ mod tests { "/app/register?base_url=http://localhost:3000&api_key=123" ); } + + #[test] + fn test_parse_license_query() { + let url = "hypr://hyprnote.com/license?key=123"; + + let dests = parse(url.to_string()); + assert_eq!(dests.len(), 2); + + let dest = dests.first().unwrap(); + assert_eq!(dest.window, HyprWindow::Main); + assert_eq!(dest.url, "/app"); + } } diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index 17b58b2472..8b2f77d1c2 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -96,7 +96,6 @@ pub async fn main() { .plugin(tauri_plugin_tray::init()) .plugin(tauri_plugin_notification::init()) .plugin(tauri_plugin_windows::init()) - .plugin(tauri_plugin_membership::init()) .plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_global_shortcut::Builder::new().build()) .plugin(tauri_plugin_autostart::init( @@ -104,6 +103,31 @@ pub async fn main() { Some(vec![]), )); + { + // These are not secrets. In prod, we set different values in the environment. (See .github/workflows/desktop_cd.yml) + let (keygen_account_id, keygen_verify_key) = { + #[cfg(not(debug_assertions))] + { + (env!("KEYGEN_ACCOUNT_ID"), env!("KEYGEN_VERIFY_KEY")) + } + + #[cfg(debug_assertions)] + { + ( + option_env!("KEYGEN_ACCOUNT_ID") + .unwrap_or("76dfe152-397c-4689-9c5e-3669cefa34b9"), + option_env!("KEYGEN_VERIFY_KEY").unwrap_or( + "13f18c98b8c1e5539d92df4aad2d51f4d203d5aead296215df7c3d6376b78b13", + ), + ) + } + }; + + builder = builder.plugin( + tauri_plugin_keygen::Builder::new(keygen_account_id, keygen_verify_key).build(), + ); + } + #[cfg(target_os = "macos")] { builder = builder.plugin(tauri_plugin_apple_calendar::init()) diff --git a/apps/desktop/src/components/finder/views/contact-view.tsx b/apps/desktop/src/components/finder/views/contact-view.tsx index 9031bac5f5..dcc36be786 100644 --- a/apps/desktop/src/components/finder/views/contact-view.tsx +++ b/apps/desktop/src/components/finder/views/contact-view.tsx @@ -1,3 +1,8 @@ +import { RiCornerDownLeftLine } from "@remixicon/react"; +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { Building2, CircleMinus, FileText, Pencil, Plus, SearchIcon, User } from "lucide-react"; +import { useEffect, useRef, useState } from "react"; + import { commands as dbCommands } from "@hypr/plugin-db"; import { type Human, type Organization } from "@hypr/plugin-db"; import { commands as windowsCommands } from "@hypr/plugin-windows"; @@ -6,10 +11,7 @@ import { Input } from "@hypr/ui/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger } from "@hypr/ui/components/ui/popover"; import { cn } from "@hypr/ui/lib/utils"; import { getInitials } from "@hypr/utils"; -import { RiCornerDownLeftLine } from "@remixicon/react"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { Building2, CircleMinus, FileText, Pencil, Plus, SearchIcon, User } from "lucide-react"; -import { useEffect, useRef, useState } from "react"; +import { LinkProps } from "node_modules/@tanstack/react-router/dist/esm/link"; interface ContactViewProps { userId: string; @@ -110,9 +112,13 @@ export function ContactView({ userId, initialPersonId, initialOrgId }: ContactVi }, [initialOrgId, organizations]); const handleSessionClick = (sessionId: string) => { - const url = `/app/note/${sessionId}`; + const path = { to: "/app/note/$id", params: { id: sessionId } } as const satisfies LinkProps; + windowsCommands.windowShow({ type: "main" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "main" }, url); + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: path.to.replace("$id", path.params.id), + search: null, + }); }); }; diff --git a/apps/desktop/src/components/finder/views/table-view.tsx b/apps/desktop/src/components/finder/views/table-view.tsx index 542b8680e7..02128b87a2 100644 --- a/apps/desktop/src/components/finder/views/table-view.tsx +++ b/apps/desktop/src/components/finder/views/table-view.tsx @@ -1,3 +1,4 @@ +import type { LinkProps } from "@tanstack/react-router"; import { format, isToday } from "date-fns"; import { Archive, Calendar, ChevronDown, ChevronUp, FileText, Search } from "lucide-react"; import { useMemo, useState } from "react"; @@ -108,32 +109,41 @@ export function TableView({ date, sessions, events, onNavigate }: TableViewProps const handleRowClick = async (item: TableItem) => { if (item.type === "session") { - const url = `/app/note/${item.id}`; + const url = { to: "/app/note/$id", params: { id: item.id } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "main" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "main" }, url); + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: url.to.replace("$id", item.id), + search: null, + }); }); } else if (item.type === "event") { try { const session = await dbCommands.getSession({ calendarEventId: item.id }); if (session) { - // Navigate to existing session - const url = `/app/note/${session.id}`; + const url = { to: "/app/note/$id", params: { id: session.id } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "main" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "main" }, url); + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: url.to.replace("$id", session.id), + search: null, + }); }); } else { - // Create new note with event ID - const url = `/app/new?calendarEventId=${item.id}`; + const url = { to: "/app/new", search: { calendarEventId: item.id } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "main" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "main" }, url); + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: url.to, + search: url.search, + }); }); } } catch (error) { - // If session lookup fails, create new note - const url = `/app/new?calendarEventId=${item.id}`; + const url = { to: "/app/new", search: { calendarEventId: item.id } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "main" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "main" }, url); + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: url.to, + search: url.search, + }); }); } } diff --git a/apps/desktop/src/components/human-profile/past-notes.tsx b/apps/desktop/src/components/human-profile/past-notes.tsx index c25757e4e0..67151ce0c0 100644 --- a/apps/desktop/src/components/human-profile/past-notes.tsx +++ b/apps/desktop/src/components/human-profile/past-notes.tsx @@ -1,6 +1,6 @@ import { Trans } from "@lingui/react/macro"; import { useQuery } from "@tanstack/react-query"; -import { Link, LinkProps, useNavigate } from "@tanstack/react-router"; +import { Link, type LinkProps, useNavigate } from "@tanstack/react-router"; import { format } from "date-fns"; import { FileText } from "lucide-react"; @@ -43,7 +43,10 @@ export function PastNotes({ human }: { human: Human }) { } else { const params = { to: "/app/new" } as const satisfies LinkProps; - windowsCommands.windowEmitNavigate({ type: "main" }, params.to).then(() => { + windowsCommands.windowEmitNavigate({ type: "main" }, { + path: params.to, + search: null, + }).then(() => { windowsCommands.windowDestroy({ type: "human", value: human.id }); }); } diff --git a/apps/desktop/src/components/left-sidebar/events-list.tsx b/apps/desktop/src/components/left-sidebar/events-list.tsx index d1463c8c42..cad4089875 100644 --- a/apps/desktop/src/components/left-sidebar/events-list.tsx +++ b/apps/desktop/src/components/left-sidebar/events-list.tsx @@ -1,6 +1,6 @@ import { Trans } from "@lingui/react/macro"; import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useNavigate } from "@tanstack/react-router"; +import { type LinkProps, useNavigate } from "@tanstack/react-router"; import { clsx } from "clsx"; import { format } from "date-fns"; import { AppWindowMacIcon, ArrowUpRight, CalendarDaysIcon, RefreshCwIcon } from "lucide-react"; @@ -128,10 +128,13 @@ function EventItem({ const handleOpenCalendar = () => { const date = new Date(event.start_date); const formattedDate = format(date, "yyyy-MM-dd"); - const url = `/app/finder?view=calendar&date=${formattedDate}`; + const url = { to: "/app/finder", search: { view: "calendar", date: formattedDate } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "finder" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "finder" }, url); + windowsCommands.windowEmitNavigate({ type: "finder" }, { + path: url.to, + search: url.search, + }); }); }; diff --git a/apps/desktop/src/components/left-sidebar/notes-list.tsx b/apps/desktop/src/components/left-sidebar/notes-list.tsx index 4388e13ad6..f2d217a974 100644 --- a/apps/desktop/src/components/left-sidebar/notes-list.tsx +++ b/apps/desktop/src/components/left-sidebar/notes-list.tsx @@ -1,7 +1,7 @@ import { Trans } from "@lingui/react/macro"; import { useLingui } from "@lingui/react/macro"; import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { useMatch, useNavigate } from "@tanstack/react-router"; +import { type LinkProps, useMatch, useNavigate } from "@tanstack/react-router"; import { confirm } from "@tauri-apps/plugin-dialog"; import { endOfMonth, startOfMonth, subMonths } from "date-fns"; import { AppWindowMacIcon, ArrowUpRight, CalendarDaysIcon, TrashIcon } from "lucide-react"; @@ -236,10 +236,13 @@ function NoteItem({ const handleOpenCalendar = () => { const date = new Date(currentSession.created_at); const formattedDate = format(date, "yyyy-MM-dd"); - const url = `/app/finder?view=calendar&date=${formattedDate}`; + const url = { to: "/app/finder", search: { view: "calendar", date: formattedDate } } as const satisfies LinkProps; windowsCommands.windowShow({ type: "finder" }).then(() => { - windowsCommands.windowEmitNavigate({ type: "finder" }, url); + windowsCommands.windowEmitNavigate({ type: "finder" }, { + path: url.to, + search: url.search, + }); }); }; diff --git a/apps/desktop/src/components/left-sidebar/top-area/settings-button.tsx b/apps/desktop/src/components/left-sidebar/top-area/settings-button.tsx index ef5555725a..dec5fb684f 100644 --- a/apps/desktop/src/components/left-sidebar/top-area/settings-button.tsx +++ b/apps/desktop/src/components/left-sidebar/top-area/settings-button.tsx @@ -1,10 +1,13 @@ import { Trans } from "@lingui/react/macro"; +import { useQuery } from "@tanstack/react-query"; +import type { LinkProps } from "@tanstack/react-router"; import { getName, getVersion } from "@tauri-apps/api/app"; -import { CogIcon, CpuIcon } from "lucide-react"; +import { CastleIcon, CogIcon, ShieldIcon } from "lucide-react"; import { useState } from "react"; import Shortcut from "@/components/shortcut"; import { useHypr } from "@/contexts"; +import { useLicense } from "@/hooks/use-license"; import { openURL } from "@/utils/shell"; import { commands as windowsCommands } from "@hypr/plugin-windows"; import { Button } from "@hypr/ui/components/ui/button"; @@ -15,12 +18,14 @@ import { DropdownMenuTrigger, } from "@hypr/ui/components/ui/dropdown-menu"; import { cn } from "@hypr/ui/lib/utils"; -import { useQuery } from "@tanstack/react-query"; export function SettingsButton() { const [open, setOpen] = useState(false); const { userId } = useHypr(); + const { getLicense } = useLicense(); + const isPro = !!getLicense.data?.valid; + const versionQuery = useQuery({ queryKey: ["appVersion"], queryFn: async () => { @@ -41,7 +46,17 @@ export function SettingsButton() { const handleClickPlans = () => { setOpen(false); - windowsCommands.windowShow({ type: "plans" }); + + windowsCommands.windowShow({ type: "settings" }).then(() => { + const params = { to: "/app/settings", search: { tab: "billing" } } as const satisfies LinkProps; + + setTimeout(() => { + windowsCommands.windowEmitNavigate({ type: "settings" }, { + path: params.to, + search: params.search, + }); + }, 500); + }); }; const handleClickChangelog = async () => { @@ -71,27 +86,7 @@ export function SettingsButton() { -
-
-
-
- -
-
- Local mode -
-
- Privacy-focused AI -
-
-
-
+
); } + +function DropdownHeader({ + isPro, + handleClick, +}: { + isPro: boolean; + handleClick: () => void; +}) { + return ( +
+
+
+
+ {isPro ? : } +
+
+ {isPro ? "Pro Plan" : "Free Plan"} +
+
+ {isPro ? "Full features" : "Basic features"} +
+
+
+
+ ); +} diff --git a/apps/desktop/src/components/license.tsx b/apps/desktop/src/components/license.tsx new file mode 100644 index 0000000000..b38549a2cf --- /dev/null +++ b/apps/desktop/src/components/license.tsx @@ -0,0 +1,26 @@ +import { useEffect } from "react"; + +import { useLicense } from "@/hooks/use-license"; + +export function LicenseRefreshProvider({ children }: { children: React.ReactNode }) { + const { shouldRefresh, refreshLicense, getLicense } = useLicense(); + + useEffect(() => { + if (getLicense.isLoading) { + return; + } + + const checkAndRefresh = () => { + if (shouldRefresh() && !refreshLicense.isPending) { + refreshLicense.mutate({}); + } + }; + + checkAndRefresh(); + const interval = setInterval(checkAndRefresh, 1000 * 60 * 10); // 10min + + return () => clearInterval(interval); + }, [shouldRefresh, refreshLicense, getLicense.isLoading, refreshLicense.isPending]); + + return <>{children}; +} diff --git a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts index 042f2869fa..109322e8ed 100644 --- a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts +++ b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts @@ -1,5 +1,7 @@ +import { message } from "@tauri-apps/plugin-dialog"; import { useState } from "react"; +import { useLicense } from "@/hooks/use-license"; import { commands as analyticsCommands } from "@hypr/plugin-analytics"; import { commands as connectorCommands } from "@hypr/plugin-connector"; import { commands as dbCommands } from "@hypr/plugin-db"; @@ -42,6 +44,7 @@ export function useChatLogic({ }: UseChatLogicProps) { const [isGenerating, setIsGenerating] = useState(false); const sessions = useSessions((state) => state.sessions); + const { getLicense } = useLicense(); const handleApplyMarkdown = async (markdownContent: string) => { if (!sessionId) { @@ -135,6 +138,20 @@ export function useChatLogic({ return; } + if (messages.length >= 2 && !getLicense.data?.valid) { + if (userId) { + await analyticsCommands.event({ + event: "pro_license_required_chat", + distinct_id: userId, + }); + } + await message("2 messages are allowed per session for free users.", { + title: "Pro License Required", + kind: "info", + }); + return; + } + if (userId) { await analyticsCommands.event({ event: analyticsEvent, diff --git a/apps/desktop/src/components/settings/components/tab-icon.tsx b/apps/desktop/src/components/settings/components/tab-icon.tsx index 6ab5ef941c..285b2ef41c 100644 --- a/apps/desktop/src/components/settings/components/tab-icon.tsx +++ b/apps/desktop/src/components/settings/components/tab-icon.tsx @@ -3,7 +3,7 @@ import { BellIcon, BlocksIcon, CalendarIcon, - FlaskConicalIcon, + CreditCardIcon, LayoutTemplateIcon, MessageSquareIcon, SettingsIcon, @@ -20,8 +20,6 @@ export function TabIcon({ tab }: { tab: Tab }) { return ; case "sound": return ; - case "lab": - return ; case "feedback": return ; case "ai": @@ -32,6 +30,8 @@ export function TabIcon({ tab }: { tab: Tab }) { return ; case "integrations": return ; + case "billing": + return ; default: return null; } diff --git a/apps/desktop/src/components/settings/components/types.ts b/apps/desktop/src/components/settings/components/types.ts index 8362bd0a94..c9349191f6 100644 --- a/apps/desktop/src/components/settings/components/types.ts +++ b/apps/desktop/src/components/settings/components/types.ts @@ -1,5 +1,15 @@ import type { LucideIcon } from "lucide-react"; -import { Bell, Calendar, LayoutTemplate, MessageSquare, Settings, Sparkles, Volume2 } from "lucide-react"; +import { + Bell, + BlocksIcon, + Calendar, + CreditCard, + LayoutTemplate, + MessageSquare, + Settings, + Sparkles, + Volume2, +} from "lucide-react"; export type Tab = | "general" @@ -8,9 +18,9 @@ export type Tab = | "notifications" | "sound" | "templates" - | "lab" | "feedback" - | "integrations"; + | "integrations" + | "billing"; export const TABS: { name: Tab; icon: LucideIcon }[] = [ { name: "general", icon: Settings }, @@ -19,7 +29,7 @@ export const TABS: { name: Tab; icon: LucideIcon }[] = [ { name: "notifications", icon: Bell }, { name: "sound", icon: Volume2 }, { name: "templates", icon: LayoutTemplate }, - // { name: "lab", icon: FlaskConical }, { name: "integrations", icon: MessageSquare }, - { name: "feedback", icon: MessageSquare }, + { name: "billing", icon: CreditCard }, + { name: "feedback", icon: BlocksIcon }, ]; diff --git a/apps/desktop/src/components/settings/views/billing.tsx b/apps/desktop/src/components/settings/views/billing.tsx index 5049c75daa..f8050317e2 100644 --- a/apps/desktop/src/components/settings/views/billing.tsx +++ b/apps/desktop/src/components/settings/views/billing.tsx @@ -1,208 +1,313 @@ -import { Trans, useLingui } from "@lingui/react/macro"; -import { CheckIcon, ExternalLinkIcon } from "lucide-react"; -import { useState } from "react"; +import { openUrl } from "@tauri-apps/plugin-opener"; +import { ArrowRight, CreditCard, ExternalLink, Shield } from "lucide-react"; +import { useEffect, useState } from "react"; +import { z } from "zod"; + +import { useBilling } from "@/hooks/use-billing"; +import { useLicense } from "@/hooks/use-license"; import { Button } from "@hypr/ui/components/ui/button"; -import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@hypr/ui/components/ui/card"; -import { Tabs, TabsList, TabsTrigger } from "@hypr/ui/components/ui/tabs"; +import { Card } from "@hypr/ui/components/ui/card"; +import { Input } from "@hypr/ui/components/ui/input"; +import { Label } from "@hypr/ui/components/ui/label"; +import { RadioGroup, RadioGroupItem } from "@hypr/ui/components/ui/radio-group"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@hypr/ui/components/ui/tabs"; + +export default function Billing() { + const { getLicense } = useLicense(); + const isPro = getLicense.data?.valid === true; -interface BillingProps { - currentPlan?: string; - trialDaysLeft?: number; + return ( +
+ + {isPro ? : } + +
+ ); } -export default function Billing({ currentPlan, trialDaysLeft }: BillingProps) { - const [billingCycle, setBillingCycle] = useState<"monthly" | "annual">("monthly"); - const { t } = useLingui(); - - const pricingPlans = [ - { - name: t`Free`, - description: t`For those who are serious about their privacy`, - monthlyPrice: 0, - annualPrice: 0, - features: [ - t`Works both in-person and remotely`, - t`Format notes using templates`, - t`Ask questions about past meetings`, - t`Live summary of the meeting`, - t`Works offline`, - ], - }, - { - name: t`Pro`, - description: t`For those who are serious about their performance`, - monthlyPrice: 19, - annualPrice: 15, - features: [ - t`Integration with other apps like Notion and Google Calendar`, - t`Long-term memory for past meetings and attendees`, - t`Much better AI performance`, - t`Meeting note sharing via links`, - t`Synchronization across multiple devices`, - ], - }, - { - name: t`Team`, - description: t`For fast growing teams like energetic startups`, - monthlyPrice: 25, - annualPrice: 20, - features: [ - t`Search & ask across all notes in workspace`, - t`Collaborate with others in meetings`, - t`Single sign-on for all users`, - ], - isPerSeat: true, - comingSoon: true, - }, - ]; - - const getButtonText = (planName: string) => { - const plan = planName.toLowerCase(); - if (plan === "team") { - return t`Coming Soon`; - } - if (currentPlan === plan) { - return t`Current Plan`; - } - if (currentPlan === "basic" && plan === "pro") { - return t`Upgrade`; +function FreeSection() { + const { getLicense } = useLicense(); + const isPro = getLicense.data?.valid === true; + + return ( + + + + + Get Pro Access + + + Have a License? + + + + + + + + + + + + + ); +} + +function FreeSectionCheckout() { + const { checkout } = useBilling(); + + const [email, setEmail] = useState(""); + const [interval, setInterval] = useState<"monthly" | "yearly">("yearly"); + + useEffect(() => { + if (checkout.status === "success") { + openUrl(checkout.data.url); } - if (trialDaysLeft && plan === "pro") { - return t`Free Trial`; + }, [checkout.status]); + + return ( +
+
+
+ + setEmail(e.target.value)} + className="h-12 text-base transition-all duration-200 focus:border-primary/30 focus:ring-2 focus:ring-primary/10" + /> +
+
+ + setInterval(value as "monthly" | "yearly")} + className="grid grid-cols-2 gap-4" + > +
+ ); +} + +function FreeSectionActivate() { + const { activateLicense } = useLicense(); + + const [licenseKey, setLicenseKey] = useState(""); + + return ( +
+
+ + setLicenseKey(e.target.value)} + className="h-11 font-mono text-sm transition-all duration-200 focus:border-primary/30 focus:ring-2 focus:ring-primary/10" + /> +
+ +
+ ); +} + +function ProSection() { + const l = useLicense(); + + const { stripeCustomerId, stripeSubscriptionId } = l.getLicense.data?.metadata || {}; + const b = useBilling({ stripe_customer_id: stripeCustomerId, stripe_subscription_id: stripeSubscriptionId }); + + const getSubtitle = () => { + if (!b.info.data) { + return "No subscription information found."; } - return billingCycle === "monthly" - ? t`Start Monthly Plan` - : t`Start Annual Plan`; - }; - const getButtonProps = (planName: string) => { - const plan = planName.toLowerCase(); - if (plan === "team") { - return { - disabled: true, - variant: "outline" as const, - }; + const { price, current_period_end, cancel_at_period_end, status } = b.info.data; + + if (status !== "active") { + return "Subscription inactive"; } - if (currentPlan === plan) { - return { - variant: "outline" as const, - }; + + if (cancel_at_period_end) { + const endDate = new Date(current_period_end * 1000).toLocaleDateString(); + return `Subscription ends on ${endDate}`; } - return { - variant: "default" as const, - }; + + const interval = price?.recurring?.interval; + const amount = price?.unit_amount ? (price.unit_amount / 100).toFixed(2) : "0.00"; + const nextChargeDate = new Date(current_period_end * 1000).toLocaleDateString(); + + const intervalText = interval === "year" ? "yearly" : interval === "month" ? "monthly" : interval; + + return `$${amount} ${intervalText} • Next charge: ${nextChargeDate}`; }; - return ( -
-
-
- Coming Soon -
-

- - Billing features are currently under development and will be available in a future update. - -

-
+ const headerAction = ( + + ); + return ( +
-
-

- There's a plan for everyone -

- - setBillingCycle(value as "monthly" | "annual")} +
+ + +
+
+ +

+ This will allow you to use your license on another device +

+
+ + ); +} -
-
- {pricingPlans.map((plan) => ( - - -
- {plan.name} - {plan.name === "Pro" && ( - - Best - - )} -
- {plan.description} -
- -
- $ - {billingCycle === "monthly" - ? plan.monthlyPrice - : plan.annualPrice} - - {plan.isPerSeat ? "/seat" : ""} /month - -
-
- {plan.features.map((feature) => ( -
-
- -
- {feature} -
- ))} -
-
- - - {trialDaysLeft && plan.name.toLowerCase() === "pro" && ( -

- {trialDaysLeft} days left in trial -

- )} -
-
- ))} +function SectionContainer({ title, subtitle, headerAction, children }: { + title: string; + subtitle?: string; + headerAction?: React.ReactNode; + children: React.ReactNode; +}) { + return ( + <> +
+
+
+
- - {billingCycle === "annual" && ( -

- Save up to 20% with annual billing -

- )} - -
- - Learn more about our pricing plans - - +
+

+ {title} +

+ {subtitle && ( +

+ {subtitle} +

+ )}
+ {headerAction}
-
+ {children} + ); } diff --git a/apps/desktop/src/components/settings/views/templates.tsx b/apps/desktop/src/components/settings/views/templates.tsx index 5dbee38d55..6cfa24730c 100644 --- a/apps/desktop/src/components/settings/views/templates.tsx +++ b/apps/desktop/src/components/settings/views/templates.tsx @@ -1,26 +1,30 @@ +import { Trans } from "@lingui/react/macro"; +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { message } from "@tauri-apps/plugin-dialog"; +import { ArrowLeftIcon, CheckIcon, Loader2Icon, PlusIcon } from "lucide-react"; +import { useEffect, useState } from "react"; + import { useHypr } from "@/contexts"; +import { useLicense } from "@/hooks/use-license"; import { TemplateService } from "@/utils/template-service"; import { commands as analyticsCommands } from "@hypr/plugin-analytics"; import { type Template } from "@hypr/plugin-db"; import { commands as dbCommands } from "@hypr/plugin-db"; import { Button } from "@hypr/ui/components/ui/button"; import { cn } from "@hypr/ui/lib/utils"; -import { Trans } from "@lingui/react/macro"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { ArrowLeftIcon, CheckIcon, Loader2Icon, PlusIcon } from "lucide-react"; -import { useEffect, useState } from "react"; import TemplateEditor from "./template"; type ViewState = "list" | "editor" | "new"; export default function TemplatesView() { - console.log("templatesview mounted@!"); + const { userId } = useHypr(); + const { getLicense } = useLicense(); + const [viewState, setViewState] = useState("list"); const [selectedTemplate, setSelectedTemplate] = useState