Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

feat: integrate openclaw

Vanalite25ca51eff3f5
diff --git a/extensions/yarn.lock b/extensions/yarn.lock
index 1c0f29872..c0452b939 100644
--- a/extensions/yarn.lock
+++ b/extensions/yarn.lock
@@ -342,73 +342,85 @@ __metadata:
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fdownload-extension%40workspace%3Adownload-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Fdownload-extension%40workspace%3Adownload-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fdownload-extension%40workspace%3Adownload-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fllamacpp-extension%40workspace%3Allamacpp-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Fllamacpp-extension%40workspace%3Allamacpp-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fllamacpp-extension%40workspace%3Allamacpp-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
+ languageName: node
+ linkType: hard
+
+"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension":
+ version: 0.1.10
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension"
+ dependencies:
+ rxjs: "npm:^7.8.1"
+ ulidx: "npm:^2.3.0"
+ peerDependencies:
+ react: 19.0.0
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Frag-extension%40workspace%3Arag-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Frag-extension%40workspace%3Arag-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Frag-extension%40workspace%3Arag-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fvector-db-extension%40workspace%3Avector-db-extension":
version: 0.1.10
- resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=16006d&locator=%40janhq%2Fvector-db-extension%40workspace%3Avector-db-extension"
+ resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=c49664&locator=%40janhq%2Fvector-db-extension%40workspace%3Avector-db-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
peerDependencies:
react: 19.0.0
- checksum: 10c0/58a966e7f4aabfe7ee6c34958ca4b90c0de1d1210be9397e8f3fa77dbb4d744c4bc9814647652abd747cdbce630a0035be5e1eb748e38c354199110a5f3dc42f
+ checksum: 10c0/23394165c70d57aa556c9a09301d86a26bdf7f6268dfe07564e60e97e495f829745413ae30c542c53ad68ad1f4816b27b51e236685a0c68a8f0e3f9f36f959b5
languageName: node
linkType: hard
@@ -450,6 +462,23 @@ __metadata:
languageName: unknown
linkType: soft
+"@janhq/mlx-extension@workspace:mlx-extension":
+ version: 0.0.0-use.local
+ resolution: "@janhq/mlx-extension@workspace:mlx-extension"
+ dependencies:
+ "@janhq/core": ../../core/package.tgz
+ "@janhq/tauri-plugin-llamacpp-api": "link:../../src-tauri/plugins/tauri-plugin-llamacpp"
+ "@janhq/tauri-plugin-mlx-api": "link:../../src-tauri/plugins/tauri-plugin-mlx"
+ "@tauri-apps/api": "npm:2.8.0"
+ "@tauri-apps/plugin-http": "npm:2.5.0"
+ "@tauri-apps/plugin-log": "npm:^2.6.0"
+ cpx: "npm:1.5.0"
+ rimraf: "npm:3.0.2"
+ rolldown: "npm:1.0.0-beta.1"
+ typescript: "npm:5.9.2"
+ languageName: unknown
+ linkType: soft
+
"@janhq/rag-extension@workspace:rag-extension":
version: 0.0.0-use.local
resolution: "@janhq/rag-extension@workspace:rag-extension"
@@ -476,6 +505,18 @@ __metadata:
languageName: node
linkType: soft
+"@janhq/tauri-plugin-llamacpp-api@link:../../src-tauri/plugins/tauri-plugin-llamacpp::locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension":
+ version: 0.0.0-use.local
+ resolution: "@janhq/tauri-plugin-llamacpp-api@link:../../src-tauri/plugins/tauri-plugin-llamacpp::locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension"
+ languageName: node
+ linkType: soft
+
+"@janhq/tauri-plugin-mlx-api@link:../../src-tauri/plugins/tauri-plugin-mlx::locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension":
+ version: 0.0.0-use.local
+ resolution: "@janhq/tauri-plugin-mlx-api@link:../../src-tauri/plugins/tauri-plugin-mlx::locator=%40janhq%2Fmlx-extension%40workspace%3Amlx-extension"
+ languageName: node
+ linkType: soft
+
"@janhq/tauri-plugin-rag-api@link:../../src-tauri/plugins/tauri-plugin-rag::locator=%40janhq%2Frag-extension%40workspace%3Arag-extension":
version: 0.0.0-use.local
resolution: "@janhq/tauri-plugin-rag-api@link:../../src-tauri/plugins/tauri-plugin-rag::locator=%40janhq%2Frag-extension%40workspace%3Arag-extension"
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 09880ed0e..0e71ed200 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -6,11 +6,15 @@ version = 3
name = "Jan"
version = "0.6.599"
dependencies = [
+ "base64 0.22.1",
"chrono",
+ "clap",
"dirs",
+ "ed25519-dalek",
"env",
"fix-path-env",
"flate2",
+ "futures",
"futures-util",
"glob",
"hex",
@@ -53,6 +57,7 @@ dependencies = [
"tempfile",
"thiserror 2.0.17",
"tokio",
+ "tokio-tungstenite",
"tokio-util",
"url",
"uuid",
@@ -160,6 +165,56 @@ dependencies = [
"libc",
]
+[[package]]
+name = "anstream"
+version = "0.6.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+dependencies = [
+ "anstyle",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "anyhow"
version = "1.0.100"
@@ -771,6 +826,46 @@ dependencies = [
"inout",
]
+[[package]]
+name = "clap"
+version = "4.5.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.55"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.106",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
+
[[package]]
name = "codepage"
version = "0.1.2"
@@ -780,6 +875,12 @@ dependencies = [
"encoding_rs",
]
+[[package]]
+name = "colorchoice"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+
[[package]]
name = "combine"
version = "4.6.7"
@@ -1058,6 +1159,33 @@ dependencies = [
"syn 2.0.106",
]
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest",
+ "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.106",
+]
+
[[package]]
name = "darling"
version = "0.20.11"
@@ -1141,6 +1269,12 @@ dependencies = [
"parking_lot_core",
]
+[[package]]
+name = "data-encoding"
+version = "2.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
+
[[package]]
name = "data-url"
version = "0.3.2"
@@ -1352,6 +1486,31 @@ version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand_core 0.6.4",
+ "serde",
+ "sha2",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "either"
version = "1.15.0"
@@ -1540,6 +1699,12 @@ dependencies = [
"log",
]
+[[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"
@@ -2749,6 +2914,12 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
[[package]]
name = "itoa"
version = "1.0.15"
@@ -3672,6 +3843,12 @@ version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
[[package]]
name = "open"
version = "5.3.2"
@@ -6802,6 +6979,20 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "tokio-tungstenite"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
+dependencies = [
+ "futures-util",
+ "log",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+ "tungstenite",
+]
+
[[package]]
name = "tokio-util"
version = "0.7.16"
@@ -7016,6 +7207,25 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+[[package]]
+name = "tungstenite"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
+dependencies = [
+ "byteorder",
+ "bytes",
+ "data-encoding",
+ "http 1.3.1",
+ "httparse",
+ "log",
+ "native-tls",
+ "rand 0.8.5",
+ "sha1",
+ "thiserror 1.0.69",
+ "utf-8",
+]
+
[[package]]
name = "type1-encoding-parser"
version = "0.1.0"
@@ -7188,6 +7398,12 @@ 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.18.1"
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 390b25351..abbca3dd7 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -105,8 +105,13 @@ rfd = { version = "0.15.4", default-features = false, features = [
"common-controls-v6",
] }
chrono = { version = "0.4", features = ["serde"] }
+ed25519-dalek = { version = "2.1", features = ["rand_core"] }
+futures = "0.3"
hostname = "0.4"
+base64 = "0.22"
+tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
glob = "0.3"
+clap = { version = "4.5", features = ["derive"] }
[dependencies.tauri]
version = "2.8.5"
diff --git a/src-tauri/src/core/mod.rs b/src-tauri/src/core/mod.rs
index 0ab6e0edc..5dea4eaa3 100644
--- a/src-tauri/src/core/mod.rs
+++ b/src-tauri/src/core/mod.rs
@@ -3,6 +3,8 @@ pub mod downloads;
pub mod extensions;
pub mod filesystem;
pub mod mcp;
+pub mod openclaw;
+pub mod picoclaw;
pub mod server;
pub mod setup;
pub mod state;
diff --git a/src-tauri/src/core/openclaw/cli.rs b/src-tauri/src/core/openclaw/cli.rs
new file mode 100644
index 000000000..99bbef891
--- /dev/null
+++ b/src-tauri/src/core/openclaw/cli.rs
@@ -0,0 +1,171 @@
+//! CLI-specific functions for OpenClaw management
+//!
+//! These functions are designed to be called from the CLI without
+//! requiring Tauri's State management.
+
+use std::process::Stdio;
+use tokio::process::Command;
+
+use super::models::OpenClawStatus;
+use super::{get_openclaw_config_dir, get_openclaw_config_path, OPENCLAW_PORT};
+
+/// Check if OpenClaw is installed (standalone version for CLI)
+async fn check_openclaw_installed() -> Result<Option<String>, String> {
+ let output = Command::new("npx")
+ .args(["openclaw", "--version"])
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ Ok(Some(version))
+ } else {
+ Ok(None)
+ }
+ }
+ Err(_) => Ok(None),
+ }
+}
+
+/// Check if Node.js is available
+async fn check_node_version() -> Option<String> {
+ let output = Command::new("node")
+ .arg("--version")
+ .output()
+ .await
+ .ok()?;
+
+ if output.status.success() {
+ Some(String::from_utf8_lossy(&output.stdout).trim().to_string())
+ } else {
+ None
+ }
+}
+
+/// Check if a port is available
+async fn check_port_available(port: u16) -> bool {
+ let addr = format!("127.0.0.1:{}", port);
+ tokio::net::TcpListener::bind(&addr).await.is_ok()
+}
+
+/// Check if OpenClaw gateway is running by checking if port is in use
+async fn check_gateway_running() -> bool {
+ !check_port_available(OPENCLAW_PORT).await
+}
+
+/// Get OpenClaw status (standalone version for CLI)
+pub async fn get_status() -> Result<OpenClawStatus, String> {
+ let openclaw_version = check_openclaw_installed().await?;
+ let node_version = check_node_version().await;
+ let port_available = check_port_available(OPENCLAW_PORT).await;
+ let running = check_gateway_running().await;
+
+ Ok(OpenClawStatus {
+ installed: openclaw_version.is_some(),
+ running,
+ node_version,
+ openclaw_version,
+ port_available,
+ error: None,
+ })
+}
+
+/// Start the OpenClaw gateway (standalone version for CLI)
+pub async fn start_gateway() -> Result<(), String> {
+ // Check if already running
+ if check_gateway_running().await {
+ return Err("OpenClaw gateway is already running".to_string());
+ }
+
+ // Check if config exists
+ let config_path = get_openclaw_config_path()?;
+ if !config_path.exists() {
+ return Err("OpenClaw is not configured. Run 'jan openclaw configure' first.".to_string());
+ }
+
+ let config_dir = get_openclaw_config_dir()?;
+
+ // Start OpenClaw gateway as a detached process
+ let mut child = Command::new("npx")
+ .args(["openclaw", "gateway", "start"])
+ .current_dir(&config_dir)
+ .stdout(Stdio::null())
+ .stderr(Stdio::null())
+ .spawn()
+ .map_err(|e| format!("Failed to start OpenClaw: {}", e))?;
+
+ // Wait a moment for startup
+ tokio::time::sleep(tokio::time::Duration::from_millis(1000)).await;
+
+ // Check if it started successfully
+ match child.try_wait() {
+ Ok(Some(status)) => {
+ if !status.success() {
+ return Err("OpenClaw gateway failed to start".to_string());
+ }
+ }
+ Ok(None) => {
+ // Process is still running, which is expected
+ }
+ Err(e) => {
+ return Err(format!("Failed to check gateway status: {}", e));
+ }
+ }
+
+ Ok(())
+}
+
+/// Stop the OpenClaw gateway (standalone version for CLI)
+pub async fn stop_gateway() -> Result<(), String> {
+ // Try to stop using npx openclaw
+ let output = Command::new("npx")
+ .args(["openclaw", "gateway", "stop"])
+ .output()
+ .await;
+
+ if let Ok(output) = output {
+ if output.status.success() {
+ return Ok(());
+ }
+ }
+
+ // Fallback: try to kill the process by name
+ #[cfg(unix)]
+ {
+ let _ = Command::new("pkill")
+ .args(["-f", "openclaw"])
+ .output()
+ .await;
+ }
+
+ #[cfg(target_os = "windows")]
+ {
+ let _ = Command::new("taskkill")
+ .args(["/F", "/IM", "node.exe", "/FI", "WINDOWTITLE eq openclaw*"])
+ .output()
+ .await;
+ }
+
+ // Verify it's stopped
+ tokio::time::sleep(tokio::time::Duration::from_millis(500)).await;
+
+ if check_gateway_running().await {
+ return Err("Failed to stop OpenClaw gateway".to_string());
+ }
+
+ Ok(())
+}
+
+/// Restart the OpenClaw gateway (standalone version for CLI)
+pub async fn restart_gateway() -> Result<(), String> {
+ // Stop first (ignore errors if not running)
+ let _ = stop_gateway().await;
+
+ // Wait a moment
+ tokio::time::sleep(tokio::time::Duration::from_millis(500)).await;
+
+ // Start
+ start_gateway().await
+}
diff --git a/src-tauri/src/core/openclaw/commands.rs b/src-tauri/src/core/openclaw/commands.rs
new file mode 100644
index 000000000..ae499a7fb
--- /dev/null
+++ b/src-tauri/src/core/openclaw/commands.rs
@@ -0,0 +1,2682 @@
+use std::process::Stdio;
+use std::sync::atomic::{AtomicU64, Ordering};
+
+use base64::Engine;
+use ed25519_dalek::{SigningKey, Signer};
+use futures::{SinkExt, StreamExt};
+use rand::rngs::OsRng;
+use serde::{Deserialize, Serialize};
+use tokio::process::Command;
+use tokio::net::TcpStream;
+use tokio_tungstenite::{connect_async, tungstenite::Message, MaybeTlsStream, WebSocketStream};
+use tauri::State;
+
+use crate::core::openclaw::{
+ constants::*,
+ models::*,
+ get_openclaw_config_path, get_openclaw_config_dir, OpenClawState, OPENCLAW_PORT, MIN_NODE_VERSION,
+};
+
+/// Request ID counter for WebSocket messages
+static REQUEST_ID_COUNTER: AtomicU64 = AtomicU64::new(1);
+
+/// Get next request ID
+fn next_request_id() -> String {
+ REQUEST_ID_COUNTER.fetch_add(1, Ordering::SeqCst).to_string()
+}
+
+/// Device keypair for Gateway authentication
+struct DeviceKeypair {
+ signing_key: SigningKey,
+ device_id: String,
+}
+
+impl DeviceKeypair {
+ /// Load or generate device keypair
+ fn load_or_generate() -> Result<Self, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ let keypair_path = config_dir.join("jan_device_key.json");
+
+ if keypair_path.exists() {
+ // Load existing keypair
+ let keypair_json = std::fs::read_to_string(&keypair_path)
+ .map_err(|e| format!("Failed to read keypair: {}", e))?;
+ let keypair_data: serde_json::Value = serde_json::from_str(&keypair_json)
+ .map_err(|e| format!("Failed to parse keypair: {}", e))?;
+
+ let secret_b64 = keypair_data.get("secret")
+ .and_then(|v| v.as_str())
+ .ok_or("Missing secret key")?;
+
+ let secret_bytes = base64::engine::general_purpose::STANDARD
+ .decode(secret_b64)
+ .map_err(|e| format!("Failed to decode secret: {}", e))?;
+
+ let secret_array: [u8; 32] = secret_bytes
+ .try_into()
+ .map_err(|_| "Invalid secret key length")?;
+
+ let signing_key = SigningKey::from_bytes(&secret_array);
+ let device_id = keypair_data.get("deviceId")
+ .and_then(|v| v.as_str())
+ .unwrap_or("jan-device")
+ .to_string();
+
+ Ok(Self { signing_key, device_id })
+ } else {
+ // Generate new keypair
+ let signing_key = SigningKey::generate(&mut OsRng);
+ let verifying_key = signing_key.verifying_key();
+
+ // Create device ID from public key fingerprint
+ let pubkey_bytes = verifying_key.as_bytes();
+ let device_id = format!("jan-{}", hex::encode(&pubkey_bytes[..8]));
+
+ // Save keypair
+ let secret_b64 = base64::engine::general_purpose::STANDARD
+ .encode(signing_key.as_bytes());
+ let public_b64 = base64::engine::general_purpose::STANDARD
+ .encode(pubkey_bytes);
+
+ let keypair_data = serde_json::json!({
+ "deviceId": device_id,
+ "secret": secret_b64,
+ "public": public_b64,
+ "createdAt": chrono::Utc::now().to_rfc3339()
+ });
+
+ std::fs::write(&keypair_path, serde_json::to_string_pretty(&keypair_data).unwrap())
+ .map_err(|e| format!("Failed to save keypair: {}", e))?;
+
+ log::info!("Generated new device keypair: {}", device_id);
+
+ Ok(Self { signing_key, device_id })
+ }
+ }
+
+ /// Sign a nonce for Gateway authentication
+ fn sign_nonce(&self, nonce: &str) -> (String, String, i64) {
+ let signed_at = chrono::Utc::now().timestamp_millis();
+ let message = format!("{}:{}", nonce, signed_at);
+ let signature = self.signing_key.sign(message.as_bytes());
+
+ let public_key_b64 = base64::engine::general_purpose::STANDARD
+ .encode(self.signing_key.verifying_key().as_bytes());
+ let signature_b64 = base64::engine::general_purpose::STANDARD
+ .encode(signature.to_bytes());
+
+ (public_key_b64, signature_b64, signed_at)
+ }
+}
+
+/// OpenClaw Gateway WebSocket request
+#[derive(Debug, Serialize)]
+struct GatewayRequest {
+ #[serde(rename = "type")]
+ msg_type: String,
+ id: String,
+ method: String,
+ params: serde_json::Value,
+}
+
+/// OpenClaw Gateway WebSocket response
+#[derive(Debug, Deserialize)]
+struct GatewayResponse {
+ #[serde(rename = "type")]
+ msg_type: String,
+ id: String,
+ ok: bool,
+ #[serde(default)]
+ payload: serde_json::Value,
+ #[serde(default)]
+ error: Option<serde_json::Value>,
+}
+
+/// Connect to OpenClaw Gateway WebSocket and perform handshake
+async fn connect_to_gateway() -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>, String> {
+ let url = format!("ws://127.0.0.1:{}", OPENCLAW_PORT);
+ log::info!("Connecting to OpenClaw Gateway at {}", url);
+
+ let (ws_stream, _) = connect_async(&url)
+ .await
+ .map_err(|e| format!("Failed to connect to OpenClaw Gateway: {}", e))?;
+
+ Ok(ws_stream)
+}
+
+/// Perform the Gateway handshake (connect request) with proper protocol v3
+async fn gateway_handshake(ws_stream: &mut WebSocketStream<MaybeTlsStream<TcpStream>>) -> Result<(), String> {
+ // Load or generate device keypair
+ let device = DeviceKeypair::load_or_generate()?;
+
+ // Wait for connect.challenge event
+ let timeout = tokio::time::Duration::from_secs(5);
+ let challenge_result = tokio::time::timeout(timeout, async {
+ while let Some(msg) = ws_stream.next().await {
+ match msg {
+ Ok(Message::Text(text)) => {
+ log::debug!("Received during handshake: {}", text);
+ if let Ok(event) = serde_json::from_str::<serde_json::Value>(&text) {
+ if event.get("type").and_then(|t| t.as_str()) == Some("event")
+ && event.get("event").and_then(|e| e.as_str()) == Some("connect.challenge") {
+ // Extract nonce from challenge
+ let nonce = event.get("payload")
+ .and_then(|p| p.get("nonce"))
+ .and_then(|n| n.as_str())
+ .map(String::from);
+ return Ok(nonce);
+ }
+ }
+ }
+ Ok(Message::Close(_)) => return Err("Connection closed during handshake".to_string()),
+ Err(e) => return Err(format!("WebSocket error during handshake: {}", e)),
+ _ => {}
+ }
+ }
+ Err("No challenge received".to_string())
+ }).await;
+
+ let nonce = match challenge_result {
+ Ok(Ok(Some(nonce))) => nonce,
+ Ok(Ok(None)) => return Err("No nonce in challenge".to_string()),
+ Ok(Err(e)) => return Err(e),
+ Err(_) => return Err("Handshake timeout".to_string()),
+ };
+
+ // Sign the nonce with device keypair
+ let (public_key, signature, signed_at) = device.sign_nonce(&nonce);
+
+ // Send connect request following protocol v3
+ let connect_id = next_request_id();
+ let connect_request = serde_json::json!({
+ "type": "req",
+ "id": connect_id,
+ "method": "connect",
+ "params": {
+ "minProtocol": 3,
+ "maxProtocol": 3,
+ "client": {
+ "id": "jan-desktop",
+ "version": env!("CARGO_PKG_VERSION"),
+ "platform": std::env::consts::OS,
+ "mode": "operator"
+ },
+ "role": "operator",
+ "scopes": ["operator.read", "operator.write", "operator.channels"],
+ "caps": [],
+ "commands": [],
+ "permissions": {},
+ "auth": {},
+ "locale": "en-US",
+ "userAgent": format!("jan-desktop/{}", env!("CARGO_PKG_VERSION")),
+ "device": {
+ "id": device.device_id,
+ "publicKey": public_key,
+ "signature": signature,
+ "signedAt": signed_at,
+ "nonce": nonce
+ }
+ }
+ });
+
+ let request_json = serde_json::to_string(&connect_request)
+ .map_err(|e| format!("Failed to serialize connect request: {}", e))?;
+
+ log::info!("Sending connect handshake with device auth");
+ log::debug!("Connect request: {}", request_json);
+
+ ws_stream.send(Message::Text(request_json))
+ .await
+ .map_err(|e| format!("Failed to send connect request: {}", e))?;
+
+ // Wait for connect response
+ let response_result = tokio::time::timeout(timeout, async {
+ while let Some(msg) = ws_stream.next().await {
+ match msg {
+ Ok(Message::Text(text)) => {
+ log::debug!("Received connect response: {}", text);
+ if let Ok(response) = serde_json::from_str::<GatewayResponse>(&text) {
+ if response.msg_type == "res" && response.id == connect_id {
+ if response.ok {
+ log::info!("Gateway connect successful");
+ return Ok(());
+ } else {
+ let error_msg = response.error
+ .map(|e| {
+ e.get("message")
+ .and_then(|m| m.as_str())
+ .map(String::from)
+ .unwrap_or_else(|| e.to_string())
+ })
+ .unwrap_or_else(|| "Unknown connect error".to_string());
+ return Err(error_msg);
+ }
+ }
+ }
+ }
+ Ok(Message::Close(_)) => return Err("Connection closed".to_string()),
+ Err(e) => return Err(format!("WebSocket error: {}", e)),
+ _ => {}
+ }
+ }
+ Err("No connect response received".to_string())
+ }).await;
+
+ match response_result {
+ Ok(Ok(())) => {
+ log::info!("Gateway handshake completed successfully");
+ Ok(())
+ }
+ Ok(Err(e)) => Err(e),
+ Err(_) => Err("Connect response timeout".to_string()),
+ }
+}
+
+/// Send a request to the Gateway and wait for response
+async fn gateway_request(
+ method: &str,
+ params: serde_json::Value,
+) -> Result<serde_json::Value, String> {
+ let mut ws_stream = connect_to_gateway().await?;
+
+ // Perform handshake first
+ gateway_handshake(&mut ws_stream).await?;
+
+ let request_id = next_request_id();
+ let request = GatewayRequest {
+ msg_type: "req".to_string(),
+ id: request_id.clone(),
+ method: method.to_string(),
+ params,
+ };
+
+ let request_json = serde_json::to_string(&request)
+ .map_err(|e| format!("Failed to serialize request: {}", e))?;
+
+ log::info!("Sending Gateway request: {}", request_json);
+
+ ws_stream.send(Message::Text(request_json))
+ .await
+ .map_err(|e| format!("Failed to send request: {}", e))?;
+
+ // Wait for response with matching ID
+ let timeout = tokio::time::Duration::from_secs(30);
+ let result = tokio::time::timeout(timeout, async {
+ while let Some(msg) = ws_stream.next().await {
+ match msg {
+ Ok(Message::Text(text)) => {
+ log::debug!("Received Gateway message: {}", text);
+ if let Ok(response) = serde_json::from_str::<GatewayResponse>(&text) {
+ if response.msg_type == "res" && response.id == request_id {
+ if response.ok {
+ return Ok(response.payload);
+ } else {
+ let error_msg = response.error
+ .map(|e| {
+ e.get("message")
+ .and_then(|m| m.as_str())
+ .map(String::from)
+ .unwrap_or_else(|| e.to_string())
+ })
+ .unwrap_or_else(|| "Unknown error".to_string());
+ return Err(error_msg);
+ }
+ }
+ }
+ }
+ Ok(Message::Close(_)) => {
+ return Err("Connection closed".to_string());
+ }
+ Err(e) => {
+ return Err(format!("WebSocket error: {}", e));
+ }
+ _ => {}
+ }
+ }
+ Err("Connection closed unexpectedly".to_string())
+ }).await;
+
+ // Close the connection
+ let _ = ws_stream.close(None).await;
+
+ match result {
+ Ok(inner) => inner,
+ Err(_) => Err("Request timed out".to_string()),
+ }
+}
+
+/// Check if Node.js is installed and meets version requirements
+#[tauri::command]
+pub async fn openclaw_check_dependencies() -> NodeCheckResult {
+ log::info!("Checking Node.js dependencies for OpenClaw");
+
+ // Check if Node.js is installed
+ let output = Command::new("node")
+ .arg("--version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version_output = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ let version_str = version_output.trim_start_matches('v');
+
+ // Parse major version
+ let major_version: Option<u32> = version_str
+ .split('.')
+ .next()
+ .and_then(|v| v.parse().ok());
+
+ let meets_requirements = major_version
+ .map(|v| v >= MIN_NODE_VERSION)
+ .unwrap_or(false);
+
+ let version_clone = version_output.clone();
+ NodeCheckResult {
+ installed: true,
+ version: Some(version_clone),
+ major_version,
+ meets_requirements,
+ error: if !meets_requirements {
+ Some(format!("Node.js version {} is required, found {}", MIN_NODE_VERSION, version_str))
+ } else {
+ None
+ },
+ }
+ } else {
+ NodeCheckResult {
+ installed: false,
+ version: None,
+ major_version: None,
+ meets_requirements: false,
+ error: Some("Node.js is not installed".to_string()),
+ }
+ }
+ }
+ Err(e) => {
+ NodeCheckResult {
+ installed: false,
+ version: None,
+ major_version: None,
+ meets_requirements: false,
+ error: Some(format!("Failed to check Node.js: {}", e)),
+ }
+ }
+ }
+}
+
+/// Check if a port is available
+#[tauri::command]
+pub async fn openclaw_check_port(port: u16) -> PortCheckResult {
+ log::info!("Checking if port {} is available", port);
+
+ let addr = if cfg!(target_os = "windows") {
+ format!("127.0.0.1:{}", port)
+ } else {
+ format!("localhost:{}", port)
+ };
+
+ match tokio::net::TcpListener::bind(&addr).await {
+ Ok(_) => PortCheckResult {
+ available: true,
+ port,
+ error: None,
+ },
+ Err(e) => PortCheckResult {
+ available: false,
+ port,
+ error: Some(format!("Port {} is in use: {}", port, e)),
+ },
+ }
+}
+
+/// Check if OpenClaw is installed and get its version
+async fn check_openclaw_installed() -> Result<Option<String>, String> {
+ let output = Command::new("openclaw")
+ .arg("--version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ Ok(Some(version))
+ } else {
+ Ok(None)
+ }
+ }
+ Err(_) => Ok(None),
+ }
+}
+
+/// Install OpenClaw globally via npm
+#[tauri::command]
+pub async fn openclaw_install() -> Result<InstallResult, String> {
+ log::info!("Installing OpenClaw via npm");
+
+ // First check if OpenClaw is already installed
+ if let Ok(Some(version)) = check_openclaw_installed().await {
+ log::info!("OpenClaw is already installed: {}", version);
+ return Ok(InstallResult {
+ success: true,
+ version: Some(version),
+ error: None,
+ });
+ }
+
+ // Check Node.js
+ let node_check = openclaw_check_dependencies().await;
+ if !node_check.installed {
+ return Ok(InstallResult {
+ success: false,
+ version: None,
+ error: node_check.error.or_else(|| Some("Node.js is required but not installed".to_string())),
+ });
+ }
+
+ if !node_check.meets_requirements {
+ return Ok(InstallResult {
+ success: false,
+ version: None,
+ error: node_check.error.or_else(|| Some(format!("Node.js {} or higher is required", MIN_NODE_VERSION))),
+ });
+ }
+
+ // Run npm install -g @openclaw/openclaw
+ let child = Command::new("npm")
+ .args(["install", "-g", OPENCLAW_PACKAGE_NAME])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to spawn npm: {}", e))?;
+
+ let output = child.wait_with_output().await.map_err(|e| format!("Failed to wait for npm: {}", e))?;
+
+ if output.status.success() {
+ // Verify installation
+ match check_openclaw_installed().await {
+ Ok(version) => Ok(InstallResult {
+ success: true,
+ version,
+ error: None,
+ }),
+ Err(e) => Ok(InstallResult {
+ success: false,
+ version: None,
+ error: Some(e),
+ }),
+ }
+ } else {
+ // Parse npm error output for better error messages
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ let stdout = String::from_utf8_lossy(&output.stdout);
+
+ let error_message = if stderr.contains("404") || stderr.contains("Not Found") || stdout.contains("404") {
+ format!(
+ "OpenClaw package '{}' is not yet available on npm. \
+ Please check the OpenClaw project for installation instructions, \
+ or try using PicoClaw as an alternative lightweight gateway.",
+ OPENCLAW_PACKAGE_NAME
+ )
+ } else if stderr.contains("EACCES") || stderr.contains("permission denied") {
+ "Permission denied. Try running with administrator privileges or use a Node version manager like nvm.".to_string()
+ } else if stderr.contains("ENOTFOUND") || stderr.contains("network") {
+ "Network error. Please check your internet connection and try again.".to_string()
+ } else {
+ format!(
+ "npm install failed: {}",
+ if !stderr.is_empty() {
+ stderr.trim().to_string()
+ } else if !stdout.is_empty() {
+ stdout.trim().to_string()
+ } else {
+ "Unknown error".to_string()
+ }
+ )
+ };
+
+ log::error!("OpenClaw installation failed: {}", error_message);
+
+ Ok(InstallResult {
+ success: false,
+ version: None,
+ error: Some(error_message),
+ })
+ }
+}
+
+/// Generate the default OpenClaw configuration
+fn generate_default_config(input: Option<OpenClawConfigInput>) -> OpenClawConfig {
+ let mut config = OpenClawConfig::default();
+
+ if let Some(input) = input {
+ if let Some(port) = input.port {
+ config.gateway.port = port;
+ }
+ if let Some(bind) = input.bind {
+ config.gateway.bind = bind;
+ }
+ if let Some(base_url) = input.jan_base_url {
+ config.models.providers.jan.base_url = base_url;
+ }
+ if let Some(model_id) = input.model_id {
+ config.agents.defaults.model.primary = model_id;
+ }
+ if let Some(system_prompt) = input.system_prompt {
+ config.agents.defaults.system_prompt = system_prompt;
+ }
+ }
+
+ config
+}
+
+/// Configure OpenClaw with the specified settings
+#[tauri::command]
+pub async fn openclaw_configure(config_input: Option<OpenClawConfigInput>) -> Result<OpenClawConfig, String> {
+ log::info!("Configuring OpenClaw");
+
+ let config = generate_default_config(config_input);
+
+ let config_path = get_openclaw_config_path()?;
+ let config_json = serde_json::to_string_pretty(&config)
+ .map_err(|e| format!("Failed to serialize config: {}", e))?;
+
+ std::fs::write(&config_path, config_json)
+ .map_err(|e| format!("Failed to write config file: {}", e))?;
+
+ log::info!("OpenClaw configuration written to {:?}", config_path);
+ Ok(config)
+}
+
+/// Get the current OpenClaw configuration
+#[tauri::command]
+pub async fn openclaw_get_config() -> Result<OpenClawConfig, String> {
+ let config_path = get_openclaw_config_path()?;
+
+ if !config_path.exists() {
+ // Return default config if no config exists
+ return Ok(OpenClawConfig::default());
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read config file: {}", e))?;
+
+ serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse config: {}", e))
+}
+
+/// Sync the selected model from Jan to OpenClaw
+///
+/// This updates OpenClaw's agent default model to match Jan's currently selected model.
+/// It does two things:
+/// 1. Ensures the model is registered in OpenClaw's model config (if not already)
+/// 2. Sets the model as the default for the agent
+#[tauri::command]
+pub async fn openclaw_sync_model(
+ model_id: String,
+ provider: Option<String>,
+ model_name: Option<String>,
+) -> Result<(), String> {
+ log::info!("Syncing model to OpenClaw: {} (provider: {:?})", model_id, provider);
+
+ // Format the model ID for OpenClaw
+ // OpenClaw expects format like "provider/model" or just "model"
+ let openclaw_model_id = if let Some(ref prov) = provider {
+ // If provider is specified and model_id doesn't already include it
+ if model_id.contains('/') {
+ model_id.clone()
+ } else {
+ format!("{}/{}", prov, model_id)
+ }
+ } else {
+ model_id.clone()
+ };
+
+ // First, check if the model already exists in OpenClaw's config
+ // Try to add it to the "jan" provider (or create it)
+ let display_name = model_name.unwrap_or_else(|| model_id.clone());
+
+ // Create a model definition for OpenClaw
+ let model_def = serde_json::json!({
+ "id": openclaw_model_id,
+ "name": display_name,
+ "reasoning": false,
+ "input": ["text"],
+ "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
+ "contextWindow": 128000,
+ "maxTokens": 32000
+ });
+
+ // Try to add/update the model in the jan provider
+ // First check if jan provider exists
+ let check_output = Command::new("openclaw")
+ .args(["config", "get", "models.providers.jan"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await;
+
+ let jan_provider_exists = check_output
+ .map(|o| o.status.success())
+ .unwrap_or(false);
+
+ if !jan_provider_exists {
+ // Create the jan provider pointing to local Jan API
+ log::info!("Creating 'jan' provider in OpenClaw config");
+ let jan_provider = serde_json::json!({
+ "baseUrl": "http://localhost:1337/v1",
+ "api": "openai-chat",
+ "models": [model_def]
+ });
+
+ let _ = Command::new("openclaw")
+ .args([
+ "config",
+ "set",
+ "models.providers.jan",
+ &jan_provider.to_string(),
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await;
+ } else {
+ // Jan provider exists, try to add model if not present
+ // Note: This is best-effort, the model might already exist
+ log::debug!("Jan provider exists, model may already be configured");
+ }
+
+ // Set the model as the default
+ let output = Command::new("openclaw")
+ .args([
+ "config",
+ "set",
+ "agents.defaults.model.primary",
+ &openclaw_model_id,
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw config set: {}", e))?;
+
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ let stdout = String::from_utf8_lossy(&output.stdout);
+
+ log::info!("OpenClaw config set output: {}", stdout);
+ if !stderr.is_empty() {
+ log::debug!("OpenClaw config set stderr: {}", stderr);
+ }
+
+ if !output.status.success() {
+ return Err(format!(
+ "Failed to set OpenClaw model: {}",
+ if !stderr.is_empty() { stderr.to_string() } else { stdout.to_string() }
+ ));
+ }
+
+ log::info!("Successfully synced model '{}' to OpenClaw", openclaw_model_id);
+ Ok(())
+}
+
+/// Get the currently configured model in OpenClaw
+#[tauri::command]
+pub async fn openclaw_get_model() -> Result<String, String> {
+ log::info!("Getting OpenClaw model");
+
+ let output = Command::new("openclaw")
+ .args(["config", "get", "agents.defaults.model.primary"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw config get: {}", e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("Failed to get OpenClaw model: {}", stderr));
+ }
+
+ let stdout = String::from_utf8_lossy(&output.stdout);
+ // The output is JSON, parse it to get just the value
+ let model: String = serde_json::from_str(stdout.trim())
+ .unwrap_or_else(|_| stdout.trim().trim_matches('"').to_string());
+
+ Ok(model)
+}
+
+/// Check if OpenClaw gateway is responding on the expected port
+async fn check_gateway_responding() -> bool {
+ // Use TCP connection check - OpenClaw serves a dashboard UI, not a JSON health endpoint
+ match tokio::net::TcpStream::connect(format!("127.0.0.1:{}", OPENCLAW_PORT)).await {
+ Ok(_) => {
+ log::info!("OpenClaw gateway is responding on port {}", OPENCLAW_PORT);
+ true
+ }
+ Err(_) => false,
+ }
+}
+
+/// Start the OpenClaw gateway
+#[tauri::command]
+pub async fn openclaw_start(state: State<'_, OpenClawState>) -> Result<(), String> {
+ log::info!("Starting OpenClaw gateway");
+
+ // Check if already running (tracked by us)
+ {
+ let handle = state.process_handle.lock().await;
+ if handle.is_some() {
+ log::info!("OpenClaw gateway is already running (tracked process)");
+ return Ok(());
+ }
+ }
+
+ // Check if gateway is already responding (started externally)
+ if check_gateway_responding().await {
+ log::info!("OpenClaw gateway is already running on port {} (external process)", OPENCLAW_PORT);
+ return Ok(());
+ }
+
+ // Check dependencies first
+ let node_check = openclaw_check_dependencies().await;
+ if !node_check.installed || !node_check.meets_requirements {
+ return Err(node_check.error.unwrap_or_else(|| "Node.js requirements not met".to_string()));
+ }
+
+ // Check port availability
+ let port_check = openclaw_check_port(OPENCLAW_PORT).await;
+ if !port_check.available {
+ // Port is in use but gateway not responding - something else is using the port
+ return Err(format!("Port {} is already in use by another application", OPENCLAW_PORT));
+ }
+
+ // Ensure config exists
+ let config_path = get_openclaw_config_path()?;
+ if !config_path.exists() {
+ // Generate default config
+ openclaw_configure(None).await?;
+ }
+
+ // Start OpenClaw gateway
+ let mut child = Command::new("openclaw")
+ .args(&["gateway", "start"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to start OpenClaw: {}", e))?;
+
+ // Wait a bit for the process to start
+ tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
+
+ // Check if process is still running
+ match child.try_wait().map_err(|e| format!("Failed to check process: {}", e)) {
+ Ok(Some(status)) => {
+ if !status.success() {
+ return Err(format!("OpenClaw failed to start: {:?}", status));
+ }
+ }
+ Ok(None) => {
+ // Process is running, store the handle
+ let mut handle = state.process_handle.lock().await;
+ *handle = Some(child);
+ log::info!("OpenClaw gateway started successfully on port {}", OPENCLAW_PORT);
+ }
+ Err(e) => {
+ return Err(format!("Failed to check process status: {}", e));
+ }
+ }
+
+ Ok(())
+}
+
+/// Stop the OpenClaw gateway
+#[tauri::command]
+pub async fn openclaw_stop(state: State<'_, OpenClawState>) -> Result<(), String> {
+ log::info!("Stopping OpenClaw gateway");
+
+ let mut handle = state.process_handle.lock().await;
+
+ if let Some(mut child) = handle.take() {
+ // Try graceful shutdown first
+ match child.kill().await {
+ Ok(_) => {
+ log::info!("OpenClaw gateway stopped");
+ Ok(())
+ }
+ Err(e) => {
+ log::warn!("Failed to stop OpenClaw gracefully: {}", e);
+ // Try to force kill
+ let _ = child.start_kill();
+ Ok(())
+ }
+ }
+ } else {
+ // Process not tracked, try to kill by name
+ #[cfg(target_os = "macos")]
+ {
+ let output = Command::new("pkill")
+ .arg("-f")
+ .arg("openclaw")
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run pkill: {}", e))?;
+
+ if output.status.success() {
+ Ok(())
+ } else {
+ Err("OpenClaw process not found".to_string())
+ }
+ }
+
+ #[cfg(target_os = "linux")]
+ {
+ let output = Command::new("pkill")
+ .arg("-f")
+ .arg("openclaw")
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run pkill: {}", e))?;
+
+ if output.status.success() {
+ Ok(())
+ } else {
+ Err("OpenClaw process not found".to_string())
+ }
+ }
+
+ #[cfg(target_os = "windows")]
+ {
+ let output = Command::new("taskkill")
+ .args(&["/F", "/IM", "openclaw.exe"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run taskkill: {}", e))?;
+
+ if output.status.success() {
+ Ok(())
+ } else {
+ Err("OpenClaw process not found".to_string())
+ }
+ }
+ }
+}
+
+/// Get the current OpenClaw status
+#[tauri::command]
+pub async fn openclaw_status(state: State<'_, OpenClawState>) -> Result<OpenClawStatus, String> {
+ log::info!("Getting OpenClaw status");
+
+ // Check if process is running
+ let running = {
+ let mut handle = state.process_handle.lock().await;
+ if let Some(ref mut child) = *handle {
+ match child.try_wait() {
+ Ok(Some(_)) => false, // Process has exited
+ Ok(None) => true, // Process is still running
+ Err(_) => false,
+ }
+ } else {
+ // Check if gateway is responding (might be started externally)
+ check_gateway_responding().await
+ }
+ };
+
+ // Check if OpenClaw is installed
+ let openclaw_version = match check_openclaw_installed().await {
+ Ok(v) => v,
+ Err(_) => None,
+ };
+
+ // Check Node.js
+ let node_check = openclaw_check_dependencies().await;
+
+ // Check port
+ let port_check = openclaw_check_port(OPENCLAW_PORT).await;
+
+ Ok(OpenClawStatus {
+ installed: openclaw_version.is_some(),
+ running,
+ node_version: node_check.version,
+ openclaw_version,
+ port_available: port_check.available,
+ error: None,
+ })
+}
+
+/// Restart the OpenClaw gateway
+#[tauri::command]
+pub async fn openclaw_restart(state: State<'_, OpenClawState>) -> Result<(), String> {
+ log::info!("Restarting OpenClaw gateway");
+
+ // Stop first
+ openclaw_stop(state.clone()).await?;
+
+ // Wait a bit for the process to fully terminate
+ tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
+
+ // Start again
+ openclaw_start(state).await
+}
+
+/// Get the OpenClaw configuration directory path
+#[tauri::command]
+pub fn openclaw_get_config_dir() -> Result<String, String> {
+ let path = get_openclaw_config_dir()?;
+ Ok(path.to_string_lossy().to_string())
+}
+
+/// Telegram bot token validation result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TelegramTokenValidation {
+ /// Whether the token is valid
+ pub valid: bool,
+ /// Bot username if valid
+ pub bot_username: Option<String>,
+ /// Bot name if valid
+ pub bot_name: Option<String>,
+ /// Error message if invalid
+ pub error: Option<String>,
+}
+
+/// Telegram channel configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TelegramConfig {
+ /// Bot token
+ pub bot_token: String,
+ /// Bot username
+ pub bot_username: Option<String>,
+ /// Whether the channel is connected
+ pub connected: bool,
+ /// Pairing code (if not yet paired)
+ pub pairing_code: Option<String>,
+ /// Number of paired users
+ pub paired_users: u32,
+}
+
+/// Validate a Telegram bot token by calling the Telegram Bot API
+#[tauri::command]
+pub async fn telegram_validate_token(token: String) -> TelegramTokenValidation {
+ log::info!("Validating Telegram bot token");
+
+ // Basic format validation (Telegram tokens are typically format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
+ if token.len() < 30 || !token.contains(':') {
+ return TelegramTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_name: None,
+ error: Some("Invalid token format. Telegram tokens should look like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz".to_string()),
+ };
+ }
+
+ // Call Telegram Bot API to validate the token
+ let url = format!("https://api.telegram.org/bot{}/getMe", token);
+
+ match reqwest::get(&url).await {
+ Ok(response) => {
+ if response.status().is_success() {
+ match response.json::<serde_json::Value>().await {
+ Ok(data) => {
+ if data.get("ok").and_then(|v| v.as_bool()).unwrap_or(false) {
+ let result = data.get("result");
+ let username = result.and_then(|r| r.get("username")).and_then(|v| v.as_str()).map(String::from);
+ let name = result.and_then(|r| r.get("first_name")).and_then(|v| v.as_str()).map(String::from);
+
+ TelegramTokenValidation {
+ valid: true,
+ bot_username: username.clone(),
+ bot_name: name,
+ error: None,
+ }
+ } else {
+ let description = data.get("description").and_then(|v| v.as_str()).unwrap_or("Unknown error");
+ TelegramTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_name: None,
+ error: Some(format!("Token validation failed: {}", description)),
+ }
+ }
+ }
+ Err(e) => TelegramTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_name: None,
+ error: Some(format!("Failed to parse API response: {}", e)),
+ },
+ }
+ } else {
+ TelegramTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_name: None,
+ error: Some(format!("API returned error: {}", response.status())),
+ }
+ }
+ }
+ Err(e) => TelegramTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_name: None,
+ error: Some(format!("Failed to connect to Telegram API: {}", e)),
+ },
+ }
+}
+
+/// Generate a unique pairing code for Telegram
+fn generate_pairing_code() -> String {
+ use std::time::{SystemTime, UNIX_EPOCH};
+ let timestamp = SystemTime::now()
+ .duration_since(UNIX_EPOCH)
+ .unwrap()
+ .as_millis();
+ let random_part: u32 = (timestamp % 10000) as u32;
+ format!("{:04X}{:04X}", random_part, (timestamp / 10000) as u32)
+}
+
+/// Enable a channel plugin in OpenClaw
+///
+/// Plugins must be enabled before channels can be added
+async fn enable_channel_plugin(channel: &str) -> Result<(), String> {
+ log::info!("Enabling {} plugin in OpenClaw", channel);
+
+ let enable_output = Command::new("openclaw")
+ .args(["plugins", "enable", channel])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw plugins enable: {}", e))?;
+
+ let stderr = String::from_utf8_lossy(&enable_output.stderr);
+ let stdout = String::from_utf8_lossy(&enable_output.stdout);
+
+ log::info!("OpenClaw plugins enable {} output: {}", channel, stdout);
+ if !stderr.is_empty() {
+ log::debug!("OpenClaw plugins enable {} stderr: {}", channel, stderr);
+ }
+
+ // Plugin enable succeeds even if already enabled, so we only check for actual errors
+ if !enable_output.status.success() {
+ let combined = format!("{}{}", stdout, stderr);
+ // Ignore "already enabled" type messages
+ if !combined.contains("already") && !combined.contains("Enabled") {
+ return Err(format!("Failed to enable {} plugin: {}", channel, combined));
+ }
+ }
+
+ Ok(())
+}
+
+/// Configure Telegram channel with the bot token
+///
+/// Uses `openclaw plugins enable telegram` followed by
+/// `openclaw channels add --channel telegram --token <token>` to add the channel
+#[tauri::command]
+pub async fn telegram_configure(token: String) -> Result<TelegramConfig, String> {
+ log::info!("Configuring Telegram channel via OpenClaw CLI");
+
+ // Validate the token first via Telegram API
+ let validation = telegram_validate_token(token.clone()).await;
+ if !validation.valid {
+ return Err(validation.error.unwrap_or_else(|| "Invalid token".to_string()));
+ }
+
+ // First, enable the Telegram plugin (must be done before adding channel)
+ enable_channel_plugin("telegram").await?;
+
+ // Add Telegram channel using OpenClaw CLI
+ let add_output = Command::new("openclaw")
+ .args([
+ "channels",
+ "add",
+ "--channel", "telegram",
+ "--token", &token,
+ "--account", "default",
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels add: {}", e))?;
+
+ let add_stderr = String::from_utf8_lossy(&add_output.stderr);
+ let add_stdout = String::from_utf8_lossy(&add_output.stdout);
+
+ log::info!("OpenClaw channels add telegram output: {}", add_stdout);
+ if !add_stderr.is_empty() {
+ log::info!("OpenClaw channels add telegram stderr: {}", add_stderr);
+ }
+
+ if !add_output.status.success() {
+ // Check if it failed because channel already exists
+ let combined = format!("{}{}", add_stdout, add_stderr);
+ if !combined.contains("already exists") && !combined.contains("updated") && !combined.contains("Added") {
+ return Err(format!(
+ "Failed to add Telegram channel: {}",
+ if !add_stderr.is_empty() { add_stderr.to_string() } else { add_stdout.to_string() }
+ ));
+ }
+ }
+
+ // Also store in local config for Jan's reference
+ let telegram_settings = serde_json::json!({
+ "enabled": true,
+ "bot_token": token,
+ "bot_username": validation.bot_username,
+ "connected": true,
+ });
+
+ let config_dir = get_openclaw_config_dir()?;
+ let telegram_config_path = config_dir.join("telegram.json");
+
+ std::fs::write(&telegram_config_path, serde_json::to_string_pretty(&telegram_settings).unwrap())
+ .map_err(|e| format!("Failed to save Telegram config: {}", e))?;
+
+ // Generate pairing code for DM access control
+ let pairing_code = generate_pairing_code();
+
+ log::info!("Telegram configured successfully via OpenClaw, pairing code: {}", pairing_code);
+
+ Ok(TelegramConfig {
+ bot_token: token,
+ bot_username: validation.bot_username,
+ connected: true, // Channel is added and connected
+ pairing_code: Some(pairing_code),
+ paired_users: 0,
+ })
+}
+
+/// Get current Telegram configuration
+#[tauri::command]
+pub async fn telegram_get_config() -> Result<TelegramConfig, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ let telegram_config_path = config_dir.join("telegram.json");
+
+ if !telegram_config_path.exists() {
+ return Ok(TelegramConfig {
+ bot_token: String::new(),
+ bot_username: None,
+ connected: false,
+ pairing_code: None,
+ paired_users: 0,
+ });
+ }
+
+ let config_json = std::fs::read_to_string(&telegram_config_path)
+ .map_err(|e| format!("Failed to read Telegram config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse Telegram config: {}", e))?;
+
+ Ok(TelegramConfig {
+ bot_token: settings.get("bot_token").and_then(|v| v.as_str()).unwrap_or("").to_string(),
+ bot_username: settings.get("bot_username").and_then(|v| v.as_str()).map(String::from),
+ connected: settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false),
+ pairing_code: None, // Only shown during initial setup
+ paired_users: settings.get("paired_users").and_then(|v| v.as_u64()).unwrap_or(0) as u32,
+ })
+}
+
+/// Check if pairing is complete (simulated - in real impl would check with OpenClaw)
+#[tauri::command]
+pub async fn telegram_check_pairing() -> Result<bool, String> {
+ log::info!("Checking Telegram pairing status");
+
+ let config_dir = get_openclaw_config_dir()?;
+ let telegram_config_path = config_dir.join("telegram.json");
+
+ if !telegram_config_path.exists() {
+ return Ok(false);
+ }
+
+ let config_json = std::fs::read_to_string(&telegram_config_path)
+ .map_err(|e| format!("Failed to read Telegram config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse Telegram config: {}", e))?;
+
+ Ok(settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false))
+}
+
+/// Disconnect Telegram channel
+#[tauri::command]
+pub async fn telegram_disconnect() -> Result<(), String> {
+ log::info!("Disconnecting Telegram channel");
+
+ let config_dir = get_openclaw_config_dir()?;
+ let telegram_config_path = config_dir.join("telegram.json");
+
+ if telegram_config_path.exists() {
+ let config_json = std::fs::read_to_string(&telegram_config_path)
+ .map_err(|e| format!("Failed to read Telegram config: {}", e))?;
+
+ let mut settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse Telegram config: {}", e))?;
+
+ settings["enabled"] = serde_json::json!(false);
+ settings["connected"] = serde_json::json!(false);
+ settings["paired_users"] = serde_json::json!(0);
+
+ std::fs::write(&telegram_config_path, serde_json::to_string_pretty(&settings).unwrap())
+ .map_err(|e| format!("Failed to save Telegram config: {}", e))?;
+ }
+
+ Ok(())
+}
+
+// ============================================
+// Channel List and Status Commands
+// ============================================
+
+/// Channel status information
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ChannelStatus {
+ /// Channel name (e.g., "telegram", "whatsapp", "discord")
+ pub name: String,
+ /// Account ID
+ pub account_id: String,
+ /// Whether the channel is enabled
+ pub enabled: bool,
+ /// Whether the channel is connected/authenticated
+ pub connected: bool,
+ /// Additional status info
+ pub status_info: Option<String>,
+}
+
+/// List of available and configured channels
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ChannelList {
+ /// Configured channels with their status
+ pub configured: Vec<ChannelStatus>,
+ /// All supported channel types (for showing available options)
+ pub supported: Vec<String>,
+}
+
+/// Get list of configured channels from OpenClaw
+#[tauri::command]
+pub async fn openclaw_list_channels() -> Result<ChannelList, String> {
+ log::info!("Listing OpenClaw channels");
+
+ // Run openclaw channels list to get configured channels
+ let list_output = Command::new("openclaw")
+ .args(["channels", "list"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels list: {}", e))?;
+
+ let stdout = String::from_utf8_lossy(&list_output.stdout);
+ let stderr = String::from_utf8_lossy(&list_output.stderr);
+
+ log::debug!("channels list output: {}", stdout);
+ if !stderr.is_empty() {
+ log::debug!("channels list stderr: {}", stderr);
+ }
+
+ let mut configured = Vec::new();
+
+ // Parse the output to extract configured channels
+ // Format expected: "- channelName accountId: enabled/disabled"
+ for line in stdout.lines() {
+ let line = line.trim();
+ if line.starts_with("- ") || line.starts_with("* ") {
+ let parts: Vec<&str> = line[2..].split_whitespace().collect();
+ if !parts.is_empty() {
+ let channel_name = parts[0].to_string();
+ let account_id = parts.get(1).unwrap_or(&"default").to_string();
+ let is_enabled = line.contains("enabled") || !line.contains("disabled");
+
+ configured.push(ChannelStatus {
+ name: channel_name.clone(),
+ account_id: account_id.replace(":", ""),
+ enabled: is_enabled,
+ connected: is_enabled, // Assume enabled means connected for now
+ status_info: None,
+ });
+ }
+ }
+ }
+
+ // List of all supported channel types from OpenClaw
+ let supported = vec![
+ "telegram".to_string(),
+ "whatsapp".to_string(),
+ "discord".to_string(),
+ "slack".to_string(),
+ "signal".to_string(),
+ "imessage".to_string(),
+ "matrix".to_string(),
+ "msteams".to_string(),
+ "googlechat".to_string(),
+ "mattermost".to_string(),
+ "irc".to_string(),
+ ];
+
+ Ok(ChannelList {
+ configured,
+ supported,
+ })
+}
+
+/// Get detailed status of a specific channel
+#[tauri::command]
+pub async fn openclaw_channel_status(channel: String) -> Result<ChannelStatus, String> {
+ log::info!("Getting status for channel: {}", channel);
+
+ // Run openclaw channels status to get detailed status
+ let status_output = Command::new("openclaw")
+ .args(["channels", "status", "--probe"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels status: {}", e))?;
+
+ let stdout = String::from_utf8_lossy(&status_output.stdout);
+
+ // Find the channel in the output
+ let channel_lower = channel.to_lowercase();
+ let mut found = false;
+ let mut is_enabled = false;
+ let mut status_info = None;
+
+ for line in stdout.lines() {
+ let line_lower = line.to_lowercase();
+ if line_lower.contains(&channel_lower) {
+ found = true;
+ is_enabled = line_lower.contains("enabled") || line_lower.contains("connected") || line_lower.contains("online");
+ if line.contains(":") {
+ let parts: Vec<&str> = line.split(':').collect();
+ if parts.len() > 1 {
+ status_info = Some(parts[1..].join(":").trim().to_string());
+ }
+ }
+ break;
+ }
+ }
+
+ if !found {
+ // Channel not configured
+ return Ok(ChannelStatus {
+ name: channel,
+ account_id: "default".to_string(),
+ enabled: false,
+ connected: false,
+ status_info: Some("Not configured".to_string()),
+ });
+ }
+
+ Ok(ChannelStatus {
+ name: channel,
+ account_id: "default".to_string(),
+ enabled: is_enabled,
+ connected: is_enabled,
+ status_info,
+ })
+}
+
+// ============================================
+// WhatsApp Integration Commands
+// ============================================
+
+/// WhatsApp configuration structure
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct WhatsAppConfig {
+ /// Account ID (e.g., "default")
+ pub account_id: String,
+ /// Session path for WhatsApp session data
+ pub session_path: String,
+ /// Whether the channel is connected
+ pub connected: bool,
+ /// Phone number of the connected account (if connected)
+ pub phone_number: Option<String>,
+ /// QR code data (base64 encoded image) for authentication
+ pub qr_code: Option<String>,
+ /// Number of contacts synced
+ pub contacts_count: u32,
+}
+
+impl Default for WhatsAppConfig {
+ fn default() -> Self {
+ Self {
+ account_id: "default".to_string(),
+ session_path: String::new(),
+ connected: false,
+ phone_number: None,
+ qr_code: None,
+ contacts_count: 0,
+ }
+ }
+}
+
+/// WhatsApp authentication status
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct WhatsAppAuthStatus {
+ /// Whether authentication is in progress
+ pub in_progress: bool,
+ /// Whether the QR code is ready to be scanned
+ pub qr_code_ready: bool,
+ /// QR code data (base64 encoded image)
+ pub qr_code: Option<String>,
+ /// Whether authentication is complete
+ pub authenticated: bool,
+ /// Error message if any
+ pub error: Option<String>,
+}
+
+/// Get the WhatsApp configuration file path
+fn get_whatsapp_config_path() -> Result<std::path::PathBuf, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ Ok(config_dir.join("whatsapp.json"))
+}
+
+/// Check if WhatsApp is connected by reading the config
+#[tauri::command]
+pub async fn whatsapp_validate_connection() -> Result<bool, String> {
+ log::info!("Validating WhatsApp connection");
+
+ let config_path = get_whatsapp_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(false);
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ Ok(settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false))
+}
+
+/// Start WhatsApp authentication - uses OpenClaw CLI to add WhatsApp channel
+///
+/// The WhatsApp login flow in OpenClaw works as follows:
+/// 1. `openclaw plugins enable whatsapp` - enables the WhatsApp plugin
+/// 2. `openclaw channels add --channel whatsapp` - adds the WhatsApp channel config
+/// 3. `openclaw channels login --channel whatsapp` - initiates QR code login (if supported)
+/// 4. Or the gateway generates QR code automatically when WhatsApp channel is enabled
+#[tauri::command]
+pub async fn whatsapp_start_auth() -> Result<WhatsAppAuthStatus, String> {
+ log::info!("Starting WhatsApp authentication via OpenClaw CLI");
+
+ // Get the WhatsApp session/auth directory
+ let config_dir = get_openclaw_config_dir()?;
+ let auth_dir = config_dir.join("whatsapp_auth");
+
+ if !auth_dir.exists() {
+ std::fs::create_dir_all(&auth_dir)
+ .map_err(|e| format!("Failed to create WhatsApp auth directory: {}", e))?;
+ }
+
+ // First, enable the WhatsApp plugin (must be done before adding channel)
+ enable_channel_plugin("whatsapp").await?;
+
+ // Now add WhatsApp channel using CLI
+ // This configures the channel in OpenClaw's config
+ let add_output = Command::new("openclaw")
+ .args([
+ "channels",
+ "add",
+ "--channel", "whatsapp",
+ "--account", "default",
+ "--auth-dir", &auth_dir.to_string_lossy(),
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels add: {}", e))?;
+
+ let add_stderr = String::from_utf8_lossy(&add_output.stderr);
+ let add_stdout = String::from_utf8_lossy(&add_output.stdout);
+
+ log::info!("OpenClaw channels add output: {}", add_stdout);
+ if !add_stderr.is_empty() {
+ log::info!("OpenClaw channels add stderr: {}", add_stderr);
+ }
+
+ if !add_output.status.success() {
+ // Check if it failed because channel already exists (which is fine)
+ let combined = format!("{}{}", add_stdout, add_stderr);
+ if !combined.contains("already exists") && !combined.contains("Added") && !combined.contains("updated") {
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(format!(
+ "Failed to add WhatsApp channel: {}",
+ if !add_stderr.is_empty() { add_stderr.to_string() } else { add_stdout.to_string() }
+ )),
+ });
+ }
+ }
+
+ // Now try to initiate login to get QR code
+ // This may output QR code to terminal or start interactive session
+ let login_output = Command::new("openclaw")
+ .args([
+ "channels",
+ "login",
+ "--channel", "whatsapp",
+ "--account", "default",
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels login: {}", e))?;
+
+ let login_stderr = String::from_utf8_lossy(&login_output.stderr);
+ let login_stdout = String::from_utf8_lossy(&login_output.stdout);
+
+ log::info!("OpenClaw channels login output: {}", login_stdout);
+ if !login_stderr.is_empty() {
+ log::info!("OpenClaw channels login stderr: {}", login_stderr);
+ }
+
+ // Save state to local config
+ let whatsapp_config = WhatsAppConfig {
+ account_id: "default".to_string(),
+ session_path: auth_dir.to_string_lossy().to_string(),
+ connected: false,
+ phone_number: None,
+ qr_code: None, // QR code will be fetched separately or displayed in terminal
+ contacts_count: 0,
+ };
+
+ let config_path = get_whatsapp_config_path()?;
+ std::fs::write(
+ &config_path,
+ serde_json::to_string_pretty(&whatsapp_config).unwrap()
+ ).map_err(|e| format!("Failed to save WhatsApp config: {}", e))?;
+
+ // Check login result
+ if !login_output.status.success() {
+ // Check for specific error messages
+ let combined_output = format!("{}{}", login_stdout, login_stderr);
+
+ if combined_output.contains("Unsupported channel") {
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(
+ "WhatsApp channel is not yet supported in this version of OpenClaw. \
+ Currently only iMessage is available. Please check for OpenClaw updates \
+ or consider using Telegram which may be supported.".to_string()
+ ),
+ });
+ }
+
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(format!(
+ "WhatsApp login failed: {}",
+ if !login_stderr.is_empty() { login_stderr.to_string() } else { login_stdout.to_string() }
+ )),
+ });
+ }
+
+ // Login command succeeded - WhatsApp is being set up
+ // Note: The actual QR code may be displayed in terminal or via Gateway events
+ Ok(WhatsAppAuthStatus {
+ in_progress: true,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: None,
+ })
+}
+
+/// Get the QR code for WhatsApp authentication
+/// This polls OpenClaw's Gateway for the QR code
+#[tauri::command]
+pub async fn whatsapp_get_qr_code() -> Result<WhatsAppAuthStatus, String> {
+ log::info!("Getting WhatsApp QR code from OpenClaw Gateway");
+
+ // First check if Gateway is running
+ if !check_gateway_responding().await {
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some("OpenClaw Gateway is not running".to_string()),
+ });
+ }
+
+ // Check channel status via Gateway
+ let params = serde_json::json!({
+ "probe": true,
+ "timeoutMs": 5000
+ });
+
+ match gateway_request("channels.status", params).await {
+ Ok(payload) => {
+ log::debug!("Channel status response: {:?}", payload);
+
+ // Check if WhatsApp channel is connected
+ if let Some(channels) = payload.get("channels") {
+ if let Some(whatsapp) = channels.get("whatsapp") {
+ let connected = whatsapp.get("connected")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false);
+
+ if connected {
+ // Update local config
+ update_whatsapp_connected_status(true).await?;
+
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: true,
+ error: None,
+ });
+ }
+ }
+ }
+
+ // If not connected, try to get/refresh QR code
+ let qr_params = serde_json::json!({
+ "accountId": "default",
+ "timeoutMs": 30000
+ });
+
+ match gateway_request("web.login.start", qr_params).await {
+ Ok(qr_payload) => {
+ let qr_code = qr_payload.get("qrDataUrl")
+ .and_then(|v| v.as_str())
+ .map(String::from);
+
+ Ok(WhatsAppAuthStatus {
+ in_progress: true,
+ qr_code_ready: qr_code.is_some(),
+ qr_code,
+ authenticated: false,
+ error: None,
+ })
+ }
+ Err(e) => {
+ // Fall back to local config
+ let config_path = get_whatsapp_config_path()?;
+ if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+ let qr_code = settings.get("qr_code").and_then(|v| v.as_str()).map(String::from);
+
+ Ok(WhatsAppAuthStatus {
+ in_progress: true,
+ qr_code_ready: qr_code.is_some(),
+ qr_code,
+ authenticated: false,
+ error: Some(format!("Could not refresh QR code: {}", e)),
+ })
+ } else {
+ Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(format!("Failed to get QR code: {}", e)),
+ })
+ }
+ }
+ }
+ }
+ Err(e) => {
+ log::error!("Failed to get channel status: {}", e);
+ Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(format!("Failed to check WhatsApp status: {}", e)),
+ })
+ }
+ }
+}
+
+/// Update local WhatsApp connected status
+async fn update_whatsapp_connected_status(connected: bool) -> Result<(), String> {
+ let config_path = get_whatsapp_config_path()?;
+
+ let mut config = if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+ serde_json::from_str::<WhatsAppConfig>(&config_json)
+ .unwrap_or_default()
+ } else {
+ WhatsAppConfig::default()
+ };
+
+ config.connected = connected;
+ if connected {
+ config.qr_code = None; // Clear QR code when connected
+ }
+
+ std::fs::write(
+ &config_path,
+ serde_json::to_string_pretty(&config).unwrap()
+ ).map_err(|e| format!("Failed to save WhatsApp config: {}", e))?;
+
+ Ok(())
+}
+
+/// Check if WhatsApp authentication is complete
+#[tauri::command]
+pub async fn whatsapp_check_auth() -> Result<WhatsAppAuthStatus, String> {
+ log::info!("Checking WhatsApp authentication status via OpenClaw Gateway");
+
+ // Check Gateway status first
+ if !check_gateway_responding().await {
+ // Fall back to local config
+ let config_path = get_whatsapp_config_path()?;
+ if !config_path.exists() {
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some("WhatsApp not configured".to_string()),
+ });
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ let connected = settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false);
+ let qr_code = settings.get("qr_code").and_then(|v| v.as_str()).map(String::from);
+
+ return Ok(WhatsAppAuthStatus {
+ in_progress: !connected,
+ qr_code_ready: qr_code.is_some(),
+ qr_code,
+ authenticated: connected,
+ error: if !connected { Some("OpenClaw Gateway is not running".to_string()) } else { None },
+ });
+ }
+
+ // Check channel status via Gateway
+ let params = serde_json::json!({
+ "probe": true,
+ "timeoutMs": 5000
+ });
+
+ match gateway_request("channels.status", params).await {
+ Ok(payload) => {
+ log::debug!("Channel status response: {:?}", payload);
+
+ // Check if WhatsApp channel is connected
+ if let Some(channels) = payload.get("channels") {
+ if let Some(whatsapp) = channels.get("whatsapp") {
+ let connected = whatsapp.get("connected")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false);
+
+ let linked = whatsapp.get("linked")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false);
+
+ if connected {
+ // Successfully authenticated
+ update_whatsapp_connected_status(true).await?;
+
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: true,
+ error: None,
+ });
+ }
+
+ // Check for errors
+ let last_error = whatsapp.get("lastError")
+ .and_then(|v| v.as_str())
+ .map(String::from);
+
+ if last_error.is_some() && !linked {
+ return Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: last_error,
+ });
+ }
+ }
+ }
+
+ // Still waiting for authentication, get QR code from local config
+ let config_path = get_whatsapp_config_path()?;
+ let qr_code = if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path).ok();
+ config_json.and_then(|json| {
+ serde_json::from_str::<serde_json::Value>(&json).ok()
+ }).and_then(|settings| {
+ settings.get("qr_code").and_then(|v| v.as_str()).map(String::from)
+ })
+ } else {
+ None
+ };
+
+ Ok(WhatsAppAuthStatus {
+ in_progress: true,
+ qr_code_ready: qr_code.is_some(),
+ qr_code,
+ authenticated: false,
+ error: None,
+ })
+ }
+ Err(e) => {
+ log::error!("Failed to check channel status: {}", e);
+
+ // Fall back to local config
+ let config_path = get_whatsapp_config_path()?;
+ if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ let connected = settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false);
+ let qr_code = settings.get("qr_code").and_then(|v| v.as_str()).map(String::from);
+
+ Ok(WhatsAppAuthStatus {
+ in_progress: !connected,
+ qr_code_ready: qr_code.is_some(),
+ qr_code,
+ authenticated: connected,
+ error: Some(format!("Gateway error: {}", e)),
+ })
+ } else {
+ Ok(WhatsAppAuthStatus {
+ in_progress: false,
+ qr_code_ready: false,
+ qr_code: None,
+ authenticated: false,
+ error: Some(format!("Failed to check WhatsApp status: {}", e)),
+ })
+ }
+ }
+ }
+}
+
+/// Get current WhatsApp configuration
+#[tauri::command]
+pub async fn whatsapp_get_config() -> Result<WhatsAppConfig, String> {
+ let config_path = get_whatsapp_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(WhatsAppConfig::default());
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ Ok(WhatsAppConfig {
+ account_id: settings.get("account_id").and_then(|v| v.as_str()).unwrap_or("default").to_string(),
+ session_path: settings.get("session_path").and_then(|v| v.as_str()).unwrap_or("").to_string(),
+ connected: settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false),
+ phone_number: settings.get("phone_number").and_then(|v| v.as_str()).map(String::from),
+ qr_code: settings.get("qr_code").and_then(|v| v.as_str()).map(String::from),
+ contacts_count: settings.get("contacts_count").and_then(|v| v.as_u64()).unwrap_or(0) as u32,
+ })
+}
+
+/// Get connected WhatsApp contacts
+#[tauri::command]
+pub async fn whatsapp_get_contacts() -> Result<Vec<String>, String> {
+ log::info!("Getting WhatsApp contacts");
+
+ let config_path = get_whatsapp_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(vec![]);
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ // In production, this would return actual contacts from OpenClaw
+ // For now, return the phone number if connected
+ let connected = settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false);
+ let phone_number = settings.get("phone_number").and_then(|v| v.as_str()).map(String::from);
+
+ if connected {
+ if let Some(phone) = phone_number {
+ return Ok(vec![phone]);
+ }
+ }
+
+ Ok(vec![])
+}
+
+/// Disconnect WhatsApp session
+#[tauri::command]
+pub async fn whatsapp_disconnect() -> Result<(), String> {
+ log::info!("Disconnecting WhatsApp channel");
+
+ let config_path = get_whatsapp_config_path()?;
+
+ if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read WhatsApp config: {}", e))?;
+
+ let mut settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse WhatsApp config: {}", e))?;
+
+ settings["connected"] = serde_json::json!(false);
+ settings["phone_number"] = serde_json::json!(null);
+ settings["contacts_count"] = serde_json::json!(0);
+
+ // Clear the session
+ let session_path = settings.get("session_path").and_then(|v| v.as_str());
+ if let Some(session) = session_path {
+ let session_dir = std::path::PathBuf::from(session);
+ if session_dir.exists() {
+ let _ = std::fs::remove_dir_all(&session_dir);
+ }
+ }
+
+ std::fs::write(&config_path, serde_json::to_string_pretty(&settings).unwrap())
+ .map_err(|e| format!("Failed to save WhatsApp config: {}", e))?;
+ }
+
+ Ok(())
+}
+
+// ============================================
+// Discord Integration Commands
+// ============================================
+
+/// Discord configuration structure
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DiscordConfig {
+ /// Account ID (e.g., "default")
+ pub account_id: String,
+ /// Bot token
+ pub bot_token: String,
+ /// Bot username
+ pub bot_username: Option<String>,
+ /// Bot discriminator (for older bots)
+ pub bot_discriminator: Option<String>,
+ /// Whether the bot is connected
+ pub connected: bool,
+ /// Number of guilds the bot is in
+ pub guilds_count: u32,
+ /// Number of channels configured
+ pub channels_count: u32,
+}
+
+impl Default for DiscordConfig {
+ fn default() -> Self {
+ Self {
+ account_id: "default".to_string(),
+ bot_token: String::new(),
+ bot_username: None,
+ bot_discriminator: None,
+ connected: false,
+ guilds_count: 0,
+ channels_count: 0,
+ }
+ }
+}
+
+/// Discord token validation result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DiscordTokenValidation {
+ /// Whether the token is valid
+ pub valid: bool,
+ /// Bot username if valid
+ pub bot_username: Option<String>,
+ /// Bot discriminator if valid
+ pub bot_discriminator: Option<String>,
+ /// Error message if invalid
+ pub error: Option<String>,
+}
+
+/// Get the Discord configuration file path
+fn get_discord_config_path() -> Result<std::path::PathBuf, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ Ok(config_dir.join("discord.json"))
+}
+
+/// Validate a Discord bot token by calling the Discord API
+#[tauri::command]
+pub async fn discord_validate_token(token: String) -> DiscordTokenValidation {
+ log::info!("Validating Discord bot token");
+
+ // Basic format validation (Discord bot tokens are typically 72 characters)
+ if token.len() < 50 || token.len() > 80 {
+ return DiscordTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_discriminator: None,
+ error: Some("Invalid token format. Discord bot tokens are typically 72 characters.".to_string()),
+ };
+ }
+
+ // Call Discord API to validate the token
+ let client = reqwest::Client::new();
+ let url = "https://discord.com/api/v10/users/@me";
+
+ match client.get(url)
+ .header("Authorization", format!("Bot {}", token))
+ .send()
+ .await
+ {
+ Ok(response) => {
+ if response.status().is_success() {
+ match response.json::<serde_json::Value>().await {
+ Ok(data) => {
+ let username = data.get("username").and_then(|v| v.as_str()).map(String::from);
+ let discriminator = data.get("discriminator").and_then(|v| v.as_str()).map(String::from);
+
+ DiscordTokenValidation {
+ valid: true,
+ bot_username: username.clone(),
+ bot_discriminator: discriminator,
+ error: None,
+ }
+ }
+ Err(e) => DiscordTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_discriminator: None,
+ error: Some(format!("Failed to parse API response: {}", e)),
+ },
+ }
+ } else if response.status() == 401 {
+ DiscordTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_discriminator: None,
+ error: Some("Invalid token. The bot token is incorrect or has been revoked.".to_string()),
+ }
+ } else {
+ DiscordTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_discriminator: None,
+ error: Some(format!("API returned error: {}", response.status())),
+ }
+ }
+ }
+ Err(e) => DiscordTokenValidation {
+ valid: false,
+ bot_username: None,
+ bot_discriminator: None,
+ error: Some(format!("Failed to connect to Discord API: {}", e)),
+ },
+ }
+}
+
+/// Configure Discord channel with the bot token
+///
+/// Uses `openclaw plugins enable discord` followed by
+/// `openclaw channels add --channel discord --token <token>` to add the channel
+#[tauri::command]
+pub async fn discord_configure(token: String) -> Result<DiscordConfig, String> {
+ log::info!("Configuring Discord channel via OpenClaw CLI");
+
+ // Validate the token first
+ let validation = discord_validate_token(token.clone()).await;
+ if !validation.valid {
+ return Err(validation.error.unwrap_or_else(|| "Invalid token".to_string()));
+ }
+
+ // First, enable the Discord plugin (must be done before adding channel)
+ enable_channel_plugin("discord").await?;
+
+ // Add Discord channel using OpenClaw CLI
+ let add_output = Command::new("openclaw")
+ .args([
+ "channels",
+ "add",
+ "--channel", "discord",
+ "--token", &token,
+ "--account", "default",
+ ])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run openclaw channels add: {}", e))?;
+
+ let add_stderr = String::from_utf8_lossy(&add_output.stderr);
+ let add_stdout = String::from_utf8_lossy(&add_output.stdout);
+
+ log::info!("OpenClaw channels add discord output: {}", add_stdout);
+ if !add_stderr.is_empty() {
+ log::info!("OpenClaw channels add discord stderr: {}", add_stderr);
+ }
+
+ if !add_output.status.success() {
+ // Check if it failed because channel already exists
+ let combined = format!("{}{}", add_stdout, add_stderr);
+ if !combined.contains("already exists") && !combined.contains("updated") && !combined.contains("Added") {
+ return Err(format!(
+ "Failed to add Discord channel: {}",
+ if !add_stderr.is_empty() { add_stderr.to_string() } else { add_stdout.to_string() }
+ ));
+ }
+ }
+
+ // Also store in local config for Jan's reference
+ let config_dir = get_openclaw_config_dir()?;
+ let discord_settings = serde_json::json!({
+ "enabled": true,
+ "bot_token": token,
+ "bot_username": validation.bot_username,
+ "bot_discriminator": validation.bot_discriminator,
+ "connected": true,
+ });
+
+ // Store Discord config
+ let discord_config_path = config_dir.join("discord.json");
+ std::fs::write(&discord_config_path, serde_json::to_string_pretty(&discord_settings).unwrap())
+ .map_err(|e| format!("Failed to save Discord config: {}", e))?;
+
+ log::info!("Discord configured successfully via OpenClaw for bot: {:?}", validation.bot_username);
+
+ Ok(DiscordConfig {
+ account_id: "default".to_string(),
+ bot_token: token,
+ bot_username: validation.bot_username,
+ bot_discriminator: validation.bot_discriminator,
+ connected: true,
+ guilds_count: 0,
+ channels_count: 0,
+ })
+}
+
+/// Get current Discord configuration
+#[tauri::command]
+pub async fn discord_get_config() -> Result<DiscordConfig, String> {
+ let config_path = get_discord_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(DiscordConfig::default());
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read Discord config: {}", e))?;
+
+ let settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse Discord config: {}", e))?;
+
+ Ok(DiscordConfig {
+ account_id: settings.get("account_id").and_then(|v| v.as_str()).unwrap_or("default").to_string(),
+ bot_token: settings.get("bot_token").and_then(|v| v.as_str()).unwrap_or("").to_string(),
+ bot_username: settings.get("bot_username").and_then(|v| v.as_str()).map(String::from),
+ bot_discriminator: settings.get("bot_discriminator").and_then(|v| v.as_str()).map(String::from),
+ connected: settings.get("connected").and_then(|v| v.as_bool()).unwrap_or(false),
+ guilds_count: settings.get("guilds_count").and_then(|v| v.as_u64()).unwrap_or(0) as u32,
+ channels_count: settings.get("channels_count").and_then(|v| v.as_u64()).unwrap_or(0) as u32,
+ })
+}
+
+/// Disconnect Discord channel
+#[tauri::command]
+pub async fn discord_disconnect() -> Result<(), String> {
+ log::info!("Disconnecting Discord channel");
+
+ let config_path = get_discord_config_path()?;
+
+ if config_path.exists() {
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read Discord config: {}", e))?;
+
+ let mut settings: serde_json::Value = serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse Discord config: {}", e))?;
+
+ settings["enabled"] = serde_json::json!(false);
+ settings["connected"] = serde_json::json!(false);
+ settings["guilds_count"] = serde_json::json!(0);
+ settings["channels_count"] = serde_json::json!(0);
+
+ std::fs::write(&config_path, serde_json::to_string_pretty(&settings).unwrap())
+ .map_err(|e| format!("Failed to save Discord config: {}", e))?;
+ }
+
+ Ok(())
+}
+
+// ============================================
+// Tailscale Integration Commands
+// ============================================
+
+use crate::core::openclaw::tailscale;
+
+/// Check if Tailscale is installed on the system
+///
+/// Returns detailed status including whether Tailscale is installed,
+/// running, and the user is logged in.
+#[tauri::command]
+pub async fn tailscale_detect() -> TailscaleStatus {
+ log::info!("Detecting Tailscale installation");
+ tailscale::detect_tailscale().await
+}
+
+/// Get current Tailscale status and tailnet information
+///
+/// Returns information about the current tailnet, including hostname,
+/// IP addresses, DNS name, and serve/funnel status.
+#[tauri::command]
+pub async fn tailscale_get_status() -> TailscaleInfo {
+ log::info!("Getting Tailscale status");
+ tailscale::get_tailscale_status().await
+}
+
+/// Configure Tailscale Serve for the OpenClaw gateway
+///
+/// Sets up Tailscale Serve to proxy HTTPS traffic to the local
+/// OpenClaw gateway port (default 18789).
+#[tauri::command]
+pub async fn tailscale_configure_serve(port: Option<u16>) -> Result<String, String> {
+ let port = port.unwrap_or(OPENCLAW_PORT);
+ log::info!("Configuring Tailscale Serve for port {}", port);
+ tailscale::configure_tailscale_serve(port).await
+}
+
+/// Remove Tailscale Serve configuration
+///
+/// Disables Tailscale Serve, stopping the HTTPS proxy to the local gateway.
+#[tauri::command]
+pub async fn tailscale_remove_serve() -> Result<(), String> {
+ log::info!("Removing Tailscale Serve configuration");
+ tailscale::remove_tailscale_serve().await
+}
+
+/// Enable Tailscale Funnel for public access
+///
+/// Enables Tailscale Funnel to make the OpenClaw gateway accessible
+/// from the public internet via a secure HTTPS URL.
+#[tauri::command]
+pub async fn tailscale_enable_funnel(port: Option<u16>) -> Result<String, String> {
+ let port = port.unwrap_or(OPENCLAW_PORT);
+ log::info!("Enabling Tailscale Funnel for port {}", port);
+ tailscale::enable_tailscale_funnel(port).await
+}
+
+/// Disable Tailscale Funnel
+///
+/// Disables public internet access via Tailscale Funnel.
+#[tauri::command]
+pub async fn tailscale_disable_funnel() -> Result<(), String> {
+ log::info!("Disabling Tailscale Funnel");
+ tailscale::disable_tailscale_funnel().await
+}
+
+/// Get the Tailscale URL for accessing the gateway
+///
+/// Returns the HTTPS URL that can be used to access the OpenClaw gateway
+/// via Tailscale Serve or Funnel, if configured.
+#[tauri::command]
+pub async fn tailscale_get_url() -> Result<Option<String>, String> {
+ log::info!("Getting Tailscale URL");
+ tailscale::get_tailscale_url().await
+}
+
+// ============================================
+// Security Configuration Commands
+// ============================================
+
+use crate::core::openclaw::security;
+
+/// Get current security configuration status
+///
+/// Returns a summary of the security configuration including
+/// auth mode, whether token/password are set, and device counts.
+#[tauri::command]
+pub async fn security_get_status() -> Result<SecurityStatus, String> {
+ log::info!("Getting security status");
+
+ let config = security::load_security_config().await?;
+ let recent_failures = security::count_recent_auth_failures().await?;
+
+ Ok(SecurityStatus {
+ auth_mode: config.auth_mode,
+ has_token: config.token_hash.is_some(),
+ has_password: config.password_hash.is_some(),
+ require_pairing: config.require_pairing,
+ approved_device_count: config.approved_devices.len() as u32,
+ recent_auth_failures: recent_failures,
+ })
+}
+
+/// Set the authentication mode
+///
+/// Changes how users authenticate to the OpenClaw gateway.
+#[tauri::command]
+pub async fn security_set_auth_mode(mode: AuthMode) -> Result<(), String> {
+ log::info!("Setting auth mode to {:?}", mode);
+
+ let mut config = security::load_security_config().await?;
+ config.auth_mode = mode;
+ security::save_security_config(&config).await
+}
+
+/// Generate and store a new access token
+///
+/// Returns the plaintext token (only shown once). The token is
+/// stored as a hash and cannot be retrieved after this.
+#[tauri::command]
+pub async fn security_generate_token() -> Result<String, String> {
+ log::info!("Generating new access token");
+
+ let token = security::generate_access_token();
+ let hash = security::hash_token(&token);
+
+ let mut config = security::load_security_config().await?;
+ config.token_hash = Some(hash);
+ config.auth_mode = AuthMode::Token;
+ security::save_security_config(&config).await?;
+
+ Ok(token)
+}
+
+/// Set password authentication
+///
+/// Stores the password hash and sets auth mode to Password.
+#[tauri::command]
+pub async fn security_set_password(password: String) -> Result<(), String> {
+ log::info!("Setting password authentication");
+
+ if password.len() < 8 {
+ return Err("Password must be at least 8 characters".to_string());
+ }
+
+ let hash = security::hash_token(&password);
+
+ let mut config = security::load_security_config().await?;
+ config.password_hash = Some(hash);
+ config.auth_mode = AuthMode::Password;
+ security::save_security_config(&config).await
+}
+
+/// Verify a token against the stored hash
+///
+/// Returns true if the token is valid.
+#[tauri::command]
+pub async fn security_verify_token(token: String) -> Result<bool, String> {
+ log::info!("Verifying token");
+
+ let config = security::load_security_config().await?;
+
+ match config.auth_mode {
+ AuthMode::Token => {
+ if let Some(hash) = config.token_hash {
+ Ok(security::verify_token(&token, &hash))
+ } else {
+ Ok(false)
+ }
+ }
+ AuthMode::Password => {
+ if let Some(hash) = config.password_hash {
+ Ok(security::verify_token(&token, &hash))
+ } else {
+ Ok(false)
+ }
+ }
+ AuthMode::None => Ok(true),
+ }
+}
+
+/// Set whether device pairing is required
+///
+/// When enabled, only approved devices can access the gateway.
+#[tauri::command]
+pub async fn security_set_require_pairing(require: bool) -> Result<(), String> {
+ log::info!("Setting require_pairing to {}", require);
+
+ let mut config = security::load_security_config().await?;
+ config.require_pairing = require;
+ security::save_security_config(&config).await
+}
+
+/// Get list of approved devices
+#[tauri::command]
+pub async fn security_get_devices() -> Result<Vec<DeviceInfo>, String> {
+ log::info!("Getting approved devices");
+ security::get_approved_devices().await
+}
+
+/// Approve a device for access
+///
+/// Adds the device to the approved list or updates an existing device.
+#[tauri::command]
+pub async fn security_approve_device(device: DeviceInfo) -> Result<(), String> {
+ log::info!("Approving device: {} ({})", device.name, device.id);
+ security::approve_device(device).await
+}
+
+/// Revoke device access
+///
+/// Removes the device from the approved list.
+#[tauri::command]
+pub async fn security_revoke_device(device_id: String) -> Result<(), String> {
+ log::info!("Revoking device: {}", device_id);
+ security::revoke_device(&device_id).await
+}
+
+/// Get recent access logs
+///
+/// Returns the most recent access log entries.
+#[tauri::command]
+pub async fn security_get_logs(limit: u32) -> Result<Vec<AccessLogEntry>, String> {
+ log::info!("Getting access logs (limit: {})", limit);
+ security::get_access_logs(limit as usize).await
+}
+
+/// Clear all access logs
+#[tauri::command]
+pub async fn security_clear_logs() -> Result<(), String> {
+ log::info!("Clearing access logs");
+ security::clear_access_logs().await
+}
+
+/// Generate a new pairing code
+///
+/// Returns an 8-character alphanumeric code for device pairing.
+#[tauri::command]
+pub fn security_generate_pairing_code() -> String {
+ log::info!("Generating pairing code");
+ security::generate_pairing_code()
+}
+
+// ============================================
+// Tunnel Provider Commands
+// ============================================
+
+use crate::core::openclaw::tunnels;
+
+/// Get status of all tunnel providers
+///
+/// Returns the installation and authentication status of all supported
+/// tunnel providers (Tailscale, ngrok, Cloudflare).
+#[tauri::command]
+pub async fn tunnel_get_providers(
+ state: State<'_, OpenClawState>,
+) -> Result<TunnelProvidersStatus, String> {
+ log::info!("Getting tunnel providers status");
+ let tunnel_state = state.tunnel_state.clone();
+ Ok(tunnels::get_tunnel_providers(&tunnel_state).await)
+}
+
+/// Detect all installed tunnel providers
+///
+/// Runs detection for all supported tunnel providers in parallel
+/// and returns their installation/authentication status.
+#[tauri::command]
+pub async fn tunnel_detect_all(
+ state: State<'_, OpenClawState>,
+) -> Result<TunnelProvidersStatus, String> {
+ log::info!("Detecting all tunnel providers");
+ let tunnel_state = state.tunnel_state.clone();
+ Ok(tunnels::get_tunnel_providers(&tunnel_state).await)
+}
+
+/// Set the preferred tunnel provider
+///
+/// Sets which tunnel provider should be used when starting a tunnel.
+#[tauri::command]
+pub async fn tunnel_set_provider(
+ state: State<'_, OpenClawState>,
+ provider: TunnelProvider,
+) -> Result<(), String> {
+ log::info!("Setting tunnel provider to {:?}", provider);
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::set_tunnel_provider(&tunnel_state, provider).await
+}
+
+/// Start a tunnel with the preferred provider
+///
+/// Starts a tunnel using the configured preferred provider on the specified port.
+#[tauri::command]
+pub async fn tunnel_start(
+ state: State<'_, OpenClawState>,
+ port: u16,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting tunnel on port {}", port);
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::start_tunnel(&tunnel_state, port).await
+}
+
+/// Stop the active tunnel
+///
+/// Stops the currently running tunnel, if any.
+#[tauri::command]
+pub async fn tunnel_stop(
+ state: State<'_, OpenClawState>,
+) -> Result<(), String> {
+ log::info!("Stopping tunnel");
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::stop_tunnel(&tunnel_state).await
+}
+
+/// Get active tunnel information
+///
+/// Returns information about the currently active tunnel, if any.
+#[tauri::command]
+pub async fn tunnel_get_active(
+ state: State<'_, OpenClawState>,
+) -> Result<Option<TunnelInfo>, String> {
+ log::info!("Getting active tunnel info");
+ let tunnel_state = state.tunnel_state.clone();
+ Ok(tunnels::get_active_tunnel(&tunnel_state).await)
+}
+
+/// Set ngrok authentication token
+///
+/// Configures ngrok with the provided auth token and saves it for future use.
+#[tauri::command]
+pub async fn tunnel_set_ngrok_token(
+ state: State<'_, OpenClawState>,
+ token: String,
+) -> Result<(), String> {
+ log::info!("Setting ngrok auth token");
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::set_ngrok_token(&tunnel_state, token).await
+}
+
+/// Set Cloudflare tunnel ID
+///
+/// Configures a named Cloudflare tunnel for use with cloudflared.
+#[tauri::command]
+pub async fn tunnel_set_cloudflare_tunnel(
+ state: State<'_, OpenClawState>,
+ tunnel_id: String,
+) -> Result<(), String> {
+ log::info!("Setting Cloudflare tunnel ID");
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::set_cloudflare_tunnel(&tunnel_state, tunnel_id).await
+}
+
+/// Get tunnel configuration
+///
+/// Returns the current tunnel configuration including preferred provider
+/// and stored credentials.
+#[tauri::command]
+pub async fn tunnel_get_config(
+ state: State<'_, OpenClawState>,
+) -> Result<TunnelConfig, String> {
+ log::info!("Getting tunnel configuration");
+ let config = state.tunnel_state.config.lock().await;
+ Ok(config.clone())
+}
+
+/// Start ngrok tunnel directly
+///
+/// Starts an ngrok tunnel on the specified port, optionally using a provided auth token.
+#[tauri::command]
+pub async fn tunnel_start_ngrok(
+ state: State<'_, OpenClawState>,
+ port: u16,
+ auth_token: Option<String>,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting ngrok tunnel on port {}", port);
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::start_ngrok_tunnel(&tunnel_state, port, auth_token).await
+}
+
+/// Stop ngrok tunnel
+///
+/// Stops the active ngrok tunnel.
+#[tauri::command]
+pub async fn tunnel_stop_ngrok(
+ state: State<'_, OpenClawState>,
+) -> Result<(), String> {
+ log::info!("Stopping ngrok tunnel");
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::stop_ngrok_tunnel(&tunnel_state).await
+}
+
+/// Start cloudflared tunnel directly
+///
+/// Starts a cloudflared tunnel on the specified port. If no tunnel_name is provided,
+/// a quick tunnel (no account required) will be created.
+#[tauri::command]
+pub async fn tunnel_start_cloudflared(
+ state: State<'_, OpenClawState>,
+ port: u16,
+ tunnel_name: Option<String>,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting cloudflared tunnel on port {}", port);
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::start_cloudflared_tunnel(&tunnel_state, port, tunnel_name).await
+}
+
+/// Stop cloudflared tunnel
+///
+/// Stops the active cloudflared tunnel.
+#[tauri::command]
+pub async fn tunnel_stop_cloudflared(
+ state: State<'_, OpenClawState>,
+) -> Result<(), String> {
+ log::info!("Stopping cloudflared tunnel");
+ let tunnel_state = state.tunnel_state.clone();
+ tunnels::stop_cloudflared_tunnel(&tunnel_state).await
+}
\ No newline at end of file
diff --git a/src-tauri/src/core/openclaw/constants.rs b/src-tauri/src/core/openclaw/constants.rs
new file mode 100644
index 000000000..27b68977e
--- /dev/null
+++ b/src-tauri/src/core/openclaw/constants.rs
@@ -0,0 +1,17 @@
+/// OpenClaw package name on npm
+pub const OPENCLAW_PACKAGE_NAME: &str = "@openclaw/openclaw";
+
+/// Default OpenClaw gateway port
+pub const DEFAULT_OPENCLAW_PORT: u16 = 18789;
+
+/// Default Jan API base URL
+pub const DEFAULT_JAN_BASE_URL: &str = "http://localhost:1337/v1";
+
+/// Default API type for Jan
+pub const DEFAULT_JAN_API_TYPE: &str = "openai-completions";
+
+/// Default model ID for agents
+pub const DEFAULT_MODEL_ID: &str = "llama-3.2-3b";
+
+/// Default system prompt for agents
+pub const DEFAULT_SYSTEM_PROMPT: &str = "You are a helpful AI assistant running via Jan.";
\ No newline at end of file
diff --git a/src-tauri/src/core/openclaw/mod.rs b/src-tauri/src/core/openclaw/mod.rs
new file mode 100644
index 000000000..460b14c75
--- /dev/null
+++ b/src-tauri/src/core/openclaw/mod.rs
@@ -0,0 +1,52 @@
+pub mod cli;
+pub mod commands;
+pub mod constants;
+pub mod models;
+pub mod security;
+pub mod tailscale;
+pub mod tunnels;
+
+use std::path::PathBuf;
+use std::sync::Arc;
+
+use tokio::sync::Mutex;
+
+use tunnels::TunnelState;
+
+/// OpenClaw configuration directory
+pub fn get_openclaw_config_dir() -> Result<PathBuf, String> {
+ let home = dirs::home_dir().ok_or("Could not find home directory")?;
+ let config_dir = home.join(".openclaw");
+ if !config_dir.exists() {
+ std::fs::create_dir_all(&config_dir).map_err(|e| e.to_string())?;
+ }
+ Ok(config_dir)
+}
+
+/// OpenClaw configuration file path
+pub fn get_openclaw_config_path() -> Result<PathBuf, String> {
+ Ok(get_openclaw_config_dir()?.join("openclaw.json"))
+}
+
+/// OpenClaw gateway port
+pub const OPENCLAW_PORT: u16 = 18789;
+
+/// Minimum Node.js version required (22+)
+pub const MIN_NODE_VERSION: u32 = 22;
+
+/// OpenClaw Manager state
+pub struct OpenClawState {
+ /// Process handle for the OpenClaw gateway
+ pub process_handle: Arc<Mutex<Option<tokio::process::Child>>>,
+ /// Tunnel state for managing tunnel processes
+ pub tunnel_state: TunnelState,
+}
+
+impl Default for OpenClawState {
+ fn default() -> Self {
+ Self {
+ process_handle: Arc::new(Mutex::new(None)),
+ tunnel_state: TunnelState::default(),
+ }
+ }
+}
\ No newline at end of file
diff --git a/src-tauri/src/core/openclaw/models.rs b/src-tauri/src/core/openclaw/models.rs
new file mode 100644
index 000000000..ad10af26b
--- /dev/null
+++ b/src-tauri/src/core/openclaw/models.rs
@@ -0,0 +1,507 @@
+use serde::{Deserialize, Serialize};
+
+use super::constants;
+
+/// OpenClaw configuration structure
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct OpenClawConfig {
+ /// Gateway configuration
+ pub gateway: GatewayConfig,
+ /// Model providers configuration
+ pub models: ModelsConfig,
+ /// Agents configuration
+ pub agents: AgentsConfig,
+}
+
+impl Default for OpenClawConfig {
+ fn default() -> Self {
+ Self {
+ gateway: GatewayConfig::default(),
+ models: ModelsConfig::default(),
+ agents: AgentsConfig::default(),
+ }
+ }
+}
+
+/// Gateway configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GatewayConfig {
+ /// Bind address (loopback or 0.0.0.0)
+ pub bind: String,
+ /// Port number
+ pub port: u16,
+ /// Authentication configuration
+ pub auth: AuthConfig,
+}
+
+impl Default for GatewayConfig {
+ fn default() -> Self {
+ Self {
+ bind: "loopback".to_string(),
+ port: super::OPENCLAW_PORT,
+ auth: AuthConfig::default(),
+ }
+ }
+}
+
+/// Authentication configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AuthConfig {
+ /// Authentication mode (token, etc.)
+ pub mode: String,
+}
+
+impl Default for AuthConfig {
+ fn default() -> Self {
+ Self {
+ mode: "token".to_string(),
+ }
+ }
+}
+
+/// Models configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ModelsConfig {
+ /// Provider configurations
+ pub providers: ProvidersConfig,
+}
+
+impl Default for ModelsConfig {
+ fn default() -> Self {
+ Self {
+ providers: ProvidersConfig::default(),
+ }
+ }
+}
+
+/// Providers configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ProvidersConfig {
+ /// Jan provider configuration
+ #[serde(rename = "jan")]
+ pub jan: JanProviderConfig,
+}
+
+impl Default for ProvidersConfig {
+ fn default() -> Self {
+ Self {
+ jan: JanProviderConfig::default(),
+ }
+ }
+}
+
+/// Jan provider configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct JanProviderConfig {
+ /// Base URL for Jan API
+ #[serde(rename = "baseUrl")]
+ pub base_url: String,
+ /// API type (openai-completions, etc.)
+ pub api: String,
+ /// List of models to use (or ["*"] for all)
+ pub models: Vec<String>,
+}
+
+impl Default for JanProviderConfig {
+ fn default() -> Self {
+ Self {
+ base_url: constants::DEFAULT_JAN_BASE_URL.to_string(),
+ api: constants::DEFAULT_JAN_API_TYPE.to_string(),
+ models: vec!["*".to_string()],
+ }
+ }
+}
+
+/// Agents configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AgentsConfig {
+ /// Default agent settings
+ pub defaults: AgentDefaults,
+}
+
+impl Default for AgentsConfig {
+ fn default() -> Self {
+ Self {
+ defaults: AgentDefaults::default(),
+ }
+ }
+}
+
+/// Default agent settings
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AgentDefaults {
+ /// Default model configuration
+ pub model: ModelConfig,
+ /// Default system prompt
+ #[serde(rename = "systemPrompt")]
+ pub system_prompt: String,
+}
+
+impl Default for AgentDefaults {
+ fn default() -> Self {
+ Self {
+ model: ModelConfig::default(),
+ system_prompt: constants::DEFAULT_SYSTEM_PROMPT.to_string(),
+ }
+ }
+}
+
+/// Model configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ModelConfig {
+ /// Primary model ID
+ pub primary: String,
+}
+
+impl Default for ModelConfig {
+ fn default() -> Self {
+ Self {
+ primary: constants::DEFAULT_MODEL_ID.to_string(),
+ }
+ }
+}
+
+/// OpenClaw status response
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct OpenClawStatus {
+ /// Whether OpenClaw is installed
+ pub installed: bool,
+ /// Whether the gateway is running
+ pub running: bool,
+ /// Node.js version (if installed)
+ pub node_version: Option<String>,
+ /// Installed OpenClaw version (if installed)
+ pub openclaw_version: Option<String>,
+ /// Port status (available or in use)
+ pub port_available: bool,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Node.js check result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct NodeCheckResult {
+ /// Whether Node.js is installed
+ pub installed: bool,
+ /// Node.js version (if installed)
+ pub version: Option<String>,
+ /// Major version number
+ pub major_version: Option<u32>,
+ /// Whether the version meets minimum requirements (22+)
+ pub meets_requirements: bool,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Installation result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct InstallResult {
+ /// Whether installation was successful
+ pub success: bool,
+ /// Installed version (if successful)
+ pub version: Option<String>,
+ /// Error message (if failed)
+ pub error: Option<String>,
+}
+
+/// Port check result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PortCheckResult {
+ /// Whether the port is available
+ pub available: bool,
+ /// The port number checked
+ pub port: u16,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Custom configuration input for OpenClaw
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct OpenClawConfigInput {
+ /// Optional custom Jan base URL
+ #[serde(rename = "janBaseUrl")]
+ pub jan_base_url: Option<String>,
+ /// Optional custom model ID
+ #[serde(rename = "modelId")]
+ pub model_id: Option<String>,
+ /// Optional custom system prompt
+ #[serde(rename = "systemPrompt")]
+ pub system_prompt: Option<String>,
+ /// Optional custom port
+ pub port: Option<u16>,
+ /// Optional bind address
+ pub bind: Option<String>,
+}
+
+// ============================================
+// Tailscale Integration Models
+// ============================================
+
+/// Tailscale installation and connection status
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TailscaleStatus {
+ /// Whether Tailscale is installed on the system
+ pub installed: bool,
+ /// Whether Tailscale daemon is running
+ pub running: bool,
+ /// Whether user is logged in to Tailscale
+ pub logged_in: bool,
+ /// Tailscale version (if installed)
+ pub version: Option<String>,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+impl Default for TailscaleStatus {
+ fn default() -> Self {
+ Self {
+ installed: false,
+ running: false,
+ logged_in: false,
+ version: None,
+ error: None,
+ }
+ }
+}
+
+/// Tailscale network information
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TailscaleInfo {
+ /// Machine hostname in the tailnet
+ pub hostname: Option<String>,
+ /// Name of the tailnet
+ pub tailnet: Option<String>,
+ /// Tailscale IP addresses assigned to this machine
+ pub ip_addresses: Vec<String>,
+ /// DNS name for this machine in the tailnet
+ pub dns_name: Option<String>,
+ /// Whether Tailscale Serve is enabled
+ pub serve_enabled: bool,
+ /// Whether Tailscale Funnel is enabled
+ pub funnel_enabled: bool,
+ /// URL for accessing via Tailscale Serve/Funnel
+ pub serve_url: Option<String>,
+}
+
+impl Default for TailscaleInfo {
+ fn default() -> Self {
+ Self {
+ hostname: None,
+ tailnet: None,
+ ip_addresses: Vec::new(),
+ dns_name: None,
+ serve_enabled: false,
+ funnel_enabled: false,
+ serve_url: None,
+ }
+ }
+}
+
+// ============================================
+// Tunnel Provider Models
+// ============================================
+
+/// Available tunnel providers
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
+#[serde(rename_all = "lowercase")]
+pub enum TunnelProvider {
+ #[default]
+ None,
+ Tailscale,
+ Ngrok,
+ Cloudflare,
+ LocalOnly,
+}
+
+/// Status of a tunnel provider
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TunnelProviderStatus {
+ /// The tunnel provider type
+ pub provider: TunnelProvider,
+ /// Whether the provider CLI is installed
+ pub installed: bool,
+ /// Whether the provider is authenticated
+ pub authenticated: bool,
+ /// Version of the installed CLI (if available)
+ pub version: Option<String>,
+ /// Error message if detection failed
+ pub error: Option<String>,
+}
+
+impl Default for TunnelProviderStatus {
+ fn default() -> Self {
+ Self {
+ provider: TunnelProvider::None,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: None,
+ }
+ }
+}
+
+/// Status of all tunnel providers
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TunnelProvidersStatus {
+ /// Tailscale status
+ pub tailscale: TunnelProviderStatus,
+ /// ngrok status
+ pub ngrok: TunnelProviderStatus,
+ /// Cloudflare (cloudflared) status
+ pub cloudflare: TunnelProviderStatus,
+ /// Currently active/preferred provider
+ pub active_provider: TunnelProvider,
+ /// Currently active tunnel information (if any)
+ pub active_tunnel: Option<TunnelInfo>,
+}
+
+impl Default for TunnelProvidersStatus {
+ fn default() -> Self {
+ Self {
+ tailscale: TunnelProviderStatus {
+ provider: TunnelProvider::Tailscale,
+ ..Default::default()
+ },
+ ngrok: TunnelProviderStatus {
+ provider: TunnelProvider::Ngrok,
+ ..Default::default()
+ },
+ cloudflare: TunnelProviderStatus {
+ provider: TunnelProvider::Cloudflare,
+ ..Default::default()
+ },
+ active_provider: TunnelProvider::None,
+ active_tunnel: None,
+ }
+ }
+}
+
+/// Active tunnel information
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TunnelInfo {
+ /// The tunnel provider being used
+ pub provider: TunnelProvider,
+ /// Public URL for the tunnel
+ pub url: String,
+ /// ISO 8601 timestamp when tunnel started
+ pub started_at: String,
+ /// Local port being tunneled
+ pub port: u16,
+ /// Whether the tunnel is publicly accessible
+ pub is_public: bool,
+}
+
+/// Tunnel configuration stored in config file
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct TunnelConfig {
+ /// Preferred tunnel provider
+ pub preferred_provider: TunnelProvider,
+ /// ngrok authentication token
+ pub ngrok_auth_token: Option<String>,
+ /// Cloudflare tunnel ID
+ pub cloudflare_tunnel_id: Option<String>,
+ /// Whether to auto-start tunnel when OpenClaw starts
+ pub auto_start: bool,
+}
+
+// ============================================
+// Security Configuration Models
+// ============================================
+
+/// Authentication mode for the gateway
+#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
+#[serde(rename_all = "lowercase")]
+pub enum AuthMode {
+ #[default]
+ Token,
+ Password,
+ None,
+}
+
+/// Security configuration for OpenClaw gateway
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct SecurityConfig {
+ /// Authentication mode (token, password, or none)
+ pub auth_mode: AuthMode,
+ /// Hashed access token (if auth_mode is Token)
+ pub token_hash: Option<String>,
+ /// Hashed password (if auth_mode is Password)
+ pub password_hash: Option<String>,
+ /// Whether device pairing is required
+ pub require_pairing: bool,
+ /// List of approved devices
+ pub approved_devices: Vec<DeviceInfo>,
+ /// Maximum authentication attempts before rate limiting
+ pub rate_limit_attempts: u32,
+ /// Time window for rate limiting in seconds
+ pub rate_limit_window_secs: u32,
+}
+
+impl Default for SecurityConfig {
+ fn default() -> Self {
+ Self {
+ auth_mode: AuthMode::Token,
+ token_hash: None,
+ password_hash: None,
+ require_pairing: true,
+ approved_devices: vec![],
+ rate_limit_attempts: 5,
+ rate_limit_window_secs: 300,
+ }
+ }
+}
+
+/// Approved device information
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DeviceInfo {
+ /// Unique device identifier
+ pub id: String,
+ /// Human-readable device name
+ pub name: String,
+ /// Communication channel (telegram, whatsapp, discord)
+ pub channel: String,
+ /// User ID on the channel
+ pub user_id: String,
+ /// ISO 8601 timestamp when device was approved
+ pub approved_at: String,
+ /// ISO 8601 timestamp of last access (if any)
+ pub last_access: Option<String>,
+}
+
+/// Access log entry for security auditing
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AccessLogEntry {
+ /// ISO 8601 timestamp of the event
+ pub timestamp: String,
+ /// Device ID (if known)
+ pub device_id: Option<String>,
+ /// Communication channel
+ pub channel: String,
+ /// User ID on the channel
+ pub user_id: String,
+ /// Action performed (message, pairing, auth_success, auth_fail)
+ pub action: String,
+ /// IP address (if available)
+ pub ip_address: Option<String>,
+ /// Whether the action was successful
+ pub success: bool,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Security status response for the frontend
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct SecurityStatus {
+ /// Current authentication mode
+ pub auth_mode: AuthMode,
+ /// Whether an access token has been configured
+ pub has_token: bool,
+ /// Whether a password has been configured
+ pub has_password: bool,
+ /// Whether device pairing is required
+ pub require_pairing: bool,
+ /// Number of approved devices
+ pub approved_device_count: u32,
+ /// Number of recent authentication failures
+ pub recent_auth_failures: u32,
+}
\ No newline at end of file
diff --git a/src-tauri/src/core/openclaw/security.rs b/src-tauri/src/core/openclaw/security.rs
new file mode 100644
index 000000000..5378af03e
--- /dev/null
+++ b/src-tauri/src/core/openclaw/security.rs
@@ -0,0 +1,303 @@
+//! Security configuration module for OpenClaw gateway
+//!
+//! Handles authentication tokens, device pairing, and access logging
+//! for the OpenClaw remote access feature.
+
+use chrono::Utc;
+use sha2::{Digest, Sha256};
+use uuid::Uuid;
+
+use super::get_openclaw_config_dir;
+use super::models::{AccessLogEntry, DeviceInfo, SecurityConfig};
+
+/// Maximum number of access log entries to keep
+const MAX_ACCESS_LOG_ENTRIES: usize = 1000;
+
+/// Security configuration file name
+const SECURITY_CONFIG_FILE: &str = "security.json";
+
+/// Access logs file name
+const ACCESS_LOGS_FILE: &str = "access_logs.json";
+
+/// Generate a new secure access token
+///
+/// Returns a UUID-based token that can be used for authentication.
+pub fn generate_access_token() -> String {
+ Uuid::new_v4().to_string()
+}
+
+/// Hash an access token or password for storage
+///
+/// Uses SHA-256 to create a secure hash of the input.
+pub fn hash_token(token: &str) -> String {
+ let mut hasher = Sha256::new();
+ hasher.update(token.as_bytes());
+ let result = hasher.finalize();
+ hex::encode(result)
+}
+
+/// Verify a token or password against a stored hash
+///
+/// Returns true if the token matches the stored hash.
+pub fn verify_token(token: &str, hash: &str) -> bool {
+ let token_hash = hash_token(token);
+ token_hash == hash
+}
+
+/// Generate a pairing code for device authentication
+///
+/// Returns an 8-character alphanumeric code that's easy to type.
+pub fn generate_pairing_code() -> String {
+ use rand::Rng;
+
+ let mut rng = rand::thread_rng();
+ let chars: Vec<char> = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
+ .chars()
+ .collect();
+
+ (0..8)
+ .map(|_| {
+ let idx = rng.gen_range(0..chars.len());
+ chars[idx]
+ })
+ .collect()
+}
+
+/// Get the path to the security configuration file
+fn get_security_config_path() -> Result<std::path::PathBuf, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ Ok(config_dir.join(SECURITY_CONFIG_FILE))
+}
+
+/// Get the path to the access logs file
+fn get_access_logs_path() -> Result<std::path::PathBuf, String> {
+ let config_dir = get_openclaw_config_dir()?;
+ Ok(config_dir.join(ACCESS_LOGS_FILE))
+}
+
+/// Load the security configuration from disk
+pub async fn load_security_config() -> Result<SecurityConfig, String> {
+ let config_path = get_security_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(SecurityConfig::default());
+ }
+
+ let config_json = tokio::fs::read_to_string(&config_path)
+ .await
+ .map_err(|e| format!("Failed to read security config: {}", e))?;
+
+ serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse security config: {}", e))
+}
+
+/// Save the security configuration to disk
+pub async fn save_security_config(config: &SecurityConfig) -> Result<(), String> {
+ let config_path = get_security_config_path()?;
+
+ let config_json = serde_json::to_string_pretty(config)
+ .map_err(|e| format!("Failed to serialize security config: {}", e))?;
+
+ tokio::fs::write(&config_path, config_json)
+ .await
+ .map_err(|e| format!("Failed to write security config: {}", e))?;
+
+ Ok(())
+}
+
+/// Record an access log entry
+///
+/// Appends the entry to the access logs file, rotating if necessary.
+pub async fn log_access(entry: AccessLogEntry) -> Result<(), String> {
+ let logs_path = get_access_logs_path()?;
+
+ // Load existing logs
+ let mut logs = load_access_logs_internal(&logs_path).await?;
+
+ // Add new entry
+ logs.push(entry);
+
+ // Rotate if we exceed the maximum
+ if logs.len() > MAX_ACCESS_LOG_ENTRIES {
+ let excess = logs.len() - MAX_ACCESS_LOG_ENTRIES;
+ logs.drain(0..excess);
+ }
+
+ // Save back to disk
+ let logs_json = serde_json::to_string_pretty(&logs)
+ .map_err(|e| format!("Failed to serialize access logs: {}", e))?;
+
+ tokio::fs::write(&logs_path, logs_json)
+ .await
+ .map_err(|e| format!("Failed to write access logs: {}", e))?;
+
+ Ok(())
+}
+
+/// Load access logs from the file
+async fn load_access_logs_internal(path: &std::path::Path) -> Result<Vec<AccessLogEntry>, String> {
+ if !path.exists() {
+ return Ok(Vec::new());
+ }
+
+ let logs_json = tokio::fs::read_to_string(path)
+ .await
+ .map_err(|e| format!("Failed to read access logs: {}", e))?;
+
+ serde_json::from_str(&logs_json)
+ .map_err(|e| format!("Failed to parse access logs: {}", e))
+}
+
+/// Get recent access logs
+///
+/// Returns the most recent `limit` entries.
+pub async fn get_access_logs(limit: usize) -> Result<Vec<AccessLogEntry>, String> {
+ let logs_path = get_access_logs_path()?;
+ let logs = load_access_logs_internal(&logs_path).await?;
+
+ // Return the most recent entries
+ let start = if logs.len() > limit {
+ logs.len() - limit
+ } else {
+ 0
+ };
+
+ Ok(logs[start..].to_vec())
+}
+
+/// Clear all access logs
+pub async fn clear_access_logs() -> Result<(), String> {
+ let logs_path = get_access_logs_path()?;
+
+ if logs_path.exists() {
+ tokio::fs::write(&logs_path, "[]")
+ .await
+ .map_err(|e| format!("Failed to clear access logs: {}", e))?;
+ }
+
+ Ok(())
+}
+
+/// Add a device to the approved list
+pub async fn approve_device(device: DeviceInfo) -> Result<(), String> {
+ let mut config = load_security_config().await?;
+
+ // Check if device already exists (by ID)
+ let existing_index = config.approved_devices
+ .iter()
+ .position(|d| d.id == device.id);
+
+ if let Some(index) = existing_index {
+ // Update existing device
+ config.approved_devices[index] = device;
+ } else {
+ // Add new device
+ config.approved_devices.push(device);
+ }
+
+ save_security_config(&config).await
+}
+
+/// Remove a device from the approved list
+pub async fn revoke_device(device_id: &str) -> Result<(), String> {
+ let mut config = load_security_config().await?;
+
+ let original_len = config.approved_devices.len();
+ config.approved_devices.retain(|d| d.id != device_id);
+
+ if config.approved_devices.len() == original_len {
+ return Err(format!("Device '{}' not found", device_id));
+ }
+
+ save_security_config(&config).await
+}
+
+/// Get list of approved devices
+pub async fn get_approved_devices() -> Result<Vec<DeviceInfo>, String> {
+ let config = load_security_config().await?;
+ Ok(config.approved_devices)
+}
+
+/// Update the last access time for a device
+pub async fn update_device_last_access(device_id: &str) -> Result<(), String> {
+ let mut config = load_security_config().await?;
+
+ if let Some(device) = config.approved_devices.iter_mut().find(|d| d.id == device_id) {
+ device.last_access = Some(Utc::now().to_rfc3339());
+ save_security_config(&config).await
+ } else {
+ Err(format!("Device '{}' not found", device_id))
+ }
+}
+
+/// Count recent authentication failures within the rate limit window
+pub async fn count_recent_auth_failures() -> Result<u32, String> {
+ let config = load_security_config().await?;
+ let logs = get_access_logs(100).await?;
+
+ let window_start = Utc::now()
+ .checked_sub_signed(chrono::Duration::seconds(config.rate_limit_window_secs as i64))
+ .map(|t| t.to_rfc3339())
+ .unwrap_or_default();
+
+ let failures = logs
+ .iter()
+ .filter(|entry| {
+ entry.action == "auth_fail"
+ && entry.timestamp > window_start
+ })
+ .count();
+
+ Ok(failures as u32)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_generate_access_token() {
+ let token = generate_access_token();
+ assert!(!token.is_empty());
+ // UUID format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ assert_eq!(token.len(), 36);
+ }
+
+ #[test]
+ fn test_hash_token() {
+ let token = "test-token-12345";
+ let hash = hash_token(token);
+
+ // SHA-256 produces 64 hex characters
+ assert_eq!(hash.len(), 64);
+
+ // Same input should produce same hash
+ let hash2 = hash_token(token);
+ assert_eq!(hash, hash2);
+
+ // Different input should produce different hash
+ let hash3 = hash_token("different-token");
+ assert_ne!(hash, hash3);
+ }
+
+ #[test]
+ fn test_verify_token() {
+ let token = "my-secret-token";
+ let hash = hash_token(token);
+
+ assert!(verify_token(token, &hash));
+ assert!(!verify_token("wrong-token", &hash));
+ }
+
+ #[test]
+ fn test_generate_pairing_code() {
+ let code = generate_pairing_code();
+ assert_eq!(code.len(), 8);
+
+ // All characters should be alphanumeric (excluding confusing chars like 0, O, 1, I)
+ for c in code.chars() {
+ assert!(c.is_ascii_alphanumeric());
+ assert!(c != '0' && c != 'O' && c != '1' && c != 'I');
+ }
+ }
+}
diff --git a/src-tauri/src/core/openclaw/tailscale.rs b/src-tauri/src/core/openclaw/tailscale.rs
new file mode 100644
index 000000000..346ed5b6f
--- /dev/null
+++ b/src-tauri/src/core/openclaw/tailscale.rs
@@ -0,0 +1,463 @@
+//! Tailscale integration for OpenClaw remote access
+//!
+//! This module provides functions to detect, configure, and manage Tailscale
+//! for secure remote access to the OpenClaw gateway.
+
+use serde::Deserialize;
+use tokio::process::Command;
+
+use super::models::{TailscaleInfo, TailscaleStatus};
+
+/// Tailscale status JSON response structure
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "PascalCase")]
+struct TailscaleStatusJson {
+ #[serde(default)]
+ backend_state: String,
+ #[serde(rename = "Self")]
+ self_node: Option<TailscaleSelfNode>,
+ #[serde(default)]
+ current_tailnet: Option<TailscaleCurrentTailnet>,
+}
+
+/// Tailscale self node information
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "PascalCase")]
+struct TailscaleSelfNode {
+ #[serde(default)]
+ host_name: String,
+ #[serde(rename = "DNSName")]
+ #[serde(default)]
+ dns_name: String,
+ #[serde(rename = "TailscaleIPs")]
+ #[serde(default)]
+ tailscale_ips: Vec<String>,
+}
+
+/// Tailscale current tailnet information
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "PascalCase")]
+#[allow(dead_code)]
+struct TailscaleCurrentTailnet {
+ #[serde(default)]
+ name: String,
+ #[serde(rename = "MagicDNSSuffix")]
+ #[serde(default)]
+ magic_dns_suffix: String,
+}
+
+/// Get the Tailscale CLI command based on the platform
+fn get_tailscale_cmd() -> &'static str {
+ #[cfg(target_os = "macos")]
+ {
+ // On macOS, Tailscale is typically installed via App Store or direct download
+ // The CLI is usually available at /Applications/Tailscale.app/Contents/MacOS/Tailscale
+ // or via /usr/local/bin/tailscale if installed via Homebrew
+ "tailscale"
+ }
+ #[cfg(target_os = "windows")]
+ {
+ "tailscale"
+ }
+ #[cfg(target_os = "linux")]
+ {
+ "tailscale"
+ }
+ #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "linux")))]
+ {
+ "tailscale"
+ }
+}
+
+/// Check if Tailscale is installed on the system
+pub async fn detect_tailscale() -> TailscaleStatus {
+ log::info!("Detecting Tailscale installation");
+
+ // Try to get Tailscale version
+ let version_output = Command::new(get_tailscale_cmd())
+ .arg("version")
+ .output()
+ .await;
+
+ match version_output {
+ Ok(output) => {
+ if output.status.success() {
+ let version_str = String::from_utf8_lossy(&output.stdout)
+ .lines()
+ .next()
+ .unwrap_or("")
+ .trim()
+ .to_string();
+
+ // Check if Tailscale daemon is running and user is logged in
+ let status_output = Command::new(get_tailscale_cmd())
+ .args(["status", "--json"])
+ .output()
+ .await;
+
+ match status_output {
+ Ok(status) => {
+ if status.status.success() {
+ let status_json = String::from_utf8_lossy(&status.stdout);
+ match serde_json::from_str::<TailscaleStatusJson>(&status_json) {
+ Ok(parsed) => {
+ let running = !parsed.backend_state.is_empty();
+ let logged_in = parsed.backend_state == "Running"
+ && parsed.self_node.is_some();
+
+ TailscaleStatus {
+ installed: true,
+ running,
+ logged_in,
+ version: Some(version_str),
+ error: None,
+ }
+ }
+ Err(e) => {
+ log::warn!("Failed to parse Tailscale status JSON: {}", e);
+ TailscaleStatus {
+ installed: true,
+ running: true,
+ logged_in: false,
+ version: Some(version_str),
+ error: Some(format!(
+ "Failed to parse status: {}",
+ e
+ )),
+ }
+ }
+ }
+ } else {
+ let stderr = String::from_utf8_lossy(&status.stderr);
+ // Check for common error messages
+ let (running, error) = if stderr.contains("not running") {
+ (false, Some("Tailscale daemon is not running".to_string()))
+ } else if stderr.contains("not logged in") {
+ (true, Some("Not logged in to Tailscale".to_string()))
+ } else {
+ (false, Some(stderr.trim().to_string()))
+ };
+
+ TailscaleStatus {
+ installed: true,
+ running,
+ logged_in: false,
+ version: Some(version_str),
+ error,
+ }
+ }
+ }
+ Err(e) => TailscaleStatus {
+ installed: true,
+ running: false,
+ logged_in: false,
+ version: Some(version_str),
+ error: Some(format!("Failed to check Tailscale status: {}", e)),
+ },
+ }
+ } else {
+ TailscaleStatus {
+ installed: false,
+ running: false,
+ logged_in: false,
+ version: None,
+ error: Some("Tailscale is not installed".to_string()),
+ }
+ }
+ }
+ Err(e) => {
+ log::info!("Tailscale not found: {}", e);
+ TailscaleStatus {
+ installed: false,
+ running: false,
+ logged_in: false,
+ version: None,
+ error: Some("Tailscale is not installed".to_string()),
+ }
+ }
+ }
+}
+
+/// Get the current tailnet name and status
+pub async fn get_tailscale_status() -> TailscaleInfo {
+ log::info!("Getting Tailscale status");
+
+ let output = Command::new(get_tailscale_cmd())
+ .args(["status", "--json"])
+ .output()
+ .await;
+
+ let mut info = TailscaleInfo::default();
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let status_json = String::from_utf8_lossy(&output.stdout);
+ if let Ok(parsed) = serde_json::from_str::<TailscaleStatusJson>(&status_json) {
+ if let Some(self_node) = parsed.self_node {
+ info.hostname = Some(self_node.host_name);
+ info.dns_name = if self_node.dns_name.is_empty() {
+ None
+ } else {
+ // Remove trailing dot if present
+ Some(self_node.dns_name.trim_end_matches('.').to_string())
+ };
+ info.ip_addresses = self_node.tailscale_ips;
+ }
+
+ if let Some(tailnet) = parsed.current_tailnet {
+ info.tailnet = if tailnet.name.is_empty() {
+ None
+ } else {
+ Some(tailnet.name)
+ };
+ }
+ }
+ }
+ }
+ Err(e) => {
+ log::warn!("Failed to get Tailscale status: {}", e);
+ }
+ }
+
+ // Check serve status
+ let serve_status = check_serve_status().await;
+ info.serve_enabled = serve_status.0;
+ info.funnel_enabled = serve_status.1;
+ info.serve_url = serve_status.2;
+
+ info
+}
+
+/// Check the current Tailscale Serve status
+/// Returns (serve_enabled, funnel_enabled, serve_url)
+async fn check_serve_status() -> (bool, bool, Option<String>) {
+ let output = Command::new(get_tailscale_cmd())
+ .args(["serve", "status", "--json"])
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let status_str = String::from_utf8_lossy(&output.stdout);
+ // Parse the serve status JSON
+ // The structure varies but typically contains "Services" or similar
+ if let Ok(json) = serde_json::from_str::<serde_json::Value>(&status_str) {
+ // Check if there are any active services
+ let has_services = json.get("Services").map(|s| !s.is_null()).unwrap_or(false)
+ || json.get("TCP").map(|s| !s.is_null()).unwrap_or(false)
+ || json.get("Web").map(|s| !s.is_null()).unwrap_or(false);
+
+ // Check for funnel
+ let funnel_enabled = json.get("AllowFunnel")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false);
+
+ // Try to extract the serve URL
+ let serve_url = json.get("ServeConfig")
+ .and_then(|c| c.get("DNS"))
+ .and_then(|d| d.as_str())
+ .map(|s| format!("https://{}", s));
+
+ return (has_services, funnel_enabled, serve_url);
+ }
+ }
+ }
+ Err(e) => {
+ log::debug!("Failed to check serve status: {}", e);
+ }
+ }
+
+ (false, false, None)
+}
+
+/// Configure Tailscale Serve for OpenClaw gateway
+///
+/// This sets up Tailscale Serve to proxy HTTPS traffic to the local OpenClaw port.
+pub async fn configure_tailscale_serve(port: u16) -> Result<String, String> {
+ log::info!("Configuring Tailscale Serve for port {}", port);
+
+ // First, check if Tailscale is ready
+ let status = detect_tailscale().await;
+ if !status.installed {
+ return Err("Tailscale is not installed".to_string());
+ }
+ if !status.running {
+ return Err("Tailscale daemon is not running".to_string());
+ }
+ if !status.logged_in {
+ return Err("Not logged in to Tailscale. Please run 'tailscale login' first.".to_string());
+ }
+
+ // Configure Tailscale Serve to forward HTTPS to localhost:port
+ // The command is: tailscale serve https / http://localhost:PORT
+ let output = Command::new(get_tailscale_cmd())
+ .args([
+ "serve",
+ "https",
+ "/",
+ &format!("http://localhost:{}", port),
+ ])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run tailscale serve: {}", e))?;
+
+ if output.status.success() {
+ // Get the serve URL
+ let info = get_tailscale_status().await;
+ let url = info.serve_url.unwrap_or_else(|| {
+ // Construct URL from DNS name if available
+ info.dns_name
+ .map(|dns| format!("https://{}", dns))
+ .unwrap_or_else(|| "URL not available".to_string())
+ });
+
+ log::info!("Tailscale Serve configured successfully: {}", url);
+ Ok(url)
+ } else {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ Err(format!("Failed to configure Tailscale Serve: {}", stderr.trim()))
+ }
+}
+
+/// Remove Tailscale Serve configuration
+pub async fn remove_tailscale_serve() -> Result<(), String> {
+ log::info!("Removing Tailscale Serve configuration");
+
+ let output = Command::new(get_tailscale_cmd())
+ .args(["serve", "off"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run tailscale serve off: {}", e))?;
+
+ if output.status.success() {
+ log::info!("Tailscale Serve configuration removed");
+ Ok(())
+ } else {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ // If already off, that's fine
+ if stderr.contains("no serve config") || stderr.is_empty() {
+ Ok(())
+ } else {
+ Err(format!("Failed to remove Tailscale Serve: {}", stderr.trim()))
+ }
+ }
+}
+
+/// Enable Tailscale Funnel for public access
+///
+/// This allows the OpenClaw gateway to be accessed from the public internet
+/// via Tailscale's Funnel feature.
+pub async fn enable_tailscale_funnel(port: u16) -> Result<String, String> {
+ log::info!("Enabling Tailscale Funnel for port {}", port);
+
+ // First, check if Tailscale is ready
+ let status = detect_tailscale().await;
+ if !status.installed {
+ return Err("Tailscale is not installed".to_string());
+ }
+ if !status.running {
+ return Err("Tailscale daemon is not running".to_string());
+ }
+ if !status.logged_in {
+ return Err("Not logged in to Tailscale. Please run 'tailscale login' first.".to_string());
+ }
+
+ // Enable Funnel - this also sets up serve if not already configured
+ // The command is: tailscale funnel PORT
+ let output = Command::new(get_tailscale_cmd())
+ .args(["funnel", &port.to_string()])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run tailscale funnel: {}", e))?;
+
+ if output.status.success() {
+ // Get the funnel URL
+ let info = get_tailscale_status().await;
+ let url = info.serve_url.unwrap_or_else(|| {
+ info.dns_name
+ .map(|dns| format!("https://{}", dns))
+ .unwrap_or_else(|| "URL not available".to_string())
+ });
+
+ log::info!("Tailscale Funnel enabled: {}", url);
+ Ok(url)
+ } else {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ // Check for common errors
+ if stderr.contains("Funnel not available") || stderr.contains("not enabled") {
+ Err("Tailscale Funnel is not enabled for your account. Please enable it in the Tailscale admin console.".to_string())
+ } else {
+ Err(format!("Failed to enable Tailscale Funnel: {}", stderr.trim()))
+ }
+ }
+}
+
+/// Disable Tailscale Funnel
+pub async fn disable_tailscale_funnel() -> Result<(), String> {
+ log::info!("Disabling Tailscale Funnel");
+
+ let output = Command::new(get_tailscale_cmd())
+ .args(["funnel", "off"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run tailscale funnel off: {}", e))?;
+
+ if output.status.success() {
+ log::info!("Tailscale Funnel disabled");
+ Ok(())
+ } else {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ // If already off, that's fine
+ if stderr.contains("no funnel") || stderr.is_empty() {
+ Ok(())
+ } else {
+ Err(format!("Failed to disable Tailscale Funnel: {}", stderr.trim()))
+ }
+ }
+}
+
+/// Get the tailnet URL for accessing the gateway
+///
+/// Returns the HTTPS URL that can be used to access the OpenClaw gateway
+/// via Tailscale Serve or Funnel.
+pub async fn get_tailscale_url() -> Result<Option<String>, String> {
+ log::info!("Getting Tailscale URL");
+
+ let info = get_tailscale_status().await;
+
+ // If serve is enabled and we have a URL, return it
+ if info.serve_enabled {
+ if let Some(url) = info.serve_url {
+ return Ok(Some(url));
+ }
+ }
+
+ // Otherwise, construct from DNS name if available
+ if let Some(dns_name) = info.dns_name {
+ // If serve is enabled, use HTTPS
+ if info.serve_enabled {
+ return Ok(Some(format!("https://{}", dns_name)));
+ }
+ // Otherwise, return the Tailscale IP-based URL for direct access
+ // (though this won't work without serve for HTTP services)
+ return Ok(Some(format!("http://{}", dns_name)));
+ }
+
+ // No URL available
+ Ok(None)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[tokio::test]
+ async fn test_detect_tailscale() {
+ // This test will vary based on whether Tailscale is installed
+ let status = detect_tailscale().await;
+ // Just verify we get a valid response
+ assert!(status.installed || status.error.is_some());
+ }
+}
diff --git a/src-tauri/src/core/openclaw/tunnels.rs b/src-tauri/src/core/openclaw/tunnels.rs
new file mode 100644
index 000000000..86f4aa247
--- /dev/null
+++ b/src-tauri/src/core/openclaw/tunnels.rs
@@ -0,0 +1,865 @@
+//! Tunnel provider detection and management for OpenClaw remote access.
+//!
+//! This module provides support for multiple tunnel providers (ngrok, cloudflared, Tailscale)
+//! to enable remote access to the Jan OpenClaw gateway.
+
+use std::process::Stdio;
+use std::sync::Arc;
+
+use chrono::Utc;
+use tokio::io::{AsyncBufReadExt, BufReader};
+use tokio::process::Command;
+use tokio::sync::Mutex;
+
+use super::models::{TunnelConfig, TunnelInfo, TunnelProvider, TunnelProviderStatus, TunnelProvidersStatus};
+use super::get_openclaw_config_dir;
+
+/// Shared tunnel state for managing active tunnel processes
+#[derive(Clone)]
+pub struct TunnelState {
+ /// Process handle for the active tunnel
+ pub process_handle: Arc<Mutex<Option<tokio::process::Child>>>,
+ /// Information about the active tunnel
+ pub active_tunnel: Arc<Mutex<Option<TunnelInfo>>>,
+ /// Current tunnel configuration
+ pub config: Arc<Mutex<TunnelConfig>>,
+}
+
+impl Default for TunnelState {
+ fn default() -> Self {
+ Self {
+ process_handle: Arc::new(Mutex::new(None)),
+ active_tunnel: Arc::new(Mutex::new(None)),
+ config: Arc::new(Mutex::new(TunnelConfig::default())),
+ }
+ }
+}
+
+/// Get the tunnel configuration file path
+pub fn get_tunnel_config_path() -> Result<std::path::PathBuf, String> {
+ Ok(get_openclaw_config_dir()?.join("tunnel.json"))
+}
+
+/// Load tunnel configuration from disk
+pub async fn load_tunnel_config() -> Result<TunnelConfig, String> {
+ let config_path = get_tunnel_config_path()?;
+
+ if !config_path.exists() {
+ return Ok(TunnelConfig::default());
+ }
+
+ let config_json = tokio::fs::read_to_string(&config_path)
+ .await
+ .map_err(|e| format!("Failed to read tunnel config: {}", e))?;
+
+ serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse tunnel config: {}", e))
+}
+
+/// Save tunnel configuration to disk
+pub async fn save_tunnel_config(config: &TunnelConfig) -> Result<(), String> {
+ let config_path = get_tunnel_config_path()?;
+
+ let config_json = serde_json::to_string_pretty(config)
+ .map_err(|e| format!("Failed to serialize tunnel config: {}", e))?;
+
+ tokio::fs::write(&config_path, config_json)
+ .await
+ .map_err(|e| format!("Failed to write tunnel config: {}", e))
+}
+
+/// Check if ngrok is installed and get its status
+pub async fn detect_ngrok() -> TunnelProviderStatus {
+ log::info!("Detecting ngrok installation");
+
+ let output = Command::new("ngrok")
+ .arg("version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version_output = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ // ngrok version outputs like "ngrok version 3.x.x"
+ let version = version_output
+ .split_whitespace()
+ .last()
+ .map(String::from);
+
+ // Check if ngrok is authenticated by trying to get the config
+ let authenticated = check_ngrok_authenticated().await;
+
+ TunnelProviderStatus {
+ provider: TunnelProvider::Ngrok,
+ installed: true,
+ authenticated,
+ version,
+ error: None,
+ }
+ } else {
+ TunnelProviderStatus {
+ provider: TunnelProvider::Ngrok,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: Some("ngrok command failed".to_string()),
+ }
+ }
+ }
+ Err(_) => TunnelProviderStatus {
+ provider: TunnelProvider::Ngrok,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: None,
+ },
+ }
+}
+
+/// Check if ngrok is authenticated
+async fn check_ngrok_authenticated() -> bool {
+ // Try to check ngrok config for authtoken
+ let output = Command::new("ngrok")
+ .args(["config", "check"])
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => output.status.success(),
+ Err(_) => false,
+ }
+}
+
+/// Check if cloudflared is installed and get its status
+pub async fn detect_cloudflared() -> TunnelProviderStatus {
+ log::info!("Detecting cloudflared installation");
+
+ let output = Command::new("cloudflared")
+ .arg("version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version_output = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ // cloudflared version outputs like "cloudflared version 2024.x.x (built 2024-xx-xx)"
+ let version = version_output
+ .split_whitespace()
+ .nth(2)
+ .map(String::from);
+
+ // Check if cloudflared has tunnels configured
+ let authenticated = check_cloudflared_authenticated().await;
+
+ TunnelProviderStatus {
+ provider: TunnelProvider::Cloudflare,
+ installed: true,
+ authenticated,
+ version,
+ error: None,
+ }
+ } else {
+ TunnelProviderStatus {
+ provider: TunnelProvider::Cloudflare,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: Some("cloudflared command failed".to_string()),
+ }
+ }
+ }
+ Err(_) => TunnelProviderStatus {
+ provider: TunnelProvider::Cloudflare,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: None,
+ },
+ }
+}
+
+/// Check if cloudflared is authenticated (has tunnels)
+async fn check_cloudflared_authenticated() -> bool {
+ // Try to list tunnels to see if authenticated
+ let output = Command::new("cloudflared")
+ .args(["tunnel", "list"])
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ // If the command succeeds and doesn't show an error about authentication
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ output.status.success() && !stderr.contains("You did not provide credentials")
+ }
+ Err(_) => false,
+ }
+}
+
+/// Check if Tailscale is installed and get its status
+pub async fn detect_tailscale() -> TunnelProviderStatus {
+ log::info!("Detecting Tailscale installation");
+
+ let output = Command::new("tailscale")
+ .arg("version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version_output = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ // tailscale version outputs just the version number
+ let version = version_output.lines().next().map(String::from);
+
+ // Check if Tailscale is running and logged in
+ let authenticated = check_tailscale_authenticated().await;
+
+ TunnelProviderStatus {
+ provider: TunnelProvider::Tailscale,
+ installed: true,
+ authenticated,
+ version,
+ error: None,
+ }
+ } else {
+ TunnelProviderStatus {
+ provider: TunnelProvider::Tailscale,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: Some("tailscale command failed".to_string()),
+ }
+ }
+ }
+ Err(_) => TunnelProviderStatus {
+ provider: TunnelProvider::Tailscale,
+ installed: false,
+ authenticated: false,
+ version: None,
+ error: None,
+ },
+ }
+}
+
+/// Check if Tailscale is authenticated
+async fn check_tailscale_authenticated() -> bool {
+ let output = Command::new("tailscale")
+ .args(["status", "--json"])
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ // Parse JSON to check BackendState
+ let json_str = String::from_utf8_lossy(&output.stdout);
+ if let Ok(json) = serde_json::from_str::<serde_json::Value>(&json_str) {
+ // BackendState should be "Running" when logged in
+ json.get("BackendState")
+ .and_then(|v| v.as_str())
+ .map(|s| s == "Running")
+ .unwrap_or(false)
+ } else {
+ false
+ }
+ } else {
+ false
+ }
+ }
+ Err(_) => false,
+ }
+}
+
+/// Get status of all tunnel providers
+pub async fn get_tunnel_providers(tunnel_state: &TunnelState) -> TunnelProvidersStatus {
+ log::info!("Getting status of all tunnel providers");
+
+ // Run all detections in parallel
+ let (tailscale, ngrok, cloudflare) = tokio::join!(
+ detect_tailscale(),
+ detect_ngrok(),
+ detect_cloudflared()
+ );
+
+ // Get current config and active tunnel
+ let config = tunnel_state.config.lock().await;
+ let active_tunnel = tunnel_state.active_tunnel.lock().await.clone();
+
+ TunnelProvidersStatus {
+ tailscale,
+ ngrok,
+ cloudflare,
+ active_provider: config.preferred_provider.clone(),
+ active_tunnel,
+ }
+}
+
+/// Start ngrok tunnel
+pub async fn start_ngrok_tunnel(
+ tunnel_state: &TunnelState,
+ port: u16,
+ auth_token: Option<String>,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting ngrok tunnel on port {}", port);
+
+ // Check if already running
+ {
+ let handle = tunnel_state.process_handle.lock().await;
+ if handle.is_some() {
+ return Err("A tunnel is already running".to_string());
+ }
+ }
+
+ // If auth token provided, configure ngrok
+ if let Some(token) = &auth_token {
+ let output = Command::new("ngrok")
+ .args(["config", "add-authtoken", token])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to configure ngrok auth token: {}", e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("Failed to set ngrok auth token: {}", stderr));
+ }
+ }
+
+ // Start ngrok with JSON log format
+ let mut child = Command::new("ngrok")
+ .args(["http", &port.to_string(), "--log=stdout", "--log-format=json"])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to start ngrok: {}", e))?;
+
+ // Read stdout to get the public URL
+ let stdout = child.stdout.take()
+ .ok_or("Failed to capture ngrok stdout")?;
+
+ let mut reader = BufReader::new(stdout).lines();
+ let mut public_url: Option<String> = None;
+
+ // Set a timeout for URL detection
+ let timeout = tokio::time::Duration::from_secs(30);
+ let start = tokio::time::Instant::now();
+
+ while start.elapsed() < timeout {
+ match tokio::time::timeout(tokio::time::Duration::from_secs(1), reader.next_line()).await {
+ Ok(Ok(Some(line))) => {
+ // Parse JSON log line
+ if let Ok(json) = serde_json::from_str::<serde_json::Value>(&line) {
+ // Look for the URL in the log
+ if let Some(url) = json.get("url").and_then(|v| v.as_str()) {
+ if url.starts_with("https://") {
+ public_url = Some(url.to_string());
+ break;
+ }
+ }
+ // Also check msg field for URL assignment
+ if let Some(msg) = json.get("msg").and_then(|v| v.as_str()) {
+ if msg.contains("started tunnel") {
+ if let Some(url) = json.get("url").and_then(|v| v.as_str()) {
+ public_url = Some(url.to_string());
+ break;
+ }
+ }
+ }
+ }
+ }
+ Ok(Ok(None)) => break, // EOF
+ Ok(Err(e)) => {
+ log::warn!("Error reading ngrok output: {}", e);
+ break;
+ }
+ Err(_) => continue, // Timeout, try again
+ }
+ }
+
+ // If we couldn't get the URL from logs, try the API
+ if public_url.is_none() {
+ tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
+ public_url = get_ngrok_url_from_api().await;
+ }
+
+ let url = public_url.ok_or("Failed to get ngrok public URL")?;
+
+ let tunnel_info = TunnelInfo {
+ provider: TunnelProvider::Ngrok,
+ url,
+ started_at: Utc::now().to_rfc3339(),
+ port,
+ is_public: true,
+ };
+
+ // Store the process handle and tunnel info
+ {
+ let mut handle = tunnel_state.process_handle.lock().await;
+ *handle = Some(child);
+ }
+ {
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = Some(tunnel_info.clone());
+ }
+
+ log::info!("ngrok tunnel started: {}", tunnel_info.url);
+ Ok(tunnel_info)
+}
+
+/// Get ngrok URL from the local API
+async fn get_ngrok_url_from_api() -> Option<String> {
+ // ngrok runs a local API on port 4040
+ let client = reqwest::Client::new();
+ let response = client
+ .get("http://127.0.0.1:4040/api/tunnels")
+ .send()
+ .await
+ .ok()?;
+
+ if !response.status().is_success() {
+ return None;
+ }
+
+ let json: serde_json::Value = response.json().await.ok()?;
+
+ // Find the https tunnel
+ json.get("tunnels")?
+ .as_array()?
+ .iter()
+ .find_map(|tunnel| {
+ let url = tunnel.get("public_url")?.as_str()?;
+ if url.starts_with("https://") {
+ Some(url.to_string())
+ } else {
+ None
+ }
+ })
+}
+
+/// Stop ngrok tunnel
+pub async fn stop_ngrok_tunnel(tunnel_state: &TunnelState) -> Result<(), String> {
+ log::info!("Stopping ngrok tunnel");
+
+ let mut handle = tunnel_state.process_handle.lock().await;
+
+ if let Some(mut child) = handle.take() {
+ child.kill().await
+ .map_err(|e| format!("Failed to kill ngrok process: {}", e))?;
+
+ // Clear active tunnel
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = None;
+
+ log::info!("ngrok tunnel stopped");
+ Ok(())
+ } else {
+ // Try to kill any orphaned ngrok processes
+ #[cfg(unix)]
+ {
+ let _ = Command::new("pkill")
+ .args(["-f", "ngrok"])
+ .output()
+ .await;
+ }
+
+ #[cfg(windows)]
+ {
+ let _ = Command::new("taskkill")
+ .args(["/F", "/IM", "ngrok.exe"])
+ .output()
+ .await;
+ }
+
+ Ok(())
+ }
+}
+
+/// Start cloudflared tunnel
+pub async fn start_cloudflared_tunnel(
+ tunnel_state: &TunnelState,
+ port: u16,
+ tunnel_name: Option<String>,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting cloudflared tunnel on port {}", port);
+
+ // Check if already running
+ {
+ let handle = tunnel_state.process_handle.lock().await;
+ if handle.is_some() {
+ return Err("A tunnel is already running".to_string());
+ }
+ }
+
+ let url = format!("http://localhost:{}", port);
+
+ // Build command args based on whether we have a named tunnel or quick tunnel
+ let (child, public_url) = if let Some(name) = tunnel_name {
+ // Named tunnel (requires pre-configuration)
+ let child = Command::new("cloudflared")
+ .args(["tunnel", "run", "--url", &url, &name])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to start cloudflared: {}", e))?;
+
+ // For named tunnels, the URL is typically <tunnel-name>.<domain>
+ // We need to get this from the tunnel configuration
+ let tunnel_url = get_cloudflared_tunnel_url(&name).await
+ .unwrap_or_else(|| format!("https://{}.trycloudflare.com", name));
+
+ (child, tunnel_url)
+ } else {
+ // Quick tunnel (no account required)
+ let mut child = Command::new("cloudflared")
+ .args(["tunnel", "--url", &url])
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to start cloudflared: {}", e))?;
+
+ // Read stderr to get the public URL (cloudflared outputs to stderr)
+ let stderr = child.stderr.take()
+ .ok_or("Failed to capture cloudflared stderr")?;
+
+ let mut reader = BufReader::new(stderr).lines();
+ let mut public_url: Option<String> = None;
+
+ let timeout = tokio::time::Duration::from_secs(30);
+ let start = tokio::time::Instant::now();
+
+ while start.elapsed() < timeout {
+ match tokio::time::timeout(tokio::time::Duration::from_secs(1), reader.next_line()).await {
+ Ok(Ok(Some(line))) => {
+ // Look for the URL in the output
+ // cloudflared outputs something like: "Your quick Tunnel has been created! Visit it at (it may take some time to be reachable): https://xxx.trycloudflare.com"
+ if line.contains("trycloudflare.com") {
+ // Extract URL from the line
+ if let Some(start_idx) = line.find("https://") {
+ let url_part = &line[start_idx..];
+ let end_idx = url_part.find(|c: char| c.is_whitespace()).unwrap_or(url_part.len());
+ public_url = Some(url_part[..end_idx].to_string());
+ break;
+ }
+ }
+ }
+ Ok(Ok(None)) => break,
+ Ok(Err(e)) => {
+ log::warn!("Error reading cloudflared output: {}", e);
+ break;
+ }
+ Err(_) => continue,
+ }
+ }
+
+ let url = public_url.ok_or("Failed to get cloudflared public URL")?;
+ (child, url)
+ };
+
+ let tunnel_info = TunnelInfo {
+ provider: TunnelProvider::Cloudflare,
+ url: public_url,
+ started_at: Utc::now().to_rfc3339(),
+ port,
+ is_public: true,
+ };
+
+ // Store the process handle and tunnel info
+ {
+ let mut handle = tunnel_state.process_handle.lock().await;
+ *handle = Some(child);
+ }
+ {
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = Some(tunnel_info.clone());
+ }
+
+ log::info!("cloudflared tunnel started: {}", tunnel_info.url);
+ Ok(tunnel_info)
+}
+
+/// Get cloudflared tunnel URL for a named tunnel
+async fn get_cloudflared_tunnel_url(tunnel_name: &str) -> Option<String> {
+ let output = Command::new("cloudflared")
+ .args(["tunnel", "info", tunnel_name, "--output", "json"])
+ .output()
+ .await
+ .ok()?;
+
+ if !output.status.success() {
+ return None;
+ }
+
+ let json: serde_json::Value = serde_json::from_slice(&output.stdout).ok()?;
+
+ // Extract the hostname from tunnel info
+ json.get("config")?
+ .get("ingress")?
+ .as_array()?
+ .first()?
+ .get("hostname")
+ .and_then(|h| h.as_str())
+ .map(|h| format!("https://{}", h))
+}
+
+/// Stop cloudflared tunnel
+pub async fn stop_cloudflared_tunnel(tunnel_state: &TunnelState) -> Result<(), String> {
+ log::info!("Stopping cloudflared tunnel");
+
+ let mut handle = tunnel_state.process_handle.lock().await;
+
+ if let Some(mut child) = handle.take() {
+ child.kill().await
+ .map_err(|e| format!("Failed to kill cloudflared process: {}", e))?;
+
+ // Clear active tunnel
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = None;
+
+ log::info!("cloudflared tunnel stopped");
+ Ok(())
+ } else {
+ // Try to kill any orphaned cloudflared processes
+ #[cfg(unix)]
+ {
+ let _ = Command::new("pkill")
+ .args(["-f", "cloudflared tunnel"])
+ .output()
+ .await;
+ }
+
+ #[cfg(windows)]
+ {
+ let _ = Command::new("taskkill")
+ .args(["/F", "/IM", "cloudflared.exe"])
+ .output()
+ .await;
+ }
+
+ Ok(())
+ }
+}
+
+/// Start Tailscale Serve/Funnel
+pub async fn start_tailscale_tunnel(
+ tunnel_state: &TunnelState,
+ port: u16,
+ use_funnel: bool,
+) -> Result<TunnelInfo, String> {
+ log::info!("Starting Tailscale {} on port {}", if use_funnel { "Funnel" } else { "Serve" }, port);
+
+ // Check if already running
+ {
+ let active = tunnel_state.active_tunnel.lock().await;
+ if active.is_some() {
+ return Err("A tunnel is already running".to_string());
+ }
+ }
+
+ // First, get the Tailscale hostname
+ let status_output = Command::new("tailscale")
+ .args(["status", "--json"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to get Tailscale status: {}", e))?;
+
+ if !status_output.status.success() {
+ return Err("Tailscale is not running or not logged in".to_string());
+ }
+
+ let status_json: serde_json::Value = serde_json::from_slice(&status_output.stdout)
+ .map_err(|e| format!("Failed to parse Tailscale status: {}", e))?;
+
+ let dns_name = status_json.get("Self")
+ .and_then(|s| s.get("DNSName"))
+ .and_then(|d| d.as_str())
+ .map(|s| s.trim_end_matches('.').to_string())
+ .ok_or("Failed to get Tailscale DNS name")?;
+
+ // Start Tailscale Serve
+ let _serve_url = format!("http://localhost:{}", port);
+
+ // Use funnel if requested (publicly accessible), otherwise serve (tailnet only)
+ let command = if use_funnel { "funnel" } else { "serve" };
+
+ let output = Command::new("tailscale")
+ .args([command, &port.to_string()])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to start Tailscale {}: {}", command, e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("Failed to start Tailscale {}: {}", command, stderr));
+ }
+
+ let public_url = if use_funnel {
+ format!("https://{}", dns_name)
+ } else {
+ format!("https://{}:{}", dns_name, port)
+ };
+
+ let tunnel_info = TunnelInfo {
+ provider: TunnelProvider::Tailscale,
+ url: public_url,
+ started_at: Utc::now().to_rfc3339(),
+ port,
+ is_public: use_funnel,
+ };
+
+ // Store tunnel info (Tailscale serve/funnel runs as a daemon, not a child process)
+ {
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = Some(tunnel_info.clone());
+ }
+
+ log::info!("Tailscale {} started: {}", command, tunnel_info.url);
+ Ok(tunnel_info)
+}
+
+/// Stop Tailscale Serve/Funnel
+pub async fn stop_tailscale_tunnel(tunnel_state: &TunnelState) -> Result<(), String> {
+ log::info!("Stopping Tailscale Serve/Funnel");
+
+ // Reset serve configuration
+ let output = Command::new("tailscale")
+ .args(["serve", "reset"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to stop Tailscale serve: {}", e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ log::warn!("Failed to reset Tailscale serve: {}", stderr);
+ }
+
+ // Also reset funnel
+ let _ = Command::new("tailscale")
+ .args(["funnel", "reset"])
+ .output()
+ .await;
+
+ // Clear active tunnel
+ let mut active = tunnel_state.active_tunnel.lock().await;
+ *active = None;
+
+ log::info!("Tailscale tunnel stopped");
+ Ok(())
+}
+
+/// Get active tunnel info
+pub async fn get_active_tunnel(tunnel_state: &TunnelState) -> Option<TunnelInfo> {
+ let active = tunnel_state.active_tunnel.lock().await;
+ active.clone()
+}
+
+/// Set preferred tunnel provider
+pub async fn set_tunnel_provider(
+ tunnel_state: &TunnelState,
+ provider: TunnelProvider,
+) -> Result<(), String> {
+ log::info!("Setting preferred tunnel provider to {:?}", provider);
+
+ let mut config = tunnel_state.config.lock().await;
+ config.preferred_provider = provider;
+
+ // Save to disk
+ save_tunnel_config(&config).await?;
+
+ Ok(())
+}
+
+/// Start tunnel with preferred provider
+pub async fn start_tunnel(
+ tunnel_state: &TunnelState,
+ port: u16,
+) -> Result<TunnelInfo, String> {
+ let config = tunnel_state.config.lock().await.clone();
+
+ match config.preferred_provider {
+ TunnelProvider::Ngrok => {
+ start_ngrok_tunnel(tunnel_state, port, config.ngrok_auth_token).await
+ }
+ TunnelProvider::Cloudflare => {
+ start_cloudflared_tunnel(tunnel_state, port, config.cloudflare_tunnel_id).await
+ }
+ TunnelProvider::Tailscale => {
+ start_tailscale_tunnel(tunnel_state, port, false).await
+ }
+ TunnelProvider::None | TunnelProvider::LocalOnly => {
+ Err("No tunnel provider configured. Please set a preferred provider first.".to_string())
+ }
+ }
+}
+
+/// Stop active tunnel
+pub async fn stop_tunnel(tunnel_state: &TunnelState) -> Result<(), String> {
+ let active = tunnel_state.active_tunnel.lock().await.clone();
+
+ match active.map(|t| t.provider) {
+ Some(TunnelProvider::Ngrok) => stop_ngrok_tunnel(tunnel_state).await,
+ Some(TunnelProvider::Cloudflare) => stop_cloudflared_tunnel(tunnel_state).await,
+ Some(TunnelProvider::Tailscale) => stop_tailscale_tunnel(tunnel_state).await,
+ _ => {
+ // No active tunnel, but try to clean up any orphaned processes
+ let _ = stop_ngrok_tunnel(tunnel_state).await;
+ let _ = stop_cloudflared_tunnel(tunnel_state).await;
+ Ok(())
+ }
+ }
+}
+
+/// Set ngrok auth token
+pub async fn set_ngrok_token(
+ tunnel_state: &TunnelState,
+ token: String,
+) -> Result<(), String> {
+ log::info!("Setting ngrok auth token");
+
+ // Configure ngrok with the token
+ let output = Command::new("ngrok")
+ .args(["config", "add-authtoken", &token])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to configure ngrok: {}", e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("Failed to set ngrok auth token: {}", stderr));
+ }
+
+ // Save to config
+ let mut config = tunnel_state.config.lock().await;
+ config.ngrok_auth_token = Some(token);
+ save_tunnel_config(&config).await?;
+
+ Ok(())
+}
+
+/// Set cloudflare tunnel ID
+pub async fn set_cloudflare_tunnel(
+ tunnel_state: &TunnelState,
+ tunnel_id: String,
+) -> Result<(), String> {
+ log::info!("Setting Cloudflare tunnel ID: {}", tunnel_id);
+
+ // Verify the tunnel exists
+ let output = Command::new("cloudflared")
+ .args(["tunnel", "info", &tunnel_id])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to verify Cloudflare tunnel: {}", e))?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("Invalid tunnel ID or not authenticated: {}", stderr));
+ }
+
+ // Save to config
+ let mut config = tunnel_state.config.lock().await;
+ config.cloudflare_tunnel_id = Some(tunnel_id);
+ save_tunnel_config(&config).await?;
+
+ Ok(())
+}
diff --git a/src-tauri/src/core/picoclaw/commands.rs b/src-tauri/src/core/picoclaw/commands.rs
new file mode 100644
index 000000000..4738a3cc9
--- /dev/null
+++ b/src-tauri/src/core/picoclaw/commands.rs
@@ -0,0 +1,566 @@
+use std::path::PathBuf;
+use std::process::Stdio;
+
+use tauri::State;
+use tokio::process::Command;
+
+use crate::core::picoclaw::{
+ constants::*,
+ models::*,
+ get_picoclaw_config_path, get_picoclaw_config_dir, get_picoclaw_binary_path,
+ PicoClawState, DEFAULT_PICOCLAW_PORT,
+};
+
+/// Check if a port is available
+#[tauri::command]
+pub async fn picoclaw_check_port(port: u16) -> PortCheckResult {
+ log::info!("Checking if port {} is available for PicoClaw", port);
+
+ let addr = format!("127.0.0.1:{}", port);
+
+ match tokio::net::TcpListener::bind(&addr).await {
+ Ok(_) => PortCheckResult {
+ available: true,
+ port,
+ error: None,
+ },
+ Err(e) => PortCheckResult {
+ available: false,
+ port,
+ error: Some(format!("Port {} is in use: {}", port, e)),
+ },
+ }
+}
+
+/// Check if PicoClaw binary exists and get its version
+async fn check_picoclaw_binary() -> Result<Option<(String, PathBuf)>, String> {
+ let binary_path = get_picoclaw_binary_path()?;
+
+ if !binary_path.exists() {
+ return Ok(None);
+ }
+
+ // Try to get version
+ let output = Command::new(&binary_path)
+ .arg("--version")
+ .output()
+ .await;
+
+ match output {
+ Ok(output) => {
+ if output.status.success() {
+ let version = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ Ok(Some((version, binary_path)))
+ } else {
+ // Binary exists but version check failed - still consider it installed
+ Ok(Some(("unknown".to_string(), binary_path)))
+ }
+ }
+ Err(_) => {
+ // Binary exists but couldn't execute - might be permission issue
+ Ok(Some(("unknown".to_string(), binary_path)))
+ }
+ }
+}
+
+/// Detect if PicoClaw is installed
+#[tauri::command]
+pub async fn picoclaw_detect() -> PicoClawStatus {
+ log::info!("Detecting PicoClaw installation");
+
+ let binary_info = match check_picoclaw_binary().await {
+ Ok(info) => info,
+ Err(e) => {
+ return PicoClawStatus {
+ installed: false,
+ running: false,
+ version: None,
+ binary_path: None,
+ port_available: true,
+ error: Some(e),
+ };
+ }
+ };
+
+ let port_check = picoclaw_check_port(DEFAULT_PICOCLAW_PORT).await;
+
+ match binary_info {
+ Some((version, path)) => PicoClawStatus {
+ installed: true,
+ running: false, // Will be updated by status check
+ version: Some(version),
+ binary_path: Some(path.to_string_lossy().to_string()),
+ port_available: port_check.available,
+ error: None,
+ },
+ None => PicoClawStatus {
+ installed: false,
+ running: false,
+ version: None,
+ binary_path: None,
+ port_available: port_check.available,
+ error: None,
+ },
+ }
+}
+
+/// Download and install PicoClaw binary
+#[tauri::command]
+pub async fn picoclaw_install() -> Result<InstallResult, String> {
+ log::info!("Installing PicoClaw binary");
+
+ // Create config directory if it doesn't exist
+ let _config_dir = get_picoclaw_config_dir()?;
+
+ // Determine download URL
+ let download_url = get_releases_url();
+ log::info!("Downloading PicoClaw from: {}", download_url);
+
+ // Download the binary
+ let response = reqwest::get(&download_url)
+ .await
+ .map_err(|e| format!("Failed to download PicoClaw: {}", e))?;
+
+ if !response.status().is_success() {
+ return Ok(InstallResult {
+ success: false,
+ version: None,
+ binary_path: None,
+ error: Some(format!("Download failed with status: {}", response.status())),
+ });
+ }
+
+ let bytes = response.bytes()
+ .await
+ .map_err(|e| format!("Failed to read download: {}", e))?;
+
+ // Save the binary
+ let binary_path = get_picoclaw_binary_path()?;
+ std::fs::write(&binary_path, &bytes)
+ .map_err(|e| format!("Failed to save binary: {}", e))?;
+
+ // Make it executable on Unix
+ #[cfg(unix)]
+ {
+ use std::os::unix::fs::PermissionsExt;
+ let mut perms = std::fs::metadata(&binary_path)
+ .map_err(|e| format!("Failed to get file metadata: {}", e))?
+ .permissions();
+ perms.set_mode(0o755);
+ std::fs::set_permissions(&binary_path, perms)
+ .map_err(|e| format!("Failed to set permissions: {}", e))?;
+ }
+
+ // Verify installation
+ match check_picoclaw_binary().await {
+ Ok(Some((version, path))) => {
+ log::info!("PicoClaw installed successfully: {} at {:?}", version, path);
+ Ok(InstallResult {
+ success: true,
+ version: Some(version),
+ binary_path: Some(path.to_string_lossy().to_string()),
+ error: None,
+ })
+ }
+ Ok(None) => Ok(InstallResult {
+ success: false,
+ version: None,
+ binary_path: None,
+ error: Some("Binary was saved but verification failed".to_string()),
+ }),
+ Err(e) => Ok(InstallResult {
+ success: false,
+ version: None,
+ binary_path: None,
+ error: Some(e),
+ }),
+ }
+}
+
+/// Generate the default PicoClaw configuration
+fn generate_default_config(input: Option<PicoClawConfigInput>) -> PicoClawConfig {
+ let mut config = PicoClawConfig::default();
+
+ if let Some(input) = input {
+ if let Some(port) = input.port {
+ config.gateway.port = port;
+ }
+ if let Some(host) = input.host {
+ config.gateway.host = host;
+ }
+ if let Some(base_url) = input.jan_base_url {
+ config.providers.jan.api_base = base_url;
+ }
+ if let Some(model_id) = input.model_id {
+ config.agents.defaults.model = format!("jan/{}", model_id);
+ }
+ }
+
+ // Add default web search tool
+ config.tools = ToolsConfig {
+ web: Some(WebToolsConfig {
+ duckduckgo: Some(DuckDuckGoConfig::default()),
+ }),
+ };
+
+ config
+}
+
+/// Configure PicoClaw with the specified settings
+#[tauri::command]
+pub async fn picoclaw_configure(config_input: Option<PicoClawConfigInput>) -> Result<PicoClawConfig, String> {
+ log::info!("Configuring PicoClaw");
+
+ let config = generate_default_config(config_input);
+
+ // Ensure config directory exists
+ let config_dir = get_picoclaw_config_dir()?;
+
+ // Create workspace directory
+ let workspace_dir = config_dir.join("workspace");
+ if !workspace_dir.exists() {
+ std::fs::create_dir_all(&workspace_dir)
+ .map_err(|e| format!("Failed to create workspace: {}", e))?;
+ }
+
+ // Write config file
+ let config_path = get_picoclaw_config_path()?;
+ let config_json = serde_json::to_string_pretty(&config)
+ .map_err(|e| format!("Failed to serialize config: {}", e))?;
+
+ std::fs::write(&config_path, config_json)
+ .map_err(|e| format!("Failed to write config file: {}", e))?;
+
+ log::info!("PicoClaw configuration written to {:?}", config_path);
+ Ok(config)
+}
+
+/// Get the current PicoClaw configuration
+#[tauri::command]
+pub async fn picoclaw_get_config() -> Result<PicoClawConfig, String> {
+ let config_path = get_picoclaw_config_path()?;
+
+ if !config_path.exists() {
+ // Return default config if no config exists
+ return Ok(PicoClawConfig::default());
+ }
+
+ let config_json = std::fs::read_to_string(&config_path)
+ .map_err(|e| format!("Failed to read config file: {}", e))?;
+
+ serde_json::from_str(&config_json)
+ .map_err(|e| format!("Failed to parse config: {}", e))
+}
+
+/// Start the PicoClaw gateway
+#[tauri::command]
+pub async fn picoclaw_start(state: State<'_, PicoClawState>) -> Result<(), String> {
+ log::info!("Starting PicoClaw gateway");
+
+ // Check if already running
+ {
+ let handle = state.process_handle.lock().await;
+ if handle.is_some() {
+ return Err("PicoClaw is already running".to_string());
+ }
+ }
+
+ // Check if binary exists
+ let binary_path = get_picoclaw_binary_path()?;
+ if !binary_path.exists() {
+ return Err("PicoClaw is not installed. Please install it first.".to_string());
+ }
+
+ // Check port availability
+ let port_check = picoclaw_check_port(DEFAULT_PICOCLAW_PORT).await;
+ if !port_check.available {
+ return Err(format!("Port {} is already in use", DEFAULT_PICOCLAW_PORT));
+ }
+
+ // Ensure config exists
+ let config_path = get_picoclaw_config_path()?;
+ if !config_path.exists() {
+ // Generate default config
+ picoclaw_configure(None).await?;
+ }
+
+ // Start PicoClaw gateway
+ let config_dir = get_picoclaw_config_dir()?;
+ let mut child = Command::new(&binary_path)
+ .arg("gateway")
+ .current_dir(&config_dir)
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .map_err(|e| format!("Failed to start PicoClaw: {}", e))?;
+
+ // Wait a bit for the process to start
+ tokio::time::sleep(tokio::time::Duration::from_millis(500)).await;
+
+ // Check if process is still running
+ match child.try_wait().map_err(|e| format!("Failed to check process: {}", e)) {
+ Ok(Some(status)) => {
+ if !status.success() {
+ return Err(format!("PicoClaw failed to start: {:?}", status));
+ }
+ }
+ Ok(None) => {
+ // Process is running, store the handle
+ let mut handle = state.process_handle.lock().await;
+ *handle = Some(child);
+ log::info!("PicoClaw gateway started successfully on port {}", DEFAULT_PICOCLAW_PORT);
+ }
+ Err(e) => {
+ return Err(format!("Failed to check process status: {}", e));
+ }
+ }
+
+ Ok(())
+}
+
+/// Stop the PicoClaw gateway
+#[tauri::command]
+pub async fn picoclaw_stop(state: State<'_, PicoClawState>) -> Result<(), String> {
+ log::info!("Stopping PicoClaw gateway");
+
+ let mut handle = state.process_handle.lock().await;
+
+ if let Some(mut child) = handle.take() {
+ // Try graceful shutdown first
+ match child.kill().await {
+ Ok(_) => {
+ log::info!("PicoClaw gateway stopped");
+ Ok(())
+ }
+ Err(e) => {
+ log::warn!("Failed to stop PicoClaw gracefully: {}", e);
+ // Try to force kill
+ let _ = child.start_kill();
+ Ok(())
+ }
+ }
+ } else {
+ // Process not tracked, try to kill by name
+ #[cfg(unix)]
+ {
+ let output = Command::new("pkill")
+ .arg("-f")
+ .arg("picoclaw")
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run pkill: {}", e))?;
+
+ if output.status.success() {
+ Ok(())
+ } else {
+ Err("PicoClaw process not found".to_string())
+ }
+ }
+
+ #[cfg(target_os = "windows")]
+ {
+ let output = Command::new("taskkill")
+ .args(&["/F", "/IM", "picoclaw.exe"])
+ .output()
+ .await
+ .map_err(|e| format!("Failed to run taskkill: {}", e))?;
+
+ if output.status.success() {
+ Ok(())
+ } else {
+ Err("PicoClaw process not found".to_string())
+ }
+ }
+ }
+}
+
+/// Get the current PicoClaw status
+#[tauri::command]
+pub async fn picoclaw_status(state: State<'_, PicoClawState>) -> Result<PicoClawStatus, String> {
+ log::info!("Getting PicoClaw status");
+
+ // Check if process is running
+ let running = {
+ let mut handle = state.process_handle.lock().await;
+ if let Some(ref mut child) = *handle {
+ match child.try_wait() {
+ Ok(Some(_)) => {
+ // Process has exited, clear the handle
+ *handle = None;
+ false
+ }
+ Ok(None) => true, // Process is still running
+ Err(_) => false,
+ }
+ } else {
+ false
+ }
+ };
+
+ // Check if binary is installed
+ let binary_info = match check_picoclaw_binary().await {
+ Ok(info) => info,
+ Err(e) => {
+ return Ok(PicoClawStatus {
+ installed: false,
+ running: false,
+ version: None,
+ binary_path: None,
+ port_available: true,
+ error: Some(e),
+ });
+ }
+ };
+
+ // Check port
+ let port_check = picoclaw_check_port(DEFAULT_PICOCLAW_PORT).await;
+
+ match binary_info {
+ Some((version, path)) => Ok(PicoClawStatus {
+ installed: true,
+ running,
+ version: Some(version),
+ binary_path: Some(path.to_string_lossy().to_string()),
+ port_available: port_check.available || running, // Port is "available" if we're using it
+ error: None,
+ }),
+ None => Ok(PicoClawStatus {
+ installed: false,
+ running: false,
+ version: None,
+ binary_path: None,
+ port_available: port_check.available,
+ error: None,
+ }),
+ }
+}
+
+/// Restart the PicoClaw gateway
+#[tauri::command]
+pub async fn picoclaw_restart(state: State<'_, PicoClawState>) -> Result<(), String> {
+ log::info!("Restarting PicoClaw gateway");
+
+ // Stop first
+ let _ = picoclaw_stop(state.clone()).await;
+
+ // Wait a bit for the process to fully terminate
+ tokio::time::sleep(tokio::time::Duration::from_millis(500)).await;
+
+ // Start again
+ picoclaw_start(state).await
+}
+
+/// Get the PicoClaw configuration directory path
+#[tauri::command]
+pub fn picoclaw_get_config_dir() -> Result<String, String> {
+ let path = get_picoclaw_config_dir()?;
+ Ok(path.to_string_lossy().to_string())
+}
+
+/// One-click enable PicoClaw remote access
+/// This handles detection, installation, configuration, and startup
+#[tauri::command]
+pub async fn picoclaw_enable(
+ state: State<'_, PicoClawState>,
+ config_input: Option<PicoClawConfigInput>,
+) -> Result<PicoClawStatus, String> {
+ log::info!("Enabling PicoClaw remote access (1-click setup)");
+
+ // Step 1: Detect current status
+ let mut status = picoclaw_detect().await;
+
+ // Step 2: Install if not installed
+ if !status.installed {
+ log::info!("PicoClaw not installed, installing...");
+ let install_result = picoclaw_install().await?;
+
+ if !install_result.success {
+ return Err(install_result.error.unwrap_or_else(|| "Installation failed".to_string()));
+ }
+
+ status.installed = true;
+ status.version = install_result.version;
+ status.binary_path = install_result.binary_path;
+ }
+
+ // Step 3: Configure with Jan as provider
+ log::info!("Configuring PicoClaw...");
+ picoclaw_configure(config_input).await?;
+
+ // Step 4: Start the gateway
+ log::info!("Starting PicoClaw gateway...");
+ picoclaw_start(state.clone()).await?;
+
+ // Step 5: Return final status
+ picoclaw_status(state).await
+}
+
+/// Configure Telegram channel for PicoClaw
+/// Reuses the validation logic but stores in PicoClaw config
+#[tauri::command]
+pub async fn picoclaw_telegram_configure(token: String, user_id: Option<String>) -> Result<(), String> {
+ log::info!("Configuring Telegram channel for PicoClaw");
+
+ // Get current config
+ let mut config = picoclaw_get_config().await?;
+
+ // Update Telegram configuration
+ config.channels.telegram = Some(TelegramChannelConfig {
+ enabled: true,
+ token,
+ allow_from: user_id.map(|id| vec![id]).unwrap_or_default(),
+ });
+
+ // Write updated config
+ let config_path = get_picoclaw_config_path()?;
+ let config_json = serde_json::to_string_pretty(&config)
+ .map_err(|e| format!("Failed to serialize config: {}", e))?;
+
+ std::fs::write(&config_path, config_json)
+ .map_err(|e| format!("Failed to write config: {}", e))?;
+
+ log::info!("Telegram configured for PicoClaw");
+ Ok(())
+}
+
+/// Configure Discord channel for PicoClaw
+#[tauri::command]
+pub async fn picoclaw_discord_configure(token: String, user_id: Option<String>, mention_only: bool) -> Result<(), String> {
+ log::info!("Configuring Discord channel for PicoClaw");
+
+ // Get current config
+ let mut config = picoclaw_get_config().await?;
+
+ // Update Discord configuration
+ config.channels.discord = Some(DiscordChannelConfig {
+ enabled: true,
+ token,
+ allow_from: user_id.map(|id| vec![id]).unwrap_or_default(),
+ mention_only,
+ });
+
+ // Write updated config
+ let config_path = get_picoclaw_config_path()?;
+ let config_json = serde_json::to_string_pretty(&config)
+ .map_err(|e| format!("Failed to serialize config: {}", e))?;
+
+ std::fs::write(&config_path, config_json)
+ .map_err(|e| format!("Failed to write config: {}", e))?;
+
+ log::info!("Discord configured for PicoClaw");
+ Ok(())
+}
+
+/// Get Telegram channel configuration for PicoClaw
+#[tauri::command]
+pub async fn picoclaw_telegram_get_config() -> Result<Option<TelegramChannelConfig>, String> {
+ let config = picoclaw_get_config().await?;
+ Ok(config.channels.telegram)
+}
+
+/// Get Discord channel configuration for PicoClaw
+#[tauri::command]
+pub async fn picoclaw_discord_get_config() -> Result<Option<DiscordChannelConfig>, String> {
+ let config = picoclaw_get_config().await?;
+ Ok(config.channels.discord)
+}
diff --git a/src-tauri/src/core/picoclaw/constants.rs b/src-tauri/src/core/picoclaw/constants.rs
new file mode 100644
index 000000000..780de57e1
--- /dev/null
+++ b/src-tauri/src/core/picoclaw/constants.rs
@@ -0,0 +1,63 @@
+/// PicoClaw GitHub repository owner
+pub const PICOCLAW_REPO_OWNER: &str = "pico-ai";
+
+/// PicoClaw GitHub repository name
+pub const PICOCLAW_REPO_NAME: &str = "picoclaw";
+
+/// Default PicoClaw gateway port
+pub const DEFAULT_PICOCLAW_PORT: u16 = 8080;
+
+/// Default Jan API base URL (same as OpenClaw)
+pub const DEFAULT_JAN_BASE_URL: &str = "http://localhost:1337/v1";
+
+/// Default model ID for agents
+pub const DEFAULT_MODEL_ID: &str = "llama-3.2-3b";
+
+/// Default system prompt for agents
+pub const DEFAULT_SYSTEM_PROMPT: &str = "You are a helpful AI assistant running via Jan.";
+
+/// PicoClaw binary name for different platforms
+#[cfg(target_os = "macos")]
+pub const PICOCLAW_BINARY_NAME: &str = "picoclaw";
+
+#[cfg(target_os = "windows")]
+pub const PICOCLAW_BINARY_NAME: &str = "picoclaw.exe";
+
+#[cfg(target_os = "linux")]
+pub const PICOCLAW_BINARY_NAME: &str = "picoclaw";
+
+/// Get the platform-specific binary download name
+pub fn get_binary_download_name() -> String {
+ let os = std::env::consts::OS;
+ let arch = std::env::consts::ARCH;
+
+ let os_name = match os {
+ "macos" => "darwin",
+ "windows" => "windows",
+ "linux" => "linux",
+ _ => "linux",
+ };
+
+ let arch_name = match arch {
+ "x86_64" => "amd64",
+ "aarch64" => "arm64",
+ "arm" => "arm",
+ _ => "amd64",
+ };
+
+ if os == "windows" {
+ format!("picoclaw-{}-{}.exe", os_name, arch_name)
+ } else {
+ format!("picoclaw-{}-{}", os_name, arch_name)
+ }
+}
+
+/// Get the GitHub releases URL for PicoClaw
+pub fn get_releases_url() -> String {
+ format!(
+ "https://github.com/{}/{}/releases/latest/download/{}",
+ PICOCLAW_REPO_OWNER,
+ PICOCLAW_REPO_NAME,
+ get_binary_download_name()
+ )
+}
diff --git a/src-tauri/src/core/picoclaw/mod.rs b/src-tauri/src/core/picoclaw/mod.rs
new file mode 100644
index 000000000..f036a18a0
--- /dev/null
+++ b/src-tauri/src/core/picoclaw/mod.rs
@@ -0,0 +1,45 @@
+pub mod commands;
+pub mod constants;
+pub mod models;
+
+use std::path::PathBuf;
+use std::sync::Arc;
+
+use tokio::sync::Mutex;
+
+/// PicoClaw configuration directory
+pub fn get_picoclaw_config_dir() -> Result<PathBuf, String> {
+ let home = dirs::home_dir().ok_or("Could not find home directory")?;
+ let config_dir = home.join(".picoclaw");
+ if !config_dir.exists() {
+ std::fs::create_dir_all(&config_dir).map_err(|e| e.to_string())?;
+ }
+ Ok(config_dir)
+}
+
+/// PicoClaw configuration file path
+pub fn get_picoclaw_config_path() -> Result<PathBuf, String> {
+ Ok(get_picoclaw_config_dir()?.join("config.json"))
+}
+
+/// PicoClaw binary path (stored in config directory)
+pub fn get_picoclaw_binary_path() -> Result<PathBuf, String> {
+ Ok(get_picoclaw_config_dir()?.join(constants::PICOCLAW_BINARY_NAME))
+}
+
+/// PicoClaw gateway port
+pub const DEFAULT_PICOCLAW_PORT: u16 = constants::DEFAULT_PICOCLAW_PORT;
+
+/// PicoClaw Manager state
+pub struct PicoClawState {
+ /// Process handle for the PicoClaw gateway
+ pub process_handle: Arc<Mutex<Option<tokio::process::Child>>>,
+}
+
+impl Default for PicoClawState {
+ fn default() -> Self {
+ Self {
+ process_handle: Arc::new(Mutex::new(None)),
+ }
+ }
+}
diff --git a/src-tauri/src/core/picoclaw/models.rs b/src-tauri/src/core/picoclaw/models.rs
new file mode 100644
index 000000000..15a220213
--- /dev/null
+++ b/src-tauri/src/core/picoclaw/models.rs
@@ -0,0 +1,301 @@
+use serde::{Deserialize, Serialize};
+
+use super::constants;
+
+/// PicoClaw configuration structure
+/// Matches the config.json format used by PicoClaw
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PicoClawConfig {
+ /// Agents configuration
+ pub agents: AgentsConfig,
+ /// LLM providers configuration
+ pub providers: ProvidersConfig,
+ /// Channels configuration
+ #[serde(default)]
+ pub channels: ChannelsConfig,
+ /// Tools configuration
+ #[serde(default)]
+ pub tools: ToolsConfig,
+ /// Gateway configuration
+ #[serde(default)]
+ pub gateway: GatewayConfig,
+}
+
+impl Default for PicoClawConfig {
+ fn default() -> Self {
+ Self {
+ agents: AgentsConfig::default(),
+ providers: ProvidersConfig::default(),
+ channels: ChannelsConfig::default(),
+ tools: ToolsConfig::default(),
+ gateway: GatewayConfig::default(),
+ }
+ }
+}
+
+/// Agents configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AgentsConfig {
+ /// Default agent settings
+ pub defaults: AgentDefaults,
+}
+
+impl Default for AgentsConfig {
+ fn default() -> Self {
+ Self {
+ defaults: AgentDefaults::default(),
+ }
+ }
+}
+
+/// Default agent settings
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AgentDefaults {
+ /// Workspace directory
+ pub workspace: String,
+ /// Default model ID (format: provider/model)
+ pub model: String,
+ /// Maximum tokens for responses
+ pub max_tokens: u32,
+ /// Temperature for generation
+ pub temperature: f32,
+ /// Maximum tool iterations
+ pub max_tool_iterations: u32,
+}
+
+impl Default for AgentDefaults {
+ fn default() -> Self {
+ Self {
+ workspace: "~/.picoclaw/workspace".to_string(),
+ model: format!("jan/{}", constants::DEFAULT_MODEL_ID),
+ max_tokens: 8192,
+ temperature: 0.7,
+ max_tool_iterations: 20,
+ }
+ }
+}
+
+/// Providers configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ProvidersConfig {
+ /// Jan provider configuration (Ollama-compatible)
+ #[serde(default)]
+ pub jan: JanProviderConfig,
+}
+
+impl Default for ProvidersConfig {
+ fn default() -> Self {
+ Self {
+ jan: JanProviderConfig::default(),
+ }
+ }
+}
+
+/// Jan provider configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct JanProviderConfig {
+ /// API base URL
+ pub api_base: String,
+ /// API key (empty for local Jan)
+ #[serde(default)]
+ pub api_key: String,
+}
+
+impl Default for JanProviderConfig {
+ fn default() -> Self {
+ Self {
+ api_base: constants::DEFAULT_JAN_BASE_URL.to_string(),
+ api_key: String::new(),
+ }
+ }
+}
+
+/// Channels configuration
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct ChannelsConfig {
+ /// Telegram channel configuration
+ #[serde(default)]
+ pub telegram: Option<TelegramChannelConfig>,
+ /// Discord channel configuration
+ #[serde(default)]
+ pub discord: Option<DiscordChannelConfig>,
+}
+
+/// Telegram channel configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TelegramChannelConfig {
+ /// Whether the channel is enabled
+ pub enabled: bool,
+ /// Bot token
+ pub token: String,
+ /// Allowed user IDs
+ #[serde(default)]
+ pub allow_from: Vec<String>,
+}
+
+/// Discord channel configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DiscordChannelConfig {
+ /// Whether the channel is enabled
+ pub enabled: bool,
+ /// Bot token
+ pub token: String,
+ /// Allowed user IDs
+ #[serde(default)]
+ pub allow_from: Vec<String>,
+ /// Whether to only respond to mentions
+ #[serde(default)]
+ pub mention_only: bool,
+}
+
+/// Tools configuration
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct ToolsConfig {
+ /// Web search tools configuration
+ #[serde(default)]
+ pub web: Option<WebToolsConfig>,
+}
+
+/// Web search tools configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct WebToolsConfig {
+ /// DuckDuckGo configuration
+ #[serde(default)]
+ pub duckduckgo: Option<DuckDuckGoConfig>,
+}
+
+/// DuckDuckGo search configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DuckDuckGoConfig {
+ /// Whether enabled
+ pub enabled: bool,
+ /// Maximum results
+ pub max_results: u32,
+}
+
+impl Default for DuckDuckGoConfig {
+ fn default() -> Self {
+ Self {
+ enabled: true,
+ max_results: 5,
+ }
+ }
+}
+
+/// Gateway configuration
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GatewayConfig {
+ /// Host to bind to
+ pub host: String,
+ /// Port to listen on
+ pub port: u16,
+}
+
+impl Default for GatewayConfig {
+ fn default() -> Self {
+ Self {
+ host: "127.0.0.1".to_string(),
+ port: constants::DEFAULT_PICOCLAW_PORT,
+ }
+ }
+}
+
+/// PicoClaw status response
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PicoClawStatus {
+ /// Whether PicoClaw binary is installed
+ pub installed: bool,
+ /// Whether the gateway is running
+ pub running: bool,
+ /// Installed PicoClaw version (if installed)
+ pub version: Option<String>,
+ /// Binary path (if installed)
+ pub binary_path: Option<String>,
+ /// Port status (available or in use)
+ pub port_available: bool,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Installation result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct InstallResult {
+ /// Whether installation was successful
+ pub success: bool,
+ /// Installed version (if successful)
+ pub version: Option<String>,
+ /// Binary path (if successful)
+ pub binary_path: Option<String>,
+ /// Error message (if failed)
+ pub error: Option<String>,
+}
+
+/// Port check result
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PortCheckResult {
+ /// Whether the port is available
+ pub available: bool,
+ /// The port number checked
+ pub port: u16,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
+
+/// Download progress event
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DownloadProgress {
+ /// Current bytes downloaded
+ pub downloaded: u64,
+ /// Total bytes to download
+ pub total: u64,
+ /// Progress percentage (0-100)
+ pub percentage: u8,
+}
+
+/// Custom configuration input for PicoClaw
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PicoClawConfigInput {
+ /// Optional custom Jan base URL
+ #[serde(rename = "janBaseUrl")]
+ pub jan_base_url: Option<String>,
+ /// Optional custom model ID
+ #[serde(rename = "modelId")]
+ pub model_id: Option<String>,
+ /// Optional custom port
+ pub port: Option<u16>,
+ /// Optional bind host
+ pub host: Option<String>,
+}
+
+/// Remote access backend type
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+#[serde(rename_all = "lowercase")]
+pub enum RemoteAccessBackend {
+ /// OpenClaw (full-featured, Node.js based)
+ OpenClaw,
+ /// PicoClaw (lightweight, Go binary)
+ PicoClaw,
+}
+
+impl Default for RemoteAccessBackend {
+ fn default() -> Self {
+ Self::PicoClaw // Default to lightweight option
+ }
+}
+
+/// Unified remote access status
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct RemoteAccessStatus {
+ /// Which backend is active
+ pub backend: RemoteAccessBackend,
+ /// Whether the backend is installed
+ pub installed: bool,
+ /// Whether the gateway is running
+ pub running: bool,
+ /// Version string
+ pub version: Option<String>,
+ /// Connected channels
+ pub channels: Vec<String>,
+ /// Error message (if any)
+ pub error: Option<String>,
+}
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index e29697c96..0674ef7ba 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -1,4 +1,8 @@
-mod core;
+pub mod core;
+pub mod openclaw_cli;
+pub use core::openclaw::OpenClawState;
+pub use core::picoclaw::PicoClawState;
+
use core::{
app::commands::get_jan_data_folder_path,
downloads::models::DownloadManagerState,
@@ -128,6 +132,92 @@ pub fn run() {
// Custom updater commands (desktop only)
core::updater::commands::check_for_app_updates,
core::updater::commands::is_update_available,
+ // OpenClaw commands
+ core::openclaw::commands::openclaw_check_dependencies,
+ core::openclaw::commands::openclaw_check_port,
+ core::openclaw::commands::openclaw_install,
+ core::openclaw::commands::openclaw_configure,
+ core::openclaw::commands::openclaw_get_config,
+ core::openclaw::commands::openclaw_sync_model,
+ core::openclaw::commands::openclaw_get_model,
+ core::openclaw::commands::openclaw_list_channels,
+ core::openclaw::commands::openclaw_channel_status,
+ core::openclaw::commands::openclaw_start,
+ core::openclaw::commands::openclaw_stop,
+ core::openclaw::commands::openclaw_status,
+ core::openclaw::commands::openclaw_restart,
+ core::openclaw::commands::openclaw_get_config_dir,
+ // Telegram commands
+ core::openclaw::commands::telegram_validate_token,
+ core::openclaw::commands::telegram_configure,
+ core::openclaw::commands::telegram_get_config,
+ core::openclaw::commands::telegram_check_pairing,
+ core::openclaw::commands::telegram_disconnect,
+ // WhatsApp commands
+ core::openclaw::commands::whatsapp_validate_connection,
+ core::openclaw::commands::whatsapp_start_auth,
+ core::openclaw::commands::whatsapp_get_qr_code,
+ core::openclaw::commands::whatsapp_check_auth,
+ core::openclaw::commands::whatsapp_get_config,
+ core::openclaw::commands::whatsapp_get_contacts,
+ core::openclaw::commands::whatsapp_disconnect,
+ // Discord commands
+ core::openclaw::commands::discord_validate_token,
+ core::openclaw::commands::discord_configure,
+ core::openclaw::commands::discord_get_config,
+ core::openclaw::commands::discord_disconnect,
+ // Tailscale commands
+ core::openclaw::commands::tailscale_detect,
+ core::openclaw::commands::tailscale_get_status,
+ core::openclaw::commands::tailscale_configure_serve,
+ core::openclaw::commands::tailscale_remove_serve,
+ core::openclaw::commands::tailscale_enable_funnel,
+ core::openclaw::commands::tailscale_disable_funnel,
+ core::openclaw::commands::tailscale_get_url,
+ // Security commands
+ core::openclaw::commands::security_get_status,
+ core::openclaw::commands::security_set_auth_mode,
+ core::openclaw::commands::security_generate_token,
+ core::openclaw::commands::security_set_password,
+ core::openclaw::commands::security_verify_token,
+ core::openclaw::commands::security_set_require_pairing,
+ core::openclaw::commands::security_get_devices,
+ core::openclaw::commands::security_approve_device,
+ core::openclaw::commands::security_revoke_device,
+ core::openclaw::commands::security_get_logs,
+ core::openclaw::commands::security_clear_logs,
+ core::openclaw::commands::security_generate_pairing_code,
+ // Tunnel commands
+ core::openclaw::commands::tunnel_get_providers,
+ core::openclaw::commands::tunnel_detect_all,
+ core::openclaw::commands::tunnel_set_provider,
+ core::openclaw::commands::tunnel_start,
+ core::openclaw::commands::tunnel_stop,
+ core::openclaw::commands::tunnel_get_active,
+ core::openclaw::commands::tunnel_set_ngrok_token,
+ core::openclaw::commands::tunnel_set_cloudflare_tunnel,
+ core::openclaw::commands::tunnel_get_config,
+ core::openclaw::commands::tunnel_start_ngrok,
+ core::openclaw::commands::tunnel_stop_ngrok,
+ core::openclaw::commands::tunnel_start_cloudflared,
+ core::openclaw::commands::tunnel_stop_cloudflared,
+ // PicoClaw commands
+ core::picoclaw::commands::picoclaw_detect,
+ core::picoclaw::commands::picoclaw_install,
+ core::picoclaw::commands::picoclaw_configure,
+ core::picoclaw::commands::picoclaw_start,
+ core::picoclaw::commands::picoclaw_stop,
+ core::picoclaw::commands::picoclaw_status,
+ core::picoclaw::commands::picoclaw_enable,
+ core::picoclaw::commands::picoclaw_check_port,
+ core::picoclaw::commands::picoclaw_get_config,
+ core::picoclaw::commands::picoclaw_get_config_dir,
+ // PicoClaw Telegram commands
+ core::picoclaw::commands::picoclaw_telegram_configure,
+ core::picoclaw::commands::picoclaw_telegram_get_config,
+ // PicoClaw Discord commands
+ core::picoclaw::commands::picoclaw_discord_configure,
+ core::picoclaw::commands::picoclaw_discord_get_config,
]);
// Mobile: no updater commands
@@ -222,6 +312,8 @@ pub fn run() {
mcp_server_pids: Arc::new(Mutex::new(HashMap::new())),
provider_configs: Arc::new(Mutex::new(HashMap::new())),
})
+ .manage(OpenClawState::default())
+ .manage(PicoClawState::default())
.setup(|app| {
app.handle().plugin(
tauri_plugin_log::Builder::default()
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 79affabe8..fef3378ed 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -1,7 +1,221 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
+use app_lib::openclaw_cli::{get_openclaw_cli_args, OpenClawCli, OpenClawCommands};
+use std::process::exit;
+
fn main() {
let _ = fix_path_env::fix();
+
+ // Check if we're in CLI mode with openclaw subcommand
+ if let Some(cli) = get_openclaw_cli_args() {
+ // Run CLI command and exit
+ run_openclaw_cli(cli);
+ exit(0);
+ }
+
+ // Normal Tauri app startup
app_lib::run();
}
+
+/// Execute OpenClaw CLI commands
+fn run_openclaw_cli(cli: OpenClawCli) {
+ use tokio::runtime::Runtime;
+
+ let rt = Runtime::new().expect("Failed to create runtime");
+
+ match cli.command {
+ OpenClawCommands::Status => {
+ // Use standalone status check that doesn't require Tauri State
+ let status = rt.block_on(async {
+ app_lib::core::openclaw::cli::get_status().await
+ });
+
+ match status {
+ Ok(status) => {
+ println!("OpenClaw Status:");
+ println!(" Installed: {}", if status.installed { "Yes" } else { "No" });
+ println!(" Running: {}", if status.running { "Yes" } else { "No" });
+ println!(" OpenClaw Version: {}", status.openclaw_version.clone().unwrap_or_else(|| "N/A".to_string()));
+ println!(" Node.js Version: {}", status.node_version.clone().unwrap_or_else(|| "N/A".to_string()));
+ println!(" Port (18789): {}", if status.port_available { "Available" } else { "In Use" });
+
+ if let Some(err) = status.error {
+ println!(" Error: {}", err);
+ }
+ }
+ Err(e) => {
+ eprintln!("Failed to get status: {}", e);
+ exit(1);
+ }
+ }
+ }
+
+ OpenClawCommands::Start => {
+ let result = rt.block_on(async {
+ app_lib::core::openclaw::cli::start_gateway().await
+ });
+
+ match result {
+ Ok(_) => println!("OpenClaw gateway started successfully on port 18789"),
+ Err(e) => {
+ eprintln!("Failed to start OpenClaw: {}", e);
+ exit(1);
+ }
+ }
+ }
+
+ OpenClawCommands::Stop => {
+ let result = rt.block_on(async {
+ app_lib::core::openclaw::cli::stop_gateway().await
+ });
+
+ match result {
+ Ok(_) => println!("OpenClaw gateway stopped successfully"),
+ Err(e) => {
+ eprintln!("Failed to stop OpenClaw: {}", e);
+ exit(1);
+ }
+ }
+ }
+
+ OpenClawCommands::Logs { lines } => {
+ // Read logs from the OpenClaw config directory
+ if let Ok(config_dir) = app_lib::core::openclaw::get_openclaw_config_dir() {
+ let log_path = config_dir.join("logs");
+ if log_path.exists() {
+ if let Ok(entries) = std::fs::read_dir(&log_path) {
+ let mut log_files: Vec<_> = entries
+ .filter_map(|e| e.ok())
+ .filter(|e| e.path().extension().map_or(false, |ext| ext == "log"))
+ .collect();
+
+ // Sort by modified time - get the most recent
+ log_files.sort_by(|a, b| {
+ let a_time = a.metadata().and_then(|m| m.modified()).ok();
+ let b_time = b.metadata().and_then(|m| m.modified()).ok();
+ b_time.cmp(&a_time)
+ });
+
+ if let Some(latest_log) = log_files.first() {
+ if let Ok(content) = std::fs::read_to_string(latest_log.path()) {
+ let lines_vec: Vec<&str> = content.lines().collect();
+ let start = if lines_vec.len() > lines {
+ lines_vec.len() - lines
+ } else {
+ 0
+ };
+ for line in &lines_vec[start..] {
+ println!("{}", line);
+ }
+ return;
+ }
+ }
+ }
+ }
+ // Also try to find logs in data directory
+ let data_log_path = dirs::data_dir()
+ .map(|p| p.join("openclaw").join("logs"))
+ .unwrap_or_default();
+ if data_log_path.exists() {
+ if let Ok(entries) = std::fs::read_dir(&data_log_path) {
+ let mut log_files: Vec<_> = entries
+ .filter_map(|e| e.ok())
+ .filter(|e| e.path().extension().map_or(false, |ext| ext == "log"))
+ .collect();
+
+ log_files.sort_by(|a, b| {
+ let a_time = a.metadata().and_then(|m| m.modified()).ok();
+ let b_time = b.metadata().and_then(|m| m.modified()).ok();
+ b_time.cmp(&a_time)
+ });
+
+ if let Some(latest_log) = log_files.first() {
+ if let Ok(content) = std::fs::read_to_string(latest_log.path()) {
+ let lines_vec: Vec<&str> = content.lines().collect();
+ let start = if lines_vec.len() > lines {
+ lines_vec.len() - lines
+ } else {
+ 0
+ };
+ for line in &lines_vec[start..] {
+ println!("{}", line);
+ }
+ return;
+ }
+ }
+ }
+ }
+ }
+ println!("No logs found. Make sure OpenClaw has been started at least once.");
+ }
+
+ OpenClawCommands::Install => {
+ println!("Installing OpenClaw...");
+
+ let result = rt.block_on(async {
+ app_lib::core::openclaw::commands::openclaw_install().await
+ });
+
+ match result {
+ Ok(install_result) => {
+ if install_result.success {
+ println!("OpenClaw installed successfully!");
+ if let Some(version) = install_result.version {
+ println!(" Version: {}", version);
+ }
+ } else {
+ eprintln!("Installation failed: {}", install_result.error.unwrap_or_else(|| "Unknown error".to_string()));
+ exit(1);
+ }
+ }
+ Err(e) => {
+ eprintln!("Installation error: {}", e);
+ exit(1);
+ }
+ }
+ }
+
+ OpenClawCommands::Configure { port, bind, jan_base_url, model_id, system_prompt } => {
+ let config_input = app_lib::core::openclaw::models::OpenClawConfigInput {
+ port,
+ bind,
+ jan_base_url,
+ model_id,
+ system_prompt,
+ };
+
+ let result = rt.block_on(async {
+ app_lib::core::openclaw::commands::openclaw_configure(Some(config_input)).await
+ });
+
+ match result {
+ Ok(config) => {
+ println!("OpenClaw configured successfully!");
+ println!(" Gateway Port: {}", config.gateway.port);
+ println!(" Gateway Bind: {}", config.gateway.bind);
+ println!(" Jan Base URL: {}", config.models.providers.jan.base_url);
+ println!(" Model ID: {}", config.agents.defaults.model.primary);
+ }
+ Err(e) => {
+ eprintln!("Configuration failed: {}", e);
+ exit(1);
+ }
+ }
+ }
+
+ OpenClawCommands::Restart => {
+ let result = rt.block_on(async {
+ app_lib::core::openclaw::cli::restart_gateway().await
+ });
+
+ match result {
+ Ok(_) => println!("OpenClaw gateway restarted successfully"),
+ Err(e) => {
+ eprintln!("Failed to restart OpenClaw: {}", e);
+ exit(1);
+ }
+ }
+ }
+ }
+}
diff --git a/src-tauri/src/openclaw_cli.rs b/src-tauri/src/openclaw_cli.rs
new file mode 100644
index 000000000..340d3fa5f
--- /dev/null
+++ b/src-tauri/src/openclaw_cli.rs
@@ -0,0 +1,68 @@
+use clap::{Parser, Subcommand};
+use std::process::exit;
+
+/// OpenClaw CLI commands
+#[derive(Parser)]
+#[command(name = "openclaw")]
+#[command(about = "Manage OpenClaw gateway", long_about = None)]
+pub struct OpenClawCli {
+ #[command(subcommand)]
+ pub command: OpenClawCommands,
+}
+
+#[derive(Subcommand)]
+pub enum OpenClawCommands {
+ /// Show OpenClaw status (running/stopped, version, port)
+ Status,
+ /// Start the OpenClaw gateway
+ Start,
+ /// Stop the OpenClaw gateway
+ Stop,
+ /// View recent logs from OpenClaw
+ Logs {
+ /// Number of lines to show (default: 50)
+ #[arg(short, long, default_value = "50")]
+ lines: usize,
+ },
+ /// Install OpenClaw (if not installed)
+ Install,
+ /// Configure OpenClaw settings
+ Configure {
+ /// Port number for the gateway
+ #[arg(long)]
+ port: Option<u16>,
+ /// Bind address
+ #[arg(long)]
+ bind: Option<String>,
+ /// Jan base URL
+ #[arg(long)]
+ jan_base_url: Option<String>,
+ /// Model ID to use
+ #[arg(long)]
+ model_id: Option<String>,
+ /// System prompt for agents
+ #[arg(long)]
+ system_prompt: Option<String>,
+ },
+ /// Restart the OpenClaw gateway
+ Restart,
+}
+
+/// Check if we're in CLI mode with openclaw subcommand
+pub fn get_openclaw_cli_args() -> Option<OpenClawCli> {
+ let args: Vec<String> = std::env::args().collect();
+
+ // Check if we have at least 2 arguments and second is "openclaw"
+ if args.len() >= 2 && args[1] == "openclaw" {
+ // Parse just the openclaw subcommand
+ match OpenClawCli::try_parse_from(&args[1..]) {
+ Ok(cli) => Some(cli),
+ Err(e) => {
+ eprintln!("Error parsing CLI arguments: {}", e);
+ exit(1);
+ }
+ }
+ } else {
+ None
+ }
+}
\ No newline at end of file
diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json
index fd24e2e4f..a512345a6 100644
--- a/src-tauri/tauri.macos.conf.json
+++ b/src-tauri/tauri.macos.conf.json
@@ -30,7 +30,7 @@
},
"bundle": {
"targets": ["app", "dmg"],
- "resources": ["resources/pre-install/**/*", "resources/LICENSE", "resources/bin/mlx-server", "resources/bin/mlx-swift_Cmlx.bundle"],
+ "resources": ["resources/pre-install/**/*", "resources/LICENSE"],
"externalBin": ["resources/bin/bun", "resources/bin/uv"],
"macOS": {
"entitlements": "./Entitlements.plist"
diff --git a/web-app/src/constants/routes.ts b/web-app/src/constants/routes.ts
index 7df00aee5..b039db3a4 100644
--- a/web-app/src/constants/routes.ts
+++ b/web-app/src/constants/routes.ts
@@ -19,6 +19,7 @@ export const route = {
https_proxy: '/settings/https-proxy',
hardware: '/settings/hardware',
assistant: '/settings/assistant',
+ remote_access: '/settings/remote-access',
},
hub: {
index: '/hub/',
diff --git a/web-app/src/containers/ChannelCard.tsx b/web-app/src/containers/ChannelCard.tsx
new file mode 100644
index 000000000..9e45b4fa9
--- /dev/null
+++ b/web-app/src/containers/ChannelCard.tsx
@@ -0,0 +1,265 @@
+import { useState } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { Button } from '@/components/ui/button'
+import {
+ IconBrandTelegram,
+ IconBrandWhatsapp,
+ IconBrandDiscord,
+ IconSettings,
+ IconTrash,
+ IconChevronDown,
+ IconChevronUp,
+ IconMessage,
+ IconClock,
+} from '@tabler/icons-react'
+
+export type ChannelType = 'telegram' | 'whatsapp' | 'discord'
+
+// Channel configuration interfaces
+export interface TelegramConfig {
+ bot_token: string
+ bot_username: string | null
+ connected: boolean
+ pairing_code: string | null
+ paired_users: number
+}
+
+export interface WhatsAppConfig {
+ account_id: string
+ session_path: string
+ connected: boolean
+ phone_number: string | null
+ qr_code: string | null
+ contacts_count: number
+}
+
+export interface DiscordConfig {
+ account_id: string
+ bot_token: string
+ bot_username: string | null
+ bot_discriminator: string | null
+ connected: boolean
+ guilds_count: number
+ channels_count: number
+}
+
+// Union type for all channel configs
+export type ChannelConfig = TelegramConfig | WhatsAppConfig | DiscordConfig
+
+interface MessagePreview {
+ id: string
+ sender: string
+ content: string
+ timestamp: Date
+}
+
+interface ChannelCardProps {
+ type: ChannelType
+ config: ChannelConfig | null
+ onSettings: () => void
+ onDisconnect: () => void
+ recentMessages?: MessagePreview[]
+}
+
+export function ChannelCard({
+ type,
+ config,
+ onSettings,
+ onDisconnect,
+ recentMessages = [],
+}: ChannelCardProps) {
+ const { t } = useTranslation()
+ const [isExpanded, setIsExpanded] = useState(false)
+
+ const isConnected = config?.connected ?? false
+
+ const getChannelIcon = () => {
+ switch (type) {
+ case 'telegram':
+ return <IconBrandTelegram size={24} className="text-blue-500" />
+ case 'whatsapp':
+ return <IconBrandWhatsapp size={24} className="text-green-500" />
+ case 'discord':
+ return <IconBrandDiscord size={24} className="text-indigo-500" />
+ }
+ }
+
+ const getChannelName = (): string => {
+ switch (type) {
+ case 'telegram':
+ return t('settings:remoteAccess.telegram')
+ case 'whatsapp':
+ return t('settings:remoteAccess.whatsapp')
+ case 'discord':
+ return t('settings:remoteAccess.discord')
+ }
+ }
+
+ const getChannelDetails = (): string => {
+ if (!config || !isConnected) return ''
+
+ switch (type) {
+ case 'telegram': {
+ const tg = config as TelegramConfig
+ return tg.bot_username ? `@${tg.bot_username}` : ''
+ }
+ case 'whatsapp': {
+ const wa = config as WhatsAppConfig
+ return wa.phone_number || ''
+ }
+ case 'discord': {
+ const dc = config as DiscordConfig
+ return dc.bot_username ? `${dc.bot_username}#${dc.bot_discriminator || ''}` : ''
+ }
+ default:
+ return ''
+ }
+ }
+
+ const getConnectedUsers = (): number => {
+ if (!config || !isConnected) return 0
+
+ switch (type) {
+ case 'telegram':
+ return (config as TelegramConfig).paired_users
+ case 'whatsapp':
+ return (config as WhatsAppConfig).contacts_count
+ case 'discord':
+ return (config as DiscordConfig).guilds_count
+ default:
+ return 0
+ }
+ }
+
+ const formatTimeAgo = (date: Date): string => {
+ const minutes = Math.floor((Date.now() - date.getTime()) / 60000)
+ if (minutes < 1) return t('settings:remoteAccess.justNow')
+ if (minutes === 1) return `1 ${t('settings:remoteAccess.minuteAgo')}`
+ if (minutes < 60)
+ return `${minutes} ${t('settings:remoteAccess.minutesAgo')}`
+ const hours = Math.floor(minutes / 60)
+ if (hours === 1) return `1 ${t('settings:remoteAccess.hourAgo')}`
+ return `${hours} ${t('settings:remoteAccess.hoursAgo')}`
+ }
+
+ return (
+ <div
+ className={`border rounded-lg overflow-hidden transition-all ${
+ isConnected
+ ? 'border-green-500/30 bg-green-500/5'
+ : 'border-border bg-card'
+ }`}
+ >
+ {/* Header */}
+ <div className="flex items-center justify-between p-4">
+ <div className="flex items-center gap-3">
+ <div className="flex-shrink-0">{getChannelIcon()}</div>
+ <div>
+ <div className="flex items-center gap-2">
+ <span className="font-medium text-foreground">
+ {getChannelName()}
+ </span>
+ <div
+ className={`w-2 h-2 rounded-full ${
+ isConnected ? 'bg-green-500' : 'bg-muted-foreground'
+ }`}
+ />
+ <span
+ className={`text-xs ${
+ isConnected ? 'text-green-500' : 'text-muted-foreground'
+ }`}
+ >
+ {isConnected
+ ? t('settings:remoteAccess.connected')
+ : t('settings:remoteAccess.notConnected')}
+ </span>
+ </div>
+ {isConnected && getChannelDetails() && (
+ <p className="text-sm text-muted-foreground">
+ {getChannelDetails()}
+ </p>
+ )}
+ </div>
+ </div>
+
+ <div className="flex items-center gap-2">
+ {isConnected && (
+ <div className="flex items-center gap-1 text-sm text-muted-foreground mr-2">
+ <IconMessage size={14} />
+ <span>
+ {getConnectedUsers()}{' '}
+ {t('settings:remoteAccess.users', { count: getConnectedUsers() })}
+ </span>
+ </div>
+ )}
+ {recentMessages.length > 0 && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => setIsExpanded(!isExpanded)}
+ className="gap-1"
+ >
+ {isExpanded ? (
+ <IconChevronUp size={16} />
+ ) : (
+ <IconChevronDown size={16} />
+ )}
+ </Button>
+ )}
+ <Button variant="outline" size="sm" onClick={onSettings}>
+ <IconSettings size={16} className="mr-1" />
+ {t('settings:remoteAccess.settings')}
+ </Button>
+ {isConnected && (
+ <Button variant="ghost" size="sm" onClick={onDisconnect}>
+ <IconTrash size={16} />
+ </Button>
+ )}
+ </div>
+ </div>
+
+ {/* Expanded Message History */}
+ {isExpanded && recentMessages.length > 0 && (
+ <div className="border-t border-border/40 p-4 bg-background/50">
+ <h4 className="text-sm font-medium text-foreground mb-3">
+ {t('settings:remoteAccess.recentMessages')}
+ </h4>
+ <div className="space-y-2">
+ {recentMessages.map((message) => (
+ <div
+ key={message.id}
+ className="flex items-start gap-3 p-2 rounded hover:bg-secondary/50 transition-colors"
+ >
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2">
+ <span className="text-sm font-medium text-foreground">
+ {message.sender}
+ </span>
+ <span className="text-xs text-muted-foreground flex items-center gap-1">
+ <IconClock size={12} />
+ {formatTimeAgo(message.timestamp)}
+ </span>
+ </div>
+ <p className="text-sm text-muted-foreground truncate">
+ {message.content}
+ </p>
+ </div>
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {/* Not Connected State */}
+ {!isConnected && (
+ <div className="border-t border-border/40 px-4 py-3 bg-muted/30">
+ <p className="text-sm text-muted-foreground">
+ {t('settings:remoteAccess.channelNotConnected', {
+ channel: getChannelName(),
+ })}
+ </p>
+ </div>
+ )}
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/containers/DropdownModelProvider.tsx b/web-app/src/containers/DropdownModelProvider.tsx
index d34c7906f..fa10be67b 100644
--- a/web-app/src/containers/DropdownModelProvider.tsx
+++ b/web-app/src/containers/DropdownModelProvider.tsx
@@ -23,6 +23,7 @@ import { useFavoriteModel } from '@/hooks/useFavoriteModel'
import { predefinedProviders } from '@/constants/providers'
import { useServiceHub } from '@/hooks/useServiceHub'
import { getLastUsedModel } from '@/utils/getModelToStart'
+import { syncModelToOpenClaw } from '@/utils/openclaw'
import { ChevronsUpDown } from 'lucide-react'
type DropdownModelProviderProps = {
@@ -415,6 +416,19 @@ const DropdownModelProvider = memo(function DropdownModelProvider({
searchableModel.model.id
)
+ // Sync model to OpenClaw (async, don't block UI)
+ syncModelToOpenClaw(
+ searchableModel.model.id,
+ searchableModel.provider.provider,
+ getModelDisplayName(searchableModel.model)
+ ).catch((error) => {
+ console.debug(
+ 'Error syncing model to OpenClaw:',
+ searchableModel.model.id,
+ error
+ )
+ })
+
// Check mmproj existence for llamacpp models (async, don't block UI)
if (searchableModel.provider.provider === 'llamacpp') {
serviceHub
diff --git a/web-app/src/containers/SettingsMenu.tsx b/web-app/src/containers/SettingsMenu.tsx
index dca7ef73e..fdd177eb4 100644
--- a/web-app/src/containers/SettingsMenu.tsx
+++ b/web-app/src/containers/SettingsMenu.tsx
@@ -114,6 +114,12 @@ const SettingsMenu = () => {
hasSubMenu: false,
isEnabled: true,
},
+ {
+ title: 'common:remote_access',
+ route: route.settings.remote_access,
+ hasSubMenu: false,
+ isEnabled: true,
+ },
{
title: 'common:https_proxy',
route: route.settings.https_proxy,
diff --git a/web-app/src/containers/dialogs/AddChannelDialog.tsx b/web-app/src/containers/dialogs/AddChannelDialog.tsx
new file mode 100644
index 000000000..c96829fd7
--- /dev/null
+++ b/web-app/src/containers/dialogs/AddChannelDialog.tsx
@@ -0,0 +1,168 @@
+import { useState, useEffect } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import {
+ IconBrandTelegram,
+ IconBrandWhatsapp,
+ IconBrandDiscord,
+ IconArrowRight,
+} from '@tabler/icons-react'
+
+export type ChannelType = 'telegram' | 'whatsapp' | 'discord'
+
+interface AddChannelDialogProps {
+ isOpen: boolean
+ onOpenChange: (open: boolean) => void
+ onSelectChannel: (channel: ChannelType) => void
+ connectedChannels: ChannelType[]
+}
+
+interface ChannelOption {
+ id: ChannelType
+ name: string
+ icon: React.ReactNode
+ description: string
+}
+
+export function AddChannelDialog({
+ isOpen,
+ onOpenChange,
+ onSelectChannel,
+ connectedChannels,
+}: AddChannelDialogProps) {
+ const { t } = useTranslation()
+ const [selectedChannel, setSelectedChannel] = useState<ChannelType | null>(null)
+
+ useEffect(() => {
+ if (!isOpen) {
+ setSelectedChannel(null)
+ }
+ }, [isOpen])
+
+ const channelOptions: ChannelOption[] = [
+ {
+ id: 'telegram',
+ name: t('settings:remoteAccess.telegram'),
+ icon: <IconBrandTelegram size={32} className="text-blue-500" />,
+ description: t('settings:remoteAccess.channelDescriptions.telegram'),
+ },
+ {
+ id: 'whatsapp',
+ name: t('settings:remoteAccess.whatsapp'),
+ icon: <IconBrandWhatsapp size={32} className="text-green-500" />,
+ description: t('settings:remoteAccess.channelDescriptions.whatsapp'),
+ },
+ {
+ id: 'discord',
+ name: t('settings:remoteAccess.discord'),
+ icon: <IconBrandDiscord size={32} className="text-indigo-500" />,
+ description: t('settings:remoteAccess.channelDescriptions.discord'),
+ },
+ ]
+
+ const handleChannelSelect = (channel: ChannelType) => {
+ setSelectedChannel(channel)
+ }
+
+ const handleContinue = () => {
+ if (selectedChannel) {
+ onSelectChannel(selectedChannel)
+ onOpenChange(false)
+ }
+ }
+
+ const handleOpenWizard = (channel: ChannelType) => {
+ onSelectChannel(channel)
+ onOpenChange(false)
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-[480px] max-w-[90vw]">
+ <DialogHeader>
+ <DialogTitle>{t('settings:remoteAccess.addChannel.title')}</DialogTitle>
+ <DialogDescription>
+ {t('settings:remoteAccess.addChannel.description')}
+ </DialogDescription>
+ </DialogHeader>
+
+ <div className="space-y-3 py-4">
+ {channelOptions.map((channel) => {
+ const isConnected = connectedChannels.includes(channel.id)
+ return (
+ <div
+ key={channel.id}
+ className={`relative flex items-center gap-4 p-4 rounded-lg border transition-all cursor-pointer ${
+ selectedChannel === channel.id
+ ? 'border-primary bg-primary/5'
+ : 'border-border hover:border-border hover:bg-secondary/50'
+ }`}
+ onClick={() => handleChannelSelect(channel.id)}
+ >
+ <div className="flex-shrink-0">{channel.icon}</div>
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2">
+ <span className="font-medium text-foreground">{channel.name}</span>
+ {isConnected && (
+ <span className="text-xs px-2 py-0.5 rounded-full bg-green-500/20 text-green-500">
+ {t('settings:remoteAccess.connected')}
+ </span>
+ )}
+ </div>
+ <p className="text-sm text-muted-foreground truncate">
+ {channel.description}
+ </p>
+ </div>
+ {isConnected ? (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={(e) => {
+ e.stopPropagation()
+ handleOpenWizard(channel.id)
+ }}
+ >
+ {t('settings:remoteAccess.manage')}
+ </Button>
+ ) : (
+ <div
+ className={`w-5 h-5 rounded-full border-2 flex items-center justify-center ${
+ selectedChannel === channel.id
+ ? 'border-primary bg-primary'
+ : 'border-muted-foreground'
+ }`}
+ >
+ {selectedChannel === channel.id && (
+ <div className="w-2 h-2 rounded-full bg-primary-foreground" />
+ )}
+ </div>
+ )}
+ </div>
+ )
+ })}
+ </div>
+
+ <div className="flex justify-end gap-2 pt-2">
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ {t('settings:remoteAccess.addChannel.cancel')}
+ </Button>
+ <Button
+ onClick={handleContinue}
+ disabled={!selectedChannel}
+ className="gap-2"
+ >
+ {t('settings:remoteAccess.addChannel.continue')}
+ <IconArrowRight size={16} />
+ </Button>
+ </div>
+ </DialogContent>
+ </Dialog>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/containers/dialogs/DiscordWizardDialog.tsx b/web-app/src/containers/dialogs/DiscordWizardDialog.tsx
new file mode 100644
index 000000000..f30b09566
--- /dev/null
+++ b/web-app/src/containers/dialogs/DiscordWizardDialog.tsx
@@ -0,0 +1,428 @@
+import { useState, useEffect } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ IconBrandDiscord,
+ IconCheck,
+ IconArrowRight,
+ IconArrowLeft,
+ IconLoader2,
+ IconAlertCircle,
+} from '@tabler/icons-react'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import { Input } from '@/components/ui/input'
+
+// Types mirroring Rust backend
+interface DiscordTokenValidation {
+ valid: boolean
+ bot_username: string | null
+ bot_discriminator: string | null
+ error: string | null
+}
+
+export interface DiscordConfig {
+ account_id: string
+ bot_token: string
+ bot_username: string | null
+ bot_discriminator: string | null
+ connected: boolean
+ guilds_count: number
+ channels_count: number
+}
+
+interface DiscordWizardDialogProps {
+ isOpen: boolean
+ onOpenChange: (open: boolean) => void
+ onConnected?: (config: DiscordConfig) => void
+}
+
+type WizardStep = 'instructions' | 'token' | 'configure' | 'success'
+
+const TOTAL_STEPS = 4
+
+export function DiscordWizardDialog({
+ isOpen,
+ onOpenChange,
+}: DiscordWizardDialogProps) {
+ const { t } = useTranslation()
+ const [step, setStep] = useState<WizardStep>('instructions')
+ const [token, setToken] = useState('')
+ const [validation, setValidation] = useState<DiscordTokenValidation | null>(null)
+ const [isValidating, setIsValidating] = useState(false)
+ const [isConfiguring, setIsConfiguring] = useState(false)
+ const [config, setConfig] = useState<DiscordConfig | null>(null)
+
+ // Reset state when dialog closes
+ useEffect(() => {
+ if (!isOpen) {
+ setStep('instructions')
+ setToken('')
+ setValidation(null)
+ setConfig(null)
+ }
+ }, [isOpen])
+
+ const getStepNumber = (): number => {
+ const stepMap: Record<WizardStep, number> = {
+ instructions: 1,
+ token: 2,
+ configure: 3,
+ success: 4,
+ }
+ return stepMap[step]
+ }
+
+ const handleValidateToken = async () => {
+ if (!token.trim()) {
+ toast.error(t('settings:remoteAccess.discordWizard.errors.tokenRequired'))
+ return
+ }
+
+ setIsValidating(true)
+ try {
+ const result = await invoke<DiscordTokenValidation>('discord_validate_token', {
+ token: token.trim(),
+ })
+ setValidation(result)
+ if (result.valid) {
+ toast.success(
+ t('settings:remoteAccess.discordWizard.step2.validToken', {
+ username: result.bot_username,
+ })
+ )
+ } else {
+ toast.error(
+ result.error || t('settings:remoteAccess.discordWizard.step2.invalidToken')
+ )
+ }
+ } catch (error) {
+ console.error('Token validation error:', error)
+ toast.error(t('settings:remoteAccess.discordWizard.errors.networkError'))
+ } finally {
+ setIsValidating(false)
+ }
+ }
+
+ const handleConfigure = async () => {
+ if (!validation?.valid) return
+
+ setIsConfiguring(true)
+ try {
+ const result = await invoke<DiscordConfig>('discord_configure', {
+ token: token.trim(),
+ })
+ setConfig(result)
+ setStep('success')
+ toast.success(t('settings:remoteAccess.discordWizard.step3.success'))
+ } catch (error) {
+ console.error('Configure error:', error)
+ toast.error(
+ t('settings:remoteAccess.discordWizard.step3.error', {
+ error: error instanceof Error ? error.message : String(error),
+ })
+ )
+ } finally {
+ setIsConfiguring(false)
+ }
+ }
+
+ const handleDisconnect = async () => {
+ try {
+ await invoke('discord_disconnect')
+ setConfig(null)
+ setToken('')
+ setValidation(null)
+ setStep('instructions')
+ toast.success(t('settings:remoteAccess.discordWizard.status.notConnected'))
+ } catch (error) {
+ console.error('Disconnect error:', error)
+ }
+ }
+
+ const renderStepIndicator = () => {
+ const currentStep = getStepNumber()
+ return (
+ <div className="flex items-center justify-center gap-2 mb-6">
+ {Array.from({ length: TOTAL_STEPS }, (_, i) => (
+ <div
+ key={i}
+ className={`flex items-center justify-center w-8 h-8 rounded-full text-sm font-medium ${
+ i + 1 < currentStep
+ ? 'bg-green-500 text-white'
+ : i + 1 === currentStep
+ ? 'bg-primary text-primary-foreground'
+ : 'bg-secondary text-muted-foreground'
+ }`}
+ >
+ {i + 1 < currentStep ? (
+ <IconCheck size={16} />
+ ) : (
+ i + 1
+ )}
+ </div>
+ ))}
+ </div>
+ )
+ }
+
+ const renderInstructionsStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.discordWizard.description')}
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 space-y-3">
+ <h4 className="font-medium text-foreground">
+ {t('settings:remoteAccess.discordWizard.step1.title')}
+ </h4>
+ <ol className="list-decimal list-inside space-y-2 text-sm text-muted-foreground">
+ <li>{t('settings:remoteAccess.discordWizard.step1.instruction1')}</li>
+ <li>{t('settings:remoteAccess.discordWizard.step1.instruction2')}</li>
+ <li>{t('settings:remoteAccess.discordWizard.step1.instruction3')}</li>
+ <li>{t('settings:remoteAccess.discordWizard.step1.instruction4')}</li>
+ <li>{t('settings:remoteAccess.discordWizard.step1.instruction5')}</li>
+ </ol>
+ </div>
+
+ <div className="flex justify-center">
+ <Button
+ variant="outline"
+ onClick={() => window.open('https://discord.com/developers/applications', '_blank')}
+ className="gap-2"
+ >
+ <IconBrandDiscord size={18} />
+ Open Discord Developer Portal
+ </Button>
+ </div>
+ </div>
+ )
+
+ const renderTokenStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.discordWizard.step2.title')}
+ </DialogDescription>
+
+ <div className="space-y-2">
+ <Input
+ type="password"
+ value={token}
+ onChange={(e) => {
+ setToken(e.target.value)
+ setValidation(null)
+ }}
+ placeholder={t('settings:remoteAccess.discordWizard.step2.placeholder')}
+ className="font-mono"
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && !isValidating) {
+ handleValidateToken()
+ }
+ }}
+ />
+ </div>
+
+ {validation?.valid && (
+ <div className="flex items-center gap-2 text-green-500 text-sm">
+ <IconCheck size={16} />
+ <span>
+ {t('settings:remoteAccess.discordWizard.step2.validToken', {
+ username: validation.bot_username,
+ })}
+ </span>
+ </div>
+ )}
+
+ {validation && !validation.valid && (
+ <div className="flex items-center gap-2 text-red-500 text-sm">
+ <IconAlertCircle size={16} />
+ <span>{validation.error}</span>
+ </div>
+ )}
+
+ <Button
+ onClick={handleValidateToken}
+ disabled={isValidating || !token.trim()}
+ className="w-full"
+ >
+ {isValidating ? (
+ <>
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.discordWizard.step2.validating')}
+ </>
+ ) : (
+ t('settings:remoteAccess.discordWizard.step2.validate')
+ )}
+ </Button>
+ </div>
+ )
+
+ const renderConfigureStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.discordWizard.step3.title')}
+ </DialogDescription>
+
+ <div className="flex flex-col items-center justify-center py-8">
+ <IconBrandDiscord size={48} className="text-indigo-500 mb-4" />
+ <p className="text-muted-foreground">
+ {isConfiguring
+ ? t('settings:remoteAccess.discordWizard.step3.connecting')
+ : validation?.bot_username
+ ? validation.bot_username
+ : ''}
+ </p>
+ </div>
+
+ {isConfiguring && (
+ <div className="flex justify-center">
+ <IconLoader2 className="animate-spin h-8 w-8 text-primary" />
+ </div>
+ )}
+ </div>
+ )
+
+ const renderSuccessStep = () => (
+ <div className="space-y-4">
+ <div className="flex flex-col items-center justify-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mb-4">
+ <IconCheck size={32} className="text-green-500" />
+ </div>
+ <DialogTitle className="text-center">
+ {t('settings:remoteAccess.discordWizard.step4.success')}
+ </DialogTitle>
+ </div>
+
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.discordWizard.step4.instruction')}
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 text-center space-y-2">
+ {config?.bot_username && (
+ <p className="text-foreground">
+ {t('settings:remoteAccess.discordWizard.step4.botUsername', {
+ username: config.bot_username,
+ })}
+ </p>
+ )}
+ </div>
+
+ <Button variant="outline" onClick={handleDisconnect} className="w-full">
+ {t('settings:remoteAccess.discordWizard.buttons.disconnect')}
+ </Button>
+ </div>
+ )
+
+ const renderStep = () => {
+ switch (step) {
+ case 'instructions':
+ return renderInstructionsStep()
+ case 'token':
+ return renderTokenStep()
+ case 'configure':
+ return renderConfigureStep()
+ case 'success':
+ return renderSuccessStep()
+ default:
+ return null
+ }
+ }
+
+ const handleNext = () => {
+ switch (step) {
+ case 'instructions':
+ setStep('token')
+ break
+ case 'token':
+ if (validation?.valid) {
+ setStep('configure')
+ handleConfigure()
+ }
+ break
+ case 'configure':
+ // Handled by configure function
+ break
+ case 'success':
+ onOpenChange(false)
+ break
+ }
+ }
+
+ const handleBack = () => {
+ switch (step) {
+ case 'token':
+ setStep('instructions')
+ break
+ case 'configure':
+ setStep('token')
+ setValidation(null)
+ break
+ case 'success':
+ // Cannot go back from success
+ break
+ }
+ }
+
+ const canGoNext = (): boolean => {
+ switch (step) {
+ case 'instructions':
+ return true
+ case 'token':
+ return validation?.valid ?? false
+ case 'configure':
+ return false // Auto-progresses
+ case 'success':
+ return true
+ default:
+ return false
+ }
+ }
+
+ const canGoBack = (): boolean => {
+ return step !== 'instructions' && step !== 'success' && step !== 'configure'
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-[480px] max-w-[90vw]">
+ <DialogHeader>
+ <div className="flex items-center justify-center gap-2 mb-2">
+ <IconBrandDiscord size={24} className="text-indigo-500" />
+ <DialogTitle>{t('settings:remoteAccess.discordWizard.title')}</DialogTitle>
+ </div>
+ </DialogHeader>
+
+ {renderStepIndicator()}
+
+ {renderStep()}
+
+ {step !== 'configure' && step !== 'success' && (
+ <DialogFooter className="gap-2 sm:gap-0">
+ {canGoBack() && (
+ <Button variant="outline" onClick={handleBack} className="gap-1">
+ <IconArrowLeft size={16} />
+ {t('settings:remoteAccess.discordWizard.buttons.back')}
+ </Button>
+ )}
+ <Button
+ onClick={handleNext}
+ disabled={!canGoNext()}
+ className="gap-1"
+ >
+ {t('settings:remoteAccess.discordWizard.buttons.next')}
+ <IconArrowRight size={16} />
+ </Button>
+ </DialogFooter>
+ )}
+ </DialogContent>
+ </Dialog>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/containers/dialogs/SecurityConfigDialog.tsx b/web-app/src/containers/dialogs/SecurityConfigDialog.tsx
new file mode 100644
index 000000000..b2acab90a
--- /dev/null
+++ b/web-app/src/containers/dialogs/SecurityConfigDialog.tsx
@@ -0,0 +1,870 @@
+import { useState, useEffect, useCallback } from 'react'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+ DialogFooter,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import { Input } from '@/components/ui/input'
+import { Switch } from '@/components/ui/switch'
+import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'
+import { cn } from '@/lib/utils'
+import {
+ IconShield,
+ IconKey,
+ IconDevices,
+ IconHistory,
+ IconLoader2,
+ IconCopy,
+ IconCheck,
+ IconTrash,
+ IconRefresh,
+ IconAlertTriangle,
+ IconEye,
+ IconEyeOff,
+} from '@tabler/icons-react'
+
+// Types
+type AuthMode = 'token' | 'password' | 'none'
+
+interface SecurityStatus {
+ auth_mode: AuthMode
+ has_token: boolean
+ has_password: boolean
+ require_pairing: boolean
+ approved_device_count: number
+ recent_auth_failures: number
+}
+
+interface DeviceInfo {
+ id: string
+ name: string
+ channel: string
+ user_id: string
+ approved_at: string
+ last_access: string | null
+}
+
+interface AccessLogEntry {
+ timestamp: string
+ device_id: string | null
+ channel: string
+ user_id: string
+ action: string
+ ip_address: string | null
+ success: boolean
+ error: string | null
+}
+
+interface SecurityConfigDialogProps {
+ isOpen: boolean
+ onClose: () => void
+ onSave?: () => void
+}
+
+type TabType = 'auth' | 'devices' | 'logs'
+
+export function SecurityConfigDialog({
+ isOpen,
+ onClose,
+ onSave,
+}: SecurityConfigDialogProps) {
+ // Tab state
+ const [activeTab, setActiveTab] = useState<TabType>('auth')
+
+ // Security status state
+ const [status, setStatus] = useState<SecurityStatus | null>(null)
+ const [isLoadingStatus, setIsLoadingStatus] = useState(false)
+
+ // Auth settings state
+ const [authMode, setAuthMode] = useState<AuthMode>('none')
+ const [isChangingAuthMode, setIsChangingAuthMode] = useState(false)
+
+ // Token state
+ const [generatedToken, setGeneratedToken] = useState<string | null>(null)
+ const [isGeneratingToken, setIsGeneratingToken] = useState(false)
+ const [showToken, setShowToken] = useState(false)
+ const [tokenCopied, setTokenCopied] = useState(false)
+
+ // Password state
+ const [password, setPassword] = useState('')
+ const [confirmPassword, setConfirmPassword] = useState('')
+ const [isSettingPassword, setIsSettingPassword] = useState(false)
+ const [showPassword, setShowPassword] = useState(false)
+
+ // Device pairing state
+ const [requirePairing, setRequirePairing] = useState(false)
+ const [isTogglingPairing, setIsTogglingPairing] = useState(false)
+
+ // Devices state
+ const [devices, setDevices] = useState<DeviceInfo[]>([])
+ const [isLoadingDevices, setIsLoadingDevices] = useState(false)
+ const [revokingDeviceId, setRevokingDeviceId] = useState<string | null>(null)
+
+ // Logs state
+ const [logs, setLogs] = useState<AccessLogEntry[]>([])
+ const [isLoadingLogs, setIsLoadingLogs] = useState(false)
+ const [isClearingLogs, setIsClearingLogs] = useState(false)
+
+ // Confirm dialogs state
+ const [confirmAction, setConfirmAction] = useState<{
+ type: 'revoke' | 'clear_logs' | 'change_auth_mode' | null
+ data?: unknown
+ }>({ type: null })
+
+ // Fetch security status
+ const fetchStatus = useCallback(async () => {
+ setIsLoadingStatus(true)
+ try {
+ const result = await invoke<SecurityStatus>('security_get_status')
+ setStatus(result)
+ setAuthMode(result.auth_mode)
+ setRequirePairing(result.require_pairing)
+ } catch (error) {
+ console.error('Failed to fetch security status:', error)
+ toast.error('Failed to load security settings')
+ } finally {
+ setIsLoadingStatus(false)
+ }
+ }, [])
+
+ // Fetch devices
+ const fetchDevices = useCallback(async () => {
+ setIsLoadingDevices(true)
+ try {
+ const result = await invoke<DeviceInfo[]>('security_get_devices')
+ setDevices(result)
+ } catch (error) {
+ console.error('Failed to fetch devices:', error)
+ toast.error('Failed to load devices')
+ } finally {
+ setIsLoadingDevices(false)
+ }
+ }, [])
+
+ // Fetch logs
+ const fetchLogs = useCallback(async () => {
+ setIsLoadingLogs(true)
+ try {
+ const result = await invoke<AccessLogEntry[]>('security_get_logs', { limit: 100 })
+ setLogs(result)
+ } catch (error) {
+ console.error('Failed to fetch logs:', error)
+ toast.error('Failed to load access logs')
+ } finally {
+ setIsLoadingLogs(false)
+ }
+ }, [])
+
+ // Load data when dialog opens
+ useEffect(() => {
+ if (isOpen) {
+ fetchStatus()
+ setGeneratedToken(null)
+ setPassword('')
+ setConfirmPassword('')
+ setShowToken(false)
+ setShowPassword(false)
+ }
+ }, [isOpen, fetchStatus])
+
+ // Load tab-specific data
+ useEffect(() => {
+ if (isOpen && activeTab === 'devices') {
+ fetchDevices()
+ } else if (isOpen && activeTab === 'logs') {
+ fetchLogs()
+ }
+ }, [isOpen, activeTab, fetchDevices, fetchLogs])
+
+ // Handle auth mode change
+ const handleAuthModeChange = async (newMode: AuthMode) => {
+ if (newMode === authMode) return
+
+ // If changing away from current mode, confirm first
+ if (authMode !== 'none' && newMode !== authMode) {
+ setConfirmAction({ type: 'change_auth_mode', data: newMode })
+ return
+ }
+
+ await changeAuthMode(newMode)
+ }
+
+ const changeAuthMode = async (newMode: AuthMode) => {
+ setIsChangingAuthMode(true)
+ try {
+ await invoke('security_set_auth_mode', { mode: newMode })
+ setAuthMode(newMode)
+ setGeneratedToken(null)
+ await fetchStatus()
+ toast.success(`Authentication mode changed to ${newMode}`)
+ onSave?.()
+ } catch (error) {
+ console.error('Failed to change auth mode:', error)
+ toast.error('Failed to change authentication mode')
+ } finally {
+ setIsChangingAuthMode(false)
+ setConfirmAction({ type: null })
+ }
+ }
+
+ // Generate token
+ const handleGenerateToken = async () => {
+ setIsGeneratingToken(true)
+ try {
+ const token = await invoke<string>('security_generate_token')
+ setGeneratedToken(token)
+ setShowToken(true)
+ await fetchStatus()
+ toast.success('New access token generated')
+ onSave?.()
+ } catch (error) {
+ console.error('Failed to generate token:', error)
+ toast.error('Failed to generate token')
+ } finally {
+ setIsGeneratingToken(false)
+ }
+ }
+
+ // Copy token to clipboard
+ const handleCopyToken = async () => {
+ if (!generatedToken) return
+ try {
+ await navigator.clipboard.writeText(generatedToken)
+ setTokenCopied(true)
+ toast.success('Token copied to clipboard')
+ setTimeout(() => setTokenCopied(false), 2000)
+ } catch (error) {
+ console.error('Failed to copy token:', error)
+ toast.error('Failed to copy token')
+ }
+ }
+
+ // Set password
+ const handleSetPassword = async () => {
+ if (!password || password !== confirmPassword) {
+ toast.error('Passwords do not match')
+ return
+ }
+
+ if (password.length < 8) {
+ toast.error('Password must be at least 8 characters')
+ return
+ }
+
+ setIsSettingPassword(true)
+ try {
+ await invoke('security_set_password', { password })
+ setPassword('')
+ setConfirmPassword('')
+ await fetchStatus()
+ toast.success('Password set successfully')
+ onSave?.()
+ } catch (error) {
+ console.error('Failed to set password:', error)
+ toast.error('Failed to set password')
+ } finally {
+ setIsSettingPassword(false)
+ }
+ }
+
+ // Toggle pairing requirement
+ const handleTogglePairing = async (enabled: boolean) => {
+ setIsTogglingPairing(true)
+ try {
+ await invoke('security_set_require_pairing', { require: enabled })
+ setRequirePairing(enabled)
+ await fetchStatus()
+ toast.success(
+ enabled ? 'Device pairing required' : 'Device pairing disabled'
+ )
+ onSave?.()
+ } catch (error) {
+ console.error('Failed to toggle pairing:', error)
+ toast.error('Failed to update pairing setting')
+ } finally {
+ setIsTogglingPairing(false)
+ }
+ }
+
+ // Revoke device
+ const handleRevokeDevice = async (deviceId: string) => {
+ setRevokingDeviceId(deviceId)
+ try {
+ await invoke('security_revoke_device', { device_id: deviceId })
+ await fetchDevices()
+ await fetchStatus()
+ toast.success('Device access revoked')
+ onSave?.()
+ } catch (error) {
+ console.error('Failed to revoke device:', error)
+ toast.error('Failed to revoke device access')
+ } finally {
+ setRevokingDeviceId(null)
+ setConfirmAction({ type: null })
+ }
+ }
+
+ // Clear logs
+ const handleClearLogs = async () => {
+ setIsClearingLogs(true)
+ try {
+ await invoke('security_clear_logs')
+ setLogs([])
+ toast.success('Access logs cleared')
+ } catch (error) {
+ console.error('Failed to clear logs:', error)
+ toast.error('Failed to clear logs')
+ } finally {
+ setIsClearingLogs(false)
+ setConfirmAction({ type: null })
+ }
+ }
+
+ // Format date helper
+ const formatDate = (dateStr: string): string => {
+ try {
+ const date = new Date(dateStr)
+ return date.toLocaleString()
+ } catch {
+ return dateStr
+ }
+ }
+
+ // Mask token helper
+ const maskToken = (token: string): string => {
+ if (token.length <= 8) return '*'.repeat(token.length)
+ return token.slice(0, 4) + '*'.repeat(token.length - 8) + token.slice(-4)
+ }
+
+ // Render tab buttons
+ const renderTabs = () => (
+ <div className="flex gap-1 p-1 bg-secondary/50 rounded-lg mb-4">
+ <button
+ onClick={() => setActiveTab('auth')}
+ className={cn(
+ 'flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors flex-1 justify-center',
+ activeTab === 'auth'
+ ? 'bg-background text-foreground shadow-sm'
+ : 'text-muted-foreground hover:text-foreground'
+ )}
+ >
+ <IconKey size={16} />
+ Authentication
+ </button>
+ <button
+ onClick={() => setActiveTab('devices')}
+ className={cn(
+ 'flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors flex-1 justify-center',
+ activeTab === 'devices'
+ ? 'bg-background text-foreground shadow-sm'
+ : 'text-muted-foreground hover:text-foreground'
+ )}
+ >
+ <IconDevices size={16} />
+ Devices
+ </button>
+ <button
+ onClick={() => setActiveTab('logs')}
+ className={cn(
+ 'flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors flex-1 justify-center',
+ activeTab === 'logs'
+ ? 'bg-background text-foreground shadow-sm'
+ : 'text-muted-foreground hover:text-foreground'
+ )}
+ >
+ <IconHistory size={16} />
+ Logs
+ </button>
+ </div>
+ )
+
+ // Render authentication tab
+ const renderAuthTab = () => (
+ <div className="space-y-6">
+ {/* Current Status */}
+ {status && (
+ <div className="bg-secondary/30 rounded-lg p-4 space-y-2">
+ <h4 className="font-medium text-foreground text-sm">Current Status</h4>
+ <div className="grid grid-cols-2 gap-2 text-sm">
+ <span className="text-muted-foreground">Auth Mode:</span>
+ <span className="text-foreground capitalize">{status.auth_mode}</span>
+ <span className="text-muted-foreground">Has Token:</span>
+ <span className="text-foreground">{status.has_token ? 'Yes' : 'No'}</span>
+ <span className="text-muted-foreground">Has Password:</span>
+ <span className="text-foreground">{status.has_password ? 'Yes' : 'No'}</span>
+ {status.recent_auth_failures > 0 && (
+ <>
+ <span className="text-muted-foreground">Recent Failures:</span>
+ <span className="text-destructive">{status.recent_auth_failures}</span>
+ </>
+ )}
+ </div>
+ </div>
+ )}
+
+ {/* Auth Mode Selection */}
+ <div className="space-y-3">
+ <label className="text-sm font-medium text-foreground">
+ Authentication Mode
+ </label>
+ <RadioGroup
+ value={authMode}
+ onValueChange={(value) => handleAuthModeChange(value as AuthMode)}
+ className="space-y-2"
+ disabled={isChangingAuthMode}
+ >
+ <div className="flex items-center space-x-3 p-3 rounded-lg border border-border hover:bg-secondary/30 transition-colors">
+ <RadioGroupItem value="token" id="auth-token" />
+ <label htmlFor="auth-token" className="flex-1 cursor-pointer">
+ <span className="font-medium text-foreground">Token</span>
+ <p className="text-sm text-muted-foreground">
+ Require a secret token for API access
+ </p>
+ </label>
+ </div>
+ <div className="flex items-center space-x-3 p-3 rounded-lg border border-border hover:bg-secondary/30 transition-colors">
+ <RadioGroupItem value="password" id="auth-password" />
+ <label htmlFor="auth-password" className="flex-1 cursor-pointer">
+ <span className="font-medium text-foreground">Password</span>
+ <p className="text-sm text-muted-foreground">
+ Require a password for access
+ </p>
+ </label>
+ </div>
+ <div className="flex items-center space-x-3 p-3 rounded-lg border border-border hover:bg-secondary/30 transition-colors">
+ <RadioGroupItem value="none" id="auth-none" />
+ <label htmlFor="auth-none" className="flex-1 cursor-pointer">
+ <span className="font-medium text-foreground">None</span>
+ <p className="text-sm text-muted-foreground">
+ No authentication required (not recommended)
+ </p>
+ </label>
+ </div>
+ </RadioGroup>
+ </div>
+
+ {/* Token Section */}
+ {authMode === 'token' && (
+ <div className="space-y-3 p-4 border border-border rounded-lg">
+ <h4 className="font-medium text-foreground">Access Token</h4>
+
+ {generatedToken ? (
+ <div className="space-y-3">
+ <div className="bg-secondary/50 rounded-lg p-3">
+ <div className="flex items-center gap-2">
+ <code className="flex-1 text-sm font-mono text-foreground break-all">
+ {showToken ? generatedToken : maskToken(generatedToken)}
+ </code>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={() => setShowToken(!showToken)}
+ >
+ {showToken ? <IconEyeOff size={16} /> : <IconEye size={16} />}
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={handleCopyToken}
+ >
+ {tokenCopied ? (
+ <IconCheck size={16} className="text-green-500" />
+ ) : (
+ <IconCopy size={16} />
+ )}
+ </Button>
+ </div>
+ </div>
+ <div className="flex items-start gap-2 text-amber-500 text-sm">
+ <IconAlertTriangle size={16} className="shrink-0 mt-0.5" />
+ <span>
+ Save this token now. It cannot be retrieved later. You will
+ need to generate a new one if lost.
+ </span>
+ </div>
+ </div>
+ ) : (
+ <p className="text-sm text-muted-foreground">
+ {status?.has_token
+ ? 'A token is already configured. Generate a new one to replace it.'
+ : 'No token configured. Generate one to enable token authentication.'}
+ </p>
+ )}
+
+ <Button
+ onClick={handleGenerateToken}
+ disabled={isGeneratingToken}
+ variant="outline"
+ size="sm"
+ >
+ {isGeneratingToken ? (
+ <>
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ Generating...
+ </>
+ ) : (
+ <>
+ <IconKey className="mr-2 h-4 w-4" />
+ Generate New Token
+ </>
+ )}
+ </Button>
+ </div>
+ )}
+
+ {/* Password Section */}
+ {authMode === 'password' && (
+ <div className="space-y-3 p-4 border border-border rounded-lg">
+ <h4 className="font-medium text-foreground">Set Password</h4>
+ <p className="text-sm text-muted-foreground">
+ {status?.has_password
+ ? 'Enter a new password to replace the existing one.'
+ : 'Set a password to enable password authentication.'}
+ </p>
+
+ <div className="space-y-3">
+ <div className="relative">
+ <Input
+ type={showPassword ? 'text' : 'password'}
+ value={password}
+ onChange={(e) => setPassword(e.target.value)}
+ placeholder="Enter password"
+ className="pr-10"
+ />
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ className="absolute right-1 top-1/2 -translate-y-1/2"
+ onClick={() => setShowPassword(!showPassword)}
+ >
+ {showPassword ? <IconEyeOff size={16} /> : <IconEye size={16} />}
+ </Button>
+ </div>
+ <Input
+ type={showPassword ? 'text' : 'password'}
+ value={confirmPassword}
+ onChange={(e) => setConfirmPassword(e.target.value)}
+ placeholder="Confirm password"
+ />
+ {password && confirmPassword && password !== confirmPassword && (
+ <p className="text-sm text-destructive">Passwords do not match</p>
+ )}
+ {password && password.length < 8 && (
+ <p className="text-sm text-amber-500">
+ Password must be at least 8 characters
+ </p>
+ )}
+ </div>
+
+ <Button
+ onClick={handleSetPassword}
+ disabled={
+ isSettingPassword ||
+ !password ||
+ password !== confirmPassword ||
+ password.length < 8
+ }
+ size="sm"
+ >
+ {isSettingPassword ? (
+ <>
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ Setting...
+ </>
+ ) : (
+ 'Set Password'
+ )}
+ </Button>
+ </div>
+ )}
+ </div>
+ )
+
+ // Render devices tab
+ const renderDevicesTab = () => (
+ <div className="space-y-4">
+ {/* Pairing Toggle */}
+ <div className="flex items-center justify-between p-4 border border-border rounded-lg">
+ <div className="space-y-1">
+ <h4 className="font-medium text-foreground">Require Device Pairing</h4>
+ <p className="text-sm text-muted-foreground">
+ Devices must be approved before they can access
+ </p>
+ </div>
+ <Switch
+ checked={requirePairing}
+ onCheckedChange={handleTogglePairing}
+ loading={isTogglingPairing}
+ disabled={isTogglingPairing}
+ />
+ </div>
+
+ {/* Approved Devices */}
+ <div className="space-y-3">
+ <div className="flex items-center justify-between">
+ <h4 className="font-medium text-foreground">Approved Devices</h4>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={fetchDevices}
+ disabled={isLoadingDevices}
+ >
+ <IconRefresh
+ size={16}
+ className={cn(isLoadingDevices && 'animate-spin')}
+ />
+ </Button>
+ </div>
+
+ {isLoadingDevices ? (
+ <div className="flex items-center justify-center py-8">
+ <IconLoader2 className="animate-spin h-6 w-6 text-muted-foreground" />
+ </div>
+ ) : devices.length === 0 ? (
+ <div className="text-center py-8 text-muted-foreground">
+ <IconDevices size={32} className="mx-auto mb-2 opacity-50" />
+ <p>No approved devices</p>
+ </div>
+ ) : (
+ <div className="space-y-2">
+ {devices.map((device) => (
+ <div
+ key={device.id}
+ className="flex items-center justify-between p-3 bg-secondary/30 rounded-lg"
+ >
+ <div className="space-y-1 min-w-0 flex-1">
+ <div className="flex items-center gap-2">
+ <span className="font-medium text-foreground truncate">
+ {device.name}
+ </span>
+ <span className="text-xs px-2 py-0.5 rounded-full bg-secondary text-muted-foreground">
+ {device.channel}
+ </span>
+ </div>
+ <div className="text-sm text-muted-foreground">
+ <span>User: {device.user_id}</span>
+ <span className="mx-2">|</span>
+ <span>Approved: {formatDate(device.approved_at)}</span>
+ {device.last_access && (
+ <>
+ <span className="mx-2">|</span>
+ <span>Last: {formatDate(device.last_access)}</span>
+ </>
+ )}
+ </div>
+ </div>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={() =>
+ setConfirmAction({ type: 'revoke', data: device.id })
+ }
+ disabled={revokingDeviceId === device.id}
+ className="shrink-0 text-destructive hover:text-destructive"
+ >
+ {revokingDeviceId === device.id ? (
+ <IconLoader2 className="animate-spin h-4 w-4" />
+ ) : (
+ <IconTrash size={16} />
+ )}
+ </Button>
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+ </div>
+ )
+
+ // Render logs tab
+ const renderLogsTab = () => (
+ <div className="space-y-4">
+ {/* Header with actions */}
+ <div className="flex items-center justify-between">
+ <h4 className="font-medium text-foreground">Recent Access Logs</h4>
+ <div className="flex items-center gap-2">
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={fetchLogs}
+ disabled={isLoadingLogs}
+ >
+ <IconRefresh
+ size={16}
+ className={cn(isLoadingLogs && 'animate-spin')}
+ />
+ </Button>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => setConfirmAction({ type: 'clear_logs' })}
+ disabled={isClearingLogs || logs.length === 0}
+ className="text-destructive hover:text-destructive"
+ >
+ <IconTrash size={16} className="mr-1" />
+ Clear
+ </Button>
+ </div>
+ </div>
+
+ {/* Logs list */}
+ {isLoadingLogs ? (
+ <div className="flex items-center justify-center py-8">
+ <IconLoader2 className="animate-spin h-6 w-6 text-muted-foreground" />
+ </div>
+ ) : logs.length === 0 ? (
+ <div className="text-center py-8 text-muted-foreground">
+ <IconHistory size={32} className="mx-auto mb-2 opacity-50" />
+ <p>No access logs</p>
+ </div>
+ ) : (
+ <div className="space-y-2 max-h-[300px] overflow-y-auto">
+ {logs.map((log, index) => (
+ <div
+ key={index}
+ className={cn(
+ 'p-3 rounded-lg text-sm',
+ log.success ? 'bg-secondary/30' : 'bg-destructive/10'
+ )}
+ >
+ <div className="flex items-center justify-between mb-1">
+ <div className="flex items-center gap-2">
+ <span
+ className={cn(
+ 'w-2 h-2 rounded-full',
+ log.success ? 'bg-green-500' : 'bg-red-500'
+ )}
+ />
+ <span className="font-medium text-foreground">
+ {log.action}
+ </span>
+ <span className="text-xs px-2 py-0.5 rounded-full bg-secondary text-muted-foreground">
+ {log.channel}
+ </span>
+ </div>
+ <span className="text-xs text-muted-foreground">
+ {formatDate(log.timestamp)}
+ </span>
+ </div>
+ <div className="text-muted-foreground text-xs space-x-3">
+ <span>User: {log.user_id}</span>
+ {log.ip_address && <span>IP: {log.ip_address}</span>}
+ {log.device_id && <span>Device: {log.device_id}</span>}
+ </div>
+ {log.error && (
+ <p className="text-destructive text-xs mt-1">{log.error}</p>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+ )
+
+ // Render confirm dialog
+ const renderConfirmDialog = () => {
+ if (!confirmAction.type) return null
+
+ let title = ''
+ let description = ''
+ let confirmText = ''
+ let onConfirm = () => {}
+
+ switch (confirmAction.type) {
+ case 'revoke':
+ title = 'Revoke Device Access'
+ description =
+ 'Are you sure you want to revoke access for this device? The device will need to be approved again to access.'
+ confirmText = 'Revoke'
+ onConfirm = () => handleRevokeDevice(confirmAction.data as string)
+ break
+ case 'clear_logs':
+ title = 'Clear Access Logs'
+ description =
+ 'Are you sure you want to clear all access logs? This action cannot be undone.'
+ confirmText = 'Clear Logs'
+ onConfirm = handleClearLogs
+ break
+ case 'change_auth_mode':
+ title = 'Change Authentication Mode'
+ description =
+ 'Changing the authentication mode will affect how clients access your Jan instance. Are you sure you want to continue?'
+ confirmText = 'Change'
+ onConfirm = () => changeAuthMode(confirmAction.data as AuthMode)
+ break
+ }
+
+ return (
+ <Dialog
+ open={!!confirmAction.type}
+ onOpenChange={() => setConfirmAction({ type: null })}
+ >
+ <DialogContent className="sm:max-w-[400px]">
+ <DialogHeader>
+ <DialogTitle>{title}</DialogTitle>
+ <DialogDescription>{description}</DialogDescription>
+ </DialogHeader>
+ <DialogFooter className="gap-2">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => setConfirmAction({ type: null })}
+ >
+ Cancel
+ </Button>
+ <Button variant="destructive" size="sm" onClick={onConfirm}>
+ {confirmText}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+ }
+
+ return (
+ <>
+ <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
+ <DialogContent className="sm:max-w-[560px] max-w-[90vw] max-h-[85vh] flex flex-col">
+ <DialogHeader>
+ <div className="flex items-center gap-2">
+ <IconShield size={24} className="text-primary" />
+ <DialogTitle>Security Settings</DialogTitle>
+ </div>
+ <DialogDescription>
+ Configure authentication, device management, and view access logs
+ </DialogDescription>
+ </DialogHeader>
+
+ {isLoadingStatus ? (
+ <div className="flex items-center justify-center py-12">
+ <IconLoader2 className="animate-spin h-8 w-8 text-muted-foreground" />
+ </div>
+ ) : (
+ <div className="flex-1 overflow-y-auto">
+ {renderTabs()}
+ {activeTab === 'auth' && renderAuthTab()}
+ {activeTab === 'devices' && renderDevicesTab()}
+ {activeTab === 'logs' && renderLogsTab()}
+ </div>
+ )}
+
+ <DialogFooter>
+ <Button variant="ghost" size="sm" onClick={onClose}>
+ Close
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+
+ {renderConfirmDialog()}
+ </>
+ )
+}
+
+export default SecurityConfigDialog
diff --git a/web-app/src/containers/dialogs/TailscaleSetupDialog.tsx b/web-app/src/containers/dialogs/TailscaleSetupDialog.tsx
new file mode 100644
index 000000000..89157d004
--- /dev/null
+++ b/web-app/src/containers/dialogs/TailscaleSetupDialog.tsx
@@ -0,0 +1,748 @@
+import { useState, useCallback, useEffect } from 'react'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ IconNetwork,
+ IconCheck,
+ IconX,
+ IconArrowRight,
+ IconArrowLeft,
+ IconLoader2,
+ IconAlertCircle,
+ IconExternalLink,
+ IconWorld,
+ IconCopy,
+ IconShieldLock,
+} from '@tabler/icons-react'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import { Switch } from '@/components/ui/switch'
+
+// Types mirroring Rust backend
+interface TailscaleStatus {
+ installed: boolean
+ running: boolean
+ logged_in: boolean
+ version: string | null
+ error: string | null
+}
+
+interface TailscaleInfo {
+ hostname: string | null
+ tailnet: string | null
+ ip_addresses: string[]
+ dns_name: string | null
+ serve_enabled: boolean
+ funnel_enabled: boolean
+ serve_url: string | null
+}
+
+interface TailscaleSetupDialogProps {
+ isOpen: boolean
+ onClose: () => void
+ onSuccess?: () => void
+}
+
+type WizardStep = 'detection' | 'configuration' | 'funnel' | 'success'
+
+const TOTAL_STEPS = 4
+
+export function TailscaleSetupDialog({
+ isOpen,
+ onClose,
+ onSuccess,
+}: TailscaleSetupDialogProps) {
+ const [step, setStep] = useState<WizardStep>('detection')
+ const [isLoading, setIsLoading] = useState(false)
+ const [status, setStatus] = useState<TailscaleStatus | null>(null)
+ const [info, setInfo] = useState<TailscaleInfo | null>(null)
+ const [errorMessage, setErrorMessage] = useState<string | null>(null)
+ const [isConfiguringServe, setIsConfiguringServe] = useState(false)
+ const [isConfiguringFunnel, setIsConfiguringFunnel] = useState(false)
+
+ const getStepNumber = (): number => {
+ const stepMap: Record<WizardStep, number> = {
+ detection: 1,
+ configuration: 2,
+ funnel: 3,
+ success: 4,
+ }
+ return stepMap[step]
+ }
+
+ const fetchTailscaleInfo = useCallback(async () => {
+ try {
+ const result = await invoke<TailscaleInfo>('tailscale_get_status')
+ setInfo(result)
+ } catch (error) {
+ console.error('Failed to fetch Tailscale info:', error)
+ }
+ }, [])
+
+ const detectTailscale = useCallback(async () => {
+ setIsLoading(true)
+ setErrorMessage(null)
+ try {
+ const result = await invoke<TailscaleStatus>('tailscale_detect')
+ setStatus(result)
+
+ if (result.error) {
+ setErrorMessage(result.error)
+ } else if (result.installed && result.running && result.logged_in) {
+ // Tailscale is ready, fetch detailed info
+ await fetchTailscaleInfo()
+ }
+ } catch (error) {
+ console.error('Failed to detect Tailscale:', error)
+ setErrorMessage(
+ error instanceof Error ? error.message : 'Failed to detect Tailscale'
+ )
+ } finally {
+ setIsLoading(false)
+ }
+ }, [fetchTailscaleInfo])
+
+ // Reset state when dialog opens
+ useEffect(() => {
+ if (isOpen) {
+ setStep('detection')
+ setIsLoading(false)
+ setStatus(null)
+ setInfo(null)
+ setErrorMessage(null)
+ setIsConfiguringServe(false)
+ setIsConfiguringFunnel(false)
+ }
+ }, [isOpen])
+
+ // Start detection when dialog opens
+ useEffect(() => {
+ if (isOpen) {
+ detectTailscale()
+ }
+ }, [isOpen, detectTailscale])
+
+ const handleConfigureServe = useCallback(
+ async (enable: boolean) => {
+ setIsConfiguringServe(true)
+ try {
+ if (enable) {
+ await invoke('tailscale_configure_serve')
+ toast.success('Tailscale Serve enabled')
+ } else {
+ await invoke('tailscale_remove_serve')
+ toast.success('Tailscale Serve disabled')
+ }
+ await fetchTailscaleInfo()
+ } catch (error) {
+ console.error('Failed to configure Tailscale Serve:', error)
+ toast.error(
+ error instanceof Error
+ ? error.message
+ : 'Failed to configure Tailscale Serve'
+ )
+ } finally {
+ setIsConfiguringServe(false)
+ }
+ },
+ [fetchTailscaleInfo]
+ )
+
+ const handleConfigureFunnel = useCallback(
+ async (enable: boolean) => {
+ setIsConfiguringFunnel(true)
+ try {
+ if (enable) {
+ await invoke('tailscale_enable_funnel')
+ toast.success('Tailscale Funnel enabled - Your endpoint is now publicly accessible')
+ } else {
+ await invoke('tailscale_disable_funnel')
+ toast.success('Tailscale Funnel disabled')
+ }
+ await fetchTailscaleInfo()
+ } catch (error) {
+ console.error('Failed to configure Tailscale Funnel:', error)
+ toast.error(
+ error instanceof Error
+ ? error.message
+ : 'Failed to configure Tailscale Funnel'
+ )
+ } finally {
+ setIsConfiguringFunnel(false)
+ }
+ },
+ [fetchTailscaleInfo]
+ )
+
+ const handleCopyUrl = useCallback((url: string) => {
+ navigator.clipboard.writeText(url)
+ toast.success('URL copied to clipboard')
+ }, [])
+
+ const handleOpenUrl = useCallback((url: string) => {
+ window.open(url, '_blank')
+ }, [])
+
+ const handleClose = useCallback(() => {
+ onClose()
+ }, [onClose])
+
+ const handleSuccess = useCallback(() => {
+ if (onSuccess) {
+ onSuccess()
+ }
+ onClose()
+ }, [onSuccess, onClose])
+
+ const renderStepIndicator = () => {
+ const currentStep = getStepNumber()
+ return (
+ <div className="flex items-center justify-center gap-2 mb-6">
+ {Array.from({ length: TOTAL_STEPS }, (_, i) => (
+ <div
+ key={i}
+ className={`flex items-center justify-center w-8 h-8 rounded-full text-sm font-medium ${
+ i + 1 < currentStep
+ ? 'bg-green-500 text-white'
+ : i + 1 === currentStep
+ ? 'bg-primary text-primary-foreground'
+ : 'bg-secondary text-muted-foreground'
+ }`}
+ >
+ {i + 1 < currentStep ? <IconCheck size={16} /> : i + 1}
+ </div>
+ ))}
+ </div>
+ )
+ }
+
+ const renderDetectionStep = () => {
+ return (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ Checking Tailscale status on your system
+ </DialogDescription>
+
+ {isLoading ? (
+ <div className="flex flex-col items-center justify-center py-8">
+ <IconLoader2 className="animate-spin h-12 w-12 text-primary mb-4" />
+ <p className="text-muted-foreground">Detecting Tailscale...</p>
+ </div>
+ ) : errorMessage ? (
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center mb-4">
+ <IconX size={32} className="text-red-500" />
+ </div>
+ <p className="text-red-500 text-center mb-4">{errorMessage}</p>
+ <Button variant="outline" onClick={detectTailscale}>
+ Try Again
+ </Button>
+ </div>
+ ) : !status?.installed ? (
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-yellow-500/10 flex items-center justify-center mb-4">
+ <IconAlertCircle size={32} className="text-yellow-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ Tailscale Not Installed
+ </h3>
+ <p className="text-muted-foreground text-center mb-4 max-w-xs">
+ Tailscale is required to securely share your OpenClaw endpoint
+ across your network.
+ </p>
+ <div className="bg-secondary/50 rounded-lg p-4 w-full mb-4">
+ <h4 className="font-medium text-sm mb-2">Installation Steps:</h4>
+ <ol className="text-muted-foreground text-sm space-y-2">
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">1.</span>
+ Download Tailscale from the official website
+ </li>
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">2.</span>
+ Install and launch Tailscale
+ </li>
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">3.</span>
+ Sign in with your account
+ </li>
+ </ol>
+ </div>
+ <Button
+ variant="outline"
+ onClick={() =>
+ window.open('https://tailscale.com/download', '_blank')
+ }
+ className="gap-2"
+ >
+ <IconExternalLink size={16} />
+ Download Tailscale
+ </Button>
+ </div>
+ ) : !status?.running ? (
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-yellow-500/10 flex items-center justify-center mb-4">
+ <IconAlertCircle size={32} className="text-yellow-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">Tailscale Not Running</h3>
+ <p className="text-muted-foreground text-center mb-4 max-w-xs">
+ Tailscale is installed but not currently running. Please start
+ Tailscale and try again.
+ </p>
+ <Button variant="outline" onClick={detectTailscale} className="gap-2">
+ <IconLoader2 size={16} />
+ Check Again
+ </Button>
+ </div>
+ ) : !status?.logged_in ? (
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-yellow-500/10 flex items-center justify-center mb-4">
+ <IconAlertCircle size={32} className="text-yellow-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">Not Logged In</h3>
+ <p className="text-muted-foreground text-center mb-4 max-w-xs">
+ You need to log in to Tailscale to use this feature.
+ </p>
+ <div className="bg-secondary/50 rounded-lg p-4 w-full mb-4">
+ <p className="text-sm text-muted-foreground mb-2">
+ Run this command in your terminal:
+ </p>
+ <code className="text-sm font-mono bg-background px-3 py-2 rounded block">
+ tailscale login
+ </code>
+ </div>
+ <Button variant="outline" onClick={detectTailscale} className="gap-2">
+ <IconLoader2 size={16} />
+ Check Again
+ </Button>
+ </div>
+ ) : (
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4">
+ <IconCheck size={32} className="text-green-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">Tailscale Ready</h3>
+ <p className="text-muted-foreground text-center mb-4">
+ {status.version && `Version ${status.version}`}
+ </p>
+ {info && (
+ <div className="bg-secondary/50 rounded-lg p-4 w-full space-y-2 text-sm">
+ {info.hostname && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Hostname:</span>
+ <span className="text-foreground font-medium">
+ {info.hostname}
+ </span>
+ </div>
+ )}
+ {info.tailnet && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Tailnet:</span>
+ <span className="text-foreground font-medium">
+ {info.tailnet}
+ </span>
+ </div>
+ )}
+ {info.dns_name && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">DNS Name:</span>
+ <span className="text-foreground font-medium text-xs">
+ {info.dns_name}
+ </span>
+ </div>
+ )}
+ {info.ip_addresses.length > 0 && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">IP Address:</span>
+ <span className="text-foreground font-medium">
+ {info.ip_addresses[0]}
+ </span>
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ )
+ }
+
+ const renderConfigurationStep = () => {
+ return (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ Configure Tailscale Serve to expose OpenClaw on your tailnet
+ </DialogDescription>
+
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-blue-500/10 flex items-center justify-center mb-4">
+ <IconNetwork size={32} className="text-blue-500" />
+ </div>
+
+ <div className="bg-secondary/50 rounded-lg p-4 w-full mb-4">
+ <h4 className="font-medium text-sm mb-2">What is Tailscale Serve?</h4>
+ <p className="text-muted-foreground text-sm">
+ Tailscale Serve allows you to share your local OpenClaw gateway
+ with other devices on your tailnet. Only devices connected to your
+ tailnet can access it.
+ </p>
+ </div>
+
+ <div className="w-full border border-border rounded-lg p-4">
+ <div className="flex items-center justify-between">
+ <div className="space-y-1">
+ <h4 className="font-medium text-foreground">
+ Enable Tailscale Serve
+ </h4>
+ <p className="text-muted-foreground text-sm">
+ Share OpenClaw on your tailnet
+ </p>
+ </div>
+ <Switch
+ checked={info?.serve_enabled ?? false}
+ onCheckedChange={handleConfigureServe}
+ disabled={isConfiguringServe}
+ loading={isConfiguringServe}
+ />
+ </div>
+
+ {info?.serve_enabled && info?.serve_url && (
+ <div className="mt-4 pt-4 border-t border-border">
+ <p className="text-sm text-muted-foreground mb-2">
+ Your tailnet URL:
+ </p>
+ <div className="flex items-center gap-2">
+ <code className="flex-1 text-sm font-mono bg-background px-3 py-2 rounded truncate">
+ {info.serve_url}
+ </code>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => handleCopyUrl(info.serve_url!)}
+ title="Copy URL"
+ >
+ <IconCopy size={16} />
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => handleOpenUrl(info.serve_url!)}
+ title="Open URL"
+ >
+ <IconExternalLink size={16} />
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+
+ {info && (
+ <div className="bg-secondary/50 rounded-lg p-4 w-full mt-4 space-y-2 text-sm">
+ {info.hostname && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Hostname:</span>
+ <span className="text-foreground font-medium">
+ {info.hostname}
+ </span>
+ </div>
+ )}
+ {info.tailnet && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Tailnet:</span>
+ <span className="text-foreground font-medium">
+ {info.tailnet}
+ </span>
+ </div>
+ )}
+ {info.ip_addresses.length > 0 && (
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">IP Addresses:</span>
+ <span className="text-foreground font-medium">
+ {info.ip_addresses.join(', ')}
+ </span>
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ </div>
+ )
+ }
+
+ const renderFunnelStep = () => {
+ return (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ Optionally enable Tailscale Funnel for public internet access
+ </DialogDescription>
+
+ <div className="flex flex-col items-center py-4">
+ <div className="w-16 h-16 rounded-full bg-orange-500/10 flex items-center justify-center mb-4">
+ <IconWorld size={32} className="text-orange-500" />
+ </div>
+
+ <div className="bg-secondary/50 rounded-lg p-4 w-full mb-4">
+ <h4 className="font-medium text-sm mb-2">What is Tailscale Funnel?</h4>
+ <p className="text-muted-foreground text-sm">
+ Funnel exposes your OpenClaw gateway to the public internet. Anyone
+ with the URL can access it, not just devices on your tailnet.
+ </p>
+ </div>
+
+ {/* Warning banner */}
+ <div className="w-full bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-4 mb-4">
+ <div className="flex items-start gap-3">
+ <IconShieldLock size={20} className="text-yellow-500 shrink-0 mt-0.5" />
+ <div>
+ <h4 className="font-medium text-yellow-600 dark:text-yellow-400 text-sm">
+ Security Warning
+ </h4>
+ <p className="text-yellow-600/80 dark:text-yellow-400/80 text-sm mt-1">
+ Enabling Funnel makes your endpoint publicly accessible on the
+ internet. Make sure you have appropriate authentication and
+ access controls in place.
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div className="w-full border border-border rounded-lg p-4">
+ <div className="flex items-center justify-between">
+ <div className="space-y-1">
+ <h4 className="font-medium text-foreground">
+ Enable Tailscale Funnel
+ </h4>
+ <p className="text-muted-foreground text-sm">
+ Public internet access
+ </p>
+ </div>
+ <Switch
+ checked={info?.funnel_enabled ?? false}
+ onCheckedChange={handleConfigureFunnel}
+ disabled={isConfiguringFunnel || !info?.serve_enabled}
+ loading={isConfiguringFunnel}
+ />
+ </div>
+
+ {!info?.serve_enabled && (
+ <p className="text-sm text-muted-foreground mt-2">
+ Enable Tailscale Serve first to use Funnel
+ </p>
+ )}
+
+ {info?.funnel_enabled && info?.serve_url && (
+ <div className="mt-4 pt-4 border-t border-border">
+ <p className="text-sm text-muted-foreground mb-2">
+ Your public URL:
+ </p>
+ <div className="flex items-center gap-2">
+ <code className="flex-1 text-sm font-mono bg-background px-3 py-2 rounded truncate">
+ {info.serve_url}
+ </code>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => handleCopyUrl(info.serve_url!)}
+ title="Copy URL"
+ >
+ <IconCopy size={16} />
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => handleOpenUrl(info.serve_url!)}
+ title="Open URL"
+ >
+ <IconExternalLink size={16} />
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+ </div>
+ </div>
+ )
+ }
+
+ const renderSuccessStep = () => {
+ return (
+ <div className="space-y-4">
+ <div className="flex flex-col items-center justify-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mb-4">
+ <IconCheck size={32} className="text-green-500" />
+ </div>
+ <DialogTitle className="text-center">
+ Tailscale Setup Complete
+ </DialogTitle>
+ </div>
+
+ <DialogDescription className="text-center">
+ Your OpenClaw gateway is now accessible via Tailscale
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 space-y-3">
+ <div className="flex justify-between items-center">
+ <span className="text-muted-foreground">Tailscale Serve:</span>
+ <span
+ className={`font-medium ${info?.serve_enabled ? 'text-green-500' : 'text-muted-foreground'}`}
+ >
+ {info?.serve_enabled ? 'Enabled' : 'Disabled'}
+ </span>
+ </div>
+ <div className="flex justify-between items-center">
+ <span className="text-muted-foreground">Tailscale Funnel:</span>
+ <span
+ className={`font-medium ${info?.funnel_enabled ? 'text-orange-500' : 'text-muted-foreground'}`}
+ >
+ {info?.funnel_enabled ? 'Enabled (Public)' : 'Disabled'}
+ </span>
+ </div>
+ {info?.serve_url && (
+ <div className="pt-2 border-t border-border">
+ <p className="text-sm text-muted-foreground mb-2">Access URL:</p>
+ <div className="flex items-center gap-2">
+ <code className="flex-1 text-sm font-mono bg-background px-3 py-2 rounded truncate">
+ {info.serve_url}
+ </code>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => handleCopyUrl(info.serve_url!)}
+ title="Copy URL"
+ >
+ <IconCopy size={16} />
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+ </div>
+ )
+ }
+
+ const renderStepContent = () => {
+ switch (step) {
+ case 'detection':
+ return renderDetectionStep()
+ case 'configuration':
+ return renderConfigurationStep()
+ case 'funnel':
+ return renderFunnelStep()
+ case 'success':
+ return renderSuccessStep()
+ default:
+ return null
+ }
+ }
+
+ const canGoNext = (): boolean => {
+ switch (step) {
+ case 'detection':
+ return (
+ status?.installed === true &&
+ status?.running === true &&
+ status?.logged_in === true
+ )
+ case 'configuration':
+ return true // Can always proceed (Serve is optional)
+ case 'funnel':
+ return true // Can always proceed (Funnel is optional)
+ case 'success':
+ return true
+ default:
+ return false
+ }
+ }
+
+ const canGoBack = (): boolean => {
+ return step !== 'detection' && step !== 'success'
+ }
+
+ const handleNext = () => {
+ switch (step) {
+ case 'detection':
+ setStep('configuration')
+ break
+ case 'configuration':
+ setStep('funnel')
+ break
+ case 'funnel':
+ setStep('success')
+ break
+ case 'success':
+ handleSuccess()
+ break
+ }
+ }
+
+ const handleBack = () => {
+ switch (step) {
+ case 'configuration':
+ setStep('detection')
+ break
+ case 'funnel':
+ setStep('configuration')
+ break
+ default:
+ break
+ }
+ }
+
+ const getNextButtonText = (): string => {
+ switch (step) {
+ case 'detection':
+ return 'Continue'
+ case 'configuration':
+ return 'Next'
+ case 'funnel':
+ return 'Finish'
+ case 'success':
+ return 'Done'
+ default:
+ return 'Next'
+ }
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={handleClose}>
+ <DialogContent className="sm:max-w-[480px] max-w-[90vw]">
+ <DialogHeader>
+ <div className="flex items-center justify-center gap-2 mb-2">
+ <IconNetwork size={24} className="text-blue-500" />
+ <DialogTitle>Tailscale Setup</DialogTitle>
+ </div>
+ </DialogHeader>
+
+ {renderStepIndicator()}
+
+ {renderStepContent()}
+
+ <DialogFooter className="gap-2 sm:gap-0">
+ {canGoBack() && (
+ <Button variant="outline" onClick={handleBack} className="gap-1">
+ <IconArrowLeft size={16} />
+ Back
+ </Button>
+ )}
+ {step === 'detection' && !canGoNext() && !isLoading && (
+ <Button variant="outline" onClick={handleClose}>
+ Cancel
+ </Button>
+ )}
+ {(canGoNext() || step === 'success') && (
+ <Button onClick={handleNext} disabled={!canGoNext()} className="gap-1">
+ {getNextButtonText()}
+ {step !== 'success' && <IconArrowRight size={16} />}
+ </Button>
+ )}
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/web-app/src/containers/dialogs/TelegramWizardDialog.tsx b/web-app/src/containers/dialogs/TelegramWizardDialog.tsx
new file mode 100644
index 000000000..ed2064c88
--- /dev/null
+++ b/web-app/src/containers/dialogs/TelegramWizardDialog.tsx
@@ -0,0 +1,536 @@
+import { useState, useCallback, useEffect } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ Dialog,
+ DialogContent,
+ DialogTitle,
+ DialogDescription,
+ DialogHeader,
+ DialogFooter,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import { Input } from '@/components/ui/input'
+import {
+ IconBrandTelegram,
+ IconCheck,
+ IconCopy,
+ IconArrowRight,
+ IconArrowLeft,
+ IconLoader2,
+ IconAlertCircle,
+} from '@tabler/icons-react'
+
+// Types mirroring Rust backend
+interface TelegramTokenValidation {
+ valid: boolean
+ bot_username: string | null
+ bot_name: string | null
+ error: string | null
+}
+
+interface TelegramConfig {
+ bot_token: string
+ bot_username: string | null
+ connected: boolean
+ pairing_code: string | null
+ paired_users: number
+}
+
+interface TelegramWizardProps {
+ isOpen: boolean
+ onOpenChange: (open: boolean) => void
+ onConnected?: (config: TelegramConfig) => void
+}
+
+type WizardStep = 'instructions' | 'token' | 'configure' | 'pairing' | 'success'
+
+const TOTAL_STEPS = 5
+
+export function TelegramWizard({
+ isOpen,
+ onOpenChange,
+ onConnected,
+}: TelegramWizardProps) {
+ const { t } = useTranslation()
+ const [step, setStep] = useState<WizardStep>('instructions')
+ const [token, setToken] = useState('')
+ const [validation, setValidation] = useState<TelegramTokenValidation | null>(null)
+ const [isValidating, setIsValidating] = useState(false)
+ const [isConfiguring, setIsConfiguring] = useState(false)
+ const [config, setConfig] = useState<TelegramConfig | null>(null)
+ const [isCheckingPairing, setIsCheckingPairing] = useState(false)
+ const [, setPairingCheckedCount] = useState(0)
+
+ // Reset state when dialog closes
+ useEffect(() => {
+ if (!isOpen) {
+ setStep('instructions')
+ setToken('')
+ setValidation(null)
+ setConfig(null)
+ setPairingCheckedCount(0)
+ }
+ }, [isOpen])
+
+ const getStepNumber = (): number => {
+ const stepMap: Record<WizardStep, number> = {
+ instructions: 1,
+ token: 2,
+ configure: 3,
+ pairing: 4,
+ success: 5,
+ }
+ return stepMap[step]
+ }
+
+ const handleValidateToken = async () => {
+ if (!token.trim()) {
+ toast.error(t('settings:remoteAccess.telegramWizard.errors.tokenRequired'))
+ return
+ }
+
+ setIsValidating(true)
+ try {
+ const result = await invoke<TelegramTokenValidation>('telegram_validate_token', {
+ token: token.trim(),
+ })
+ setValidation(result)
+ if (result.valid) {
+ toast.success(
+ t('settings:remoteAccess.telegramWizard.step2.validToken', {
+ username: result.bot_username,
+ })
+ )
+ } else {
+ toast.error(
+ result.error || t('settings:remoteAccess.telegramWizard.step2.invalidToken')
+ )
+ }
+ } catch (error) {
+ console.error('Token validation error:', error)
+ toast.error(t('settings:remoteAccess.telegramWizard.errors.networkError'))
+ } finally {
+ setIsValidating(false)
+ }
+ }
+
+ const handleConfigure = async () => {
+ if (!validation?.valid) return
+
+ setIsConfiguring(true)
+ try {
+ const result = await invoke<TelegramConfig>('telegram_configure', {
+ token: token.trim(),
+ })
+ setConfig(result)
+ setStep('pairing')
+ toast.success(t('settings:remoteAccess.telegramWizard.step3.success'))
+ } catch (error) {
+ console.error('Configure error:', error)
+ toast.error(
+ t('settings:remoteAccess.telegramWizard.step3.error', {
+ error: error instanceof Error ? error.message : String(error),
+ })
+ )
+ } finally {
+ setIsConfiguring(false)
+ }
+ }
+
+ const handleCheckPairing = async () => {
+ setIsCheckingPairing(true)
+ setPairingCheckedCount((prev) => prev + 1)
+ try {
+ const isPaired = await invoke<boolean>('telegram_check_pairing')
+ if (isPaired) {
+ // Refresh config to get updated paired users
+ const updatedConfig = await invoke<TelegramConfig>('telegram_get_config')
+ setConfig(updatedConfig)
+ setStep('success')
+ if (onConnected) {
+ onConnected(updatedConfig)
+ }
+ } else {
+ toast.message(t('settings:remoteAccess.telegramWizard.step4.waiting'))
+ }
+ } catch (error) {
+ console.error('Pairing check error:', error)
+ } finally {
+ setIsCheckingPairing(false)
+ }
+ }
+
+ const handleSkipPairing = () => {
+ setStep('success')
+ if (config && onConnected) {
+ onConnected(config)
+ }
+ }
+
+ const handleDisconnect = async () => {
+ try {
+ await invoke('telegram_disconnect')
+ setConfig(null)
+ setToken('')
+ setValidation(null)
+ setStep('instructions')
+ toast.success(t('settings:remoteAccess.telegramWizard.status.notConnected'))
+ } catch (error) {
+ console.error('Disconnect error:', error)
+ }
+ }
+
+ const handleCopyCode = useCallback(() => {
+ if (config?.pairing_code) {
+ navigator.clipboard.writeText(config.pairing_code)
+ toast.success('Copied to clipboard!')
+ }
+ }, [config?.pairing_code])
+
+ const renderStepIndicator = () => {
+ const currentStep = getStepNumber()
+ return (
+ <div className="flex items-center justify-center gap-2 mb-6">
+ {Array.from({ length: TOTAL_STEPS }, (_, i) => (
+ <div
+ key={i}
+ className={`flex items-center justify-center w-8 h-8 rounded-full text-sm font-medium ${
+ i + 1 < currentStep
+ ? 'bg-green-500 text-white'
+ : i + 1 === currentStep
+ ? 'bg-primary text-primary-foreground'
+ : 'bg-secondary text-muted-foreground'
+ }`}
+ >
+ {i + 1 < currentStep ? (
+ <IconCheck size={16} />
+ ) : (
+ i + 1
+ )}
+ </div>
+ ))}
+ </div>
+ )
+ }
+
+ const renderInstructionsStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.telegramWizard.description')}
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 space-y-3">
+ <h4 className="font-medium text-foreground">
+ {t('settings:remoteAccess.telegramWizard.step1.title')}
+ </h4>
+ <ol className="list-decimal list-inside space-y-2 text-sm text-muted-foreground">
+ <li>{t('settings:remoteAccess.telegramWizard.step1.instruction1')}</li>
+ <li>{t('settings:remoteAccess.telegramWizard.step1.instruction2')}</li>
+ <li>{t('settings:remoteAccess.telegramWizard.step1.instruction3')}</li>
+ <li className="font-mono text-xs bg-background p-2 rounded">
+ {t('settings:remoteAccess.telegramWizard.step1.instruction4')}
+ </li>
+ </ol>
+ </div>
+
+ <div className="flex justify-center">
+ <Button
+ variant="outline"
+ onClick={() => window.open('https://t.me/BotFather', '_blank')}
+ className="gap-2"
+ >
+ <IconBrandTelegram size={18} />
+ Open BotFather
+ </Button>
+ </div>
+ </div>
+ )
+
+ const renderTokenStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.telegramWizard.step2.title')}
+ </DialogDescription>
+
+ <div className="space-y-2">
+ <Input
+ type="password"
+ value={token}
+ onChange={(e) => {
+ setToken(e.target.value)
+ setValidation(null)
+ }}
+ placeholder={t('settings:remoteAccess.telegramWizard.step2.placeholder')}
+ className="font-mono"
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && !isValidating) {
+ handleValidateToken()
+ }
+ }}
+ />
+ </div>
+
+ {validation?.valid && (
+ <div className="flex items-center gap-2 text-green-500 text-sm">
+ <IconCheck size={16} />
+ <span>
+ {t('settings:remoteAccess.telegramWizard.step2.validToken', {
+ username: validation.bot_username,
+ })}
+ </span>
+ </div>
+ )}
+
+ {validation && !validation.valid && (
+ <div className="flex items-center gap-2 text-red-500 text-sm">
+ <IconAlertCircle size={16} />
+ <span>{validation.error}</span>
+ </div>
+ )}
+
+ <Button
+ onClick={handleValidateToken}
+ disabled={isValidating || !token.trim()}
+ className="w-full"
+ >
+ {isValidating ? (
+ <>
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.telegramWizard.step2.validating')}
+ </>
+ ) : (
+ t('settings:remoteAccess.telegramWizard.step2.validate')
+ )}
+ </Button>
+ </div>
+ )
+
+ const renderConfigureStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.telegramWizard.step3.title')}
+ </DialogDescription>
+
+ <div className="flex flex-col items-center justify-center py-8">
+ <IconBrandTelegram size={48} className="text-blue-500 mb-4" />
+ <p className="text-muted-foreground">
+ {isConfiguring
+ ? t('settings:remoteAccess.telegramWizard.step3.connecting')
+ : validation?.bot_username
+ ? `@${validation.bot_username}`
+ : ''}
+ </p>
+ </div>
+
+ {isConfiguring && (
+ <div className="flex justify-center">
+ <IconLoader2 className="animate-spin h-8 w-8 text-primary" />
+ </div>
+ )}
+ </div>
+ )
+
+ const renderPairingStep = () => (
+ <div className="space-y-4">
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.telegramWizard.step4.title')}
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 text-center space-y-3">
+ <p className="text-muted-foreground text-sm">
+ {t('settings:remoteAccess.telegramWizard.step4.instruction')}
+ </p>
+ <div className="flex items-center justify-center gap-2">
+ <code className="text-2xl font-mono font-bold text-foreground bg-background px-4 py-2 rounded-lg">
+ {config?.pairing_code || '------'}
+ </code>
+ <Button variant="ghost" size="icon" onClick={handleCopyCode}>
+ <IconCopy size={18} />
+ </Button>
+ </div>
+ </div>
+
+ <div className="flex justify-center">
+ {isCheckingPairing ? (
+ <IconLoader2 className="animate-spin h-6 w-6 text-primary" />
+ ) : (
+ <p className="text-muted-foreground text-sm">
+ {t('settings:remoteAccess.telegramWizard.step4.waiting')}
+ </p>
+ )}
+ </div>
+
+ <div className="flex gap-2">
+ <Button
+ variant="outline"
+ onClick={handleSkipPairing}
+ className="flex-1"
+ >
+ {t('settings:remoteAccess.telegramWizard.step4.skipForNow')}
+ </Button>
+ <Button
+ onClick={handleCheckPairing}
+ disabled={isCheckingPairing}
+ className="flex-1"
+ >
+ {t('settings:remoteAccess.telegramWizard.step4.checkAgain')}
+ </Button>
+ </div>
+ </div>
+ )
+
+ const renderSuccessStep = () => (
+ <div className="space-y-4">
+ <div className="flex flex-col items-center justify-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mb-4">
+ <IconCheck size={32} className="text-green-500" />
+ </div>
+ <DialogTitle className="text-center">
+ {t('settings:remoteAccess.telegramWizard.step5.success')}
+ </DialogTitle>
+ </div>
+
+ <DialogDescription className="text-center">
+ {t('settings:remoteAccess.telegramWizard.step5.instruction')}
+ </DialogDescription>
+
+ <div className="bg-secondary/50 rounded-lg p-4 text-center space-y-2">
+ {config?.bot_username && (
+ <p className="text-foreground">
+ {t('settings:remoteAccess.telegramWizard.step5.botUsername', {
+ username: config.bot_username,
+ })}
+ </p>
+ )}
+ <p className="text-muted-foreground text-sm">
+ {t('settings:remoteAccess.telegramWizard.step5.pairedUsers', {
+ count: config?.paired_users || 0,
+ })}
+ </p>
+ </div>
+
+ <Button variant="outline" onClick={handleDisconnect} className="w-full">
+ {t('settings:remoteAccess.telegramWizard.buttons.disconnect')}
+ </Button>
+ </div>
+ )
+
+ const renderStep = () => {
+ switch (step) {
+ case 'instructions':
+ return renderInstructionsStep()
+ case 'token':
+ return renderTokenStep()
+ case 'configure':
+ return renderConfigureStep()
+ case 'pairing':
+ return renderPairingStep()
+ case 'success':
+ return renderSuccessStep()
+ default:
+ return null
+ }
+ }
+
+ const handleNext = () => {
+ switch (step) {
+ case 'instructions':
+ setStep('token')
+ break
+ case 'token':
+ if (validation?.valid) {
+ setStep('configure')
+ handleConfigure()
+ }
+ break
+ case 'configure':
+ // Handled by configure function
+ break
+ case 'pairing':
+ handleCheckPairing()
+ break
+ case 'success':
+ onOpenChange(false)
+ break
+ }
+ }
+
+ const handleBack = () => {
+ switch (step) {
+ case 'token':
+ setStep('instructions')
+ break
+ case 'configure':
+ setStep('token')
+ setValidation(null)
+ break
+ case 'pairing':
+ setStep('configure')
+ break
+ case 'success':
+ // Cannot go back from success
+ break
+ }
+ }
+
+ const canGoNext = (): boolean => {
+ switch (step) {
+ case 'instructions':
+ return true
+ case 'token':
+ return validation?.valid ?? false
+ case 'configure':
+ return false // Auto-progresses
+ case 'pairing':
+ return false // Manual check
+ case 'success':
+ return true
+ default:
+ return false
+ }
+ }
+
+ const canGoBack = (): boolean => {
+ return step !== 'instructions' && step !== 'success' && step !== 'configure'
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-[480px] max-w-[90vw]">
+ <DialogHeader>
+ <div className="flex items-center justify-center gap-2 mb-2">
+ <IconBrandTelegram size={24} className="text-blue-500" />
+ <DialogTitle>{t('settings:remoteAccess.telegramWizard.title')}</DialogTitle>
+ </div>
+ </DialogHeader>
+
+ {renderStepIndicator()}
+
+ {renderStep()}
+
+ {step !== 'configure' && step !== 'success' && (
+ <DialogFooter className="gap-2 sm:gap-0">
+ {canGoBack() && (
+ <Button variant="outline" onClick={handleBack} className="gap-1">
+ <IconArrowLeft size={16} />
+ {t('settings:remoteAccess.telegramWizard.buttons.back')}
+ </Button>
+ )}
+ {step !== 'pairing' && (
+ <Button
+ onClick={handleNext}
+ disabled={!canGoNext()}
+ className="gap-1"
+ >
+ {t('settings:remoteAccess.telegramWizard.buttons.next')}
+ <IconArrowRight size={16} />
+ </Button>
+ )}
+ </DialogFooter>
+ )}
+ </DialogContent>
+ </Dialog>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/containers/dialogs/TunnelSelectionDialog.tsx b/web-app/src/containers/dialogs/TunnelSelectionDialog.tsx
new file mode 100644
index 000000000..86cfcc24c
--- /dev/null
+++ b/web-app/src/containers/dialogs/TunnelSelectionDialog.tsx
@@ -0,0 +1,716 @@
+import { useState, useCallback, useEffect } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+import { Input } from '@/components/ui/input'
+import { Switch } from '@/components/ui/switch'
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from '@/components/ui/collapsible'
+import { cn } from '@/lib/utils'
+import {
+ IconLoader2,
+ IconCheck,
+ IconChevronDown,
+ IconExternalLink,
+ IconCopy,
+ IconRefresh,
+ IconPlayerPlay,
+ IconPlayerStop,
+ IconAlertCircle,
+} from '@tabler/icons-react'
+
+// Types mirroring Rust backend
+type TunnelProvider = 'none' | 'tailscale' | 'ngrok' | 'cloudflare' | 'localonly'
+
+interface TunnelProviderStatus {
+ provider: TunnelProvider
+ installed: boolean
+ authenticated: boolean
+ version: string | null
+ error: string | null
+}
+
+interface TunnelProvidersStatus {
+ tailscale: TunnelProviderStatus
+ ngrok: TunnelProviderStatus
+ cloudflare: TunnelProviderStatus
+ active_provider: TunnelProvider
+ active_tunnel: TunnelInfo | null
+}
+
+interface TunnelInfo {
+ provider: TunnelProvider
+ url: string
+ started_at: string
+ port: number
+ is_public: boolean
+}
+
+interface TunnelConfig {
+ preferred_provider: TunnelProvider
+ ngrok_auth_token: string | null
+ cloudflare_tunnel_id: string | null
+ auto_start: boolean
+}
+
+interface TunnelSelectionDialogProps {
+ isOpen: boolean
+ onClose: () => void
+ onTailscaleSetup?: () => void
+ onSave?: () => void
+}
+
+interface ProviderCardProps {
+ provider: TunnelProvider
+ name: string
+ description: string
+ features: string[]
+ status: TunnelProviderStatus | null
+ selected: boolean
+ onSelect: () => void
+ installUrl?: string
+ isLoading?: boolean
+ children?: React.ReactNode
+}
+
+function ProviderCard({
+ provider,
+ name,
+ description,
+ features,
+ status,
+ selected,
+ onSelect,
+ installUrl,
+ isLoading,
+ children,
+}: ProviderCardProps) {
+ const { t } = useTranslation()
+ const [isExpanded, setIsExpanded] = useState(selected)
+
+ useEffect(() => {
+ if (selected) {
+ setIsExpanded(true)
+ }
+ }, [selected])
+
+ const isInstalled = status?.installed ?? false
+
+ return (
+ <div
+ className={cn(
+ 'rounded-lg border p-4 transition-all cursor-pointer',
+ selected
+ ? 'border-primary bg-primary/5'
+ : 'border-border hover:border-primary/50'
+ )}
+ onClick={onSelect}
+ >
+ <div className="flex items-start justify-between gap-3">
+ <div className="flex items-start gap-3 flex-1">
+ <div
+ className={cn(
+ 'w-4 h-4 rounded-full border-2 mt-0.5 shrink-0 flex items-center justify-center',
+ selected ? 'border-primary bg-primary' : 'border-muted-foreground'
+ )}
+ >
+ {selected && <IconCheck size={10} className="text-white" />}
+ </div>
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2 mb-1">
+ <h3 className="font-medium text-foreground">{name}</h3>
+ {provider !== 'none' && provider !== 'localonly' && (
+ <div className="flex items-center gap-1.5">
+ {isLoading ? (
+ <IconLoader2 size={14} className="animate-spin text-muted-foreground" />
+ ) : isInstalled ? (
+ <div className="flex items-center gap-1">
+ <div className="w-2 h-2 rounded-full bg-green-500" />
+ <span className="text-xs text-muted-foreground">
+ {status?.version || t('settings:tunnel.installed')}
+ </span>
+ </div>
+ ) : (
+ <div className="flex items-center gap-1">
+ <div className="w-2 h-2 rounded-full bg-red-500" />
+ <span className="text-xs text-muted-foreground">
+ {t('settings:tunnel.notInstalled')}
+ </span>
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ <p className="text-sm text-muted-foreground">{description}</p>
+ {features.length > 0 && (
+ <ul className="mt-2 space-y-1">
+ {features.map((feature, index) => (
+ <li
+ key={index}
+ className="text-xs text-muted-foreground flex items-center gap-1.5"
+ >
+ <span className="text-primary">-</span>
+ {feature}
+ </li>
+ ))}
+ </ul>
+ )}
+ </div>
+ </div>
+ </div>
+
+ {/* Expandable configuration section */}
+ {selected && children && (
+ <Collapsible open={isExpanded} onOpenChange={setIsExpanded}>
+ <CollapsibleTrigger
+ className="flex items-center gap-1 text-sm text-muted-foreground mt-3 hover:text-foreground transition-colors"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <IconChevronDown
+ size={16}
+ className={cn(
+ 'transition-transform',
+ isExpanded && 'rotate-180'
+ )}
+ />
+ {t('settings:tunnel.configuration')}
+ </CollapsibleTrigger>
+ <CollapsibleContent className="mt-3">
+ <div
+ className="border-t border-border pt-3"
+ onClick={(e) => e.stopPropagation()}
+ >
+ {!isInstalled && installUrl && (
+ <div className="mb-3 p-3 bg-muted/50 rounded-md">
+ <p className="text-sm text-muted-foreground mb-2">
+ {t('settings:tunnel.installRequired')}
+ </p>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => window.open(installUrl, '_blank')}
+ >
+ <IconExternalLink size={14} className="mr-1.5" />
+ {t('settings:tunnel.installInstructions')}
+ </Button>
+ </div>
+ )}
+ {children}
+ </div>
+ </CollapsibleContent>
+ </Collapsible>
+ )}
+ </div>
+ )
+}
+
+export function TunnelSelectionDialog({
+ isOpen,
+ onClose,
+ onTailscaleSetup,
+ onSave,
+}: TunnelSelectionDialogProps) {
+ const { t } = useTranslation()
+
+ // State
+ const [providersStatus, setProvidersStatus] = useState<TunnelProvidersStatus | null>(null)
+ // Config is used for initial state hydration
+ const [, setConfig] = useState<TunnelConfig | null>(null)
+ const [selectedProvider, setSelectedProvider] = useState<TunnelProvider>('none')
+ const [isDetecting, setIsDetecting] = useState(false)
+ const [isStarting, setIsStarting] = useState(false)
+ const [isStopping, setIsStopping] = useState(false)
+ const [isSaving, setIsSaving] = useState(false)
+ const [showStopConfirm, setShowStopConfirm] = useState(false)
+
+ // Configuration inputs
+ const [ngrokToken, setNgrokToken] = useState('')
+ const [cloudflareTunnelId, setCloudflareTunnelId] = useState('')
+ const [autoStart, setAutoStart] = useState(false)
+
+ const fetchProvidersStatus = useCallback(async () => {
+ try {
+ setIsDetecting(true)
+ const status = await invoke<TunnelProvidersStatus>('tunnel_get_providers')
+ setProvidersStatus(status)
+ if (status.active_provider) {
+ setSelectedProvider(status.active_provider)
+ }
+ } catch (error) {
+ console.error('Failed to fetch tunnel providers status:', error)
+ toast.error(t('settings:tunnel.fetchStatusError'))
+ } finally {
+ setIsDetecting(false)
+ }
+ }, [t])
+
+ const fetchConfig = useCallback(async () => {
+ try {
+ const tunnelConfig = await invoke<TunnelConfig>('tunnel_get_config')
+ setConfig(tunnelConfig)
+ setSelectedProvider(tunnelConfig.preferred_provider || 'none')
+ setNgrokToken(tunnelConfig.ngrok_auth_token || '')
+ setCloudflareTunnelId(tunnelConfig.cloudflare_tunnel_id || '')
+ setAutoStart(tunnelConfig.auto_start)
+ } catch (error) {
+ console.error('Failed to fetch tunnel config:', error)
+ }
+ }, [])
+
+ // Fetch providers status and config on open
+ useEffect(() => {
+ if (isOpen) {
+ fetchProvidersStatus()
+ fetchConfig()
+ }
+ }, [isOpen, fetchProvidersStatus, fetchConfig])
+
+ // Reset state when dialog closes
+ useEffect(() => {
+ if (!isOpen) {
+ setShowStopConfirm(false)
+ }
+ }, [isOpen])
+
+ const handleDetectAll = useCallback(async () => {
+ try {
+ setIsDetecting(true)
+ const status = await invoke<TunnelProvidersStatus>('tunnel_detect_all')
+ setProvidersStatus(status)
+ toast.success(t('settings:tunnel.detectionComplete'))
+ } catch (error) {
+ console.error('Failed to detect tunnel providers:', error)
+ toast.error(t('settings:tunnel.detectionError'))
+ } finally {
+ setIsDetecting(false)
+ }
+ }, [t])
+
+ const handleSelectProvider = useCallback(async (provider: TunnelProvider) => {
+ setSelectedProvider(provider)
+ }, [])
+
+ const handleSaveNgrokToken = useCallback(async () => {
+ if (!ngrokToken.trim()) {
+ toast.error(t('settings:tunnel.ngrok.tokenRequired'))
+ return
+ }
+ try {
+ await invoke('tunnel_set_ngrok_token', { token: ngrokToken.trim() })
+ toast.success(t('settings:tunnel.ngrok.tokenSaved'))
+ await fetchProvidersStatus()
+ } catch (error) {
+ console.error('Failed to save ngrok token:', error)
+ toast.error(t('settings:tunnel.ngrok.tokenSaveError'))
+ }
+ }, [ngrokToken, t, fetchProvidersStatus])
+
+ const handleSaveCloudflareTunnel = useCallback(async () => {
+ if (!cloudflareTunnelId.trim()) {
+ toast.error(t('settings:tunnel.cloudflare.tunnelIdRequired'))
+ return
+ }
+ try {
+ await invoke('tunnel_set_cloudflare_tunnel', { tunnelId: cloudflareTunnelId.trim() })
+ toast.success(t('settings:tunnel.cloudflare.tunnelIdSaved'))
+ await fetchProvidersStatus()
+ } catch (error) {
+ console.error('Failed to save Cloudflare tunnel ID:', error)
+ toast.error(t('settings:tunnel.cloudflare.tunnelIdSaveError'))
+ }
+ }, [cloudflareTunnelId, t, fetchProvidersStatus])
+
+ const handleStartTunnel = useCallback(async () => {
+ try {
+ setIsStarting(true)
+ await invoke('tunnel_set_provider', { provider: selectedProvider })
+ await invoke('tunnel_start')
+ toast.success(t('settings:tunnel.startSuccess'))
+ await fetchProvidersStatus()
+ } catch (error) {
+ console.error('Failed to start tunnel:', error)
+ const errorMsg = error instanceof Error ? error.message : String(error)
+ toast.error(t('settings:tunnel.startError', { error: errorMsg }))
+ } finally {
+ setIsStarting(false)
+ }
+ }, [selectedProvider, t, fetchProvidersStatus])
+
+ const handleStopTunnel = useCallback(async () => {
+ try {
+ setIsStopping(true)
+ await invoke('tunnel_stop')
+ toast.success(t('settings:tunnel.stopSuccess'))
+ setShowStopConfirm(false)
+ await fetchProvidersStatus()
+ } catch (error) {
+ console.error('Failed to stop tunnel:', error)
+ toast.error(t('settings:tunnel.stopError'))
+ } finally {
+ setIsStopping(false)
+ }
+ }, [t, fetchProvidersStatus])
+
+ const handleSave = useCallback(async () => {
+ try {
+ setIsSaving(true)
+ await invoke('tunnel_set_provider', { provider: selectedProvider })
+ toast.success(t('settings:tunnel.saved'))
+ onSave?.()
+ onClose()
+ } catch (error) {
+ console.error('Failed to save tunnel settings:', error)
+ toast.error(t('settings:tunnel.saveError'))
+ } finally {
+ setIsSaving(false)
+ }
+ }, [selectedProvider, t, onSave, onClose])
+
+ const handleCopyUrl = useCallback(() => {
+ if (providersStatus?.active_tunnel?.url) {
+ navigator.clipboard.writeText(providersStatus.active_tunnel.url)
+ toast.success(t('settings:tunnel.urlCopied'))
+ }
+ }, [providersStatus?.active_tunnel?.url, t])
+
+ const activeTunnel = providersStatus?.active_tunnel
+ const hasTunnelRunning = !!activeTunnel
+
+ // Get provider status helper
+ const getProviderStatus = (provider: TunnelProvider): TunnelProviderStatus | null => {
+ if (!providersStatus) return null
+ switch (provider) {
+ case 'tailscale':
+ return providersStatus.tailscale
+ case 'ngrok':
+ return providersStatus.ngrok
+ case 'cloudflare':
+ return providersStatus.cloudflare
+ default:
+ return null
+ }
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
+ <DialogContent className="sm:max-w-[600px] max-w-[90vw]">
+ <DialogHeader>
+ <DialogTitle>{t('settings:tunnel.title')}</DialogTitle>
+ <DialogDescription>
+ {t('settings:tunnel.description')}
+ </DialogDescription>
+ </DialogHeader>
+
+ {/* Active Tunnel Status */}
+ {hasTunnelRunning && (
+ <div className="bg-green-500/10 border border-green-500/30 rounded-lg p-4">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-3">
+ <div className="w-3 h-3 rounded-full bg-green-500 animate-pulse" />
+ <div>
+ <p className="font-medium text-foreground">
+ {t('settings:tunnel.activeStatus')}
+ </p>
+ <p className="text-sm text-muted-foreground">
+ {t('settings:tunnel.provider')}: {activeTunnel.provider}
+ </p>
+ </div>
+ </div>
+ <Button
+ variant="destructive"
+ size="sm"
+ onClick={() => setShowStopConfirm(true)}
+ disabled={isStopping}
+ >
+ {isStopping ? (
+ <IconLoader2 className="animate-spin mr-1.5 h-4 w-4" />
+ ) : (
+ <IconPlayerStop className="mr-1.5 h-4 w-4" />
+ )}
+ {t('settings:tunnel.stop')}
+ </Button>
+ </div>
+ <div className="mt-3 flex items-center gap-2">
+ <Input
+ value={activeTunnel.url}
+ readOnly
+ className="font-mono text-sm bg-background"
+ />
+ <Button variant="outline" size="icon" onClick={handleCopyUrl}>
+ <IconCopy size={16} />
+ </Button>
+ </div>
+ <div className="mt-2 flex items-center gap-4 text-xs text-muted-foreground">
+ <span>
+ {t('settings:tunnel.port')}: {activeTunnel.port}
+ </span>
+ <span>
+ {activeTunnel.is_public
+ ? t('settings:tunnel.publicAccess')
+ : t('settings:tunnel.privateAccess')}
+ </span>
+ </div>
+ </div>
+ )}
+
+ {/* Stop Confirmation */}
+ {showStopConfirm && (
+ <div className="bg-destructive/10 border border-destructive/30 rounded-lg p-4">
+ <div className="flex items-start gap-3">
+ <IconAlertCircle className="text-destructive shrink-0 mt-0.5" size={20} />
+ <div className="flex-1">
+ <p className="font-medium text-foreground">
+ {t('settings:tunnel.stopConfirmTitle')}
+ </p>
+ <p className="text-sm text-muted-foreground mt-1">
+ {t('settings:tunnel.stopConfirmDescription')}
+ </p>
+ <div className="flex items-center gap-2 mt-3">
+ <Button
+ variant="destructive"
+ size="sm"
+ onClick={handleStopTunnel}
+ disabled={isStopping}
+ >
+ {isStopping && (
+ <IconLoader2 className="animate-spin mr-1.5 h-4 w-4" />
+ )}
+ {t('settings:tunnel.confirmStop')}
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => setShowStopConfirm(false)}
+ >
+ {t('common:cancel')}
+ </Button>
+ </div>
+ </div>
+ </div>
+ </div>
+ )}
+
+ {/* Detect Providers Button */}
+ <div className="flex items-center justify-between">
+ <span className="text-sm text-muted-foreground">
+ {t('settings:tunnel.selectProvider')}
+ </span>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleDetectAll}
+ disabled={isDetecting}
+ >
+ {isDetecting ? (
+ <IconLoader2 className="animate-spin mr-1.5 h-4 w-4" />
+ ) : (
+ <IconRefresh className="mr-1.5 h-4 w-4" />
+ )}
+ {t('settings:tunnel.detectProviders')}
+ </Button>
+ </div>
+
+ {/* Provider Selection */}
+ <div className="space-y-3 max-h-[40vh] overflow-y-auto pr-1">
+ {/* None / Local Only */}
+ <ProviderCard
+ provider="none"
+ name={t('settings:tunnel.providers.none.name')}
+ description={t('settings:tunnel.providers.none.description')}
+ features={[]}
+ status={null}
+ selected={selectedProvider === 'none' || selectedProvider === 'localonly'}
+ onSelect={() => handleSelectProvider('none')}
+ />
+
+ {/* Tailscale */}
+ <ProviderCard
+ provider="tailscale"
+ name={t('settings:tunnel.providers.tailscale.name')}
+ description={t('settings:tunnel.providers.tailscale.description')}
+ features={[
+ t('settings:tunnel.providers.tailscale.feature1'),
+ t('settings:tunnel.providers.tailscale.feature2'),
+ t('settings:tunnel.providers.tailscale.feature3'),
+ ]}
+ status={getProviderStatus('tailscale')}
+ selected={selectedProvider === 'tailscale'}
+ onSelect={() => handleSelectProvider('tailscale')}
+ installUrl="https://tailscale.com/download"
+ isLoading={isDetecting}
+ >
+ <div className="space-y-3">
+ <p className="text-sm text-muted-foreground">
+ {t('settings:tunnel.providers.tailscale.configInfo')}
+ </p>
+ {onTailscaleSetup && (
+ <Button variant="outline" size="sm" onClick={onTailscaleSetup}>
+ <IconExternalLink size={14} className="mr-1.5" />
+ {t('settings:tunnel.providers.tailscale.openSetup')}
+ </Button>
+ )}
+ </div>
+ </ProviderCard>
+
+ {/* ngrok */}
+ <ProviderCard
+ provider="ngrok"
+ name={t('settings:tunnel.providers.ngrok.name')}
+ description={t('settings:tunnel.providers.ngrok.description')}
+ features={[
+ t('settings:tunnel.providers.ngrok.feature1'),
+ t('settings:tunnel.providers.ngrok.feature2'),
+ t('settings:tunnel.providers.ngrok.feature3'),
+ ]}
+ status={getProviderStatus('ngrok')}
+ selected={selectedProvider === 'ngrok'}
+ onSelect={() => handleSelectProvider('ngrok')}
+ installUrl="https://ngrok.com/download"
+ isLoading={isDetecting}
+ >
+ <div className="space-y-3">
+ <div>
+ <label className="text-sm font-medium text-foreground mb-1.5 block">
+ {t('settings:tunnel.providers.ngrok.authToken')}
+ </label>
+ <div className="flex items-center gap-2">
+ <Input
+ type="password"
+ value={ngrokToken}
+ onChange={(e) => setNgrokToken(e.target.value)}
+ placeholder={t('settings:tunnel.providers.ngrok.tokenPlaceholder')}
+ className="font-mono"
+ />
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleSaveNgrokToken}
+ disabled={!ngrokToken.trim()}
+ >
+ {t('common:save')}
+ </Button>
+ </div>
+ </div>
+ <Button
+ variant="link"
+ size="sm"
+ className="p-0 h-auto"
+ onClick={() =>
+ window.open('https://dashboard.ngrok.com/get-started/your-authtoken', '_blank')
+ }
+ >
+ <IconExternalLink size={14} className="mr-1" />
+ {t('settings:tunnel.providers.ngrok.getToken')}
+ </Button>
+ </div>
+ </ProviderCard>
+
+ {/* Cloudflare */}
+ <ProviderCard
+ provider="cloudflare"
+ name={t('settings:tunnel.providers.cloudflare.name')}
+ description={t('settings:tunnel.providers.cloudflare.description')}
+ features={[
+ t('settings:tunnel.providers.cloudflare.feature1'),
+ t('settings:tunnel.providers.cloudflare.feature2'),
+ t('settings:tunnel.providers.cloudflare.feature3'),
+ ]}
+ status={getProviderStatus('cloudflare')}
+ selected={selectedProvider === 'cloudflare'}
+ onSelect={() => handleSelectProvider('cloudflare')}
+ installUrl="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/"
+ isLoading={isDetecting}
+ >
+ <div className="space-y-3">
+ <div>
+ <label className="text-sm font-medium text-foreground mb-1.5 block">
+ {t('settings:tunnel.providers.cloudflare.tunnelId')}
+ </label>
+ <div className="flex items-center gap-2">
+ <Input
+ value={cloudflareTunnelId}
+ onChange={(e) => setCloudflareTunnelId(e.target.value)}
+ placeholder={t('settings:tunnel.providers.cloudflare.tunnelIdPlaceholder')}
+ className="font-mono"
+ />
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleSaveCloudflareTunnel}
+ disabled={!cloudflareTunnelId.trim()}
+ >
+ {t('common:save')}
+ </Button>
+ </div>
+ </div>
+ <Button
+ variant="link"
+ size="sm"
+ className="p-0 h-auto"
+ onClick={() =>
+ window.open('https://one.dash.cloudflare.com/', '_blank')
+ }
+ >
+ <IconExternalLink size={14} className="mr-1" />
+ {t('settings:tunnel.providers.cloudflare.openDashboard')}
+ </Button>
+ </div>
+ </ProviderCard>
+ </div>
+
+ {/* Auto-start Toggle */}
+ <div className="flex items-center justify-between py-2 border-t border-border">
+ <div>
+ <p className="font-medium text-foreground">
+ {t('settings:tunnel.autoStart')}
+ </p>
+ <p className="text-sm text-muted-foreground">
+ {t('settings:tunnel.autoStartDescription')}
+ </p>
+ </div>
+ <Switch
+ checked={autoStart}
+ onCheckedChange={setAutoStart}
+ disabled={selectedProvider === 'none'}
+ />
+ </div>
+
+ <DialogFooter className="gap-2 sm:gap-0">
+ <Button variant="outline" onClick={onClose}>
+ {t('common:cancel')}
+ </Button>
+ {!hasTunnelRunning && selectedProvider !== 'none' && (
+ <Button
+ variant="secondary"
+ onClick={handleStartTunnel}
+ disabled={isStarting || !getProviderStatus(selectedProvider)?.installed}
+ >
+ {isStarting ? (
+ <IconLoader2 className="animate-spin mr-1.5 h-4 w-4" />
+ ) : (
+ <IconPlayerPlay className="mr-1.5 h-4 w-4" />
+ )}
+ {t('settings:tunnel.startTunnel')}
+ </Button>
+ )}
+ <Button onClick={handleSave} disabled={isSaving}>
+ {isSaving && <IconLoader2 className="animate-spin mr-1.5 h-4 w-4" />}
+ {t('common:save')}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/web-app/src/containers/dialogs/WhatsAppWizardDialog.tsx b/web-app/src/containers/dialogs/WhatsAppWizardDialog.tsx
new file mode 100644
index 000000000..f6a081725
--- /dev/null
+++ b/web-app/src/containers/dialogs/WhatsAppWizardDialog.tsx
@@ -0,0 +1,426 @@
+import { useState, useCallback, useEffect } from 'react'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ IconBrandWhatsapp,
+ IconQrcode,
+ IconCheck,
+ IconX,
+ IconRefresh,
+ IconArrowLeft,
+} from '@tabler/icons-react'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { Button } from '@/components/ui/button'
+
+// WhatsApp configuration types (mirroring Rust backend)
+export interface WhatsAppConfig {
+ account_id: string
+ session_path: string
+ connected: boolean
+ phone_number: string | null
+ qr_code: string | null
+ contacts_count: number
+}
+
+// WhatsApp authentication status
+export interface WhatsAppAuthStatus {
+ in_progress: boolean
+ qr_code_ready: boolean
+ qr_code: string | null
+ authenticated: boolean
+ error: string | null
+}
+
+interface WhatsAppWizardDialogProps {
+ isOpen: boolean
+ onOpenChange: (open: boolean) => void
+ onConnected: (config: WhatsAppConfig) => void
+}
+
+type WizardStep = 'welcome' | 'scanning' | 'verifying' | 'success' | 'error'
+
+export function WhatsAppWizardDialog({
+ isOpen,
+ onOpenChange,
+ onConnected,
+}: WhatsAppWizardDialogProps) {
+ const { t } = useTranslation()
+ const [step, setStep] = useState<WizardStep>('welcome')
+ const [isLoading, setIsLoading] = useState(false)
+ const [isPolling, setIsPolling] = useState(false)
+ const [pollingInterval, setPollingInterval] = useState<NodeJS.Timeout | null>(null)
+ const [, setAuthStatus] = useState<WhatsAppAuthStatus | null>(null)
+ const [qrCodeImage, setQrCodeImage] = useState<string | null>(null)
+ const [errorMessage, setErrorMessage] = useState<string | null>(null)
+ const [config, setConfig] = useState<WhatsAppConfig | null>(null)
+
+ // Clean up polling on unmount
+ useEffect(() => {
+ return () => {
+ if (pollingInterval) {
+ clearInterval(pollingInterval)
+ }
+ }
+ }, [pollingInterval])
+
+ // Stop polling when dialog closes
+ useEffect(() => {
+ if (!isOpen && pollingInterval) {
+ clearInterval(pollingInterval)
+ setPollingInterval(null)
+ }
+ }, [isOpen, pollingInterval])
+
+ // Reset state when dialog opens
+ useEffect(() => {
+ if (isOpen) {
+ setStep('welcome')
+ setIsLoading(false)
+ setIsPolling(false)
+ setAuthStatus(null)
+ setQrCodeImage(null)
+ setErrorMessage(null)
+ setConfig(null)
+ if (pollingInterval) {
+ clearInterval(pollingInterval)
+ setPollingInterval(null)
+ }
+ }
+ }, [isOpen])
+
+ const startAuthentication = useCallback(async () => {
+ try {
+ setIsLoading(true)
+ setErrorMessage(null)
+
+ // Start WhatsApp authentication
+ const status = await invoke<WhatsAppAuthStatus>('whatsapp_start_auth')
+ setAuthStatus(status)
+
+ // Move to scanning step
+ setStep('scanning')
+ startPolling()
+ } catch (error) {
+ console.error('Failed to start WhatsApp auth:', error)
+ setErrorMessage(
+ error instanceof Error ? error.message : String(error)
+ )
+ setStep('error')
+ } finally {
+ setIsLoading(false)
+ }
+ }, [])
+
+ const startPolling = useCallback(() => {
+ // Poll for QR code and authentication status
+ const interval = setInterval(async () => {
+ try {
+ const status = await invoke<WhatsAppAuthStatus>('whatsapp_check_auth')
+ setAuthStatus(status)
+
+ // If we get a QR code, display it
+ if (status.qr_code) {
+ setQrCodeImage(status.qr_code)
+ }
+
+ // If authenticated, stop polling and show success
+ if (status.authenticated) {
+ clearInterval(interval)
+ setPollingInterval(null)
+ setIsPolling(false)
+
+ // Get the final config
+ const whatsappConfig = await invoke<WhatsAppConfig>('whatsapp_get_config')
+ setConfig(whatsappConfig)
+ setStep('success')
+ onConnected(whatsappConfig)
+ }
+
+ // If there's an error, show it
+ if (status.error) {
+ clearInterval(interval)
+ setPollingInterval(null)
+ setIsPolling(false)
+ setErrorMessage(status.error)
+ setStep('error')
+ }
+ } catch (error) {
+ console.error('Polling error:', error)
+ }
+ }, 2000)
+
+ setPollingInterval(interval)
+ setIsPolling(true)
+ }, [onConnected])
+
+ const handleDisconnect = useCallback(async () => {
+ try {
+ setIsLoading(true)
+ await invoke('whatsapp_disconnect')
+ setStep('welcome')
+ setConfig(null)
+ setQrCodeImage(null)
+ if (pollingInterval) {
+ clearInterval(pollingInterval)
+ setPollingInterval(null)
+ }
+ setIsPolling(false)
+ } catch (error) {
+ console.error('Failed to disconnect WhatsApp:', error)
+ toast.error(t('settings:remoteAccess.disconnectError'))
+ } finally {
+ setIsLoading(false)
+ }
+ }, [pollingInterval, t])
+
+ const handleClose = useCallback(() => {
+ // Stop polling before closing
+ if (pollingInterval) {
+ clearInterval(pollingInterval)
+ setPollingInterval(null)
+ }
+ onOpenChange(false)
+ }, [pollingInterval, onOpenChange])
+
+ const renderStepContent = () => {
+ switch (step) {
+ case 'welcome':
+ return (
+ <div className="flex flex-col items-center text-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4">
+ <IconBrandWhatsapp size={32} className="text-green-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ {t('settings:remoteAccess.whatsappWizard.setupTitle')}
+ </h3>
+ <p className="text-muted-foreground text-sm mb-6 max-w-xs">
+ {t('settings:remoteAccess.whatsappWizard.setupDescription')}
+ </p>
+ <div className="bg-muted/50 rounded-lg p-4 w-full text-left">
+ <h4 className="font-medium text-sm mb-2">
+ {t('settings:remoteAccess.whatsappWizard.howItWorks')}
+ </h4>
+ <ol className="text-muted-foreground text-sm space-y-2">
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">1.</span>
+ {t('settings:remoteAccess.whatsappWizard.whatsappStep1')}
+ </li>
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">2.</span>
+ {t('settings:remoteAccess.whatsappWizard.whatsappStep2')}
+ </li>
+ <li className="flex items-start gap-2">
+ <span className="font-medium text-foreground">3.</span>
+ {t('settings:remoteAccess.whatsappWizard.whatsappStep3')}
+ </li>
+ </ol>
+ </div>
+ </div>
+ )
+
+ case 'scanning':
+ return (
+ <div className="flex flex-col items-center text-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4">
+ <IconQrcode size={32} className="text-green-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ {t('settings:remoteAccess.whatsappWizard.scanQrCode')}
+ </h3>
+ <p className="text-muted-foreground text-sm mb-4">
+ {t('settings:remoteAccess.whatsappWizard.qrCodeInstructions')}
+ </p>
+
+ {/* QR Code Display */}
+ <div className="bg-white p-4 rounded-lg mb-4 min-h-[200px] min-w-[200px] flex items-center justify-center">
+ {qrCodeImage ? (
+ <img
+ src={qrCodeImage}
+ alt="WhatsApp QR Code"
+ className="w-48 h-48"
+ />
+ ) : (
+ <div className="flex flex-col items-center text-muted-foreground">
+ <IconQrcode size={48} className="mb-2" />
+ <span className="text-sm">
+ {t('settings:remoteAccess.whatsappWizard.generatingQrCode')}
+ </span>
+ </div>
+ )}
+ </div>
+
+ {isPolling && (
+ <p className="text-muted-foreground text-xs">
+ {t('settings:remoteAccess.whatsappWizard.waitingForScan')}
+ </p>
+ )}
+ </div>
+ )
+
+ case 'verifying':
+ return (
+ <div className="flex flex-col items-center text-center py-4">
+ <div className="w-16 h-16 rounded-full bg-blue-500/10 flex items-center justify-center mb-4">
+ <IconRefresh size={32} className="text-blue-500 animate-spin" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ {t('settings:remoteAccess.whatsappWizard.verifyingConnection')}
+ </h3>
+ <p className="text-muted-foreground text-sm">
+ {t('settings:remoteAccess.whatsappWizard.pleaseWait')}
+ </p>
+ </div>
+ )
+
+ case 'success':
+ return (
+ <div className="flex flex-col items-center text-center py-4">
+ <div className="w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4">
+ <IconCheck size={32} className="text-green-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ {t('settings:remoteAccess.whatsappWizard.whatsappConnected')}
+ </h3>
+ <p className="text-muted-foreground text-sm mb-4">
+ {t('settings:remoteAccess.whatsappWizard.whatsappConnectedDescription')}
+ </p>
+ {config?.phone_number && (
+ <div className="bg-muted/50 rounded-lg px-4 py-2">
+ <span className="text-sm font-medium">{config.phone_number}</span>
+ </div>
+ )}
+ </div>
+ )
+
+ case 'error':
+ return (
+ <div className="flex flex-col items-center text-center py-4">
+ <div className="w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center mb-4">
+ <IconX size={32} className="text-red-500" />
+ </div>
+ <h3 className="text-lg font-semibold mb-2">
+ {t('settings:remoteAccess.whatsappWizard.connectionFailed')}
+ </h3>
+ <p className="text-muted-foreground text-sm mb-4">
+ {errorMessage || t('settings:remoteAccess.whatsappWizard.unknownError')}
+ </p>
+ </div>
+ )
+
+ default:
+ return null
+ }
+ }
+
+ const renderFooter = () => {
+ switch (step) {
+ case 'welcome':
+ return (
+ <>
+ <Button variant="outline" onClick={handleClose}>
+ {t('common:cancel')}
+ </Button>
+ <Button onClick={startAuthentication} disabled={isLoading}>
+ {isLoading ? t('settings:remoteAccess.whatsappWizard.connecting') : t('settings:remoteAccess.whatsappWizard.startSetup')}
+ </Button>
+ </>
+ )
+
+ case 'scanning':
+ return (
+ <>
+ <Button
+ variant="outline"
+ onClick={() => {
+ if (pollingInterval) {
+ clearInterval(pollingInterval)
+ setPollingInterval(null)
+ }
+ setIsPolling(false)
+ setStep('welcome')
+ }}
+ disabled={isLoading}
+ >
+ <IconArrowLeft className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.whatsappWizard.back')}
+ </Button>
+ <Button onClick={startAuthentication} disabled={isLoading}>
+ <IconRefresh className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.whatsappWizard.refreshQrCode')}
+ </Button>
+ </>
+ )
+
+ case 'verifying':
+ return null // No buttons while verifying
+
+ case 'success':
+ return (
+ <>
+ <Button variant="outline" onClick={handleDisconnect} disabled={isLoading}>
+ {t('settings:remoteAccess.disconnect')}
+ </Button>
+ <Button onClick={handleClose}>
+ {t('common:done')}
+ </Button>
+ </>
+ )
+
+ case 'error':
+ return (
+ <>
+ <Button
+ variant="outline"
+ onClick={() => {
+ setStep('welcome')
+ setErrorMessage(null)
+ }}
+ >
+ <IconArrowLeft className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.whatsappWizard.tryAgain')}
+ </Button>
+ <Button onClick={handleClose}>
+ {t('common:close')}
+ </Button>
+ </>
+ )
+
+ default:
+ return null
+ }
+ }
+
+ return (
+ <Dialog open={isOpen} onOpenChange={handleClose}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2">
+ <IconBrandWhatsapp className="h-5 w-5 text-green-500" />
+ {t('settings:remoteAccess.whatsapp')}
+ </DialogTitle>
+ <DialogDescription>
+ {step === 'welcome' && t('settings:remoteAccess.whatsappWizard.whatsappWizardDescription')}
+ {step === 'scanning' && t('settings:remoteAccess.whatsappWizard.scanQrCodeDescription')}
+ {step === 'verifying' && t('settings:remoteAccess.whatsappWizard.verifyingDescription')}
+ {step === 'success' && t('settings:remoteAccess.whatsappWizard.successDescription')}
+ {step === 'error' && t('settings:remoteAccess.whatsappWizard.errorDescription')}
+ </DialogDescription>
+ </DialogHeader>
+
+ <div className="py-2">{renderStepContent()}</div>
+
+ <DialogFooter className="sm:justify-between">
+ {renderFooter()}
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/containers/dialogs/index.ts b/web-app/src/containers/dialogs/index.ts
index 737a6091d..c014f6753 100644
--- a/web-app/src/containers/dialogs/index.ts
+++ b/web-app/src/containers/dialogs/index.ts
@@ -9,3 +9,6 @@ export { DeleteAssistantDialog } from './DeleteAssistantDialog'
export { DeleteProjectDialog } from './DeleteProjectDialog'
export { AddProviderDialog } from './AddProviderDialog'
export { SearchDialog } from './SearchDialog'
+export { TelegramWizard as TelegramWizardDialog } from './TelegramWizardDialog'
+export { WhatsAppWizardDialog } from './WhatsAppWizardDialog'
+export { DiscordWizardDialog } from './DiscordWizardDialog'
diff --git a/web-app/src/locales/en/common.json b/web-app/src/locales/en/common.json
index 764f68a67..4d147bd93 100644
--- a/web-app/src/locales/en/common.json
+++ b/web-app/src/locales/en/common.json
@@ -3,6 +3,7 @@
"hardware": "Hardware",
"mcp-servers": "MCP Servers",
"local_api_server": "Local API Server",
+ "remote_access": "Remote Access",
"https_proxy": "HTTPS Proxy",
"extensions": "Extensions",
"attachments": "Attachments",
diff --git a/web-app/src/locales/en/settings.json b/web-app/src/locales/en/settings.json
index 9b823fb49..713be4045 100644
--- a/web-app/src/locales/en/settings.json
+++ b/web-app/src/locales/en/settings.json
@@ -318,5 +318,219 @@
"updateError": "Failed to update Llamacpp"
},
"backendInstallSuccess": "Backend installed successfully",
- "backendInstallError": "Failed to install backend"
+ "backendInstallError": "Failed to install backend",
+ "remoteAccess": {
+ "title": "Remote Access",
+ "description": "Access your Jan assistant remotely through messaging platforms.",
+ "status": "Status",
+ "enabled": "Remote Access Enabled",
+ "disabled": "Remote Access Disabled",
+ "notInstalled": "Not Installed",
+ "running": "Running",
+ "stopped": "Stopped",
+ "activeChannels": "Active Channels",
+ "connectedUsers": "Connected Users",
+ "port": "Port",
+ "nodeVersion": "Node.js Version",
+ "openclawVersion": "OpenClaw Version",
+ "quickSetup": "Quick Setup",
+ "enableRemoteAccess": "Enable Remote Access",
+ "disableRemoteAccess": "Disable Remote Access",
+ "connectChannel": "Connect a Channel",
+ "shareAccess": "Share Access",
+ "generateInviteLink": "Generate Invite Link",
+ "recentMessages": "Recent Messages",
+ "noRecentMessages": "No recent messages",
+ "settings": "Settings",
+ "modelForRemote": "Model for Remote",
+ "accessPolicy": "Access Policy",
+ "requirePairing": "Require Pairing",
+ "openAccess": "Open Access",
+ "remoteMethod": "Remote Method",
+ "advancedSettings": "Advanced Settings",
+ "install": "Install",
+ "installing": "Installing...",
+ "start": "Start",
+ "stop": "Stop",
+ "starting": "Starting...",
+ "stopping": "Stopping...",
+ "installError": "Failed to install OpenClaw",
+ "startError": "Failed to start Remote Access",
+ "stopError": "Failed to stop Remote Access",
+ "nodeRequired": "Node.js is required to run Remote Access",
+ "portInUse": "Port is already in use",
+ "telegram": "Telegram",
+ "whatsapp": "WhatsApp",
+ "discord": "Discord",
+ "channels": "Channels",
+ "addChannel": {
+ "title": "Add Channel",
+ "description": "Select a messaging platform to connect",
+ "cancel": "Cancel",
+ "continue": "Continue"
+ },
+ "channelDescriptions": {
+ "telegram": "Connect via Telegram bot for secure messaging",
+ "whatsapp": "Connect via WhatsApp for business messaging",
+ "discord": "Connect via Discord bot for server-based chat"
+ },
+ "connected": "Connected",
+ "notConnected": "Not Connected",
+ "manage": "Manage",
+ "disconnect": "Disconnect",
+ "channelDisconnected": "{{channel}} disconnected",
+ "disconnectError": "Failed to disconnect channel",
+ "channelNotConnected": "Click settings to connect {{channel}}",
+ "user_one": "user",
+ "other": "users",
+ "users": "{{count}} {{item}}",
+ "justNow": "just now",
+ "minuteAgo": "min ago",
+ "minutesAgo": "mins ago",
+ "hourAgo": "hour ago",
+ "hoursAgo": "hours ago",
+ "telegramWizard": {
+ "title": "Connect Telegram",
+ "description": "Set up Telegram to chat with Jan remotely",
+ "step1": {
+ "title": "Create a Bot",
+ "instruction1": "Open Telegram and search for @BotFather",
+ "instruction2": "Send /newbot to create a new bot",
+ "instruction3": "Follow the prompts to name your bot",
+ "instruction4": "Copy the bot token (it looks like: 123456789:ABCdefGHI...)"
+ },
+ "step2": {
+ "title": "Enter Token",
+ "placeholder": "Paste your bot token here",
+ "validate": "Validate Token",
+ "validating": "Validating...",
+ "invalidToken": "Invalid token. Please check and try again.",
+ "validToken": "Token validated! Bot: @{{username}}"
+ },
+ "step3": {
+ "title": "Configure & Start",
+ "connecting": "Configuring Telegram channel...",
+ "success": "Telegram channel configured successfully!",
+ "error": "Failed to configure Telegram: {{error}}"
+ },
+ "step4": {
+ "title": "Pair Your Device",
+ "instruction": "Send this code to your Telegram bot:",
+ "codeLabel": "Pairing Code",
+ "waiting": "Waiting for pairing...",
+ "checkAgain": "Check Again",
+ "skipForNow": "Skip for Now"
+ },
+ "step5": {
+ "title": "Connected!",
+ "success": "Telegram is now connected!",
+ "instruction": "You can now chat with Jan by sending messages to your bot.",
+ "botUsername": "Your bot: @{{username}}",
+ "pairedUsers": "{{count}} device(s) paired"
+ },
+ "buttons": {
+ "next": "Next",
+ "back": "Back",
+ "connect": "Connect",
+ "cancel": "Cancel",
+ "done": "Done",
+ "retry": "Retry",
+ "disconnect": "Disconnect"
+ },
+ "status": {
+ "notConnected": "Not Connected",
+ "connected": "Connected",
+ "connecting": "Connecting..."
+ },
+ "errors": {
+ "networkError": "Network error. Please check your connection.",
+ "tokenRequired": "Please enter a bot token",
+ "configError": "Failed to save configuration"
+ }
+ },
+ "whatsappWizard": {
+ "title": "Connect WhatsApp",
+ "description": "Set up WhatsApp to chat with Jan remotely",
+ "whatsappWizardDescription": "Connect your WhatsApp account to enable remote messaging",
+ "scanQrCodeDescription": "Scan the QR code with your WhatsApp app",
+ "verifyingDescription": "Verifying your WhatsApp connection",
+ "successDescription": "Your WhatsApp is connected successfully",
+ "errorDescription": "Failed to connect WhatsApp",
+ "setupTitle": "WhatsApp Setup",
+ "setupDescription": "Connect your WhatsApp account to enable remote messaging",
+ "howItWorks": "How it works",
+ "whatsappStep1": "Click 'Start Setup' to begin",
+ "whatsappStep2": "Scan the QR code with your phone",
+ "whatsappStep3": "Wait for the connection to be established",
+ "scanQrCode": "Scan QR Code",
+ "qrCodeInstructions": "Open WhatsApp on your phone and scan this QR code",
+ "generatingQrCode": "Generating QR code...",
+ "waitingForScan": "Waiting for scan...",
+ "verifyingConnection": "Verifying Connection",
+ "pleaseWait": "Please wait while we verify your connection",
+ "whatsappConnected": "WhatsApp Connected!",
+ "whatsappConnectedDescription": "Your WhatsApp is now connected. You can chat with Jan by sending messages.",
+ "connectionFailed": "Connection Failed",
+ "unknownError": "An unknown error occurred",
+ "back": "Back",
+ "refreshQrCode": "Refresh QR Code",
+ "tryAgain": "Try Again",
+ "startSetup": "Start Setup",
+ "connecting": "Connecting...",
+ "disconnectError": "Failed to disconnect WhatsApp",
+ "buttons": {
+ "next": "Next",
+ "back": "Back",
+ "connect": "Connect",
+ "cancel": "Cancel",
+ "done": "Done",
+ "retry": "Retry",
+ "disconnect": "Disconnect"
+ }
+ },
+ "discordWizard": {
+ "title": "Connect Discord",
+ "description": "Set up Discord to chat with Jan remotely",
+ "step1": {
+ "title": "Create a Bot",
+ "instruction1": "Go to the Discord Developer Portal",
+ "instruction2": "Create a new application",
+ "instruction3": "Navigate to the 'Bot' section",
+ "instruction4": "Click 'Reset Token' to get your bot token",
+ "instruction5": "Copy the bot token"
+ },
+ "step2": {
+ "title": "Enter Token",
+ "placeholder": "Paste your bot token here",
+ "validate": "Validate Token",
+ "validating": "Validating...",
+ "invalidToken": "Invalid token. Please check and try again.",
+ "validToken": "Token validated! Bot: {{username}}"
+ },
+ "step3": {
+ "title": "Configure & Connect",
+ "connecting": "Configuring Discord channel...",
+ "success": "Discord channel configured successfully!",
+ "error": "Failed to configure Discord: {{error}}"
+ },
+ "step4": {
+ "success": "Discord is now connected!",
+ "instruction": "You can now chat with Jan by inviting your bot to servers.",
+ "botUsername": "Your bot: {{username}}"
+ },
+ "buttons": {
+ "next": "Next",
+ "back": "Back",
+ "done": "Done",
+ "disconnect": "Disconnect"
+ },
+ "status": {
+ "notConnected": "Not Connected"
+ },
+ "errors": {
+ "networkError": "Network error. Please check your connection.",
+ "tokenRequired": "Please enter a bot token"
+ }
+ }
+ }
}
diff --git a/web-app/src/routeTree.gen.ts b/web-app/src/routeTree.gen.ts
index 167dbf269..8ede2f885 100644
--- a/web-app/src/routeTree.gen.ts
+++ b/web-app/src/routeTree.gen.ts
@@ -15,6 +15,7 @@ import { Route as IndexRouteImport } from './routes/index'
import { Route as HubIndexRouteImport } from './routes/hub/index'
import { Route as ThreadsThreadIdRouteImport } from './routes/threads/$threadId'
import { Route as SettingsShortcutsRouteImport } from './routes/settings/shortcuts'
+import { Route as SettingsRemoteAccessRouteImport } from './routes/settings/remote-access'
import { Route as SettingsPrivacyRouteImport } from './routes/settings/privacy'
import { Route as SettingsMcpServersRouteImport } from './routes/settings/mcp-servers'
import { Route as SettingsLocalApiServerRouteImport } from './routes/settings/local-api-server'
@@ -61,6 +62,11 @@ const SettingsShortcutsRoute = SettingsShortcutsRouteImport.update({
path: '/settings/shortcuts',
getParentRoute: () => rootRouteImport,
} as any)
+const SettingsRemoteAccessRoute = SettingsRemoteAccessRouteImport.update({
+ id: '/settings/remote-access',
+ path: '/settings/remote-access',
+ getParentRoute: () => rootRouteImport,
+} as any)
const SettingsPrivacyRoute = SettingsPrivacyRouteImport.update({
id: '/settings/privacy',
path: '/settings/privacy',
@@ -155,6 +161,7 @@ export interface FileRoutesByFullPath {
'/settings/local-api-server': typeof SettingsLocalApiServerRoute
'/settings/mcp-servers': typeof SettingsMcpServersRoute
'/settings/privacy': typeof SettingsPrivacyRoute
+ '/settings/remote-access': typeof SettingsRemoteAccessRoute
'/settings/shortcuts': typeof SettingsShortcutsRoute
'/threads/$threadId': typeof ThreadsThreadIdRoute
'/hub/': typeof HubIndexRoute
@@ -178,6 +185,7 @@ export interface FileRoutesByTo {
'/settings/local-api-server': typeof SettingsLocalApiServerRoute
'/settings/mcp-servers': typeof SettingsMcpServersRoute
'/settings/privacy': typeof SettingsPrivacyRoute
+ '/settings/remote-access': typeof SettingsRemoteAccessRoute
'/settings/shortcuts': typeof SettingsShortcutsRoute
'/threads/$threadId': typeof ThreadsThreadIdRoute
'/hub': typeof HubIndexRoute
@@ -202,6 +210,7 @@ export interface FileRoutesById {
'/settings/local-api-server': typeof SettingsLocalApiServerRoute
'/settings/mcp-servers': typeof SettingsMcpServersRoute
'/settings/privacy': typeof SettingsPrivacyRoute
+ '/settings/remote-access': typeof SettingsRemoteAccessRoute
'/settings/shortcuts': typeof SettingsShortcutsRoute
'/threads/$threadId': typeof ThreadsThreadIdRoute
'/hub/': typeof HubIndexRoute
@@ -227,6 +236,7 @@ export interface FileRouteTypes {
| '/settings/local-api-server'
| '/settings/mcp-servers'
| '/settings/privacy'
+ | '/settings/remote-access'
| '/settings/shortcuts'
| '/threads/$threadId'
| '/hub/'
@@ -250,6 +260,7 @@ export interface FileRouteTypes {
| '/settings/local-api-server'
| '/settings/mcp-servers'
| '/settings/privacy'
+ | '/settings/remote-access'
| '/settings/shortcuts'
| '/threads/$threadId'
| '/hub'
@@ -273,6 +284,7 @@ export interface FileRouteTypes {
| '/settings/local-api-server'
| '/settings/mcp-servers'
| '/settings/privacy'
+ | '/settings/remote-access'
| '/settings/shortcuts'
| '/threads/$threadId'
| '/hub/'
@@ -297,6 +309,7 @@ export interface RootRouteChildren {
SettingsLocalApiServerRoute: typeof SettingsLocalApiServerRoute
SettingsMcpServersRoute: typeof SettingsMcpServersRoute
SettingsPrivacyRoute: typeof SettingsPrivacyRoute
+ SettingsRemoteAccessRoute: typeof SettingsRemoteAccessRoute
SettingsShortcutsRoute: typeof SettingsShortcutsRoute
ThreadsThreadIdRoute: typeof ThreadsThreadIdRoute
HubIndexRoute: typeof HubIndexRoute
@@ -348,6 +361,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof SettingsShortcutsRouteImport
parentRoute: typeof rootRouteImport
}
+ '/settings/remote-access': {
+ id: '/settings/remote-access'
+ path: '/settings/remote-access'
+ fullPath: '/settings/remote-access'
+ preLoaderRoute: typeof SettingsRemoteAccessRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/settings/privacy': {
id: '/settings/privacy'
path: '/settings/privacy'
@@ -473,6 +493,7 @@ const rootRouteChildren: RootRouteChildren = {
SettingsLocalApiServerRoute: SettingsLocalApiServerRoute,
SettingsMcpServersRoute: SettingsMcpServersRoute,
SettingsPrivacyRoute: SettingsPrivacyRoute,
+ SettingsRemoteAccessRoute: SettingsRemoteAccessRoute,
SettingsShortcutsRoute: SettingsShortcutsRoute,
ThreadsThreadIdRoute: ThreadsThreadIdRoute,
HubIndexRoute: HubIndexRoute,
diff --git a/web-app/src/routes/settings/remote-access.tsx b/web-app/src/routes/settings/remote-access.tsx
new file mode 100644
index 000000000..75c55f79f
--- /dev/null
+++ b/web-app/src/routes/settings/remote-access.tsx
@@ -0,0 +1,900 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { route } from '@/constants/routes'
+import SettingsMenu from '@/containers/SettingsMenu'
+import HeaderPage from '@/containers/HeaderPage'
+import { Button } from '@/components/ui/button'
+import { Card, CardItem } from '@/containers/Card'
+import { TelegramWizard as TelegramWizardDialog } from '@/containers/dialogs/TelegramWizardDialog'
+import { WhatsAppWizardDialog, WhatsAppConfig } from '@/containers/dialogs/WhatsAppWizardDialog'
+import { DiscordWizardDialog, DiscordConfig } from '@/containers/dialogs/DiscordWizardDialog'
+import { AddChannelDialog, ChannelType } from '@/containers/dialogs/AddChannelDialog'
+import { TailscaleSetupDialog } from '@/containers/dialogs/TailscaleSetupDialog'
+import { SecurityConfigDialog } from '@/containers/dialogs/SecurityConfigDialog'
+import { TunnelSelectionDialog } from '@/containers/dialogs/TunnelSelectionDialog'
+import { ChannelCard, TelegramConfig as ChannelTelegramConfig, WhatsAppConfig as ChannelWhatsAppConfig, DiscordConfig as ChannelDiscordConfig } from '@/containers/ChannelCard'
+import { useTranslation } from '@/i18n/react-i18next-compat'
+import { useEffect, useState, useCallback } from 'react'
+import { invoke } from '@tauri-apps/api/core'
+import { toast } from 'sonner'
+import {
+ IconBrandTelegram,
+ IconBrandWhatsapp,
+ IconBrandDiscord,
+ IconPlugConnected,
+ IconLink,
+ IconSettings,
+ IconLoader2,
+ IconPlayerPlay,
+ IconPlayerStop,
+ IconPlus,
+ IconNetwork,
+ IconShield,
+ IconCopy,
+ IconExternalLink,
+} from '@tabler/icons-react'
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export const Route = createFileRoute(route.settings.remote_access as any)({
+ component: RemoteAccess,
+})
+
+// OpenClaw Status types (mirroring Rust backend)
+interface OpenClawStatus {
+ installed: boolean
+ running: boolean
+ node_version: string | null
+ openclaw_version: string | null
+ port_available: boolean
+ error: string | null
+}
+
+interface InstallResult {
+ success: boolean
+ version: string | null
+ error: string | null
+}
+
+// Telegram configuration
+interface TelegramConfig {
+ bot_token: string
+ bot_username: string | null
+ connected: boolean
+ pairing_code: string | null
+ paired_users: number
+}
+
+// Mock recent messages for display (would come from actual OpenClaw in future)
+interface RecentMessage {
+ id: string
+ channel: 'telegram' | 'whatsapp' | 'discord'
+ sender: string
+ content: string
+ timestamp: Date
+}
+
+const OPENCLAW_PORT = 18789
+
+// Tunnel types (mirroring Rust backend)
+type TunnelProvider = 'none' | 'tailscale' | 'ngrok' | 'cloudflare' | 'localonly'
+
+interface TunnelInfo {
+ provider: TunnelProvider
+ url: string
+ started_at: string
+ port: number
+ is_public: boolean
+}
+
+interface TunnelProvidersStatus {
+ tailscale: { installed: boolean; authenticated: boolean; version: string | null }
+ ngrok: { installed: boolean; authenticated: boolean; version: string | null }
+ cloudflare: { installed: boolean; authenticated: boolean; version: string | null }
+ active_provider: TunnelProvider
+ active_tunnel: TunnelInfo | null
+}
+
+interface SecurityStatus {
+ auth_mode: 'token' | 'password' | 'none'
+ has_token: boolean
+ has_password: boolean
+ require_pairing: boolean
+ approved_device_count: number
+ recent_auth_failures: number
+}
+
+// Convert backend config types to ChannelCard types
+const convertTelegramConfig = (config: TelegramConfig | null): ChannelTelegramConfig | null => {
+ if (!config) return null
+ return {
+ bot_token: config.bot_token,
+ bot_username: config.bot_username,
+ connected: config.connected,
+ pairing_code: config.pairing_code,
+ paired_users: config.paired_users,
+ }
+}
+
+const convertWhatsAppConfig = (config: WhatsAppConfig | null): ChannelWhatsAppConfig | null => {
+ if (!config) return null
+ return {
+ account_id: config.account_id,
+ session_path: config.session_path,
+ connected: config.connected,
+ phone_number: config.phone_number,
+ qr_code: config.qr_code,
+ contacts_count: config.contacts_count,
+ }
+}
+
+const convertDiscordConfig = (config: DiscordConfig | null): ChannelDiscordConfig | null => {
+ if (!config) return null
+ return {
+ account_id: config.account_id,
+ bot_token: config.bot_token,
+ bot_username: config.bot_username,
+ bot_discriminator: config.bot_discriminator,
+ connected: config.connected,
+ guilds_count: config.guilds_count,
+ channels_count: config.channels_count,
+ }
+}
+
+function RemoteAccess() {
+ const { t } = useTranslation()
+ const [status, setStatus] = useState<OpenClawStatus | null>(null)
+ const [, setIsLoading] = useState(true)
+ const [isStarting, setIsStarting] = useState(false)
+ const [isStopping, setIsStopping] = useState(false)
+ const [isInstalling, setIsInstalling] = useState(false)
+ const [isTelegramWizardOpen, setIsTelegramWizardOpen] = useState(false)
+ const [isWhatsAppWizardOpen, setIsWhatsAppWizardOpen] = useState(false)
+ const [isDiscordWizardOpen, setIsDiscordWizardOpen] = useState(false)
+ const [isAddChannelDialogOpen, setIsAddChannelDialogOpen] = useState(false)
+ const [isTailscaleDialogOpen, setIsTailscaleDialogOpen] = useState(false)
+ const [isSecurityDialogOpen, setIsSecurityDialogOpen] = useState(false)
+ const [isTunnelDialogOpen, setIsTunnelDialogOpen] = useState(false)
+ const [tunnelStatus, setTunnelStatus] = useState<TunnelProvidersStatus | null>(null)
+ const [securityStatus, setSecurityStatus] = useState<SecurityStatus | null>(null)
+ const [telegramConfig, setTelegramConfig] = useState<TelegramConfig | null>(null)
+ const [whatsappConfig, setWhatsAppConfig] = useState<WhatsAppConfig | null>(null)
+ const [discordConfig, setDiscordConfig] = useState<DiscordConfig | null>(null)
+ const [recentMessages] = useState<RecentMessage[]>([
+ {
+ id: '1',
+ channel: 'telegram',
+ sender: '@john_doe',
+ content: "What's the weather like today?",
+ timestamp: new Date(Date.now() - 2 * 60 * 1000),
+ },
+ {
+ id: '2',
+ channel: 'whatsapp',
+ sender: '+1234567890',
+ content: 'Remind me to call mom',
+ timestamp: new Date(Date.now() - 5 * 60 * 1000),
+ },
+ ])
+
+ // Fetch status on mount
+ const fetchStatus = useCallback(async () => {
+ try {
+ setIsLoading(true)
+ const statusData = await invoke<OpenClawStatus>('openclaw_status')
+ setStatus(statusData)
+ } catch (error) {
+ console.error('Failed to fetch OpenClaw status:', error)
+ toast.error(t('settings:remoteAccess.startError'))
+ } finally {
+ setIsLoading(false)
+ }
+ }, [t])
+
+ useEffect(() => {
+ fetchStatus()
+ }, [fetchStatus])
+
+ // Fetch Telegram config on mount
+ const fetchTelegramConfig = useCallback(async () => {
+ try {
+ const config = await invoke<TelegramConfig>('telegram_get_config')
+ setTelegramConfig(config)
+ } catch (error) {
+ console.error('Failed to fetch Telegram config:', error)
+ }
+ }, [])
+
+ useEffect(() => {
+ fetchTelegramConfig()
+ }, [fetchTelegramConfig])
+
+ const handleTelegramWizardConnected = useCallback((config: TelegramConfig) => {
+ setTelegramConfig(config)
+ }, [])
+
+ const handleWhatsAppWizardConnected = useCallback((config: WhatsAppConfig) => {
+ setWhatsAppConfig(config)
+ }, [])
+
+ // Fetch Discord config on mount
+ const fetchDiscordConfig = useCallback(async () => {
+ try {
+ const config = await invoke<DiscordConfig>('discord_get_config')
+ setDiscordConfig(config)
+ } catch (error) {
+ console.error('Failed to fetch Discord config:', error)
+ }
+ }, [])
+
+ useEffect(() => {
+ fetchDiscordConfig()
+ }, [fetchDiscordConfig])
+
+ const handleDiscordWizardConnected = useCallback((config: DiscordConfig) => {
+ setDiscordConfig(config)
+ }, [])
+
+ // Fetch WhatsApp config on mount
+ const fetchWhatsAppConfig = useCallback(async () => {
+ try {
+ const config = await invoke<WhatsAppConfig>('whatsapp_get_config')
+ setWhatsAppConfig(config)
+ } catch (error) {
+ console.error('Failed to fetch WhatsApp config:', error)
+ }
+ }, [])
+
+ useEffect(() => {
+ fetchWhatsAppConfig()
+ }, [fetchWhatsAppConfig])
+
+ // Fetch tunnel status on mount
+ const fetchTunnelStatus = useCallback(async () => {
+ try {
+ const tunnelData = await invoke<TunnelProvidersStatus>('tunnel_get_providers')
+ setTunnelStatus(tunnelData)
+ } catch (error) {
+ console.error('Failed to fetch tunnel status:', error)
+ }
+ }, [])
+
+ useEffect(() => {
+ fetchTunnelStatus()
+ }, [fetchTunnelStatus])
+
+ // Fetch security status on mount
+ const fetchSecurityStatus = useCallback(async () => {
+ try {
+ const securityData = await invoke<SecurityStatus>('security_get_status')
+ setSecurityStatus(securityData)
+ } catch (error) {
+ console.error('Failed to fetch security status:', error)
+ }
+ }, [])
+
+ useEffect(() => {
+ fetchSecurityStatus()
+ }, [fetchSecurityStatus])
+
+ // Refresh all status data
+ const refreshAllStatus = useCallback(async () => {
+ await Promise.all([
+ fetchStatus(),
+ fetchTunnelStatus(),
+ fetchSecurityStatus(),
+ ])
+ }, [fetchStatus, fetchTunnelStatus, fetchSecurityStatus])
+
+ // Copy URL to clipboard
+ const handleCopyUrl = useCallback((url: string) => {
+ navigator.clipboard.writeText(url)
+ toast.success(t('settings:remoteAccess.urlCopied'))
+ }, [t])
+
+ // Get display name for tunnel provider
+ const getTunnelProviderName = (provider: TunnelProvider): string => {
+ switch (provider) {
+ case 'tailscale':
+ return 'Tailscale'
+ case 'ngrok':
+ return 'ngrok'
+ case 'cloudflare':
+ return 'Cloudflare Tunnel'
+ case 'localonly':
+ return t('settings:remoteAccess.localNetworkOnly')
+ case 'none':
+ default:
+ return t('settings:remoteAccess.notConfigured')
+ }
+ }
+
+ // Get display name for auth mode
+ const getAuthModeName = (mode: 'token' | 'password' | 'none'): string => {
+ switch (mode) {
+ case 'token':
+ return t('settings:remoteAccess.tokenAuth')
+ case 'password':
+ return t('settings:remoteAccess.passwordAuth')
+ case 'none':
+ default:
+ return t('settings:remoteAccess.noAuth')
+ }
+ }
+
+ const handleStart = async () => {
+ try {
+ setIsStarting(true)
+ await invoke('openclaw_start')
+ toast.success(t('settings:remoteAccess.running'))
+ await fetchStatus()
+ } catch (error) {
+ const errorMsg = error instanceof Error ? error.message : String(error)
+ if (errorMsg.includes('Node.js')) {
+ toast.error(t('settings:remoteAccess.nodeRequired'))
+ } else if (errorMsg.includes('Port')) {
+ toast.error(t('settings:remoteAccess.portInUse'))
+ } else {
+ toast.error(t('settings:remoteAccess.startError'))
+ }
+ } finally {
+ setIsStarting(false)
+ }
+ }
+
+ const handleStop = async () => {
+ try {
+ setIsStopping(true)
+ await invoke('openclaw_stop')
+ toast.success(t('settings:remoteAccess.stopped'))
+ await fetchStatus()
+ } catch (error) {
+ console.error('Failed to stop OpenClaw:', error)
+ toast.error(t('settings:remoteAccess.stopError'))
+ } finally {
+ setIsStopping(false)
+ }
+ }
+
+ const handleInstall = async () => {
+ try {
+ setIsInstalling(true)
+ const result = await invoke<InstallResult>('openclaw_install')
+ if (result.success) {
+ toast.success(t('settings:remoteAccess.backendInstallSuccess'))
+ await fetchStatus()
+ } else {
+ toast.error(result.error || t('settings:remoteAccess.installError'))
+ }
+ } catch (error) {
+ console.error('Failed to install OpenClaw:', error)
+ toast.error(t('settings:remoteAccess.installError'))
+ } finally {
+ setIsInstalling(false)
+ }
+ }
+
+ const formatTimeAgo = (date: Date): string => {
+ const minutes = Math.floor((Date.now() - date.getTime()) / 60000)
+ if (minutes < 1) return 'just now'
+ if (minutes === 1) return '1 min ago'
+ if (minutes < 60) return `${minutes} min ago`
+ const hours = Math.floor(minutes / 60)
+ if (hours === 1) return '1 hour ago'
+ return `${hours} hours ago`
+ }
+
+ const getChannelIcon = (channel: string) => {
+ switch (channel) {
+ case 'telegram':
+ return <IconBrandTelegram size={16} className="text-blue-500" />
+ case 'whatsapp':
+ return <IconBrandWhatsapp size={16} className="text-green-500" />
+ case 'discord':
+ return <IconBrandDiscord size={16} className="text-indigo-500" />
+ default:
+ return null
+ }
+ }
+
+ const getChannelName = (channel: string): string => {
+ switch (channel) {
+ case 'telegram':
+ return t('settings:remoteAccess.telegram')
+ case 'whatsapp':
+ return t('settings:remoteAccess.whatsapp')
+ case 'discord':
+ return t('settings:remoteAccess.discord')
+ default:
+ return channel
+ }
+ }
+
+ // Channel management handlers
+ const handleAddChannel = (channel: ChannelType) => {
+ switch (channel) {
+ case 'telegram':
+ setIsTelegramWizardOpen(true)
+ break
+ case 'whatsapp':
+ setIsWhatsAppWizardOpen(true)
+ break
+ case 'discord':
+ setIsDiscordWizardOpen(true)
+ break
+ }
+ }
+
+ const handleChannelSettings = (channel: ChannelType) => {
+ handleAddChannel(channel)
+ }
+
+ const handleDisconnectChannel = async (channel: ChannelType) => {
+ try {
+ switch (channel) {
+ case 'telegram':
+ await invoke('telegram_disconnect')
+ setTelegramConfig(null)
+ break
+ case 'whatsapp':
+ await invoke('whatsapp_disconnect')
+ setWhatsAppConfig(null)
+ break
+ case 'discord':
+ await invoke('discord_disconnect')
+ setDiscordConfig(null)
+ break
+ }
+ toast.success(
+ t('settings:remoteAccess.channelDisconnected', { channel: getChannelName(channel) })
+ )
+ } catch (error) {
+ console.error(`Failed to disconnect ${channel}:`, error)
+ toast.error(t('settings:remoteAccess.disconnectError'))
+ }
+ }
+
+ // Get messages filtered by channel
+ const getChannelMessages = (channel: string): RecentMessage[] => {
+ return recentMessages.filter((msg) => msg.channel === channel)
+ }
+
+ // Get connected channels list
+ const getConnectedChannels = (): ChannelType[] => {
+ const channels: ChannelType[] = []
+ if (telegramConfig?.connected) channels.push('telegram')
+ if (whatsappConfig?.connected) channels.push('whatsapp')
+ if (discordConfig?.connected) channels.push('discord')
+ return channels
+ }
+
+ const isRunning = status?.running ?? false
+ const isInstalled = status?.installed ?? false
+
+ return (
+ <div className="flex flex-col h-svh w-full">
+ <HeaderPage>
+ <div className="flex items-center gap-2 w-full">
+ <span className="font-medium text-base font-studio">
+ {t('common:settings')}
+ </span>
+ </div>
+ </HeaderPage>
+ <div className="flex h-[calc(100%-60px)]">
+ <SettingsMenu />
+ <div className="p-4 pt-0 w-full overflow-y-auto">
+ <div className="flex flex-col justify-between gap-4 gap-y-3 w-full">
+ {/* Status Card */}
+ <Card title={t('settings:remoteAccess.status')}>
+ <div className="flex items-center gap-3 mb-4">
+ <div
+ className={`w-3 h-3 rounded-full ${
+ isRunning ? 'bg-green-500' : 'bg-red-500'
+ }`}
+ />
+ <span className="text-foreground font-medium">
+ {isRunning
+ ? t('settings:remoteAccess.enabled')
+ : t('settings:remoteAccess.disabled')}
+ </span>
+ </div>
+ <CardItem
+ title={t('settings:remoteAccess.activeChannels')}
+ actions={
+ <span className="text-foreground">
+ {isRunning && getConnectedChannels().length > 0
+ ? getConnectedChannels()
+ .map((ch) => getChannelName(ch))
+ .join(', ')
+ : '-'}
+ </span>
+ }
+ />
+ <CardItem
+ title={t('settings:remoteAccess.connectedUsers')}
+ actions={
+ <span className="text-foreground">
+ {isRunning
+ ? String(
+ (telegramConfig?.paired_users ?? 0) +
+ (whatsappConfig?.contacts_count ?? 0) +
+ (discordConfig?.guilds_count ?? 0)
+ )
+ : '0'}
+ </span>
+ }
+ />
+ <CardItem
+ title={t('settings:remoteAccess.port')}
+ actions={<span className="text-foreground">{OPENCLAW_PORT}</span>}
+ />
+ {status?.node_version && (
+ <CardItem
+ title={t('settings:remoteAccess.nodeVersion')}
+ actions={
+ <span className="text-foreground">{status.node_version}</span>
+ }
+ />
+ )}
+ {status?.openclaw_version && (
+ <CardItem
+ title={t('settings:remoteAccess.openclawVersion')}
+ actions={
+ <span className="text-foreground">
+ {status.openclaw_version}
+ </span>
+ }
+ />
+ )}
+ </Card>
+
+ {/* Quick Setup Card */}
+ <Card title={t('settings:remoteAccess.quickSetup')}>
+ {/* Enable/Disable Remote Access */}
+ <CardItem
+ title={
+ isRunning
+ ? t('settings:remoteAccess.disableRemoteAccess')
+ : t('settings:remoteAccess.enableRemoteAccess')
+ }
+ actions={
+ <div className="flex items-center gap-2">
+ {isInstalled ? (
+ isRunning ? (
+ <Button
+ variant="destructive"
+ size="sm"
+ onClick={handleStop}
+ disabled={isStopping}
+ >
+ {isStopping ? (
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ ) : (
+ <IconPlayerStop className="mr-2 h-4 w-4" />
+ )}
+ {t('settings:remoteAccess.stop')}
+ </Button>
+ ) : (
+ <Button
+ variant="secondary"
+ size="sm"
+ onClick={handleStart}
+ disabled={isStarting}
+ >
+ {isStarting ? (
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ ) : (
+ <IconPlayerPlay className="mr-2 h-4 w-4" />
+ )}
+ {t('settings:remoteAccess.start')}
+ </Button>
+ )
+ ) : (
+ <Button
+ variant="secondary"
+ size="sm"
+ onClick={handleInstall}
+ disabled={isInstalling}
+ >
+ {isInstalling ? (
+ <IconLoader2 className="animate-spin mr-2 h-4 w-4" />
+ ) : (
+ <IconPlugConnected className="mr-2 h-4 w-4" />
+ )}
+ {t('settings:remoteAccess.install')}
+ </Button>
+ )}
+ </div>
+ }
+ />
+
+ {/* Connect Channels - New Unified Channel Management */}
+ <CardItem
+ title={t('settings:remoteAccess.channels')}
+ actions={
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => setIsAddChannelDialogOpen(true)}
+ >
+ <IconPlus className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.addChannel.title')}
+ </Button>
+ }
+ />
+
+ {/* Channel Cards */}
+ <div className="space-y-3 mt-4">
+ <ChannelCard
+ type="telegram"
+ config={convertTelegramConfig(telegramConfig)}
+ onSettings={() => handleChannelSettings('telegram')}
+ onDisconnect={() => handleDisconnectChannel('telegram')}
+ recentMessages={getChannelMessages('telegram').map((msg) => ({
+ id: msg.id,
+ sender: msg.sender,
+ content: msg.content,
+ timestamp: msg.timestamp,
+ }))}
+ />
+ <ChannelCard
+ type="whatsapp"
+ config={convertWhatsAppConfig(whatsappConfig)}
+ onSettings={() => handleChannelSettings('whatsapp')}
+ onDisconnect={() => handleDisconnectChannel('whatsapp')}
+ recentMessages={getChannelMessages('whatsapp').map((msg) => ({
+ id: msg.id,
+ sender: msg.sender,
+ content: msg.content,
+ timestamp: msg.timestamp,
+ }))}
+ />
+ <ChannelCard
+ type="discord"
+ config={convertDiscordConfig(discordConfig)}
+ onSettings={() => handleChannelSettings('discord')}
+ onDisconnect={() => handleDisconnectChannel('discord')}
+ recentMessages={getChannelMessages('discord').map((msg) => ({
+ id: msg.id,
+ sender: msg.sender,
+ content: msg.content,
+ timestamp: msg.timestamp,
+ }))}
+ />
+ </div>
+
+ {/* Share Access */}
+ <CardItem
+ title={t('settings:remoteAccess.shareAccess')}
+ actions={
+ <Button variant="outline" size="sm">
+ <IconLink className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.generateInviteLink')}
+ </Button>
+ }
+ />
+ </Card>
+
+ {/* Recent Messages Card */}
+ <Card title={t('settings:remoteAccess.recentMessages')}>
+ {recentMessages.length > 0 ? (
+ <div className="space-y-3">
+ {recentMessages.map((message) => (
+ <div
+ key={message.id}
+ className="border-b border-border/40 pb-3 last:border-0 last:pb-0"
+ >
+ <div className="flex items-center gap-2 mb-1">
+ {getChannelIcon(message.channel)}
+ <span className="text-foreground font-medium">
+ {getChannelName(message.channel)} {message.sender}
+ </span>
+ <span className="text-muted-foreground text-xs">
+ ({formatTimeAgo(message.timestamp)})
+ </span>
+ </div>
+ <p className="text-muted-foreground text-sm">
+ {message.content}
+ </p>
+ </div>
+ ))}
+ </div>
+ ) : (
+ <p className="text-muted-foreground">
+ {t('settings:remoteAccess.noRecentMessages')}
+ </p>
+ )}
+ </Card>
+
+ {/* Active Tunnel Status Card */}
+ {tunnelStatus?.active_tunnel && (
+ <Card title={t('settings:remoteAccess.activeTunnel')}>
+ <div className="flex items-center gap-3 mb-4">
+ <div className="w-3 h-3 rounded-full bg-green-500 animate-pulse" />
+ <span className="text-foreground font-medium">
+ {getTunnelProviderName(tunnelStatus.active_tunnel.provider)}
+ </span>
+ {tunnelStatus.active_tunnel.is_public && (
+ <span className="text-xs px-2 py-0.5 rounded-full bg-orange-500/10 text-orange-500 border border-orange-500/30">
+ {t('settings:remoteAccess.publicAccess')}
+ </span>
+ )}
+ </div>
+ <CardItem
+ title={t('settings:remoteAccess.tunnelUrl')}
+ actions={
+ <div className="flex items-center gap-2">
+ <code className="text-sm font-mono text-foreground bg-secondary px-2 py-1 rounded max-w-[200px] truncate">
+ {tunnelStatus.active_tunnel.url}
+ </code>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={() => handleCopyUrl(tunnelStatus.active_tunnel!.url)}
+ title={t('settings:remoteAccess.copyUrl')}
+ >
+ <IconCopy className="h-4 w-4" />
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ onClick={() => window.open(tunnelStatus.active_tunnel!.url, '_blank')}
+ title={t('settings:remoteAccess.openUrl')}
+ >
+ <IconExternalLink className="h-4 w-4" />
+ </Button>
+ </div>
+ }
+ />
+ <CardItem
+ title={t('settings:remoteAccess.port')}
+ actions={
+ <span className="text-foreground">{tunnelStatus.active_tunnel.port}</span>
+ }
+ />
+ </Card>
+ )}
+
+ {/* Settings Card */}
+ <Card title={t('settings:remoteAccess.settings')}>
+ <CardItem
+ title={t('settings:remoteAccess.modelForRemote')}
+ actions={
+ <select className="bg-secondary text-foreground text-sm rounded px-2 py-1 border border-input">
+ <option>Llama 3.2 3B</option>
+ <option>Llama 3.1 8B</option>
+ <option>Custom...</option>
+ </select>
+ }
+ />
+ <CardItem
+ title={t('settings:remoteAccess.remoteMethod')}
+ actions={
+ <div className="flex items-center gap-2">
+ <span className="text-foreground text-sm">
+ {getTunnelProviderName(tunnelStatus?.active_provider ?? 'none')}
+ </span>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => setIsTunnelDialogOpen(true)}
+ >
+ <IconNetwork className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.configure')}
+ </Button>
+ </div>
+ }
+ />
+ <CardItem
+ title={t('settings:remoteAccess.accessPolicy')}
+ actions={
+ <div className="flex items-center gap-2">
+ <span className="text-foreground text-sm">
+ {securityStatus
+ ? getAuthModeName(securityStatus.auth_mode)
+ : t('settings:remoteAccess.loading')}
+ </span>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => setIsSecurityDialogOpen(true)}
+ >
+ <IconShield className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.security')}
+ </Button>
+ </div>
+ }
+ />
+ {securityStatus && (
+ <CardItem
+ title={t('settings:remoteAccess.approvedDevices')}
+ actions={
+ <span className="text-foreground">
+ {securityStatus.approved_device_count}
+ </span>
+ }
+ />
+ )}
+ {tunnelStatus?.active_provider === 'tailscale' && (
+ <CardItem
+ title={t('settings:remoteAccess.tailscaleSettings')}
+ actions={
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => setIsTailscaleDialogOpen(true)}
+ >
+ <IconSettings className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.configureTailscale')}
+ </Button>
+ }
+ />
+ )}
+ <CardItem
+ title={t('settings:remoteAccess.advancedSettings')}
+ actions={
+ <Button variant="outline" size="sm">
+ <IconSettings className="mr-2 h-4 w-4" />
+ {t('settings:remoteAccess.advancedSettings')}
+ </Button>
+ }
+ />
+ </Card>
+ </div>
+ </div>
+ </div>
+
+ {/* Telegram Wizard Dialog */}
+ <TelegramWizardDialog
+ isOpen={isTelegramWizardOpen}
+ onOpenChange={setIsTelegramWizardOpen}
+ onConnected={handleTelegramWizardConnected}
+ />
+
+ {/* WhatsApp Wizard Dialog */}
+ <WhatsAppWizardDialog
+ isOpen={isWhatsAppWizardOpen}
+ onOpenChange={setIsWhatsAppWizardOpen}
+ onConnected={handleWhatsAppWizardConnected}
+ />
+
+ {/* Discord Wizard Dialog */}
+ <DiscordWizardDialog
+ isOpen={isDiscordWizardOpen}
+ onOpenChange={setIsDiscordWizardOpen}
+ onConnected={handleDiscordWizardConnected}
+ />
+
+ {/* Add Channel Dialog */}
+ <AddChannelDialog
+ isOpen={isAddChannelDialogOpen}
+ onOpenChange={setIsAddChannelDialogOpen}
+ onSelectChannel={handleAddChannel}
+ connectedChannels={getConnectedChannels()}
+ />
+
+ {/* Tailscale Setup Dialog */}
+ <TailscaleSetupDialog
+ isOpen={isTailscaleDialogOpen}
+ onClose={() => setIsTailscaleDialogOpen(false)}
+ onSuccess={refreshAllStatus}
+ />
+
+ {/* Security Config Dialog */}
+ <SecurityConfigDialog
+ isOpen={isSecurityDialogOpen}
+ onClose={() => setIsSecurityDialogOpen(false)}
+ onSave={refreshAllStatus}
+ />
+
+ {/* Tunnel Selection Dialog */}
+ <TunnelSelectionDialog
+ isOpen={isTunnelDialogOpen}
+ onClose={() => setIsTunnelDialogOpen(false)}
+ onTailscaleSetup={() => {
+ setIsTunnelDialogOpen(false)
+ setIsTailscaleDialogOpen(true)
+ }}
+ onSave={refreshAllStatus}
+ />
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/web-app/src/utils/openclaw.ts b/web-app/src/utils/openclaw.ts
new file mode 100644
index 000000000..be4cff5aa
--- /dev/null
+++ b/web-app/src/utils/openclaw.ts
@@ -0,0 +1,58 @@
+import { invoke } from '@tauri-apps/api/core'
+
+/**
+ * Check if OpenClaw is running
+ */
+export async function isOpenClawRunning(): Promise<boolean> {
+ try {
+ const status = await invoke<{ running: boolean }>('openclaw_status')
+ return status.running
+ } catch {
+ return false
+ }
+}
+
+/**
+ * Sync the selected model from Jan to OpenClaw
+ * This allows OpenClaw to use the same model that Jan is using
+ *
+ * @param modelId - The model ID (e.g., "minimax-m2.5")
+ * @param provider - The provider name (e.g., "minimaxai", "openai", "llamacpp")
+ * @param modelName - Optional display name for the model
+ */
+export async function syncModelToOpenClaw(
+ modelId: string,
+ provider?: string,
+ modelName?: string
+): Promise<void> {
+ try {
+ // Only sync if OpenClaw is running
+ const running = await isOpenClawRunning()
+ if (!running) {
+ console.debug('[OpenClaw] Not running, skipping model sync')
+ return
+ }
+
+ await invoke('openclaw_sync_model', {
+ modelId,
+ provider: provider || null,
+ modelName: modelName || null,
+ })
+ console.debug('[OpenClaw] Model synced:', modelId, provider)
+ } catch (error) {
+ // Don't throw - this is a background sync operation
+ console.debug('[OpenClaw] Failed to sync model:', error)
+ }
+}
+
+/**
+ * Get the currently configured model in OpenClaw
+ */
+export async function getOpenClawModel(): Promise<string | null> {
+ try {
+ const model = await invoke<string>('openclaw_get_model')
+ return model
+ } catch {
+ return null
+ }
+}
diff --git a/yarn.lock b/yarn.lock
index baef5f6e8..3bbcc33c7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -12,6 +12,130 @@ __metadata:
languageName: node
linkType: hard
+"@ai-sdk/anthropic@npm:^2.0.0":
+ version: 2.0.66
+ resolution: "@ai-sdk/anthropic@npm:2.0.66"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/9137e26280efe245986b3a0ea469bb075e46d3e45050faa608b13f289575dd044e5271c56abaad0f9532f543fbe5681d25141674bd5d47fcd5520c5173cd23fe
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/gateway@npm:2.0.18":
+ version: 2.0.18
+ resolution: "@ai-sdk/gateway@npm:2.0.18"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.0"
+ "@ai-sdk/provider-utils": "npm:3.0.18"
+ "@vercel/oidc": "npm:3.0.5"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/6e51159d58f2e54fbfb7b50ab2be28c890474cf72f00e199e056aa24d5ee092ed6922b452b638cddc6ddcb344b18e7e5deb734acfca8532fa4ce694377f452c3
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/gateway@npm:2.0.43":
+ version: 2.0.43
+ resolution: "@ai-sdk/gateway@npm:2.0.43"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ "@vercel/oidc": "npm:3.1.0"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/e1a1485dff28471b47f4ceb54308ead5ccb9c026945e4e4a66ee14176099d64807add97a7c91b585226df77b8d841d94695eb3dec32c5d2ca423c6dc5e7567a4
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/openai-compatible@npm:^1.0.28":
+ version: 1.0.33
+ resolution: "@ai-sdk/openai-compatible@npm:1.0.33"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/3dbab68fa290bce0b9cf2bd3612c7779fe83aa44fa085b7d32ea83cfa76bd6638f0df0b93b372022a1ee02ef806e4077802e59ba2f888d207ba6a50007d80287
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/openai@npm:^2.0.0":
+ version: 2.0.92
+ resolution: "@ai-sdk/openai@npm:2.0.92"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/56e0d8b942a4c8fb824c72450f88f69b1597311bdb9f052bd3dda55ef30651f0f285832349c66c3a8e975a45708a8da4aace7a3ebe943ce32930ab481b715df9
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/provider-utils@npm:3.0.18":
+ version: 3.0.18
+ resolution: "@ai-sdk/provider-utils@npm:3.0.18"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.0"
+ "@standard-schema/spec": "npm:^1.0.0"
+ eventsource-parser: "npm:^3.0.6"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/209c15b0dceef0ba95a7d3de544be0a417ad4a0bd5143496b3966a35fedf144156d93a42ff8c3d7db56781b9836bafc8c132c98978c49240e55bc1a36e18a67f
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/provider-utils@npm:3.0.21":
+ version: 3.0.21
+ resolution: "@ai-sdk/provider-utils@npm:3.0.21"
+ dependencies:
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@standard-schema/spec": "npm:^1.0.0"
+ eventsource-parser: "npm:^3.0.6"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/272645109b4990c1367d46fd8982ee3436f88f4f5ec96d78f98c928052dcee6e9a7df326558d908d73901a5c0a84b3374c31722bb78579c2efd3417afb2100fb
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/provider@npm:2.0.0":
+ version: 2.0.0
+ resolution: "@ai-sdk/provider@npm:2.0.0"
+ dependencies:
+ json-schema: "npm:^0.4.0"
+ checksum: 10c0/e50e520016c9fc0a8b5009cadd47dae2f1c81ec05c1792b9e312d7d15479f024ca8039525813a33425c884e3449019fed21043b1bfabd6a2626152ca9a388199
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/provider@npm:2.0.1":
+ version: 2.0.1
+ resolution: "@ai-sdk/provider@npm:2.0.1"
+ dependencies:
+ json-schema: "npm:^0.4.0"
+ checksum: 10c0/3ec560c5b03401a1e3b8c73875f4258cb815668367157a3caa4d30f580ff5adffbba54ee52f875161c986c5225a88cb3829f050437e0a2d7e5820b72cf08238b
+ languageName: node
+ linkType: hard
+
+"@ai-sdk/react@npm:^2.0.109":
+ version: 2.0.139
+ resolution: "@ai-sdk/react@npm:2.0.139"
+ dependencies:
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ ai: "npm:5.0.137"
+ swr: "npm:^2.2.5"
+ throttleit: "npm:2.1.0"
+ peerDependencies:
+ react: ^18 || ~19.0.1 || ~19.1.2 || ^19.2.1
+ zod: ^3.25.76 || ^4.1.8
+ peerDependenciesMeta:
+ zod:
+ optional: true
+ checksum: 10c0/9e00ebece9889d3036694d10a4e8111f9eead9ee45da4e96b0f059066a7532621ec09a6bf2bf1062bc9351622bc64da45c1c39035a5debb687e30f8a12651ff9
+ languageName: node
+ linkType: hard
+
"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0":
version: 2.3.0
resolution: "@ampproject/remapping@npm:2.3.0"
@@ -22,6 +146,16 @@ __metadata:
languageName: node
linkType: hard
+"@antfu/install-pkg@npm:^1.1.0":
+ version: 1.1.0
+ resolution: "@antfu/install-pkg@npm:1.1.0"
+ dependencies:
+ package-manager-detector: "npm:^1.3.0"
+ tinyexec: "npm:^1.0.1"
+ checksum: 10c0/140d5994c76fd3d0e824c88f1ce91b3370e8066a8bc2f5729ae133bf768caa239f7915e29c78f239b7ead253113ace51293e95127fafe2b786b88eb615b3be47
+ languageName: node
+ linkType: hard
+
"@anthropic-ai/sdk@npm:0.24.3":
version: 0.24.3
resolution: "@anthropic-ai/sdk@npm:0.24.3"
@@ -1172,6 +1306,17 @@ __metadata:
languageName: node
linkType: hard
+"@babel/code-frame@npm:^7.28.6, @babel/code-frame@npm:^7.29.0":
+ version: 7.29.0
+ resolution: "@babel/code-frame@npm:7.29.0"
+ dependencies:
+ "@babel/helper-validator-identifier": "npm:^7.28.5"
+ js-tokens: "npm:^4.0.0"
+ picocolors: "npm:^1.1.1"
+ checksum: 10c0/d34cc504e7765dfb576a663d97067afb614525806b5cad1a5cc1a7183b916fec8ff57fa233585e3926fd5a9e6b31aae6df91aa81ae9775fb7a28f658d3346f0d
+ languageName: node
+ linkType: hard
+
"@babel/compat-data@npm:^7.26.5":
version: 7.26.8
resolution: "@babel/compat-data@npm:7.26.8"
@@ -1186,6 +1331,13 @@ __metadata:
languageName: node
linkType: hard
+"@babel/compat-data@npm:^7.28.6":
+ version: 7.29.0
+ resolution: "@babel/compat-data@npm:7.29.0"
+ checksum: 10c0/08f348554989d23aa801bf1405aa34b15e841c0d52d79da7e524285c77a5f9d298e70e11d91cc578d8e2c9542efc586d50c5f5cf8e1915b254a9dcf786913a94
+ languageName: node
+ linkType: hard
+
"@babel/core@npm:^7.23.7, @babel/core@npm:^7.26.10, @babel/core@npm:^7.26.8":
version: 7.26.10
resolution: "@babel/core@npm:7.26.10"
@@ -1232,7 +1384,30 @@ __metadata:
languageName: node
linkType: hard
-"@babel/generator@npm:^7.26.10, @babel/generator@npm:^7.26.8, @babel/generator@npm:^7.27.0":
+"@babel/core@npm:^7.28.5":
+ version: 7.29.0
+ resolution: "@babel/core@npm:7.29.0"
+ dependencies:
+ "@babel/code-frame": "npm:^7.29.0"
+ "@babel/generator": "npm:^7.29.0"
+ "@babel/helper-compilation-targets": "npm:^7.28.6"
+ "@babel/helper-module-transforms": "npm:^7.28.6"
+ "@babel/helpers": "npm:^7.28.6"
+ "@babel/parser": "npm:^7.29.0"
+ "@babel/template": "npm:^7.28.6"
+ "@babel/traverse": "npm:^7.29.0"
+ "@babel/types": "npm:^7.29.0"
+ "@jridgewell/remapping": "npm:^2.3.5"
+ convert-source-map: "npm:^2.0.0"
+ debug: "npm:^4.1.0"
+ gensync: "npm:^1.0.0-beta.2"
+ json5: "npm:^2.2.3"
+ semver: "npm:^6.3.1"
+ checksum: 10c0/5127d2e8e842ae409e11bcbb5c2dff9874abf5415e8026925af7308e903f4f43397341467a130490d1a39884f461bc2b67f3063bce0be44340db89687fd852aa
+ languageName: node
+ linkType: hard
+
+"@babel/generator@npm:^7.26.10, @babel/generator@npm:^7.27.0":
version: 7.27.0
resolution: "@babel/generator@npm:7.27.0"
dependencies:
@@ -1284,6 +1459,19 @@ __metadata:
languageName: node
linkType: hard
+"@babel/generator@npm:^7.28.5, @babel/generator@npm:^7.29.0":
+ version: 7.29.1
+ resolution: "@babel/generator@npm:7.29.1"
+ dependencies:
+ "@babel/parser": "npm:^7.29.0"
+ "@babel/types": "npm:^7.29.0"
+ "@jridgewell/gen-mapping": "npm:^0.3.12"
+ "@jridgewell/trace-mapping": "npm:^0.3.28"
+ jsesc: "npm:^3.0.2"
+ checksum: 10c0/349086e6876258ef3fb2823030fee0f6c0eb9c3ebe35fc572e16997f8c030d765f636ddc6299edae63e760ea6658f8ee9a2edfa6d6b24c9a80c917916b973551
+ languageName: node
+ linkType: hard
+
"@babel/helper-annotate-as-pure@npm:^7.27.1, @babel/helper-annotate-as-pure@npm:^7.27.3":
version: 7.27.3
resolution: "@babel/helper-annotate-as-pure@npm:7.27.3"
@@ -1319,6 +1507,19 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-compilation-targets@npm:^7.28.6":
+ version: 7.28.6
+ resolution: "@babel/helper-compilation-targets@npm:7.28.6"
+ dependencies:
+ "@babel/compat-data": "npm:^7.28.6"
+ "@babel/helper-validator-option": "npm:^7.27.1"
+ browserslist: "npm:^4.24.0"
+ lru-cache: "npm:^5.1.1"
+ semver: "npm:^6.3.1"
+ checksum: 10c0/3fcdf3b1b857a1578e99d20508859dbd3f22f3c87b8a0f3dc540627b4be539bae7f6e61e49d931542fe5b557545347272bbdacd7f58a5c77025a18b745593a50
+ languageName: node
+ linkType: hard
+
"@babel/helper-create-class-features-plugin@npm:^7.27.1, @babel/helper-create-class-features-plugin@npm:^7.28.3":
version: 7.28.3
resolution: "@babel/helper-create-class-features-plugin@npm:7.28.3"
@@ -1401,6 +1602,16 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-module-imports@npm:^7.28.6":
+ version: 7.28.6
+ resolution: "@babel/helper-module-imports@npm:7.28.6"
+ dependencies:
+ "@babel/traverse": "npm:^7.28.6"
+ "@babel/types": "npm:^7.28.6"
+ checksum: 10c0/b49d8d8f204d9dbfd5ac70c54e533e5269afb3cea966a9d976722b13e9922cc773a653405f53c89acb247d5aebdae4681d631a3ae3df77ec046b58da76eda2ac
+ languageName: node
+ linkType: hard
+
"@babel/helper-module-transforms@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/helper-module-transforms@npm:7.26.0"
@@ -1427,6 +1638,19 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-module-transforms@npm:^7.28.6":
+ version: 7.28.6
+ resolution: "@babel/helper-module-transforms@npm:7.28.6"
+ dependencies:
+ "@babel/helper-module-imports": "npm:^7.28.6"
+ "@babel/helper-validator-identifier": "npm:^7.28.5"
+ "@babel/traverse": "npm:^7.28.6"
+ peerDependencies:
+ "@babel/core": ^7.0.0
+ checksum: 10c0/6f03e14fc30b287ce0b839474b5f271e72837d0cafe6b172d759184d998fbee3903a035e81e07c2c596449e504f453463d58baa65b6f40a37ded5bec74620b2b
+ languageName: node
+ linkType: hard
+
"@babel/helper-optimise-call-expression@npm:^7.27.1":
version: 7.27.1
resolution: "@babel/helper-optimise-call-expression@npm:7.27.1"
@@ -1514,6 +1738,13 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-validator-identifier@npm:^7.28.5":
+ version: 7.28.5
+ resolution: "@babel/helper-validator-identifier@npm:7.28.5"
+ checksum: 10c0/42aaebed91f739a41f3d80b72752d1f95fd7c72394e8e4bd7cdd88817e0774d80a432451bcba17c2c642c257c483bf1d409dd4548883429ea9493a3bc4ab0847
+ languageName: node
+ linkType: hard
+
"@babel/helper-validator-option@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helper-validator-option@npm:7.25.9"
@@ -1559,6 +1790,16 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helpers@npm:^7.28.6":
+ version: 7.28.6
+ resolution: "@babel/helpers@npm:7.28.6"
+ dependencies:
+ "@babel/template": "npm:^7.28.6"
+ "@babel/types": "npm:^7.28.6"
+ checksum: 10c0/c4a779c66396bb0cf619402d92f1610601ff3832db2d3b86b9c9dd10983bf79502270e97ac6d5280cea1b1a37de2f06ecbac561bd2271545270407fbe64027cb
+ languageName: node
+ linkType: hard
+
"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.26.9":
version: 7.26.9
resolution: "@babel/parser@npm:7.26.9"
@@ -1570,7 +1811,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/parser@npm:^7.23.6, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.8, @babel/parser@npm:^7.27.0":
+"@babel/parser@npm:^7.23.6, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.27.0":
version: 7.27.0
resolution: "@babel/parser@npm:7.27.0"
dependencies:
@@ -1614,6 +1855,17 @@ __metadata:
languageName: node
linkType: hard
+"@babel/parser@npm:^7.28.5, @babel/parser@npm:^7.28.6, @babel/parser@npm:^7.29.0":
+ version: 7.29.0
+ resolution: "@babel/parser@npm:7.29.0"
+ dependencies:
+ "@babel/types": "npm:^7.29.0"
+ bin:
+ parser: ./bin/babel-parser.js
+ checksum: 10c0/333b2aa761264b91577a74bee86141ef733f9f9f6d4fc52548e4847dc35dfbf821f58c46832c637bfa761a6d9909d6a68f7d1ed59e17e4ffbb958dc510c17b62
+ languageName: node
+ linkType: hard
+
"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.27.1":
version: 7.27.1
resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.27.1"
@@ -2517,6 +2769,17 @@ __metadata:
languageName: node
linkType: hard
+"@babel/template@npm:^7.28.6":
+ version: 7.28.6
+ resolution: "@babel/template@npm:7.28.6"
+ dependencies:
+ "@babel/code-frame": "npm:^7.28.6"
+ "@babel/parser": "npm:^7.28.6"
+ "@babel/types": "npm:^7.28.6"
+ checksum: 10c0/66d87225ed0bc77f888181ae2d97845021838c619944877f7c4398c6748bcf611f216dfd6be74d39016af502bca876e6ce6873db3c49e4ac354c56d34d57e9f5
+ languageName: node
+ linkType: hard
+
"@babel/traverse@npm:^7.23.7, @babel/traverse@npm:^7.28.0, @babel/traverse@npm:^7.28.3, @babel/traverse@npm:^7.28.4":
version: 7.28.4
resolution: "@babel/traverse@npm:7.28.4"
@@ -2577,6 +2840,21 @@ __metadata:
languageName: node
linkType: hard
+"@babel/traverse@npm:^7.28.6, @babel/traverse@npm:^7.29.0":
+ version: 7.29.0
+ resolution: "@babel/traverse@npm:7.29.0"
+ dependencies:
+ "@babel/code-frame": "npm:^7.29.0"
+ "@babel/generator": "npm:^7.29.0"
+ "@babel/helper-globals": "npm:^7.28.0"
+ "@babel/parser": "npm:^7.29.0"
+ "@babel/template": "npm:^7.28.6"
+ "@babel/types": "npm:^7.29.0"
+ debug: "npm:^4.3.1"
+ checksum: 10c0/f63ef6e58d02a9fbf3c0e2e5f1c877da3e0bc57f91a19d2223d53e356a76859cbaf51171c9211c71816d94a0e69efa2732fd27ffc0e1bbc84b636e60932333eb
+ languageName: node
+ linkType: hard
+
"@babel/traverse@npm:^7.4.3":
version: 7.28.0
resolution: "@babel/traverse@npm:7.28.0"
@@ -2642,6 +2920,16 @@ __metadata:
languageName: node
linkType: hard
+"@babel/types@npm:^7.28.5, @babel/types@npm:^7.28.6, @babel/types@npm:^7.29.0":
+ version: 7.29.0
+ resolution: "@babel/types@npm:7.29.0"
+ dependencies:
+ "@babel/helper-string-parser": "npm:^7.27.1"
+ "@babel/helper-validator-identifier": "npm:^7.28.5"
+ checksum: 10c0/23cc3466e83bcbfab8b9bd0edaafdb5d4efdb88b82b3be6728bbade5ba2f0996f84f63b1c5f7a8c0d67efded28300898a5f930b171bb40b311bca2029c4e9b4f
+ languageName: node
+ linkType: hard
+
"@bcoe/v8-coverage@npm:^0.2.3":
version: 0.2.3
resolution: "@bcoe/v8-coverage@npm:0.2.3"
@@ -2656,6 +2944,55 @@ __metadata:
languageName: node
linkType: hard
+"@braintree/sanitize-url@npm:^7.1.1":
+ version: 7.1.2
+ resolution: "@braintree/sanitize-url@npm:7.1.2"
+ checksum: 10c0/62f2aa0cf58626e3880b2dc1025c42064b4639abd157ae4e1c35f4c2f5031e9273772046a423979845069c814e27ff818e8e669280dc53585e6f033d5b7a59cb
+ languageName: node
+ linkType: hard
+
+"@chevrotain/cst-dts-gen@npm:11.1.1":
+ version: 11.1.1
+ resolution: "@chevrotain/cst-dts-gen@npm:11.1.1"
+ dependencies:
+ "@chevrotain/gast": "npm:11.1.1"
+ "@chevrotain/types": "npm:11.1.1"
+ lodash-es: "npm:4.17.23"
+ checksum: 10c0/31bdfadf2913529dec6f508aa33a3a8823eea2a75087a7a1283b76a787e62371f0b1fcb82a36be85cf01655bf62691f24d2c24b45aed22f13e5ffccf9c36a922
+ languageName: node
+ linkType: hard
+
+"@chevrotain/gast@npm:11.1.1":
+ version: 11.1.1
+ resolution: "@chevrotain/gast@npm:11.1.1"
+ dependencies:
+ "@chevrotain/types": "npm:11.1.1"
+ lodash-es: "npm:4.17.23"
+ checksum: 10c0/3a1f870bdc4a7dc349ae0c2e48f875e120c24f1fe076a095f3476ffb66de72b935fe083a7bf0669e624941527044ee2de7cc7020e35a4741d4ac66891d7053da
+ languageName: node
+ linkType: hard
+
+"@chevrotain/regexp-to-ast@npm:11.1.1":
+ version: 11.1.1
+ resolution: "@chevrotain/regexp-to-ast@npm:11.1.1"
+ checksum: 10c0/56d6900848a621bd5ee0e6babff62389245b97374290ebdc3afcedf5ba199297b47601b1f908c1021790051414fbafeea81e437c98b92817561301ee5050b5b2
+ languageName: node
+ linkType: hard
+
+"@chevrotain/types@npm:11.1.1":
+ version: 11.1.1
+ resolution: "@chevrotain/types@npm:11.1.1"
+ checksum: 10c0/7cc3692ed8dec7ff6251b583bfd9dea4f7e77f5a172b017e90fa40ab6cc7eef626ec66623228a553e61805aaf126d295941f05defaa22cdab46c2fbf908f66c3
+ languageName: node
+ linkType: hard
+
+"@chevrotain/utils@npm:11.1.1":
+ version: 11.1.1
+ resolution: "@chevrotain/utils@npm:11.1.1"
+ checksum: 10c0/b862ba08bb6c6443a8316fcdc040ce940b61d06a15c746fb1cf63bc0e01e37b6976be4ec73285933c25201d2a17d2bfd65bf2a704de72320fc013e31e86fcedf
+ languageName: node
+ linkType: hard
+
"@csstools/color-helpers@npm:^5.1.0":
version: 5.1.0
resolution: "@csstools/color-helpers@npm:5.1.0"
@@ -3322,20 +3659,6 @@ __metadata:
languageName: node
linkType: hard
-"@gilbarbara/deep-equal@npm:^0.1.1":
- version: 0.1.2
- resolution: "@gilbarbara/deep-equal@npm:0.1.2"
- checksum: 10c0/ef441034a34d3e3a2fdcdd473b1082c4e8a324682c8a35cea100d60b5341fecb7249ae043eecf2ea9bdf736a1fe582b294a347095c3d48a1d9d04d7d6e4ad16a
- languageName: node
- linkType: hard
-
-"@gilbarbara/deep-equal@npm:^0.3.1":
- version: 0.3.1
- resolution: "@gilbarbara/deep-equal@npm:0.3.1"
- checksum: 10c0/009584aa912f13c59e98b35c3ebf99ff7fc7c5658d5394fd56d58570da61d68cbc6f7ec082ad2ef009ff72873cc1bd8b9b9fda9e39f7e6594fd643a915e0bc94
- languageName: node
- linkType: hard
-
"@google/genai@npm:^1.10.0":
version: 1.19.0
resolution: "@google/genai@npm:1.19.0"
@@ -3407,6 +3730,24 @@ __metadata:
languageName: node
linkType: hard
+"@iconify/types@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "@iconify/types@npm:2.0.0"
+ checksum: 10c0/65a3be43500c7ccacf360e136d00e1717f050b7b91da644e94370256ac66f582d59212bdb30d00788aab4fc078262e91c95b805d1808d654b72f6d2072a7e4b2
+ languageName: node
+ linkType: hard
+
+"@iconify/utils@npm:^3.0.1":
+ version: 3.1.0
+ resolution: "@iconify/utils@npm:3.1.0"
+ dependencies:
+ "@antfu/install-pkg": "npm:^1.1.0"
+ "@iconify/types": "npm:^2.0.0"
+ mlly: "npm:^1.8.0"
+ checksum: 10c0/a39445e892b248486c186306e1ccba4b07ed1d5b21b143ddf279b33062063173feb84954b9a82e05713b927872787d6c0081073d23f55c44294de37615d4a1f7
+ languageName: node
+ linkType: hard
+
"@isaacs/balanced-match@npm:^4.0.1":
version: 4.0.1
resolution: "@isaacs/balanced-match@npm:4.0.1"
@@ -3460,27 +3801,6 @@ __metadata:
languageName: node
linkType: hard
-"@jan/extensions-web@workspace:*, @jan/extensions-web@workspace:extensions-web":
- version: 0.0.0-use.local
- resolution: "@jan/extensions-web@workspace:extensions-web"
- dependencies:
- "@janhq/core": "workspace:*"
- "@modelcontextprotocol/sdk": "npm:1.17.5"
- "@tabler/icons-react": "npm:^3.34.0"
- "@types/react": "npm:19.1.2"
- react: "npm:19.0.0"
- typescript: "npm:5.9.2"
- vite: "npm:5.4.20"
- vitest: "npm:2.1.9"
- zustand: "npm:5.0.8"
- peerDependencies:
- "@janhq/core": "*"
- "@tabler/icons-react": "*"
- react: 19.0.0
- zustand: 5.0.3
- languageName: unknown
- linkType: soft
-
"@janhq/core@workspace:*, @janhq/core@workspace:core":
version: 0.0.0-use.local
resolution: "@janhq/core@workspace:core"
@@ -3508,39 +3828,95 @@ __metadata:
languageName: unknown
linkType: soft
+"@janhq/interfaces@npm:0.0.2":
+ version: 0.0.2
+ resolution: "@janhq/interfaces@npm:0.0.2"
+ dependencies:
+ "@radix-ui/react-avatar": "npm:^1.1.11"
+ "@radix-ui/react-collapsible": "npm:^1.1.12"
+ "@radix-ui/react-dialog": "npm:^1.1.15"
+ "@radix-ui/react-dropdown-menu": "npm:^2.1.16"
+ "@radix-ui/react-hover-card": "npm:^1.1.15"
+ "@radix-ui/react-label": "npm:^2.1.8"
+ "@radix-ui/react-popover": "npm:^1.1.15"
+ "@radix-ui/react-select": "npm:^2.2.6"
+ "@radix-ui/react-separator": "npm:^1.1.8"
+ "@radix-ui/react-slot": "npm:^1.2.4"
+ "@radix-ui/react-switch": "npm:^1.2.6"
+ "@radix-ui/react-tooltip": "npm:^1.2.8"
+ "@radix-ui/react-use-controllable-state": "npm:^1.2.2"
+ ai: "npm:5.0.108"
+ class-variance-authority: "npm:^0.7.1"
+ clsx: "npm:^2.1.1"
+ cmdk: "npm:^1.1.1"
+ framer-motion: "npm:^12.23.25"
+ lucide-react: "npm:^0.562.0"
+ motion: "npm:^12.23.26"
+ nanoid: "npm:^5.1.6"
+ shiki: "npm:^3.19.0"
+ sonner: "npm:^2.0.7"
+ streamdown: "npm:@janhq/streamdown@^1.1.6"
+ tailwind-merge: "npm:^3.4.0"
+ use-stick-to-bottom: "npm:^1.1.1"
+ vaul: "npm:^1.1.2"
+ peerDependencies:
+ react: ^19.2.0
+ react-dom: ^19.2.0
+ checksum: 10c0/c91f51ffb122709657769dfa87dd5cb11076356898a3cf0e1e2267a4284fd4cfbbe270f06eeff27e1c075c9b2eb23d8f2594278a93c8d361223aaac72f63a43a
+ languageName: node
+ linkType: hard
+
+"@janhq/remend@npm:@janhq/remend@^1.1.0, @janhq/remend@npm:^1.0.1":
+ version: 1.1.0
+ resolution: "@janhq/remend@npm:1.1.0"
+ checksum: 10c0/6e56c2bd6ac9aca2dfa586903693d109cf842bfc90772503aa38b7eb6b8c6f7d1636dc047e04abbe91a177f5fafaeccf2b66c2853391bcaf327e0a7cb69e02ec
+ languageName: node
+ linkType: hard
+
"@janhq/web-app@workspace:web-app":
version: 0.0.0-use.local
resolution: "@janhq/web-app@workspace:web-app"
dependencies:
+ "@ai-sdk/anthropic": "npm:^2.0.0"
+ "@ai-sdk/openai": "npm:^2.0.0"
+ "@ai-sdk/openai-compatible": "npm:^1.0.28"
+ "@ai-sdk/react": "npm:^2.0.109"
"@dnd-kit/core": "npm:6.3.1"
"@dnd-kit/modifiers": "npm:9.0.0"
"@dnd-kit/sortable": "npm:10.0.0"
"@eslint/js": "npm:8.57.0"
- "@jan/extensions-web": "workspace:*"
"@janhq/core": "workspace:*"
+ "@janhq/interfaces": "npm:0.0.2"
"@radix-ui/react-accordion": "npm:1.2.11"
"@radix-ui/react-avatar": "npm:1.1.10"
- "@radix-ui/react-dialog": "npm:1.1.15"
- "@radix-ui/react-dropdown-menu": "npm:2.1.16"
- "@radix-ui/react-hover-card": "npm:1.1.14"
+ "@radix-ui/react-collapsible": "npm:^1.1.12"
+ "@radix-ui/react-dialog": "npm:^1.1.15"
+ "@radix-ui/react-dropdown-menu": "npm:^2.1.16"
+ "@radix-ui/react-hover-card": "npm:^1.1.15"
"@radix-ui/react-popover": "npm:1.1.14"
"@radix-ui/react-progress": "npm:1.1.4"
- "@radix-ui/react-radio-group": "npm:1.3.8"
- "@radix-ui/react-slider": "npm:1.3.2"
- "@radix-ui/react-slot": "npm:1.2.0"
+ "@radix-ui/react-radio-group": "npm:^1.3.8"
+ "@radix-ui/react-separator": "npm:^1.1.8"
+ "@radix-ui/react-slider": "npm:^1.3.6"
+ "@radix-ui/react-slot": "npm:^1.2.4"
"@radix-ui/react-switch": "npm:1.2.2"
- "@radix-ui/react-tooltip": "npm:1.2.4"
+ "@radix-ui/react-tooltip": "npm:^1.2.8"
+ "@streamdown/cjk": "npm:^1.0.1"
+ "@streamdown/code": "npm:^1.0.1"
+ "@streamdown/math": "npm:^1.0.1"
+ "@streamdown/mermaid": "npm:^1.0.1"
"@tabler/icons-react": "npm:3.34.0"
"@tailwindcss/vite": "npm:4.1.4"
"@tanstack/react-router": "npm:^1.121.34"
"@tanstack/react-router-devtools": "npm:1.121.34"
"@tanstack/react-virtual": "npm:3.13.12"
- "@tanstack/router-plugin": "npm:1.117.0"
+ "@tanstack/router-plugin": "npm:1.121.34"
"@tauri-apps/api": "npm:2.8.0"
"@tauri-apps/plugin-deep-link": "npm:2.4.3"
"@tauri-apps/plugin-http": "npm:2.5.0"
"@tauri-apps/plugin-opener": "npm:2.5.2"
"@tauri-apps/plugin-os": "npm:2.2.1"
+ "@tauri-apps/plugin-store": "npm:^2.4.2"
"@tauri-apps/plugin-updater": "npm:2.8.1"
"@testing-library/dom": "npm:10.4.1"
"@testing-library/jest-dom": "npm:6.8.0"
@@ -3551,15 +3927,18 @@ __metadata:
"@types/istanbul-reports": "npm:3.0.4"
"@types/lodash.clonedeep": "npm:4.5.9"
"@types/lodash.debounce": "npm:4.0.9"
+ "@types/mdast": "npm:^4.0.4"
"@types/node": "npm:22.14.1"
"@types/react": "npm:19.1.2"
"@types/react-dom": "npm:19.1.2"
"@types/react-syntax-highlighter": "npm:15.5.13"
+ "@types/unist": "npm:^3.0.3"
"@types/uuid": "npm:10.0.0"
"@uiw/react-textarea-code-editor": "npm:3.1.1"
"@vitejs/plugin-react": "npm:4.4.1"
"@vitest/coverage-v8": "npm:3.2.4"
- class-variance-authority: "npm:0.7.1"
+ ai: "npm:^5.0.121"
+ class-variance-authority: "npm:^0.7.1"
clsx: "npm:2.1.1"
culori: "npm:4.0.1"
emoji-picker-react: "npm:4.12.2"
@@ -3579,15 +3958,15 @@ __metadata:
katex: "npm:0.16.22"
lodash.clonedeep: "npm:4.5.0"
lodash.debounce: "npm:4.0.8"
- lucide-react: "npm:0.536.0"
- motion: "npm:12.18.1"
+ lucide-react: "npm:^0.563.0"
+ motion: "npm:^12.29.2"
next-themes: "npm:0.4.6"
posthog-js: "npm:1.255.1"
+ radix-ui: "npm:^1.4.3"
react: "npm:19.0.0"
react-colorful: "npm:5.6.1"
react-dom: "npm:19.0.0"
react-i18next: "npm:15.5.1"
- react-joyride: "npm:2.9.3"
react-markdown: "npm:10.1.0"
react-resizable-panels: "npm:3.0.5"
react-syntax-highlighter: "npm:15.6.1"
@@ -3600,9 +3979,11 @@ __metadata:
remark-gfm: "npm:4.0.1"
remark-math: "npm:6.0.0"
serve: "npm:14.2.5"
+ shiki: "npm:^3.19.0"
sonner: "npm:2.0.5"
+ streamdown: "npm:@janhq/streamdown@^2.1.1"
tailwind-merge: "npm:3.3.1"
- tailwindcss: "npm:4.1.4"
+ tailwindcss: "npm:4.1.17"
token.js: "npm:[email protected]"
tw-animate-css: "npm:1.2.8"
typescript: "npm:5.9.2"
@@ -3610,12 +3991,14 @@ __metadata:
ulidx: "npm:2.4.1"
unified: "npm:11.0.5"
unist-util-visit: "npm:^5.0.0"
+ use-stick-to-bottom: "npm:^1.0.48"
uuid: "npm:11.1.0"
- vaul: "npm:1.1.2"
+ vaul: "npm:^1.1.2"
vite: "npm:6.3.2"
vite-plugin-node-polyfills: "npm:0.23.0"
vite-plugin-pwa: "npm:1.0.3"
vitest: "npm:3.2.4"
+ zod: "npm:^4.1.13"
zustand: "npm:5.0.3"
languageName: unknown
linkType: soft
@@ -3719,6 +4102,15 @@ __metadata:
languageName: node
linkType: hard
+"@mermaid-js/parser@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "@mermaid-js/parser@npm:1.0.0"
+ dependencies:
+ langium: "npm:^4.0.0"
+ checksum: 10c0/e311a0981d31984614eee25101c695e950cb1197befc51296d8735390433de59dc6e4a48c3cce1e23a1279b6baf60f9f724d529b741c0c86cdcb09afe3e5e046
+ languageName: node
+ linkType: hard
+
"@mistralai/mistralai@npm:0.5.0":
version: 0.5.0
resolution: "@mistralai/mistralai@npm:0.5.0"
@@ -3728,26 +4120,6 @@ __metadata:
languageName: node
linkType: hard
-"@modelcontextprotocol/sdk@npm:1.17.5":
- version: 1.17.5
- resolution: "@modelcontextprotocol/sdk@npm:1.17.5"
- dependencies:
- ajv: "npm:^6.12.6"
- content-type: "npm:^1.0.5"
- cors: "npm:^2.8.5"
- cross-spawn: "npm:^7.0.5"
- eventsource: "npm:^3.0.2"
- eventsource-parser: "npm:^3.0.0"
- express: "npm:^5.0.1"
- express-rate-limit: "npm:^7.5.0"
- pkce-challenge: "npm:^5.0.0"
- raw-body: "npm:^3.0.0"
- zod: "npm:^3.23.8"
- zod-to-json-schema: "npm:^3.24.1"
- checksum: 10c0/182b92b5e7c07da428fd23c6de22021c4f9a91f799c02a8ef15def07e4f9361d0fc22303548658fec2a700623535fd44a9dc4d010fb5d803a8f80e3c6c64a45e
- languageName: node
- linkType: hard
-
"@napi-rs/wasm-runtime@npm:^0.2.4":
version: 0.2.7
resolution: "@napi-rs/wasm-runtime@npm:0.2.7"
@@ -4088,6 +4460,13 @@ __metadata:
languageName: node
linkType: hard
+"@opentelemetry/api@npm:1.9.0":
+ version: 1.9.0
+ resolution: "@opentelemetry/api@npm:1.9.0"
+ checksum: 10c0/9aae2fe6e8a3a3eeb6c1fdef78e1939cf05a0f37f8a4fae4d6bf2e09eb1e06f966ece85805626e01ba5fab48072b94f19b835449e58b6d26720ee19a58298add
+ languageName: node
+ linkType: hard
+
"@pkgjs/parseargs@npm:^0.11.0":
version: 0.11.0
resolution: "@pkgjs/parseargs@npm:0.11.0"
@@ -4123,6 +4502,25 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-accessible-icon@npm:1.1.7":
+ version: 1.1.7
+ resolution: "@radix-ui/react-accessible-icon@npm:1.1.7"
+ dependencies:
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/2a912454b3f5e1dbea599747be39e94a7d23b1d7c4261fd20b04faf38db9aaf00f4c26fc96922d75871e57a0f94948fe60ec044d3022c934b8df43da94faf18a
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-accordion@npm:1.2.11":
version: 1.2.11
resolution: "@radix-ui/react-accordion@npm:1.2.11"
@@ -4150,11 +4548,19 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-arrow@npm:1.1.4":
- version: 1.1.4
- resolution: "@radix-ui/react-arrow@npm:1.1.4"
+"@radix-ui/react-accordion@npm:1.2.12":
+ version: 1.2.12
+ resolution: "@radix-ui/react-accordion@npm:1.2.12"
dependencies:
- "@radix-ui/react-primitive": "npm:2.1.0"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collapsible": "npm:1.1.12"
+ "@radix-ui/react-collection": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4165,15 +4571,20 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/ce93c35e6c85661d9ba90d235164dcbe9a1bd477dd9096763526c71348378d959f3642a017eb32fb4e72952043fddd8e100b17c67d5552250d60c8fc11551323
+ checksum: 10c0/c64a53ce766a1ef529cf6413ed7382598c94f78879b3a83ceda27cb1894ed6eb6e8ad61f6a550ca3c7fa813657045dadfc7328dbf1d736a37e1cf3c446db43de
languageName: node
linkType: hard
-"@radix-ui/react-arrow@npm:1.1.7":
- version: 1.1.7
- resolution: "@radix-ui/react-arrow@npm:1.1.7"
+"@radix-ui/react-alert-dialog@npm:1.1.15":
+ version: 1.1.15
+ resolution: "@radix-ui/react-alert-dialog@npm:1.1.15"
dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-dialog": "npm:1.1.15"
"@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-slot": "npm:1.2.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4184,19 +4595,57 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/c3b46766238b3ee2a394d8806a5141432361bf1425110c9f0dcf480bda4ebd304453a53f294b5399c6ee3ccfcae6fd544921fd01ddc379cf5942acdd7168664b
+ checksum: 10c0/038de84ad1b36c162e5f5a3b4034de95558698eb6e3f483d2b1a15f4a502c921c4e6a5a723fe6f29e928ed7001ffe38ac6fd16bb720b1e629892ce7beb1da174
languageName: node
linkType: hard
-"@radix-ui/react-avatar@npm:1.1.10":
- version: 1.1.10
- resolution: "@radix-ui/react-avatar@npm:1.1.10"
+"@radix-ui/react-arrow@npm:1.1.7":
+ version: 1.1.7
+ resolution: "@radix-ui/react-arrow@npm:1.1.7"
dependencies:
- "@radix-ui/react-context": "npm:1.1.2"
"@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-use-callback-ref": "npm:1.1.1"
- "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
- "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/c3b46766238b3ee2a394d8806a5141432361bf1425110c9f0dcf480bda4ebd304453a53f294b5399c6ee3ccfcae6fd544921fd01ddc379cf5942acdd7168664b
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-aspect-ratio@npm:1.1.7":
+ version: 1.1.7
+ resolution: "@radix-ui/react-aspect-ratio@npm:1.1.7"
+ dependencies:
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/12761718749d56393b6135e01434f8384dd05bcebf2c2fedc04f85f414174297d36531e17010df9f40aec7407c76d683e3f309ce5a39536ed1a3e03a12d08f71
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-avatar@npm:1.1.10":
+ version: 1.1.10
+ resolution: "@radix-ui/react-avatar@npm:1.1.10"
+ dependencies:
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4211,6 +4660,55 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-avatar@npm:^1.1.11":
+ version: 1.1.11
+ resolution: "@radix-ui/react-avatar@npm:1.1.11"
+ dependencies:
+ "@radix-ui/react-context": "npm:1.1.3"
+ "@radix-ui/react-primitive": "npm:2.1.4"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/b1b3d4b11a8e05a8479d2410fb4e7b1bf825135c4cd42f7e5152568a54a55a3073bd87d50325150417a29306e7b1b371289dc3c4f11739af8a2a7bb8dd7c38c9
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-checkbox@npm:1.3.3":
+ version: 1.3.3
+ resolution: "@radix-ui/react-checkbox@npm:1.3.3"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/5eeb78e37a6c9611a638a80b309c931dd6f1f8968357ab2abb453505392fa1397491441447ca2d5f4381faaac7fab2dc84c780e8ce27d931bd203fa014088b74
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-collapsible@npm:1.1.11":
version: 1.1.11
resolution: "@radix-ui/react-collapsible@npm:1.1.11"
@@ -4237,14 +4735,18 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-collection@npm:1.1.4":
- version: 1.1.4
- resolution: "@radix-ui/react-collection@npm:1.1.4"
+"@radix-ui/react-collapsible@npm:1.1.12, @radix-ui/react-collapsible@npm:^1.1.12":
+ version: 1.1.12
+ resolution: "@radix-ui/react-collapsible@npm:1.1.12"
dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-primitive": "npm:2.1.0"
- "@radix-ui/react-slot": "npm:1.2.0"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4255,7 +4757,7 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/fc03f1964789226161f2cea2a97c909feaf0e09ba5bb849a9471fb19c1e161e4d8c64588d14fba80ac869eb06c752538c0eaa328c3608ef5dddb033a2ad87770
+ checksum: 10c0/777cced73fbbec9cfafe6325aa5605e90f49d889af2778f4c4a6be101c07cacd69ae817d0b41cc27e3181f49392e2c06db7f32d6b084db047a51805ec70729b3
languageName: node
linkType: hard
@@ -4281,7 +4783,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-compose-refs@npm:1.1.2":
+"@radix-ui/react-compose-refs@npm:1.1.2, @radix-ui/react-compose-refs@npm:^1.1.1":
version: 1.1.2
resolution: "@radix-ui/react-compose-refs@npm:1.1.2"
peerDependencies:
@@ -4294,6 +4796,30 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-context-menu@npm:2.2.16":
+ version: 2.2.16
+ resolution: "@radix-ui/react-context-menu@npm:2.2.16"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-menu": "npm:2.1.16"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/950f7559e65474a19145238cf44d744cb1e49be2221ff18436ba49b496b05ccf93bd3906aaa2c7ab76bc77daf694911a78442801e0053f57d2e57ebbfd281c49
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-context@npm:1.1.2":
version: 1.1.2
resolution: "@radix-ui/react-context@npm:1.1.2"
@@ -4307,7 +4833,20 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-dialog@npm:1.1.15, @radix-ui/react-dialog@npm:^1.1.1":
+"@radix-ui/react-context@npm:1.1.3":
+ version: 1.1.3
+ resolution: "@radix-ui/react-context@npm:1.1.3"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/0f271b4100dbb007ad2675f2529453f07454f214b7ce796d72680bf2dff050d0719083ee6e8962919a74048ff853eff2e50de07d8f8c674d6be91bfa76204cc2
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-dialog@npm:1.1.15, @radix-ui/react-dialog@npm:^1.1.1, @radix-ui/react-dialog@npm:^1.1.15, @radix-ui/react-dialog@npm:^1.1.6":
version: 1.1.15
resolution: "@radix-ui/react-dialog@npm:1.1.15"
dependencies:
@@ -4398,30 +4937,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-dismissable-layer@npm:1.1.7":
- version: 1.1.7
- resolution: "@radix-ui/react-dismissable-layer@npm:1.1.7"
- dependencies:
- "@radix-ui/primitive": "npm:1.1.2"
- "@radix-ui/react-compose-refs": "npm:1.1.2"
- "@radix-ui/react-primitive": "npm:2.1.0"
- "@radix-ui/react-use-callback-ref": "npm:1.1.1"
- "@radix-ui/react-use-escape-keydown": "npm:1.1.1"
- peerDependencies:
- "@types/react": "*"
- "@types/react-dom": "*"
- react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
- react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
- peerDependenciesMeta:
- "@types/react":
- optional: true
- "@types/react-dom":
- optional: true
- checksum: 10c0/bb93b821ab1e24da86f4a4e74e251d9bc53c021a8a2cb4be5273af6cfe94fcd95807058a789b74bd5ca256bcb8be6dfaec3a0768f8323009dd2b2a9161964d7a
- languageName: node
- linkType: hard
-
-"@radix-ui/react-dropdown-menu@npm:2.1.16":
+"@radix-ui/react-dropdown-menu@npm:2.1.16, @radix-ui/react-dropdown-menu@npm:^2.1.16":
version: 2.1.16
resolution: "@radix-ui/react-dropdown-menu@npm:2.1.16"
dependencies:
@@ -4493,17 +5009,41 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-hover-card@npm:1.1.14":
- version: 1.1.14
- resolution: "@radix-ui/react-hover-card@npm:1.1.14"
+"@radix-ui/react-form@npm:0.1.8":
+ version: 0.1.8
+ resolution: "@radix-ui/react-form@npm:0.1.8"
dependencies:
- "@radix-ui/primitive": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-dismissable-layer": "npm:1.1.10"
- "@radix-ui/react-popper": "npm:1.2.7"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-label": "npm:2.1.7"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/4245a16c9f638f625de2825889f41a5a32e7b1f3dfb785fa78981375b83b551718f69f84d8ea8da1dac0631835cd1fcd6fa3488415a31b3d38c4699a626e54c0
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-hover-card@npm:1.1.15, @radix-ui/react-hover-card@npm:^1.1.15":
+ version: 1.1.15
+ resolution: "@radix-ui/react-hover-card@npm:1.1.15"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-popper": "npm:1.2.8"
"@radix-ui/react-portal": "npm:1.1.9"
- "@radix-ui/react-presence": "npm:1.1.4"
+ "@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
@@ -4516,11 +5056,11 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/f352bab22dd81ac2ef1140ca1a8426913010851becd03df9d8b8476bdf6ef7001f0559f6a61c4f98ff8033d6cedacd4c86ad47e4c391385254430e266329a2a0
+ checksum: 10c0/c44ab88b0c62a3c1bf274b72e5cc3f5a6aea571a52bf2fcb2d471e1336738adabdbd10c26c8e72071cad444704ac28fcf2679d43132b69279564ad689839cf4e
languageName: node
linkType: hard
-"@radix-ui/react-id@npm:1.1.1":
+"@radix-ui/react-id@npm:1.1.1, @radix-ui/react-id@npm:^1.1.0":
version: 1.1.1
resolution: "@radix-ui/react-id@npm:1.1.1"
dependencies:
@@ -4535,6 +5075,44 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-label@npm:2.1.7":
+ version: 2.1.7
+ resolution: "@radix-ui/react-label@npm:2.1.7"
+ dependencies:
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/d8c81411d5327b6db5cbf4b900bfcc52030315539911701cf8d82b4970aed80cbd66df5b62d2242859572c666cf4b0e147a8b39dc3c04bd024a4b4405e1183fe
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-label@npm:^2.1.8":
+ version: 2.1.8
+ resolution: "@radix-ui/react-label@npm:2.1.8"
+ dependencies:
+ "@radix-ui/react-primitive": "npm:2.1.4"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/8b130380bd54bafb0dc652270c8cf035ceeb78faab82f78c0a76fc33cc0718e8455ff880e0db1b6c10f203ff342bf1f941544eb258c1fd85ae5b49b53cdf1a3d
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-menu@npm:2.1.16":
version: 2.1.16
resolution: "@radix-ui/react-menu@npm:2.1.16"
@@ -4552,11 +5130,406 @@ __metadata:
"@radix-ui/react-portal": "npm:1.1.9"
"@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-roving-focus": "npm:1.1.11"
- "@radix-ui/react-slot": "npm:1.2.3"
- "@radix-ui/react-use-callback-ref": "npm:1.1.1"
- aria-hidden: "npm:^1.2.4"
- react-remove-scroll: "npm:^2.6.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ aria-hidden: "npm:^1.2.4"
+ react-remove-scroll: "npm:^2.6.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/27516b2b987fa9181c4da8645000af8f60691866a349d7a46b9505fa7d2e9d92b9e364db4f7305d08e9e57d0e1afc8df8354f8ee3c12aa05c0100c16b0e76c27
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-menubar@npm:1.1.16":
+ version: 1.1.16
+ resolution: "@radix-ui/react-menubar@npm:1.1.16"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-menu": "npm:2.1.16"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/81f8134a178b8e81522280988dfa0327ddbb777e0b0650fb71dd2528b94af18c2a23166fd3497d17473fd3191e5317adda449248fd16945d786728c57ded097e
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-navigation-menu@npm:1.2.14":
+ version: 1.2.14
+ resolution: "@radix-ui/react-navigation-menu@npm:1.2.14"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/c06ca983fc99bf37f09101b1f423def413e5b7437308e519c878180411a12f837a6a3b293b873293b06e68ca60294597da0f2bf0321efaf9028ab4144e13187e
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-one-time-password-field@npm:0.1.8":
+ version: 0.1.8
+ resolution: "@radix-ui/react-one-time-password-field@npm:0.1.8"
+ dependencies:
+ "@radix-ui/number": "npm:1.1.1"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-effect-event": "npm:0.0.2"
+ "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/1dded300690d148c71b022ef2fffd271faae906ad6546ec39ae537d5f7cfaab76b8c13567c97660bc3623c38eb1686e248e6a442de289f70226df87230196650
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-password-toggle-field@npm:0.1.3":
+ version: 0.1.3
+ resolution: "@radix-ui/react-password-toggle-field@npm:0.1.3"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-effect-event": "npm:0.0.2"
+ "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/9c4eea5f6a05401e6c77d9bfebfea801c027c0e5a85bac5df71e6982b1162b79dbdeed6e6e52fc7fd2b34533ccc64c63ec47fbf5f9bf621dfd0d1810baec2f4d
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-popover@npm:1.1.14":
+ version: 1.1.14
+ resolution: "@radix-ui/react-popover@npm:1.1.14"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.2"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.10"
+ "@radix-ui/react-focus-guards": "npm:1.1.2"
+ "@radix-ui/react-focus-scope": "npm:1.1.7"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-popper": "npm:1.2.7"
+ "@radix-ui/react-portal": "npm:1.1.9"
+ "@radix-ui/react-presence": "npm:1.1.4"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ aria-hidden: "npm:^1.2.4"
+ react-remove-scroll: "npm:^2.6.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/04e557bfcaab4887694d119555b101e16b8a4e99595541ff2cbe805c551be853cb02882a2ada04e6507ffc45bc092bc2b89704b7b79f5025251767d0b4f3230a
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-popover@npm:1.1.15, @radix-ui/react-popover@npm:^1.1.15":
+ version: 1.1.15
+ resolution: "@radix-ui/react-popover@npm:1.1.15"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-focus-guards": "npm:1.1.3"
+ "@radix-ui/react-focus-scope": "npm:1.1.7"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-popper": "npm:1.2.8"
+ "@radix-ui/react-portal": "npm:1.1.9"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ aria-hidden: "npm:^1.2.4"
+ react-remove-scroll: "npm:^2.6.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/c1c76b5e5985b128d03b621424fb453f769931d497759a1977734d303007da9f970570cf3ea1f6968ab609ab4a97f384168bff056197bd2d3d422abea0e3614b
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-popper@npm:1.2.7":
+ version: 1.2.7
+ resolution: "@radix-ui/react-popper@npm:1.2.7"
+ dependencies:
+ "@floating-ui/react-dom": "npm:^2.0.0"
+ "@radix-ui/react-arrow": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-use-rect": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
+ "@radix-ui/rect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/fb901329df5432225b0be08778a89faaa25c40e8042f0f181218e385cae26811420b6e4b1effc70955393e09d83cd462d1b0eb6ca6d33282d76692972b602ad8
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-popper@npm:1.2.8":
+ version: 1.2.8
+ resolution: "@radix-ui/react-popper@npm:1.2.8"
+ dependencies:
+ "@floating-ui/react-dom": "npm:^2.0.0"
+ "@radix-ui/react-arrow": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-use-rect": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
+ "@radix-ui/rect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/48e3f13eac3b8c13aca8ded37d74db17e1bb294da8d69f142ab6b8719a06c3f90051668bed64520bf9f3abdd77b382ce7ce209d056bb56137cecc949b69b421c
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-portal@npm:1.1.9":
+ version: 1.1.9
+ resolution: "@radix-ui/react-portal@npm:1.1.9"
+ dependencies:
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/45b432497c722720c72c493a29ef6085bc84b50eafe79d48b45c553121b63e94f9cdb77a3a74b9c49126f8feb3feee009fe400d48b7759d3552396356b192cd7
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-presence@npm:1.1.4":
+ version: 1.1.4
+ resolution: "@radix-ui/react-presence@npm:1.1.4"
+ dependencies:
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/8202647139d6f5097b0abcc43dfba471c00b69da95ca336afe3ea23a165e05ca21992f40fc801760fe442f3e064e54e2f2cbcb9ad758c4b07ef6c69a5b6777bd
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-presence@npm:1.1.5":
+ version: 1.1.5
+ resolution: "@radix-ui/react-presence@npm:1.1.5"
+ dependencies:
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/d0e61d314250eeaef5369983cb790701d667f51734bafd98cf759072755562018052c594e6cdc5389789f4543cb0a4d98f03ff4e8f37338d6b5bf51a1700c1d1
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-primitive@npm:2.1.0":
+ version: 2.1.0
+ resolution: "@radix-ui/react-primitive@npm:2.1.0"
+ dependencies:
+ "@radix-ui/react-slot": "npm:1.2.0"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/b436280dbd705b8b32f66b2a36a6432d90db579191fd283697d5d6a4b661ac4ee86b0f6a05e223806ce0802b2652dd8d95c6f7e0ce3c0a5567b2b1e2c3a3fcfe
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-primitive@npm:2.1.3":
+ version: 2.1.3
+ resolution: "@radix-ui/react-primitive@npm:2.1.3"
+ dependencies:
+ "@radix-ui/react-slot": "npm:1.2.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/fdff9b84913bb4172ef6d3af7442fca5f9bba5f2709cba08950071f819d7057aec3a4a2d9ef44cf9cbfb8014d02573c6884a04cff175895823aaef809ebdb034
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-primitive@npm:2.1.4, @radix-ui/react-primitive@npm:^2.0.2":
+ version: 2.1.4
+ resolution: "@radix-ui/react-primitive@npm:2.1.4"
+ dependencies:
+ "@radix-ui/react-slot": "npm:1.2.4"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/90d687b222a25975371ed1f9f08648d75237214b8dec4cbaf09ec9ac951339b17421278f1aff2fb7c5672ba8bd03774a94904efdba73805dd5cc947ce5be8c4a
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-progress@npm:1.1.4":
+ version: 1.1.4
+ resolution: "@radix-ui/react-progress@npm:1.1.4"
+ dependencies:
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/36c518c336c59dcf0629b0e9f5358ff646ac7cc110d7def7365fbe250b151b6e67c68b3581b9b39448d4116d79472d3683058b229ad2d1f11dcb4467a58cb2d3
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-progress@npm:1.1.7":
+ version: 1.1.7
+ resolution: "@radix-ui/react-progress@npm:1.1.7"
+ dependencies:
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.1.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4567,29 +5540,24 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/27516b2b987fa9181c4da8645000af8f60691866a349d7a46b9505fa7d2e9d92b9e364db4f7305d08e9e57d0e1afc8df8354f8ee3c12aa05c0100c16b0e76c27
+ checksum: 10c0/bed5349682a75db02d362c07ac99fefddbbdc0152c4d5035719498223b9d490ebd834e2d9f64d498424048eb3da7eb7e55ba696e202cd0a048d6e319390e69d3
languageName: node
linkType: hard
-"@radix-ui/react-popover@npm:1.1.14":
- version: 1.1.14
- resolution: "@radix-ui/react-popover@npm:1.1.14"
+"@radix-ui/react-radio-group@npm:1.3.8, @radix-ui/react-radio-group@npm:^1.3.8":
+ version: 1.3.8
+ resolution: "@radix-ui/react-radio-group@npm:1.3.8"
dependencies:
- "@radix-ui/primitive": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-dismissable-layer": "npm:1.1.10"
- "@radix-ui/react-focus-guards": "npm:1.1.2"
- "@radix-ui/react-focus-scope": "npm:1.1.7"
- "@radix-ui/react-id": "npm:1.1.1"
- "@radix-ui/react-popper": "npm:1.2.7"
- "@radix-ui/react-portal": "npm:1.1.9"
- "@radix-ui/react-presence": "npm:1.1.4"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
- aria-hidden: "npm:^1.2.4"
- react-remove-scroll: "npm:^2.6.3"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4600,24 +5568,23 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/04e557bfcaab4887694d119555b101e16b8a4e99595541ff2cbe805c551be853cb02882a2ada04e6507ffc45bc092bc2b89704b7b79f5025251767d0b4f3230a
+ checksum: 10c0/23af8e8b833da1fc4aa4e67c3607dedee4fc5b39278d2e2b820bec7f7b3c0891b006a8a35c57ba436ddf18735bbd8dad9a598d14632a328753a875fde447975c
languageName: node
linkType: hard
-"@radix-ui/react-popper@npm:1.2.4":
- version: 1.2.4
- resolution: "@radix-ui/react-popper@npm:1.2.4"
+"@radix-ui/react-roving-focus@npm:1.1.11":
+ version: 1.1.11
+ resolution: "@radix-ui/react-roving-focus@npm:1.1.11"
dependencies:
- "@floating-ui/react-dom": "npm:^2.0.0"
- "@radix-ui/react-arrow": "npm:1.1.4"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-primitive": "npm:2.1.0"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
"@radix-ui/react-use-callback-ref": "npm:1.1.1"
- "@radix-ui/react-use-layout-effect": "npm:1.1.1"
- "@radix-ui/react-use-rect": "npm:1.1.1"
- "@radix-ui/react-use-size": "npm:1.1.1"
- "@radix-ui/rect": "npm:1.1.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4628,24 +5595,23 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/3c0b1dac6f3e25700604424c11f0e3a29aacb430f4cf5ed78ea3acb059481c7dc6907fbb9538f068415583c03b2ba7ebb2a270e5dfd156421e4112b42ae70168
+ checksum: 10c0/2cd43339c36e89a3bf1db8aab34b939113dfbde56bf3a33df2d74757c78c9489b847b1962f1e2441c67e41817d120cb6177943e0f655f47bc1ff8e44fd55b1a2
languageName: node
linkType: hard
-"@radix-ui/react-popper@npm:1.2.7":
- version: 1.2.7
- resolution: "@radix-ui/react-popper@npm:1.2.7"
+"@radix-ui/react-scroll-area@npm:1.2.10":
+ version: 1.2.10
+ resolution: "@radix-ui/react-scroll-area@npm:1.2.10"
dependencies:
- "@floating-ui/react-dom": "npm:^2.0.0"
- "@radix-ui/react-arrow": "npm:1.1.7"
+ "@radix-ui/number": "npm:1.1.1"
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
"@radix-ui/react-use-callback-ref": "npm:1.1.1"
"@radix-ui/react-use-layout-effect": "npm:1.1.1"
- "@radix-ui/react-use-rect": "npm:1.1.1"
- "@radix-ui/react-use-size": "npm:1.1.1"
- "@radix-ui/rect": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4656,24 +5622,35 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/fb901329df5432225b0be08778a89faaa25c40e8042f0f181218e385cae26811420b6e4b1effc70955393e09d83cd462d1b0eb6ca6d33282d76692972b602ad8
+ checksum: 10c0/8acdacd255fdfcefe4f72028a13dc554df73327db94c250f54a85b9608aa0313284dbb6c417f28a48e7b7b7bcaa76ddf3297e91ba07d833604d428f869259622
languageName: node
linkType: hard
-"@radix-ui/react-popper@npm:1.2.8":
- version: 1.2.8
- resolution: "@radix-ui/react-popper@npm:1.2.8"
+"@radix-ui/react-select@npm:2.2.6, @radix-ui/react-select@npm:^2.2.6":
+ version: 2.2.6
+ resolution: "@radix-ui/react-select@npm:2.2.6"
dependencies:
- "@floating-ui/react-dom": "npm:^2.0.0"
- "@radix-ui/react-arrow": "npm:1.1.7"
+ "@radix-ui/number": "npm:1.1.1"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-focus-guards": "npm:1.1.3"
+ "@radix-ui/react-focus-scope": "npm:1.1.7"
+ "@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-popper": "npm:1.2.8"
+ "@radix-ui/react-portal": "npm:1.1.9"
"@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-slot": "npm:1.2.3"
"@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
"@radix-ui/react-use-layout-effect": "npm:1.1.1"
- "@radix-ui/react-use-rect": "npm:1.1.1"
- "@radix-ui/react-use-size": "npm:1.1.1"
- "@radix-ui/rect": "npm:1.1.1"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
+ aria-hidden: "npm:^1.2.4"
+ react-remove-scroll: "npm:^2.6.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4684,16 +5661,15 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/48e3f13eac3b8c13aca8ded37d74db17e1bb294da8d69f142ab6b8719a06c3f90051668bed64520bf9f3abdd77b382ce7ce209d056bb56137cecc949b69b421c
+ checksum: 10c0/34b2492589c3a4b118a03900d622640033630f30ac93c4a69b3701513117607f4ac3a0d9dd3cad39caa8b6495660f71f3aa9d0074d4eb4dac6804dc0b8408deb
languageName: node
linkType: hard
-"@radix-ui/react-portal@npm:1.1.6":
- version: 1.1.6
- resolution: "@radix-ui/react-portal@npm:1.1.6"
+"@radix-ui/react-separator@npm:1.1.7":
+ version: 1.1.7
+ resolution: "@radix-ui/react-separator@npm:1.1.7"
dependencies:
- "@radix-ui/react-primitive": "npm:2.1.0"
- "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4704,16 +5680,15 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/46bc998794848289665fc5a31c14827a56406bc5ad104fc1ba829cc52506b38989301fe5405e3960d4ac504f5176549cf5ef42e80a5e3844ce53148b4f86f31b
+ checksum: 10c0/32c0eb4fe018397efbe580542e6e33fdc09b76b96395b2bb4c55da7b6d49224b18f46143bdaf9eb6cb01e166c459fb77508a81d20a591a9034949acee5d171d9
languageName: node
linkType: hard
-"@radix-ui/react-portal@npm:1.1.9":
- version: 1.1.9
- resolution: "@radix-ui/react-portal@npm:1.1.9"
+"@radix-ui/react-separator@npm:^1.1.8":
+ version: 1.1.8
+ resolution: "@radix-ui/react-separator@npm:1.1.8"
dependencies:
- "@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.4"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4724,16 +5699,25 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/45b432497c722720c72c493a29ef6085bc84b50eafe79d48b45c553121b63e94f9cdb77a3a74b9c49126f8feb3feee009fe400d48b7759d3552396356b192cd7
+ checksum: 10c0/92e1353f696a22167c90f2c610b440be1fae3c05128287560914f124eef83d74c06ad25431923f3595032e6d89c23d479c95434390f4c0d9d4a68ec8d563ae0c
languageName: node
linkType: hard
-"@radix-ui/react-presence@npm:1.1.4":
- version: 1.1.4
- resolution: "@radix-ui/react-presence@npm:1.1.4"
+"@radix-ui/react-slider@npm:1.3.6, @radix-ui/react-slider@npm:^1.3.6":
+ version: 1.3.6
+ resolution: "@radix-ui/react-slider@npm:1.3.6"
dependencies:
+ "@radix-ui/number": "npm:1.1.1"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
"@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
"@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4744,74 +5728,66 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/8202647139d6f5097b0abcc43dfba471c00b69da95ca336afe3ea23a165e05ca21992f40fc801760fe442f3e064e54e2f2cbcb9ad758c4b07ef6c69a5b6777bd
+ checksum: 10c0/a53d7854e28c5ef3d29b76c8d04cc3c723b982b643152cd5a8fefc7a8359180f8fd21753e5a08302a290bc837e7be04f2efad9d308b7a4a23326df6a6b1ac882
languageName: node
linkType: hard
-"@radix-ui/react-presence@npm:1.1.5":
- version: 1.1.5
- resolution: "@radix-ui/react-presence@npm:1.1.5"
+"@radix-ui/react-slot@npm:1.2.0":
+ version: 1.2.0
+ resolution: "@radix-ui/react-slot@npm:1.2.0"
dependencies:
"@radix-ui/react-compose-refs": "npm:1.1.2"
- "@radix-ui/react-use-layout-effect": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
- "@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
- react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
- "@types/react-dom":
- optional: true
- checksum: 10c0/d0e61d314250eeaef5369983cb790701d667f51734bafd98cf759072755562018052c594e6cdc5389789f4543cb0a4d98f03ff4e8f37338d6b5bf51a1700c1d1
+ checksum: 10c0/f1455f36479e87a0a2254fc2e2b2aba6740d1fbcada949071210bf2a009a031ad508ac01b544bce96337bcca82f49531b46c71615141a5985aaa11ae69b967b1
languageName: node
linkType: hard
-"@radix-ui/react-primitive@npm:2.1.0":
- version: 2.1.0
- resolution: "@radix-ui/react-primitive@npm:2.1.0"
+"@radix-ui/react-slot@npm:1.2.3":
+ version: 1.2.3
+ resolution: "@radix-ui/react-slot@npm:1.2.3"
dependencies:
- "@radix-ui/react-slot": "npm:1.2.0"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
peerDependencies:
"@types/react": "*"
- "@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
- react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
- "@types/react-dom":
- optional: true
- checksum: 10c0/b436280dbd705b8b32f66b2a36a6432d90db579191fd283697d5d6a4b661ac4ee86b0f6a05e223806ce0802b2652dd8d95c6f7e0ce3c0a5567b2b1e2c3a3fcfe
+ checksum: 10c0/5913aa0d760f505905779515e4b1f0f71a422350f077cc8d26d1aafe53c97f177fec0e6d7fbbb50d8b5e498aa9df9f707ca75ae3801540c283b26b0136138eef
languageName: node
linkType: hard
-"@radix-ui/react-primitive@npm:2.1.3":
- version: 2.1.3
- resolution: "@radix-ui/react-primitive@npm:2.1.3"
+"@radix-ui/react-slot@npm:1.2.4, @radix-ui/react-slot@npm:^1.2.4":
+ version: 1.2.4
+ resolution: "@radix-ui/react-slot@npm:1.2.4"
dependencies:
- "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
peerDependencies:
"@types/react": "*"
- "@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
- react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
- "@types/react-dom":
- optional: true
- checksum: 10c0/fdff9b84913bb4172ef6d3af7442fca5f9bba5f2709cba08950071f819d7057aec3a4a2d9ef44cf9cbfb8014d02573c6884a04cff175895823aaef809ebdb034
+ checksum: 10c0/8b719bb934f1ae5ac0e37214783085c17c2f1080217caf514c1c6cc3d9ca56c7e19d25470b26da79aa6e605ab36589edaade149b76f5fc0666f1063e2fc0a0dc
languageName: node
linkType: hard
-"@radix-ui/react-progress@npm:1.1.4":
- version: 1.1.4
- resolution: "@radix-ui/react-progress@npm:1.1.4"
+"@radix-ui/react-switch@npm:1.2.2":
+ version: 1.2.2
+ resolution: "@radix-ui/react-switch@npm:1.2.2"
dependencies:
+ "@radix-ui/primitive": "npm:1.1.2"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
"@radix-ui/react-primitive": "npm:2.1.0"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-previous": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4822,21 +5798,18 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/36c518c336c59dcf0629b0e9f5358ff646ac7cc110d7def7365fbe250b151b6e67c68b3581b9b39448d4116d79472d3683058b229ad2d1f11dcb4467a58cb2d3
+ checksum: 10c0/0cae52e27fd65fc68dea5078312985c8b9f4c98447ddde9d0b913c2d31d79c1054975f2f6c52485d64c5804aa638a2e5b0877f7ea58e2cc46bfc60aaa442df2f
languageName: node
linkType: hard
-"@radix-ui/react-radio-group@npm:1.3.8":
- version: 1.3.8
- resolution: "@radix-ui/react-radio-group@npm:1.3.8"
+"@radix-ui/react-switch@npm:1.2.6, @radix-ui/react-switch@npm:^1.2.6":
+ version: 1.2.6
+ resolution: "@radix-ui/react-switch@npm:1.2.6"
dependencies:
"@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-direction": "npm:1.1.1"
- "@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-roving-focus": "npm:1.1.11"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
"@radix-ui/react-use-previous": "npm:1.1.1"
"@radix-ui/react-use-size": "npm:1.1.1"
@@ -4850,22 +5823,21 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/23af8e8b833da1fc4aa4e67c3607dedee4fc5b39278d2e2b820bec7f7b3c0891b006a8a35c57ba436ddf18735bbd8dad9a598d14632a328753a875fde447975c
+ checksum: 10c0/888303cbeb0e69ebba5676b225f9ea0f00f61453c6b8a6b66384b5c5c4c7fb0ccc53493c1eb14ec6d436e5b867b302aadd6af51a1f2e6c04581c583fd9be65be
languageName: node
linkType: hard
-"@radix-ui/react-roving-focus@npm:1.1.11":
- version: 1.1.11
- resolution: "@radix-ui/react-roving-focus@npm:1.1.11"
+"@radix-ui/react-tabs@npm:1.1.13":
+ version: 1.1.13
+ resolution: "@radix-ui/react-tabs@npm:1.1.13"
dependencies:
"@radix-ui/primitive": "npm:1.1.3"
- "@radix-ui/react-collection": "npm:1.1.7"
- "@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
"@radix-ui/react-direction": "npm:1.1.1"
"@radix-ui/react-id": "npm:1.1.1"
+ "@radix-ui/react-presence": "npm:1.1.5"
"@radix-ui/react-primitive": "npm:2.1.3"
- "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
"@types/react": "*"
@@ -4877,25 +5849,26 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/2cd43339c36e89a3bf1db8aab34b939113dfbde56bf3a33df2d74757c78c9489b847b1962f1e2441c67e41817d120cb6177943e0f655f47bc1ff8e44fd55b1a2
+ checksum: 10c0/a3c78cd8c30dcb95faf1605a8424a1a71dab121dfa6e9c0019bb30d0f36d882762c925b17596d4977990005a255d8ddc0b7454e4f83337fe557b45570a2d8058
languageName: node
linkType: hard
-"@radix-ui/react-slider@npm:1.3.2":
- version: 1.3.2
- resolution: "@radix-ui/react-slider@npm:1.3.2"
+"@radix-ui/react-toast@npm:1.2.15":
+ version: 1.2.15
+ resolution: "@radix-ui/react-toast@npm:1.2.15"
dependencies:
- "@radix-ui/number": "npm:1.1.1"
- "@radix-ui/primitive": "npm:1.1.2"
- "@radix-ui/react-collection": "npm:1.1.4"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-collection": "npm:1.1.7"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-direction": "npm:1.1.1"
- "@radix-ui/react-primitive": "npm:2.1.0"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-portal": "npm:1.1.9"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
"@radix-ui/react-use-layout-effect": "npm:1.1.1"
- "@radix-ui/react-use-previous": "npm:1.1.1"
- "@radix-ui/react-use-size": "npm:1.1.1"
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4906,51 +5879,67 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/9e177aee6306397ecf6b0775f72e553df935b7049c2178e220d3582eb4d3542ed66aa4b07b5cc4bdc765641307f9d9b63dce97b905686da8b73d3025b2efd7fd
+ checksum: 10c0/e7050d356719f438e087e8033e47a8854fba001cf71eb4e0c0203d53a4fbbd35aca9f17f73abe4dadc406d2d85badf4e37065865d07835763d0e3cb9d95a518d
languageName: node
linkType: hard
-"@radix-ui/react-slot@npm:1.2.0":
- version: 1.2.0
- resolution: "@radix-ui/react-slot@npm:1.2.0"
+"@radix-ui/react-toggle-group@npm:1.1.11":
+ version: 1.1.11
+ resolution: "@radix-ui/react-toggle-group@npm:1.1.11"
dependencies:
- "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-toggle": "npm:1.1.10"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
"@types/react": "*"
+ "@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
- checksum: 10c0/f1455f36479e87a0a2254fc2e2b2aba6740d1fbcada949071210bf2a009a031ad508ac01b544bce96337bcca82f49531b46c71615141a5985aaa11ae69b967b1
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/c8cbccda3e25754ed9f3145c67792df2d5d0ee1a910bde6dc07c4577ab508d4b939f145569d4e2af5b17dc4a5c701473380d8695248f8620cf0a372c05b8e958
languageName: node
linkType: hard
-"@radix-ui/react-slot@npm:1.2.3":
- version: 1.2.3
- resolution: "@radix-ui/react-slot@npm:1.2.3"
+"@radix-ui/react-toggle@npm:1.1.10":
+ version: 1.1.10
+ resolution: "@radix-ui/react-toggle@npm:1.1.10"
dependencies:
- "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
peerDependencies:
"@types/react": "*"
+ "@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
- checksum: 10c0/5913aa0d760f505905779515e4b1f0f71a422350f077cc8d26d1aafe53c97f177fec0e6d7fbbb50d8b5e498aa9df9f707ca75ae3801540c283b26b0136138eef
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/5406cdf5dd7299ae6cfdb4865dc5fd43ca3c475ebcd4e86830bd296d734255b61f749c9bde452ebfaad126033f92dd1112ee9d95982344ffad34491238dcc9b1
languageName: node
linkType: hard
-"@radix-ui/react-switch@npm:1.2.2":
- version: 1.2.2
- resolution: "@radix-ui/react-switch@npm:1.2.2"
+"@radix-ui/react-toolbar@npm:1.1.11":
+ version: 1.1.11
+ resolution: "@radix-ui/react-toolbar@npm:1.1.11"
dependencies:
- "@radix-ui/primitive": "npm:1.1.2"
- "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-primitive": "npm:2.1.0"
- "@radix-ui/react-use-controllable-state": "npm:1.2.2"
- "@radix-ui/react-use-previous": "npm:1.1.1"
- "@radix-ui/react-use-size": "npm:1.1.1"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-separator": "npm:1.1.7"
+ "@radix-ui/react-toggle-group": "npm:1.1.11"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4961,26 +5950,26 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/0cae52e27fd65fc68dea5078312985c8b9f4c98447ddde9d0b913c2d31d79c1054975f2f6c52485d64c5804aa638a2e5b0877f7ea58e2cc46bfc60aaa442df2f
+ checksum: 10c0/3e2ef134608afd08b7a4fd8b222f7638f6d1760f0c3551a9532c91c82b02192b37684c48d5f2bc6c29e3c4be3d3c63ba9a5660d6e99fefa08044c5ded22ee311
languageName: node
linkType: hard
-"@radix-ui/react-tooltip@npm:1.2.4":
- version: 1.2.4
- resolution: "@radix-ui/react-tooltip@npm:1.2.4"
+"@radix-ui/react-tooltip@npm:1.2.8, @radix-ui/react-tooltip@npm:^1.2.8":
+ version: 1.2.8
+ resolution: "@radix-ui/react-tooltip@npm:1.2.8"
dependencies:
- "@radix-ui/primitive": "npm:1.1.2"
+ "@radix-ui/primitive": "npm:1.1.3"
"@radix-ui/react-compose-refs": "npm:1.1.2"
"@radix-ui/react-context": "npm:1.1.2"
- "@radix-ui/react-dismissable-layer": "npm:1.1.7"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
"@radix-ui/react-id": "npm:1.1.1"
- "@radix-ui/react-popper": "npm:1.2.4"
- "@radix-ui/react-portal": "npm:1.1.6"
- "@radix-ui/react-presence": "npm:1.1.4"
- "@radix-ui/react-primitive": "npm:2.1.0"
- "@radix-ui/react-slot": "npm:1.2.0"
+ "@radix-ui/react-popper": "npm:1.2.8"
+ "@radix-ui/react-portal": "npm:1.1.9"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-slot": "npm:1.2.3"
"@radix-ui/react-use-controllable-state": "npm:1.2.2"
- "@radix-ui/react-visually-hidden": "npm:1.2.0"
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -4991,7 +5980,7 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/da07e538f26a309edac954bf6bd04835209e96ec79c6812cebd656f94513b4b6667501a610aeb85f3858310be2d6c4acb3a279857bafd2578be36f30962ebee6
+ checksum: 10c0/de0cbae9c571a00671f160928d819e59502f59be8749f536ab4b180181d9d70aee3925a5b2555f8f32d0bea622bc35f65b70ca7ff0449e4844f891302310cc48
languageName: node
linkType: hard
@@ -5008,7 +5997,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-use-controllable-state@npm:1.2.2":
+"@radix-ui/react-use-controllable-state@npm:1.2.2, @radix-ui/react-use-controllable-state@npm:^1.2.2":
version: 1.2.2
resolution: "@radix-ui/react-use-controllable-state@npm:1.2.2"
dependencies:
@@ -5125,11 +6114,11 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-visually-hidden@npm:1.2.0":
- version: 1.2.0
- resolution: "@radix-ui/react-visually-hidden@npm:1.2.0"
+"@radix-ui/react-visually-hidden@npm:1.2.3":
+ version: 1.2.3
+ resolution: "@radix-ui/react-visually-hidden@npm:1.2.3"
dependencies:
- "@radix-ui/react-primitive": "npm:2.1.0"
+ "@radix-ui/react-primitive": "npm:2.1.3"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
@@ -5140,7 +6129,7 @@ __metadata:
optional: true
"@types/react-dom":
optional: true
- checksum: 10c0/58d9dc7b39078b3da609e51d0cb0f5fa80b547ba94f8794d20616e34d5c1724b8908d6cc253797f78983eed7e29d04a092e4810161658c0d890389743cdd34c1
+ checksum: 10c0/cf86a37f1cbee50a964056f3dc4f6bb1ee79c76daa321f913aa20ff3e1ccdfafbf2b114d7bb616aeefc7c4b895e6ca898523fdb67710d89bd5d8edb739a0d9b6
languageName: node
linkType: hard
@@ -5632,6 +6621,74 @@ __metadata:
languageName: node
linkType: hard
+"@shikijs/core@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/core@npm:3.22.0"
+ dependencies:
+ "@shikijs/types": "npm:3.22.0"
+ "@shikijs/vscode-textmate": "npm:^10.0.2"
+ "@types/hast": "npm:^3.0.4"
+ hast-util-to-html: "npm:^9.0.5"
+ checksum: 10c0/4df376f5fa0afaeaa458ba08db1d8a6ad15cb11c7351edc4cabf7e87453a1b1859ded083fdfe8020ac697a47f9a180fd655783be33d2602c9dbaa4cc950b8e13
+ languageName: node
+ linkType: hard
+
+"@shikijs/engine-javascript@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/engine-javascript@npm:3.22.0"
+ dependencies:
+ "@shikijs/types": "npm:3.22.0"
+ "@shikijs/vscode-textmate": "npm:^10.0.2"
+ oniguruma-to-es: "npm:^4.3.4"
+ checksum: 10c0/344dee8fd866743ecb762d3f954414d3dec17e31a6c2c5b778abdff320b8c68ff87ef661a46969c1fb34d84c2f55a696159cde2f64576407419664b9fa8dd97b
+ languageName: node
+ linkType: hard
+
+"@shikijs/engine-oniguruma@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/engine-oniguruma@npm:3.22.0"
+ dependencies:
+ "@shikijs/types": "npm:3.22.0"
+ "@shikijs/vscode-textmate": "npm:^10.0.2"
+ checksum: 10c0/21007cc1f2c714f37a53e163e1d604e6696d310f9e252970a828fe5450e4daa9f1f369b7ceffd1cb9cde348d9ca17e8a4d14180749ac052c74d104cab86834ea
+ languageName: node
+ linkType: hard
+
+"@shikijs/langs@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/langs@npm:3.22.0"
+ dependencies:
+ "@shikijs/types": "npm:3.22.0"
+ checksum: 10c0/68bb7b10a4b8d78540d0518b80b4c57e42ac232e84a5f74a91d6335de80af730008cf269b4c3da46a2fd3c4a59cd427ab1e6f5934c884335f9f648f8c0c0a912
+ languageName: node
+ linkType: hard
+
+"@shikijs/themes@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/themes@npm:3.22.0"
+ dependencies:
+ "@shikijs/types": "npm:3.22.0"
+ checksum: 10c0/f662648e346e0133d84dee058f24db6434eb7e511ffe8e34e9632f1168d46b219fbddcca245166f98200b13549fc3256baf8d2a0df7c23e856c9933c0bd444f9
+ languageName: node
+ linkType: hard
+
+"@shikijs/types@npm:3.22.0":
+ version: 3.22.0
+ resolution: "@shikijs/types@npm:3.22.0"
+ dependencies:
+ "@shikijs/vscode-textmate": "npm:^10.0.2"
+ "@types/hast": "npm:^3.0.4"
+ checksum: 10c0/68e5bb1827609fc026cba5a88442f41dd948f68fc4f23de0912ef2498944116471b543a5f40ab4ff2c2056399873c755fe717185fd4f8c928002fba934bd3a7b
+ languageName: node
+ linkType: hard
+
+"@shikijs/vscode-textmate@npm:^10.0.2":
+ version: 10.0.2
+ resolution: "@shikijs/vscode-textmate@npm:10.0.2"
+ checksum: 10c0/36b682d691088ec244de292dc8f91b808f95c89466af421cf84cbab92230f03c8348649c14b3251991b10ce632b0c715e416e992dd5f28ff3221dc2693fd9462
+ languageName: node
+ linkType: hard
+
"@sigstore/bundle@npm:^2.3.2":
version: 2.3.2
resolution: "@sigstore/bundle@npm:2.3.2"
@@ -6866,6 +7923,61 @@ __metadata:
languageName: node
linkType: hard
+"@standard-schema/spec@npm:^1.0.0":
+ version: 1.1.0
+ resolution: "@standard-schema/spec@npm:1.1.0"
+ checksum: 10c0/d90f55acde4b2deb983529c87e8025fa693de1a5e8b49ecc6eb84d1fd96328add0e03d7d551442156c7432fd78165b2c26ff561b970a9a881f046abb78d6a526
+ languageName: node
+ linkType: hard
+
+"@streamdown/cjk@npm:^1.0.1":
+ version: 1.0.2
+ resolution: "@streamdown/cjk@npm:1.0.2"
+ dependencies:
+ remark-cjk-friendly: "npm:^1.2.3"
+ remark-cjk-friendly-gfm-strikethrough: "npm:^1.2.3"
+ unist-util-visit: "npm:^5.0.0"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/10bf1ea52cd14808967a530d316fd6ca1d6568d7a5c7fc4c6020751d639732d891d3fdf2d568f8d31e28af0b3273619054067acdbd1277e5d854d2836f2ee0c7
+ languageName: node
+ linkType: hard
+
+"@streamdown/code@npm:^1.0.1":
+ version: 1.0.3
+ resolution: "@streamdown/code@npm:1.0.3"
+ dependencies:
+ shiki: "npm:^3.19.0"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/c5aab5b232fb8d6051ce9b1e4816f3736bc909c4f41365eb2c554897a13529120394554f1fc1d8ebdeea7d80b3ff4ecbb652466f8c43cfc2f6158c85b583d31e
+ languageName: node
+ linkType: hard
+
+"@streamdown/math@npm:^1.0.1":
+ version: 1.0.2
+ resolution: "@streamdown/math@npm:1.0.2"
+ dependencies:
+ katex: "npm:^0.16.27"
+ rehype-katex: "npm:^7.0.1"
+ remark-math: "npm:^6.0.0"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/8af4caad17d84285d01b27ff1ced88976ddb0b223f0f6e8f69e5aa04ca997639365fe6158e4ca73d146e262f308f04c48e88946d6cd69175b627554830ab4a97
+ languageName: node
+ linkType: hard
+
+"@streamdown/mermaid@npm:^1.0.1":
+ version: 1.0.2
+ resolution: "@streamdown/mermaid@npm:1.0.2"
+ dependencies:
+ mermaid: "npm:^11.12.2"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/3ba4f56bccf9ecfa0f74fe82c3f4c68967c5b065b10c031187fda6db5ca8df61da077ba54161de2b99eb37c6e2a1e7f360c7b8028405f842ffd0490099229e87
+ languageName: node
+ linkType: hard
+
"@surma/rollup-plugin-off-main-thread@npm:^2.2.3":
version: 2.2.3
resolution: "@surma/rollup-plugin-off-main-thread@npm:2.2.3"
@@ -6889,17 +8001,6 @@ __metadata:
languageName: node
linkType: hard
-"@tabler/icons-react@npm:^3.34.0":
- version: 3.35.0
- resolution: "@tabler/icons-react@npm:3.35.0"
- dependencies:
- "@tabler/icons": "npm:3.35.0"
- peerDependencies:
- react: ">= 16"
- checksum: 10c0/8d280fcdae00916b001142ba0800ea05d8fa2acdcbd82f88a299b4141fb941237be2e826b86b1af710e038b4f8bb6f76f452c3309c29fd62398b4d5789c2b3e0
- languageName: node
- linkType: hard
-
"@tabler/icons@npm:3.34.0":
version: 3.34.0
resolution: "@tabler/icons@npm:3.34.0"
@@ -6907,13 +8008,6 @@ __metadata:
languageName: node
linkType: hard
-"@tabler/icons@npm:3.35.0":
- version: 3.35.0
- resolution: "@tabler/icons@npm:3.35.0"
- checksum: 10c0/93098828128ffed2cf412b39bd78992f93f25b22349a4e04523d2a018b7fe376ddeff105babcc3efedd707aa00b705425c7d9f598d6987552a563c62125795a2
- languageName: node
- linkType: hard
-
"@tailwindcss/node@npm:4.1.4":
version: 4.1.4
resolution: "@tailwindcss/node@npm:4.1.4"
@@ -7075,13 +8169,6 @@ __metadata:
languageName: node
linkType: hard
-"@tanstack/history@npm:1.115.0":
- version: 1.115.0
- resolution: "@tanstack/history@npm:1.115.0"
- checksum: 10c0/d9daa348a81a03478c95727cb68002a9b70a5871089d4d3a111cea9b2647f6c159b8f04b13dcd302fafa7077ec28cc1ec878e1daf23d38e72534d649d5db7fd5
- languageName: node
- linkType: hard
-
"@tanstack/history@npm:1.139.0":
version: 1.139.0
resolution: "@tanstack/history@npm:1.139.0"
@@ -7089,6 +8176,13 @@ __metadata:
languageName: node
linkType: hard
+"@tanstack/history@npm:1.161.4":
+ version: 1.161.4
+ resolution: "@tanstack/history@npm:1.161.4"
+ checksum: 10c0/adfcaab72831dbecb35dbbcfaa75f032efb6e8b4ef7397f21bdccb08fa35234a44372b5f85e2f3c376e9370412e823f70ef94178f714cdabfb79d1f770eaa971
+ languageName: node
+ linkType: hard
+
"@tanstack/react-router-devtools@npm:1.121.34":
version: 1.121.34
resolution: "@tanstack/react-router-devtools@npm:1.121.34"
@@ -7159,14 +8253,18 @@ __metadata:
languageName: node
linkType: hard
-"@tanstack/router-core@npm:^1.117.0":
- version: 1.117.0
- resolution: "@tanstack/router-core@npm:1.117.0"
+"@tanstack/router-core@npm:1.162.2, @tanstack/router-core@npm:^1.121.34":
+ version: 1.162.2
+ resolution: "@tanstack/router-core@npm:1.162.2"
dependencies:
- "@tanstack/history": "npm:1.115.0"
- "@tanstack/store": "npm:^0.7.0"
+ "@tanstack/history": "npm:1.161.4"
+ "@tanstack/store": "npm:^0.9.1"
+ cookie-es: "npm:^2.0.0"
+ seroval: "npm:^1.4.2"
+ seroval-plugins: "npm:^1.4.2"
tiny-invariant: "npm:^1.3.3"
- checksum: 10c0/ff2229bc4f36611ffaecaafe8563bd3b0fb0d4af32ef4893a512ae87280ea083d7769df3b7b11441f73c46f94f4619d67afb47e1b4b859b87e8d5b640ae5aa15
+ tiny-warning: "npm:^1.0.3"
+ checksum: 10c0/18e45379c5970b8184cea62150dd18b1eff7f032de627e67d773797ff21224fb96a7e76cb678ba0ad29f075ba39e05491560f725948cca9a0cba0271814a6700
languageName: node
linkType: hard
@@ -7189,26 +8287,25 @@ __metadata:
languageName: node
linkType: hard
-"@tanstack/router-generator@npm:^1.117.0":
- version: 1.117.0
- resolution: "@tanstack/router-generator@npm:1.117.0"
+"@tanstack/router-generator@npm:^1.121.34":
+ version: 1.162.2
+ resolution: "@tanstack/router-generator@npm:1.162.2"
dependencies:
- "@tanstack/virtual-file-routes": "npm:^1.115.0"
+ "@tanstack/router-core": "npm:1.162.2"
+ "@tanstack/router-utils": "npm:1.161.4"
+ "@tanstack/virtual-file-routes": "npm:1.161.4"
prettier: "npm:^3.5.0"
+ recast: "npm:^0.23.11"
+ source-map: "npm:^0.7.4"
tsx: "npm:^4.19.2"
zod: "npm:^3.24.2"
- peerDependencies:
- "@tanstack/react-router": ^1.117.0
- peerDependenciesMeta:
- "@tanstack/react-router":
- optional: true
- checksum: 10c0/b251946d302566dcfa715721e5d7bf3ab06ef2860cc95c6ada513a35e5d0a9bd42425bb887cd32be39afcd898b5f644cf9363777824f82dc74cbf0c191e52bea
+ checksum: 10c0/7db1d892bb9fab92289e5b85f047081fa1a9497b3112191db005e412159a04ce786e05846ecc68eff81e019dbb3e9948b0517413c7f19b67ec9511e200b5d443
languageName: node
linkType: hard
-"@tanstack/router-plugin@npm:1.117.0":
- version: 1.117.0
- resolution: "@tanstack/router-plugin@npm:1.117.0"
+"@tanstack/router-plugin@npm:1.121.34":
+ version: 1.121.34
+ resolution: "@tanstack/router-plugin@npm:1.121.34"
dependencies:
"@babel/core": "npm:^7.26.8"
"@babel/plugin-syntax-jsx": "npm:^7.25.9"
@@ -7216,20 +8313,17 @@ __metadata:
"@babel/template": "npm:^7.26.8"
"@babel/traverse": "npm:^7.26.8"
"@babel/types": "npm:^7.26.8"
- "@tanstack/router-core": "npm:^1.117.0"
- "@tanstack/router-generator": "npm:^1.117.0"
- "@tanstack/router-utils": "npm:^1.115.0"
- "@tanstack/virtual-file-routes": "npm:^1.115.0"
- "@types/babel__core": "npm:^7.20.5"
- "@types/babel__template": "npm:^7.4.4"
- "@types/babel__traverse": "npm:^7.20.6"
+ "@tanstack/router-core": "npm:^1.121.34"
+ "@tanstack/router-generator": "npm:^1.121.34"
+ "@tanstack/router-utils": "npm:^1.121.21"
+ "@tanstack/virtual-file-routes": "npm:^1.121.21"
babel-dead-code-elimination: "npm:^1.0.10"
chokidar: "npm:^3.6.0"
unplugin: "npm:^2.1.2"
zod: "npm:^3.24.2"
peerDependencies:
"@rsbuild/core": ">=1.0.2"
- "@tanstack/react-router": ^1.117.0
+ "@tanstack/react-router": ^1.121.34
vite: ">=5.0.0 || >=6.0.0"
vite-plugin-solid: ^2.11.2
webpack: ">=5.92.0"
@@ -7244,19 +8338,24 @@ __metadata:
optional: true
webpack:
optional: true
- checksum: 10c0/d69b3bc66edf5f2f24dca6c00f9888c0386a58b4f549815e7886064dd76d9043797f0b5a3f93fdfbbc36ff1b9fe9d48389bbd911dd56bf0f614226932313b4c8
+ checksum: 10c0/d937055e0672513e18017cc2a22e995804b04e6f28df22eb8acf70a076d09c7a3cf9f9ba82be4ceb0d232a270edc185ca861a8c2496bbbaa0375ec6ddfeffb09
languageName: node
linkType: hard
-"@tanstack/router-utils@npm:^1.115.0":
- version: 1.115.0
- resolution: "@tanstack/router-utils@npm:1.115.0"
+"@tanstack/router-utils@npm:1.161.4, @tanstack/router-utils@npm:^1.121.21":
+ version: 1.161.4
+ resolution: "@tanstack/router-utils@npm:1.161.4"
dependencies:
- "@babel/generator": "npm:^7.26.8"
- "@babel/parser": "npm:^7.26.8"
- ansis: "npm:^3.11.0"
- diff: "npm:^7.0.0"
- checksum: 10c0/e4ed11346e1e61ddd2f0b16222783fa360f270078d3039efe11dc726abf56f137db68a8fc83fd47e62cbd823221a4c07cd233bc12739d35a9a82a2118ab5adfe
+ "@babel/core": "npm:^7.28.5"
+ "@babel/generator": "npm:^7.28.5"
+ "@babel/parser": "npm:^7.28.5"
+ "@babel/types": "npm:^7.28.5"
+ ansis: "npm:^4.1.0"
+ babel-dead-code-elimination: "npm:^1.0.12"
+ diff: "npm:^8.0.2"
+ pathe: "npm:^2.0.3"
+ tinyglobby: "npm:^0.2.15"
+ checksum: 10c0/b29854de53e105d833ee49f8e29c530b8f5791e8f854e61b328df107b93b48e6226bf3b6f23314007ab2032ae9de93fb933bc41d61b0a590df69f861b23b7b86
languageName: node
linkType: hard
@@ -7267,10 +8366,10 @@ __metadata:
languageName: node
linkType: hard
-"@tanstack/store@npm:^0.7.0":
- version: 0.7.5
- resolution: "@tanstack/store@npm:0.7.5"
- checksum: 10c0/69a83ce95db823d98e9949e6632781e819b7b01f9846f3c80a0ab4a318d974eee625ae7cab90ffeb02447c8e7108db2e7f78a82276a1b7dc3e40fac30ebf4917
+"@tanstack/store@npm:^0.9.1":
+ version: 0.9.1
+ resolution: "@tanstack/store@npm:0.9.1"
+ checksum: 10c0/2093bd201ec97e500fe3cdca6a76eec2c92d42790d46ff929819284be9814e768f61ac55d21215f16aefc173f7a910e9ed1abbebced519bbf08e7cc87b6b5d30
languageName: node
linkType: hard
@@ -7281,10 +8380,10 @@ __metadata:
languageName: node
linkType: hard
-"@tanstack/virtual-file-routes@npm:^1.115.0":
- version: 1.115.0
- resolution: "@tanstack/virtual-file-routes@npm:1.115.0"
- checksum: 10c0/4df85dbffb1d15cda655644202e15f55769181e7b64949ec19740e49e9dc2f5af5353f5891619749973f3307df34d7f223a0477cbe206d3889e41b934496c6a9
+"@tanstack/virtual-file-routes@npm:1.161.4, @tanstack/virtual-file-routes@npm:^1.121.21":
+ version: 1.161.4
+ resolution: "@tanstack/virtual-file-routes@npm:1.161.4"
+ checksum: 10c0/7f07d1105e4a677e32f165c95b6fd1ae491bdbd3e854b839dedb6f7814794eb9b78704ff07c95f3cf8ffe04903d3d14af2048ae457a07d2c7dca4990d1d7f9b3
languageName: node
linkType: hard
@@ -7466,6 +8565,15 @@ __metadata:
languageName: node
linkType: hard
+"@tauri-apps/plugin-store@npm:^2.4.2":
+ version: 2.4.2
+ resolution: "@tauri-apps/plugin-store@npm:2.4.2"
+ dependencies:
+ "@tauri-apps/api": "npm:^2.8.0"
+ checksum: 10c0/6892417dbd3e97c4a70e00ca437a196a65499831e7b3a5dc5b71646596a16c4030f23dedfa124ed853c73999a5b8e48de129fb0369e7af7c987142e060b58127
+ languageName: node
+ linkType: hard
+
"@tauri-apps/plugin-updater@npm:2.8.1":
version: 2.8.1
resolution: "@tauri-apps/plugin-updater@npm:2.8.1"
@@ -7599,7 +8707,7 @@ __metadata:
languageName: node
linkType: hard
-"@types/babel__template@npm:*, @types/babel__template@npm:^7.4.4":
+"@types/babel__template@npm:*":
version: 7.4.4
resolution: "@types/babel__template@npm:7.4.4"
dependencies:
@@ -7618,15 +8726,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/babel__traverse@npm:^7.20.6":
- version: 7.20.7
- resolution: "@types/babel__traverse@npm:7.20.7"
- dependencies:
- "@babel/types": "npm:^7.20.7"
- checksum: 10c0/5386f0af44f8746b063b87418f06129a814e16bb2686965a575e9d7376b360b088b89177778d8c426012abc43dd1a2d8ec3218bfc382280c898682746ce2ffbd
- languageName: node
- linkType: hard
-
"@types/chai@npm:^5.2.2":
version: 5.2.2
resolution: "@types/chai@npm:5.2.2"
@@ -7643,6 +8742,278 @@ __metadata:
languageName: node
linkType: hard
+"@types/d3-array@npm:*":
+ version: 3.2.2
+ resolution: "@types/d3-array@npm:3.2.2"
+ checksum: 10c0/6137cb97302f8a4f18ca22c0560c585cfcb823f276b23d89f2c0c005d72697ec13bca671c08e68b4b0cabd622e3f0e91782ee221580d6774074050be96dd7028
+ languageName: node
+ linkType: hard
+
+"@types/d3-axis@npm:*":
+ version: 3.0.6
+ resolution: "@types/d3-axis@npm:3.0.6"
+ dependencies:
+ "@types/d3-selection": "npm:*"
+ checksum: 10c0/d756d42360261f44d8eefd0950c5bb0a4f67a46dd92069da3f723ac36a1e8cb2b9ce6347d836ef19d5b8aef725dbcf8fdbbd6cfbff676ca4b0642df2f78b599a
+ languageName: node
+ linkType: hard
+
+"@types/d3-brush@npm:*":
+ version: 3.0.6
+ resolution: "@types/d3-brush@npm:3.0.6"
+ dependencies:
+ "@types/d3-selection": "npm:*"
+ checksum: 10c0/fd6e2ac7657a354f269f6b9c58451ffae9d01b89ccb1eb6367fd36d635d2f1990967215ab498e0c0679ff269429c57fad6a2958b68f4d45bc9f81d81672edc01
+ languageName: node
+ linkType: hard
+
+"@types/d3-chord@npm:*":
+ version: 3.0.6
+ resolution: "@types/d3-chord@npm:3.0.6"
+ checksum: 10c0/c5a25eb5389db01e63faec0c5c2ec7cc41c494e9b3201630b494c4e862a60f1aa83fabbc33a829e7e1403941e3c30d206c741559b14406ac2a4239cfdf4b4c17
+ languageName: node
+ linkType: hard
+
+"@types/d3-color@npm:*":
+ version: 3.1.3
+ resolution: "@types/d3-color@npm:3.1.3"
+ checksum: 10c0/65eb0487de606eb5ad81735a9a5b3142d30bc5ea801ed9b14b77cb14c9b909f718c059f13af341264ee189acf171508053342142bdf99338667cea26a2d8d6ae
+ languageName: node
+ linkType: hard
+
+"@types/d3-contour@npm:*":
+ version: 3.0.6
+ resolution: "@types/d3-contour@npm:3.0.6"
+ dependencies:
+ "@types/d3-array": "npm:*"
+ "@types/geojson": "npm:*"
+ checksum: 10c0/e7d83e94719af4576ceb5ac7f277c5806f83ba6c3631744ae391cffc3641f09dfa279470b83053cd0b2acd6784e8749c71141d05bdffa63ca58ffb5b31a0f27c
+ languageName: node
+ linkType: hard
+
+"@types/d3-delaunay@npm:*":
+ version: 6.0.4
+ resolution: "@types/d3-delaunay@npm:6.0.4"
+ checksum: 10c0/d154a8864f08c4ea23ecb9bdabcef1c406a25baa8895f0cb08a0ed2799de0d360e597552532ce7086ff0cdffa8f3563f9109d18f0191459d32bb620a36939123
+ languageName: node
+ linkType: hard
+
+"@types/d3-dispatch@npm:*":
+ version: 3.0.7
+ resolution: "@types/d3-dispatch@npm:3.0.7"
+ checksum: 10c0/38c6605ebf0bf0099dfb70eafe0dd4ae8213368b40b8f930b72a909ff2e7259d2bd8a54d100bb5a44eb4b36f4f2a62dcb37f8be59613ca6b507c7a2f910b3145
+ languageName: node
+ linkType: hard
+
+"@types/d3-drag@npm:*":
+ version: 3.0.7
+ resolution: "@types/d3-drag@npm:3.0.7"
+ dependencies:
+ "@types/d3-selection": "npm:*"
+ checksum: 10c0/65e29fa32a87c72d26c44b5e2df3bf15af21cd128386bcc05bcacca255927c0397d0cd7e6062aed5f0abd623490544a9d061c195f5ed9f018fe0b698d99c079d
+ languageName: node
+ linkType: hard
+
+"@types/d3-dsv@npm:*":
+ version: 3.0.7
+ resolution: "@types/d3-dsv@npm:3.0.7"
+ checksum: 10c0/c0f01da862465594c8a28278b51c850af3b4239cc22b14fd1a19d7a98f93d94efa477bf59d8071beb285dca45bf614630811451e18e7c52add3a0abfee0a1871
+ languageName: node
+ linkType: hard
+
+"@types/d3-ease@npm:*":
+ version: 3.0.2
+ resolution: "@types/d3-ease@npm:3.0.2"
+ checksum: 10c0/aff5a1e572a937ee9bff6465225d7ba27d5e0c976bd9eacdac2e6f10700a7cb0c9ea2597aff6b43a6ed850a3210030870238894a77ec73e309b4a9d0333f099c
+ languageName: node
+ linkType: hard
+
+"@types/d3-fetch@npm:*":
+ version: 3.0.7
+ resolution: "@types/d3-fetch@npm:3.0.7"
+ dependencies:
+ "@types/d3-dsv": "npm:*"
+ checksum: 10c0/3d147efa52a26da1a5d40d4d73e6cebaaa964463c378068062999b93ea3731b27cc429104c21ecbba98c6090e58ef13429db6399238c5e3500162fb3015697a0
+ languageName: node
+ linkType: hard
+
+"@types/d3-force@npm:*":
+ version: 3.0.10
+ resolution: "@types/d3-force@npm:3.0.10"
+ checksum: 10c0/c82b459079a106b50e346c9b79b141f599f2fc4f598985a5211e72c7a2e20d35bd5dc6e91f306b323c8bfa325c02c629b1645f5243f1c6a55bd51bc85cccfa92
+ languageName: node
+ linkType: hard
+
+"@types/d3-format@npm:*":
+ version: 3.0.4
+ resolution: "@types/d3-format@npm:3.0.4"
+ checksum: 10c0/3ac1600bf9061a59a228998f7cd3f29e85cbf522997671ba18d4d84d10a2a1aff4f95aceb143fa9960501c3ec351e113fc75884e6a504ace44dc1744083035ee
+ languageName: node
+ linkType: hard
+
+"@types/d3-geo@npm:*":
+ version: 3.1.0
+ resolution: "@types/d3-geo@npm:3.1.0"
+ dependencies:
+ "@types/geojson": "npm:*"
+ checksum: 10c0/3745a93439038bb5b0b38facf435f7079812921d46406f5d38deaee59e90084ff742443c7ea0a8446df81a0d81eaf622fe7068cf4117a544bd4aa3b2dc182f88
+ languageName: node
+ linkType: hard
+
+"@types/d3-hierarchy@npm:*":
+ version: 3.1.7
+ resolution: "@types/d3-hierarchy@npm:3.1.7"
+ checksum: 10c0/873711737d6b8e7b6f1dda0bcd21294a48f75024909ae510c5d2c21fad2e72032e0958def4d9f68319d3aaac298ad09c49807f8bfc87a145a82693b5208613c7
+ languageName: node
+ linkType: hard
+
+"@types/d3-interpolate@npm:*":
+ version: 3.0.4
+ resolution: "@types/d3-interpolate@npm:3.0.4"
+ dependencies:
+ "@types/d3-color": "npm:*"
+ checksum: 10c0/066ebb8da570b518dd332df6b12ae3b1eaa0a7f4f0c702e3c57f812cf529cc3500ec2aac8dc094f31897790346c6b1ebd8cd7a077176727f4860c2b181a65ca4
+ languageName: node
+ linkType: hard
+
+"@types/d3-path@npm:*":
+ version: 3.1.1
+ resolution: "@types/d3-path@npm:3.1.1"
+ checksum: 10c0/2c36eb31ebaf2ce4712e793fd88087117976f7c4ed69cc2431825f999c8c77cca5cea286f3326432b770739ac6ccd5d04d851eb65e7a4dbcc10c982b49ad2c02
+ languageName: node
+ linkType: hard
+
+"@types/d3-polygon@npm:*":
+ version: 3.0.2
+ resolution: "@types/d3-polygon@npm:3.0.2"
+ checksum: 10c0/f46307bb32b6c2aef8c7624500e0f9b518de8f227ccc10170b869dc43e4c542560f6c8d62e9f087fac45e198d6e4b623e579c0422e34c85baf56717456d3f439
+ languageName: node
+ linkType: hard
+
+"@types/d3-quadtree@npm:*":
+ version: 3.0.6
+ resolution: "@types/d3-quadtree@npm:3.0.6"
+ checksum: 10c0/7eaa0a4d404adc856971c9285e1c4ab17e9135ea669d847d6db7e0066126a28ac751864e7ce99c65d526e130f56754a2e437a1617877098b3bdcc3ef23a23616
+ languageName: node
+ linkType: hard
+
+"@types/d3-random@npm:*":
+ version: 3.0.3
+ resolution: "@types/d3-random@npm:3.0.3"
+ checksum: 10c0/5f4fea40080cd6d4adfee05183d00374e73a10c530276a6455348983dda341003a251def28565a27c25d9cf5296a33e870e397c9d91ff83fb7495a21c96b6882
+ languageName: node
+ linkType: hard
+
+"@types/d3-scale-chromatic@npm:*":
+ version: 3.1.0
+ resolution: "@types/d3-scale-chromatic@npm:3.1.0"
+ checksum: 10c0/93c564e02d2e97a048e18fe8054e4a935335da6ab75a56c3df197beaa87e69122eef0dfbeb7794d4a444a00e52e3123514ee27cec084bd21f6425b7037828cc2
+ languageName: node
+ linkType: hard
+
+"@types/d3-scale@npm:*":
+ version: 4.0.9
+ resolution: "@types/d3-scale@npm:4.0.9"
+ dependencies:
+ "@types/d3-time": "npm:*"
+ checksum: 10c0/4ac44233c05cd50b65b33ecb35d99fdf07566bcdbc55bc1306b2f27d1c5134d8c560d356f2c8e76b096e9125ffb8d26d95f78d56e210d1c542cb255bdf31d6c8
+ languageName: node
+ linkType: hard
+
+"@types/d3-selection@npm:*":
+ version: 3.0.11
+ resolution: "@types/d3-selection@npm:3.0.11"
+ checksum: 10c0/0c512956c7503ff5def4bb32e0c568cc757b9a2cc400a104fc0f4cfe5e56d83ebde2a97821b6f2cb26a7148079d3b86a2f28e11d68324ed311cf35c2ed980d1d
+ languageName: node
+ linkType: hard
+
+"@types/d3-shape@npm:*":
+ version: 3.1.8
+ resolution: "@types/d3-shape@npm:3.1.8"
+ dependencies:
+ "@types/d3-path": "npm:*"
+ checksum: 10c0/49ec2172b9eb66fc1d036e2a23966216bb972e9af51ddbed134df24bd71aedf207bb1ef81903a119eb4e1f5e927cf44beacaf64c9af86474e5548594b102b574
+ languageName: node
+ linkType: hard
+
+"@types/d3-time-format@npm:*":
+ version: 4.0.3
+ resolution: "@types/d3-time-format@npm:4.0.3"
+ checksum: 10c0/9ef5e8e2b96b94799b821eed5d61a3d432c7903247966d8ad951b8ce5797fe46554b425cb7888fa5bf604b4663c369d7628c0328ffe80892156671c58d1a7f90
+ languageName: node
+ linkType: hard
+
+"@types/d3-time@npm:*":
+ version: 3.0.4
+ resolution: "@types/d3-time@npm:3.0.4"
+ checksum: 10c0/6d9e2255d63f7a313a543113920c612e957d70da4fb0890931da6c2459010291b8b1f95e149a538500c1c99e7e6c89ffcce5554dd29a31ff134a38ea94b6d174
+ languageName: node
+ linkType: hard
+
+"@types/d3-timer@npm:*":
+ version: 3.0.2
+ resolution: "@types/d3-timer@npm:3.0.2"
+ checksum: 10c0/c644dd9571fcc62b1aa12c03bcad40571553020feeb5811f1d8a937ac1e65b8a04b759b4873aef610e28b8714ac71c9885a4d6c127a048d95118f7e5b506d9e1
+ languageName: node
+ linkType: hard
+
+"@types/d3-transition@npm:*":
+ version: 3.0.9
+ resolution: "@types/d3-transition@npm:3.0.9"
+ dependencies:
+ "@types/d3-selection": "npm:*"
+ checksum: 10c0/4f68b9df7ac745b3491216c54203cbbfa0f117ae4c60e2609cdef2db963582152035407fdff995b10ee383bae2f05b7743493f48e1b8e46df54faa836a8fb7b5
+ languageName: node
+ linkType: hard
+
+"@types/d3-zoom@npm:*":
+ version: 3.0.8
+ resolution: "@types/d3-zoom@npm:3.0.8"
+ dependencies:
+ "@types/d3-interpolate": "npm:*"
+ "@types/d3-selection": "npm:*"
+ checksum: 10c0/1dbdbcafddcae12efb5beb6948546963f29599e18bc7f2a91fb69cc617c2299a65354f2d47e282dfb86fec0968406cd4fb7f76ba2d2fb67baa8e8d146eb4a547
+ languageName: node
+ linkType: hard
+
+"@types/d3@npm:^7.4.3":
+ version: 7.4.3
+ resolution: "@types/d3@npm:7.4.3"
+ dependencies:
+ "@types/d3-array": "npm:*"
+ "@types/d3-axis": "npm:*"
+ "@types/d3-brush": "npm:*"
+ "@types/d3-chord": "npm:*"
+ "@types/d3-color": "npm:*"
+ "@types/d3-contour": "npm:*"
+ "@types/d3-delaunay": "npm:*"
+ "@types/d3-dispatch": "npm:*"
+ "@types/d3-drag": "npm:*"
+ "@types/d3-dsv": "npm:*"
+ "@types/d3-ease": "npm:*"
+ "@types/d3-fetch": "npm:*"
+ "@types/d3-force": "npm:*"
+ "@types/d3-format": "npm:*"
+ "@types/d3-geo": "npm:*"
+ "@types/d3-hierarchy": "npm:*"
+ "@types/d3-interpolate": "npm:*"
+ "@types/d3-path": "npm:*"
+ "@types/d3-polygon": "npm:*"
+ "@types/d3-quadtree": "npm:*"
+ "@types/d3-random": "npm:*"
+ "@types/d3-scale": "npm:*"
+ "@types/d3-scale-chromatic": "npm:*"
+ "@types/d3-selection": "npm:*"
+ "@types/d3-shape": "npm:*"
+ "@types/d3-time": "npm:*"
+ "@types/d3-time-format": "npm:*"
+ "@types/d3-timer": "npm:*"
+ "@types/d3-transition": "npm:*"
+ "@types/d3-zoom": "npm:*"
+ checksum: 10c0/a9c6d65b13ef3b42c87f2a89ea63a6d5640221869f97d0657b0cb2f1dac96a0f164bf5605643c0794e0de3aa2bf05df198519aaf15d24ca135eb0e8bd8a9d879
+ languageName: node
+ linkType: hard
+
"@types/debug@npm:^4.0.0":
version: 4.1.12
resolution: "@types/debug@npm:4.1.12"
@@ -7696,6 +9067,13 @@ __metadata:
languageName: node
linkType: hard
+"@types/geojson@npm:*":
+ version: 7946.0.16
+ resolution: "@types/geojson@npm:7946.0.16"
+ checksum: 10c0/1ff24a288bd5860b766b073ead337d31d73bdc715e5b50a2cee5cb0af57a1ed02cc04ef295f5fa68dc40fe3e4f104dd31282b2b818a5ba3231bc1001ba084e3c
+ languageName: node
+ linkType: hard
+
"@types/hast@npm:^2.0.0":
version: 2.3.10
resolution: "@types/hast@npm:2.3.10"
@@ -7705,7 +9083,7 @@ __metadata:
languageName: node
linkType: hard
-"@types/hast@npm:^3.0.0":
+"@types/hast@npm:^3.0.0, @types/hast@npm:^3.0.4":
version: 3.0.4
resolution: "@types/hast@npm:3.0.4"
dependencies:
@@ -7890,14 +9268,14 @@ __metadata:
languageName: node
linkType: hard
-"@types/trusted-types@npm:^2.0.2":
+"@types/trusted-types@npm:^2.0.2, @types/trusted-types@npm:^2.0.7":
version: 2.0.7
resolution: "@types/trusted-types@npm:2.0.7"
checksum: 10c0/4c4855f10de7c6c135e0d32ce462419d8abbbc33713b31d294596c0cc34ae1fa6112a2f9da729c8f7a20707782b0d69da3b1f8df6645b0366d08825ca1522e0c
languageName: node
linkType: hard
-"@types/unist@npm:*, @types/unist@npm:^3.0.0":
+"@types/unist@npm:*, @types/unist@npm:^3.0.0, @types/unist@npm:^3.0.3":
version: 3.0.3
resolution: "@types/unist@npm:3.0.3"
checksum: 10c0/2b1e4adcab78388e088fcc3c0ae8700f76619dbcb4741d7d201f87e2cb346bfc29a89003cfea2d76c996e1061452e14fcd737e8b25aacf949c1f2d6b2bc3dd60
@@ -8066,6 +9444,20 @@ __metadata:
languageName: node
linkType: hard
+"@vercel/oidc@npm:3.0.5":
+ version: 3.0.5
+ resolution: "@vercel/oidc@npm:3.0.5"
+ checksum: 10c0/a63f0ab226f9070f974334014bd2676611a2d13473c10b867e3d9db8a2cc83637ae7922db26b184dd97b5945e144fc211c8f899642d205517e5b4e0e34f05b0e
+ languageName: node
+ linkType: hard
+
+"@vercel/oidc@npm:3.1.0":
+ version: 3.1.0
+ resolution: "@vercel/oidc@npm:3.1.0"
+ checksum: 10c0/f57278ed4b4c022c7ca85e8baa5f9bdb2623397abfa0e5dbfd75de283c8e5dc534d64dac1364b5ad8c96d00eb2d469886e6f7b640f6f195def5766950ad8ce71
+ languageName: node
+ linkType: hard
+
"@vitejs/plugin-react@npm:4.4.1":
version: 4.4.1
resolution: "@vitejs/plugin-react@npm:4.4.1"
@@ -8345,16 +9737,6 @@ __metadata:
languageName: node
linkType: hard
-"accepts@npm:^2.0.0":
- version: 2.0.0
- resolution: "accepts@npm:2.0.0"
- dependencies:
- mime-types: "npm:^3.0.0"
- negotiator: "npm:^1.0.0"
- checksum: 10c0/98374742097e140891546076215f90c32644feacf652db48412329de4c2a529178a81aa500fbb13dd3e6cbf6e68d829037b123ac037fc9a08bcec4b87b358eef
- languageName: node
- linkType: hard
-
"acorn-jsx@npm:^5.3.2":
version: 5.3.2
resolution: "acorn-jsx@npm:5.3.2"
@@ -8411,9 +9793,37 @@ __metadata:
version: 3.1.0
resolution: "aggregate-error@npm:3.1.0"
dependencies:
- clean-stack: "npm:^2.0.0"
- indent-string: "npm:^4.0.0"
- checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039
+ clean-stack: "npm:^2.0.0"
+ indent-string: "npm:^4.0.0"
+ checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039
+ languageName: node
+ linkType: hard
+
+"ai@npm:5.0.108":
+ version: 5.0.108
+ resolution: "ai@npm:5.0.108"
+ dependencies:
+ "@ai-sdk/gateway": "npm:2.0.18"
+ "@ai-sdk/provider": "npm:2.0.0"
+ "@ai-sdk/provider-utils": "npm:3.0.18"
+ "@opentelemetry/api": "npm:1.9.0"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/5eab03a516d611f528600b13709470082e1e62838cba436a09ece1dd8a07473db481ab636471a5e3d69608806a46e7db44a2b4b0d48df93d8d24bb3c82de9a96
+ languageName: node
+ linkType: hard
+
+"ai@npm:5.0.137, ai@npm:^5.0.121":
+ version: 5.0.137
+ resolution: "ai@npm:5.0.137"
+ dependencies:
+ "@ai-sdk/gateway": "npm:2.0.43"
+ "@ai-sdk/provider": "npm:2.0.1"
+ "@ai-sdk/provider-utils": "npm:3.0.21"
+ "@opentelemetry/api": "npm:1.9.0"
+ peerDependencies:
+ zod: ^3.25.76 || ^4.1.8
+ checksum: 10c0/5073e222a4d1c35c100db8156585a9ad2567239a6abd42a1bd5a7039c94ad21c1632006f1549edad7259fbceb984378a9a1fede6822d6c50d1bd9b5fafb0d241
languageName: node
linkType: hard
@@ -8429,7 +9839,7 @@ __metadata:
languageName: node
linkType: hard
-"ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.6":
+"ajv@npm:^6.12.3, ajv@npm:^6.12.4":
version: 6.12.6
resolution: "ajv@npm:6.12.6"
dependencies:
@@ -8499,10 +9909,10 @@ __metadata:
languageName: node
linkType: hard
-"ansis@npm:^3.11.0":
- version: 3.17.0
- resolution: "ansis@npm:3.17.0"
- checksum: 10c0/d8fa94ca7bb91e7e5f8a7d323756aa075facce07c5d02ca883673e128b2873d16f93e0dec782f98f1eeb1f2b3b4b7b60dcf0ad98fb442e75054fe857988cc5cb
+"ansis@npm:^4.1.0":
+ version: 4.2.0
+ resolution: "ansis@npm:4.2.0"
+ checksum: 10c0/cd6a7a681ecd36e72e0d79c1e34f1f3bcb1b15bcbb6f0f8969b4228062d3bfebbef468e09771b00d93b2294370b34f707599d4a113542a876de26823b795b5d2
languageName: node
linkType: hard
@@ -8713,6 +10123,15 @@ __metadata:
languageName: node
linkType: hard
+"ast-types@npm:^0.16.1":
+ version: 0.16.1
+ resolution: "ast-types@npm:0.16.1"
+ dependencies:
+ tslib: "npm:^2.0.1"
+ checksum: 10c0/abcc49e42eb921a7ebc013d5bec1154651fb6dbc3f497541d488859e681256901b2990b954d530ba0da4d0851271d484f7057d5eff5e07cb73e8b10909f711bf
+ languageName: node
+ linkType: hard
+
"ast-v8-to-istanbul@npm:^0.3.3":
version: 0.3.5
resolution: "ast-v8-to-istanbul@npm:0.3.5"
@@ -8812,6 +10231,18 @@ __metadata:
languageName: node
linkType: hard
+"babel-dead-code-elimination@npm:^1.0.12":
+ version: 1.0.12
+ resolution: "babel-dead-code-elimination@npm:1.0.12"
+ dependencies:
+ "@babel/core": "npm:^7.23.7"
+ "@babel/parser": "npm:^7.23.6"
+ "@babel/traverse": "npm:^7.23.7"
+ "@babel/types": "npm:^7.23.6"
+ checksum: 10c0/9289b66ce202a5f2b8c160f6a0ed16b97c42a9e06e92ea997df4e34d6a8309a01cf641b21467ee6a2713efd7e158b4b770e04a07f3f9d30eb05d428d186f7a60
+ languageName: node
+ linkType: hard
+
"babel-plugin-polyfill-corejs2@npm:^0.4.14":
version: 0.4.14
resolution: "babel-plugin-polyfill-corejs2@npm:0.4.14"
@@ -8975,23 +10406,6 @@ __metadata:
languageName: node
linkType: hard
-"body-parser@npm:^2.2.0":
- version: 2.2.0
- resolution: "body-parser@npm:2.2.0"
- dependencies:
- bytes: "npm:^3.1.2"
- content-type: "npm:^1.0.5"
- debug: "npm:^4.4.0"
- http-errors: "npm:^2.0.0"
- iconv-lite: "npm:^0.6.3"
- on-finished: "npm:^2.4.1"
- qs: "npm:^6.14.0"
- raw-body: "npm:^3.0.0"
- type-is: "npm:^2.0.0"
- checksum: 10c0/a9ded39e71ac9668e2211afa72e82ff86cc5ef94de1250b7d1ba9cc299e4150408aaa5f1e8b03dd4578472a3ce6d1caa2a23b27a6c18e526e48b4595174c116c
- languageName: node
- linkType: hard
-
"bowser@npm:^2.11.0":
version: 2.12.1
resolution: "bowser@npm:2.12.1"
@@ -9247,7 +10661,7 @@ __metadata:
languageName: node
linkType: hard
-"bytes@npm:3.1.2, bytes@npm:^3.1.2":
+"bytes@npm:3.1.2":
version: 3.1.2
resolution: "bytes@npm:3.1.2"
checksum: 10c0/76d1c43cbd602794ad8ad2ae94095cddeb1de78c5dddaa7005c51af10b0176c69971a6d88e805a90c2b6550d76636e43c40d8427a808b8645ede885de4a0358e
@@ -9526,6 +10940,31 @@ __metadata:
languageName: node
linkType: hard
+"chevrotain-allstar@npm:~0.3.1":
+ version: 0.3.1
+ resolution: "chevrotain-allstar@npm:0.3.1"
+ dependencies:
+ lodash-es: "npm:^4.17.21"
+ peerDependencies:
+ chevrotain: ^11.0.0
+ checksum: 10c0/5cadedffd3114eb06b15fd3939bb1aa6c75412dbd737fe302b52c5c24334f9cb01cee8edc1d1067d98ba80dddf971f1d0e94b387de51423fc6cf3c5d8b7ef27a
+ languageName: node
+ linkType: hard
+
+"chevrotain@npm:~11.1.1":
+ version: 11.1.1
+ resolution: "chevrotain@npm:11.1.1"
+ dependencies:
+ "@chevrotain/cst-dts-gen": "npm:11.1.1"
+ "@chevrotain/gast": "npm:11.1.1"
+ "@chevrotain/regexp-to-ast": "npm:11.1.1"
+ "@chevrotain/types": "npm:11.1.1"
+ "@chevrotain/utils": "npm:11.1.1"
+ lodash-es: "npm:4.17.23"
+ checksum: 10c0/cfd1a1206b0df75f2a08e40a39b1e2c69c1652495641b090fc25dcfae6c267ddb659f3a7d00e926d643d64f245636f89473609e7133f8157c5fd999007c9c555
+ languageName: node
+ linkType: hard
+
"chokidar@npm:^1.6.0":
version: 1.7.0
resolution: "chokidar@npm:1.7.0"
@@ -9608,7 +11047,7 @@ __metadata:
languageName: node
linkType: hard
-"class-variance-authority@npm:0.7.1":
+"class-variance-authority@npm:^0.7.1":
version: 0.7.1
resolution: "class-variance-authority@npm:0.7.1"
dependencies:
@@ -9663,6 +11102,21 @@ __metadata:
languageName: node
linkType: hard
+"cmdk@npm:^1.1.1":
+ version: 1.1.1
+ resolution: "cmdk@npm:1.1.1"
+ dependencies:
+ "@radix-ui/react-compose-refs": "npm:^1.1.1"
+ "@radix-ui/react-dialog": "npm:^1.1.6"
+ "@radix-ui/react-id": "npm:^1.1.0"
+ "@radix-ui/react-primitive": "npm:^2.0.2"
+ peerDependencies:
+ react: ^18 || ^19 || ^19.0.0-rc
+ react-dom: ^18 || ^19 || ^19.0.0-rc
+ checksum: 10c0/5605ac4396ec9bc65c82f954da19dd89a0636a54026df72780e2470da1381f9d57434a80a53f2d57eaa4e759660a3ebba9232b74258dc09970576591eae03116
+ languageName: node
+ linkType: hard
+
"cohere-ai@npm:7.10.6":
version: 7.10.6
resolution: "cohere-ai@npm:7.10.6"
@@ -9732,6 +11186,13 @@ __metadata:
languageName: node
linkType: hard
+"commander@npm:7":
+ version: 7.2.0
+ resolution: "commander@npm:7.2.0"
+ checksum: 10c0/8d690ff13b0356df7e0ebbe6c59b4712f754f4b724d4f473d3cc5b3fdcf978e3a5dc3078717858a2ceb50b0f84d0660a7f22a96cdc50fb877d0c9bb31593d23a
+ languageName: node
+ linkType: hard
+
"commander@npm:^2.20.0":
version: 2.20.3
resolution: "commander@npm:2.20.3"
@@ -9805,6 +11266,13 @@ __metadata:
languageName: node
linkType: hard
+"confbox@npm:^0.1.8":
+ version: 0.1.8
+ resolution: "confbox@npm:0.1.8"
+ checksum: 10c0/fc2c68d97cb54d885b10b63e45bd8da83a8a71459d3ecf1825143dd4c7f9f1b696b3283e07d9d12a144c1301c2ebc7842380bdf0014e55acc4ae1c9550102418
+ languageName: node
+ linkType: hard
+
"console-browserify@npm:^1.1.0":
version: 1.2.0
resolution: "console-browserify@npm:1.2.0"
@@ -9826,22 +11294,6 @@ __metadata:
languageName: node
linkType: hard
-"content-disposition@npm:^1.0.0":
- version: 1.0.0
- resolution: "content-disposition@npm:1.0.0"
- dependencies:
- safe-buffer: "npm:5.2.1"
- checksum: 10c0/c7b1ba0cea2829da0352ebc1b7f14787c73884bc707c8bc2271d9e3bf447b372270d09f5d3980dc5037c749ceef56b9a13fccd0b0001c87c3f12579967e4dd27
- languageName: node
- linkType: hard
-
-"content-type@npm:^1.0.5":
- version: 1.0.5
- resolution: "content-type@npm:1.0.5"
- checksum: 10c0/b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af
- languageName: node
- linkType: hard
-
"convert-source-map@npm:^2.0.0":
version: 2.0.0
resolution: "convert-source-map@npm:2.0.0"
@@ -9856,20 +11308,6 @@ __metadata:
languageName: node
linkType: hard
-"cookie-signature@npm:^1.2.1":
- version: 1.2.2
- resolution: "cookie-signature@npm:1.2.2"
- checksum: 10c0/54e05df1a293b3ce81589b27dddc445f462f6fa6812147c033350cd3561a42bc14481674e05ed14c7bd0ce1e8bb3dc0e40851bad75415733711294ddce0b7bc6
- languageName: node
- linkType: hard
-
-"cookie@npm:^0.7.1":
- version: 0.7.2
- resolution: "cookie@npm:0.7.2"
- checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2
- languageName: node
- linkType: hard
-
"copy-descriptor@npm:^0.1.0":
version: 0.1.1
resolution: "copy-descriptor@npm:0.1.1"
@@ -9914,13 +11352,21 @@ __metadata:
languageName: node
linkType: hard
-"cors@npm:^2.8.5":
- version: 2.8.5
- resolution: "cors@npm:2.8.5"
+"cose-base@npm:^1.0.0":
+ version: 1.0.3
+ resolution: "cose-base@npm:1.0.3"
+ dependencies:
+ layout-base: "npm:^1.0.0"
+ checksum: 10c0/a6e400b1d101393d6af0967c1353355777c1106c40417c5acaef6ca8bdda41e2fc9398f466d6c85be30290943ad631f2590569f67b3fd5368a0d8318946bd24f
+ languageName: node
+ linkType: hard
+
+"cose-base@npm:^2.2.0":
+ version: 2.2.0
+ resolution: "cose-base@npm:2.2.0"
dependencies:
- object-assign: "npm:^4"
- vary: "npm:^1"
- checksum: 10c0/373702b7999409922da80de4a61938aabba6929aea5b6fd9096fefb9e8342f626c0ebd7507b0e8b0b311380744cc985f27edebc0a26e0ddb784b54e1085de761
+ layout-base: "npm:^2.0.0"
+ checksum: 10c0/14b9f8100ac322a00777ffb1daeb3321af368bbc9cabe3103943361273baee2003202ffe38e4ab770960b600214224e9c196195a78d589521540aa694df7cdec
languageName: node
linkType: hard
@@ -10013,7 +11459,7 @@ __metadata:
languageName: node
linkType: hard
-"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.5, cross-spawn@npm:^7.0.6":
+"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6":
version: 7.0.6
resolution: "cross-spawn@npm:7.0.6"
dependencies:
@@ -10051,43 +11497,435 @@ __metadata:
languageName: node
linkType: hard
-"css.escape@npm:^1.5.1":
- version: 1.5.1
- resolution: "css.escape@npm:1.5.1"
- checksum: 10c0/5e09035e5bf6c2c422b40c6df2eb1529657a17df37fda5d0433d722609527ab98090baf25b13970ca754079a0f3161dd3dfc0e743563ded8cfa0749d861c1525
+"css.escape@npm:^1.5.1":
+ version: 1.5.1
+ resolution: "css.escape@npm:1.5.1"
+ checksum: 10c0/5e09035e5bf6c2c422b40c6df2eb1529657a17df37fda5d0433d722609527ab98090baf25b13970ca754079a0f3161dd3dfc0e743563ded8cfa0749d861c1525
+ languageName: node
+ linkType: hard
+
+"cssesc@npm:^3.0.0":
+ version: 3.0.0
+ resolution: "cssesc@npm:3.0.0"
+ bin:
+ cssesc: bin/cssesc
+ checksum: 10c0/6bcfd898662671be15ae7827120472c5667afb3d7429f1f917737f3bf84c4176003228131b643ae74543f17a394446247df090c597bb9a728cce298606ed0aa7
+ languageName: node
+ linkType: hard
+
+"cssstyle@npm:^4.2.1":
+ version: 4.6.0
+ resolution: "cssstyle@npm:4.6.0"
+ dependencies:
+ "@asamuzakjp/css-color": "npm:^3.2.0"
+ rrweb-cssom: "npm:^0.8.0"
+ checksum: 10c0/71add1b0ffafa1bedbef6855db6189b9523d3320e015a0bf3fbd504760efb9a81e1f1a225228d5fa892ee58e56d06994ca372e7f4e461cda7c4c9985fe075f65
+ languageName: node
+ linkType: hard
+
+"csstype@npm:^3.0.2, csstype@npm:^3.1.0":
+ version: 3.1.3
+ resolution: "csstype@npm:3.1.3"
+ checksum: 10c0/80c089d6f7e0c5b2bd83cf0539ab41474198579584fa10d86d0cafe0642202343cbc119e076a0b1aece191989477081415d66c9fefbf3c957fc2fc4b7009f248
+ languageName: node
+ linkType: hard
+
+"culori@npm:4.0.1":
+ version: 4.0.1
+ resolution: "culori@npm:4.0.1"
+ checksum: 10c0/4efc4a41151c5c2660913a8276f6d9bc82be63c76a56251d0a975e04196b5fde63e37f2f9e4ecb5a69029c6b34320a3a0f92225dd0ed03a3503dea3e9e2b8999
+ languageName: node
+ linkType: hard
+
+"cytoscape-cose-bilkent@npm:^4.1.0":
+ version: 4.1.0
+ resolution: "cytoscape-cose-bilkent@npm:4.1.0"
+ dependencies:
+ cose-base: "npm:^1.0.0"
+ peerDependencies:
+ cytoscape: ^3.2.0
+ checksum: 10c0/5e2480ddba9da1a68e700ed2c674cbfd51e9efdbd55788f1971a68de4eb30708e3b3a5e808bf5628f7a258680406bbe6586d87a9133e02a9bdc1ab1a92f512f2
+ languageName: node
+ linkType: hard
+
+"cytoscape-fcose@npm:^2.2.0":
+ version: 2.2.0
+ resolution: "cytoscape-fcose@npm:2.2.0"
+ dependencies:
+ cose-base: "npm:^2.2.0"
+ peerDependencies:
+ cytoscape: ^3.2.0
+ checksum: 10c0/ce472c9f85b9057e75c5685396f8e1f2468895e71b184913e05ad56dcf3092618fe59a1054f29cb0995051ba8ebe566ad0dd49a58d62845145624bd60cd44917
+ languageName: node
+ linkType: hard
+
+"cytoscape@npm:^3.29.3":
+ version: 3.33.1
+ resolution: "cytoscape@npm:3.33.1"
+ checksum: 10c0/dffcf5f74df4d91517c4faf394df880d8283ce76edef19edba0c762941cf4f18daf7c4c955ec50c794f476ace39ad4394f8c98483222bd2682e1fd206e976411
+ languageName: node
+ linkType: hard
+
+"d3-array@npm:1 - 2":
+ version: 2.12.1
+ resolution: "d3-array@npm:2.12.1"
+ dependencies:
+ internmap: "npm:^1.0.0"
+ checksum: 10c0/7eca10427a9f113a4ca6a0f7301127cab26043fd5e362631ef5a0edd1c4b2dd70c56ed317566700c31e4a6d88b55f3951aaba192291817f243b730cb2352882e
+ languageName: node
+ linkType: hard
+
+"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.2.0":
+ version: 3.2.4
+ resolution: "d3-array@npm:3.2.4"
+ dependencies:
+ internmap: "npm:1 - 2"
+ checksum: 10c0/08b95e91130f98c1375db0e0af718f4371ccacef7d5d257727fe74f79a24383e79aba280b9ffae655483ffbbad4fd1dec4ade0119d88c4749f388641c8bf8c50
+ languageName: node
+ linkType: hard
+
+"d3-axis@npm:3":
+ version: 3.0.0
+ resolution: "d3-axis@npm:3.0.0"
+ checksum: 10c0/a271e70ba1966daa5aaf6a7f959ceca3e12997b43297e757c7b945db2e1ead3c6ee226f2abcfa22abbd4e2e28bd2b71a0911794c4e5b911bbba271328a582c78
+ languageName: node
+ linkType: hard
+
+"d3-brush@npm:3":
+ version: 3.0.0
+ resolution: "d3-brush@npm:3.0.0"
+ dependencies:
+ d3-dispatch: "npm:1 - 3"
+ d3-drag: "npm:2 - 3"
+ d3-interpolate: "npm:1 - 3"
+ d3-selection: "npm:3"
+ d3-transition: "npm:3"
+ checksum: 10c0/07baf00334c576da2f68a91fc0da5732c3a5fa19bd3d7aed7fd24d1d674a773f71a93e9687c154176f7246946194d77c48c2d8fed757f5dcb1a4740067ec50a8
+ languageName: node
+ linkType: hard
+
+"d3-chord@npm:3":
+ version: 3.0.1
+ resolution: "d3-chord@npm:3.0.1"
+ dependencies:
+ d3-path: "npm:1 - 3"
+ checksum: 10c0/baa6013914af3f4fe1521f0d16de31a38eb8a71d08ff1dec4741f6f45a828661e5cd3935e39bd14e3032bdc78206c283ca37411da21d46ec3cfc520be6e7a7ce
+ languageName: node
+ linkType: hard
+
+"d3-color@npm:1 - 3, d3-color@npm:3":
+ version: 3.1.0
+ resolution: "d3-color@npm:3.1.0"
+ checksum: 10c0/a4e20e1115fa696fce041fbe13fbc80dc4c19150fa72027a7c128ade980bc0eeeba4bcf28c9e21f0bce0e0dbfe7ca5869ef67746541dcfda053e4802ad19783c
+ languageName: node
+ linkType: hard
+
+"d3-contour@npm:4":
+ version: 4.0.2
+ resolution: "d3-contour@npm:4.0.2"
+ dependencies:
+ d3-array: "npm:^3.2.0"
+ checksum: 10c0/98bc5fbed6009e08707434a952076f39f1cd6ed8b9288253cc3e6a3286e4e80c63c62d84954b20e64bf6e4ededcc69add54d3db25e990784a59c04edd3449032
+ languageName: node
+ linkType: hard
+
+"d3-delaunay@npm:6":
+ version: 6.0.4
+ resolution: "d3-delaunay@npm:6.0.4"
+ dependencies:
+ delaunator: "npm:5"
+ checksum: 10c0/57c3aecd2525664b07c4c292aa11cf49b2752c0cf3f5257f752999399fe3c592de2d418644d79df1f255471eec8057a9cc0c3062ed7128cb3348c45f69597754
+ languageName: node
+ linkType: hard
+
+"d3-dispatch@npm:1 - 3, d3-dispatch@npm:3":
+ version: 3.0.1
+ resolution: "d3-dispatch@npm:3.0.1"
+ checksum: 10c0/6eca77008ce2dc33380e45d4410c67d150941df7ab45b91d116dbe6d0a3092c0f6ac184dd4602c796dc9e790222bad3ff7142025f5fd22694efe088d1d941753
+ languageName: node
+ linkType: hard
+
+"d3-drag@npm:2 - 3, d3-drag@npm:3":
+ version: 3.0.0
+ resolution: "d3-drag@npm:3.0.0"
+ dependencies:
+ d3-dispatch: "npm:1 - 3"
+ d3-selection: "npm:3"
+ checksum: 10c0/d2556e8dc720741a443b595a30af403dd60642dfd938d44d6e9bfc4c71a962142f9a028c56b61f8b4790b65a34acad177d1263d66f103c3c527767b0926ef5aa
+ languageName: node
+ linkType: hard
+
+"d3-dsv@npm:1 - 3, d3-dsv@npm:3":
+ version: 3.0.1
+ resolution: "d3-dsv@npm:3.0.1"
+ dependencies:
+ commander: "npm:7"
+ iconv-lite: "npm:0.6"
+ rw: "npm:1"
+ bin:
+ csv2json: bin/dsv2json.js
+ csv2tsv: bin/dsv2dsv.js
+ dsv2dsv: bin/dsv2dsv.js
+ dsv2json: bin/dsv2json.js
+ json2csv: bin/json2dsv.js
+ json2dsv: bin/json2dsv.js
+ json2tsv: bin/json2dsv.js
+ tsv2csv: bin/dsv2dsv.js
+ tsv2json: bin/dsv2json.js
+ checksum: 10c0/10e6af9e331950ed258f34ab49ac1b7060128ef81dcf32afc790bd1f7e8c3cc2aac7f5f875250a83f21f39bb5925fbd0872bb209f8aca32b3b77d32bab8a65ab
+ languageName: node
+ linkType: hard
+
+"d3-ease@npm:1 - 3, d3-ease@npm:3":
+ version: 3.0.1
+ resolution: "d3-ease@npm:3.0.1"
+ checksum: 10c0/fec8ef826c0cc35cda3092c6841e07672868b1839fcaf556e19266a3a37e6bc7977d8298c0fcb9885e7799bfdcef7db1baaba9cd4dcf4bc5e952cf78574a88b0
+ languageName: node
+ linkType: hard
+
+"d3-fetch@npm:3":
+ version: 3.0.1
+ resolution: "d3-fetch@npm:3.0.1"
+ dependencies:
+ d3-dsv: "npm:1 - 3"
+ checksum: 10c0/4f467a79bf290395ac0cbb5f7562483f6a18668adc4c8eb84c9d3eff048b6f6d3b6f55079ba1ebf1908dabe000c941d46be447f8d78453b2dad5fb59fb6aa93b
+ languageName: node
+ linkType: hard
+
+"d3-force@npm:3":
+ version: 3.0.0
+ resolution: "d3-force@npm:3.0.0"
+ dependencies:
+ d3-dispatch: "npm:1 - 3"
+ d3-quadtree: "npm:1 - 3"
+ d3-timer: "npm:1 - 3"
+ checksum: 10c0/220a16a1a1ac62ba56df61028896e4b52be89c81040d20229c876efc8852191482c233f8a52bb5a4e0875c321b8e5cb6413ef3dfa4d8fe79eeb7d52c587f52cf
+ languageName: node
+ linkType: hard
+
+"d3-format@npm:1 - 3, d3-format@npm:3":
+ version: 3.1.2
+ resolution: "d3-format@npm:3.1.2"
+ checksum: 10c0/0de452ae07585238e7f01607a7e0066665c34609652188b6ac7dc9f424f69465a425e07d16d79bd0e5955202ac7f241c66d0c76f68a79fc6f4857c94cf420652
+ languageName: node
+ linkType: hard
+
+"d3-geo@npm:3":
+ version: 3.1.1
+ resolution: "d3-geo@npm:3.1.1"
+ dependencies:
+ d3-array: "npm:2.5.0 - 3"
+ checksum: 10c0/d32270dd2dc8ac3ea63e8805d63239c4c8ec6c0d339d73b5e5a30a87f8f54db22a78fb434369799465eae169503b25f9a107c642c8a16c32a3285bc0e6d8e8c1
+ languageName: node
+ linkType: hard
+
+"d3-hierarchy@npm:3":
+ version: 3.1.2
+ resolution: "d3-hierarchy@npm:3.1.2"
+ checksum: 10c0/6dcdb480539644aa7fc0d72dfc7b03f99dfbcdf02714044e8c708577e0d5981deb9d3e99bbbb2d26422b55bcc342ac89a0fa2ea6c9d7302e2fc0951dd96f89cf
+ languageName: node
+ linkType: hard
+
+"d3-interpolate@npm:1 - 3, d3-interpolate@npm:1.2.0 - 3, d3-interpolate@npm:3":
+ version: 3.0.1
+ resolution: "d3-interpolate@npm:3.0.1"
+ dependencies:
+ d3-color: "npm:1 - 3"
+ checksum: 10c0/19f4b4daa8d733906671afff7767c19488f51a43d251f8b7f484d5d3cfc36c663f0a66c38fe91eee30f40327443d799be17169f55a293a3ba949e84e57a33e6a
+ languageName: node
+ linkType: hard
+
+"d3-path@npm:1":
+ version: 1.0.9
+ resolution: "d3-path@npm:1.0.9"
+ checksum: 10c0/e35e84df5abc18091f585725b8235e1fa97efc287571585427d3a3597301e6c506dea56b11dfb3c06ca5858b3eb7f02c1bf4f6a716aa9eade01c41b92d497eb5
+ languageName: node
+ linkType: hard
+
+"d3-path@npm:1 - 3, d3-path@npm:3, d3-path@npm:^3.1.0":
+ version: 3.1.0
+ resolution: "d3-path@npm:3.1.0"
+ checksum: 10c0/dc1d58ec87fa8319bd240cf7689995111a124b141428354e9637aa83059eb12e681f77187e0ada5dedfce346f7e3d1f903467ceb41b379bfd01cd8e31721f5da
+ languageName: node
+ linkType: hard
+
+"d3-polygon@npm:3":
+ version: 3.0.1
+ resolution: "d3-polygon@npm:3.0.1"
+ checksum: 10c0/e236aa7f33efa9a4072907af7dc119f85b150a0716759d4fe5f12f62573018264a6cbde8617fbfa6944a7ae48c1c0c8d3f39ae72e11f66dd471e9b5e668385df
+ languageName: node
+ linkType: hard
+
+"d3-quadtree@npm:1 - 3, d3-quadtree@npm:3":
+ version: 3.0.1
+ resolution: "d3-quadtree@npm:3.0.1"
+ checksum: 10c0/18302d2548bfecaef788152397edec95a76400fd97d9d7f42a089ceb68d910f685c96579d74e3712d57477ed042b056881b47cd836a521de683c66f47ce89090
+ languageName: node
+ linkType: hard
+
+"d3-random@npm:3":
+ version: 3.0.1
+ resolution: "d3-random@npm:3.0.1"
+ checksum: 10c0/987a1a1bcbf26e6cf01fd89d5a265b463b2cea93560fc17d9b1c45e8ed6ff2db5924601bcceb808de24c94133f000039eb7fa1c469a7a844ccbf1170cbb25b41
+ languageName: node
+ linkType: hard
+
+"d3-sankey@npm:^0.12.3":
+ version: 0.12.3
+ resolution: "d3-sankey@npm:0.12.3"
+ dependencies:
+ d3-array: "npm:1 - 2"
+ d3-shape: "npm:^1.2.0"
+ checksum: 10c0/261debb01a13269f6fc53b9ebaef174a015d5ad646242c23995bf514498829ab8b8f920a7873724a7494288b46bea3ce7ebc5a920b745bc8ae4caa5885cf5204
+ languageName: node
+ linkType: hard
+
+"d3-scale-chromatic@npm:3":
+ version: 3.1.0
+ resolution: "d3-scale-chromatic@npm:3.1.0"
+ dependencies:
+ d3-color: "npm:1 - 3"
+ d3-interpolate: "npm:1 - 3"
+ checksum: 10c0/9a3f4671ab0b971f4a411b42180d7cf92bfe8e8584e637ce7e698d705e18d6d38efbd20ec64f60cc0dfe966c20d40fc172565bc28aaa2990c0a006360eed91af
+ languageName: node
+ linkType: hard
+
+"d3-scale@npm:4":
+ version: 4.0.2
+ resolution: "d3-scale@npm:4.0.2"
+ dependencies:
+ d3-array: "npm:2.10.0 - 3"
+ d3-format: "npm:1 - 3"
+ d3-interpolate: "npm:1.2.0 - 3"
+ d3-time: "npm:2.1.1 - 3"
+ d3-time-format: "npm:2 - 4"
+ checksum: 10c0/65d9ad8c2641aec30ed5673a7410feb187a224d6ca8d1a520d68a7d6eac9d04caedbff4713d1e8545be33eb7fec5739983a7ab1d22d4e5ad35368c6729d362f1
+ languageName: node
+ linkType: hard
+
+"d3-selection@npm:2 - 3, d3-selection@npm:3":
+ version: 3.0.0
+ resolution: "d3-selection@npm:3.0.0"
+ checksum: 10c0/e59096bbe8f0cb0daa1001d9bdd6dbc93a688019abc97d1d8b37f85cd3c286a6875b22adea0931b0c88410d025563e1643019161a883c516acf50c190a11b56b
+ languageName: node
+ linkType: hard
+
+"d3-shape@npm:3":
+ version: 3.2.0
+ resolution: "d3-shape@npm:3.2.0"
+ dependencies:
+ d3-path: "npm:^3.1.0"
+ checksum: 10c0/f1c9d1f09926daaf6f6193ae3b4c4b5521e81da7d8902d24b38694517c7f527ce3c9a77a9d3a5722ad1e3ff355860b014557b450023d66a944eabf8cfde37132
+ languageName: node
+ linkType: hard
+
+"d3-shape@npm:^1.2.0":
+ version: 1.3.7
+ resolution: "d3-shape@npm:1.3.7"
+ dependencies:
+ d3-path: "npm:1"
+ checksum: 10c0/548057ce59959815decb449f15632b08e2a1bdce208f9a37b5f98ec7629dda986c2356bc7582308405ce68aedae7d47b324df41507404df42afaf352907577ae
+ languageName: node
+ linkType: hard
+
+"d3-time-format@npm:2 - 4, d3-time-format@npm:4":
+ version: 4.1.0
+ resolution: "d3-time-format@npm:4.1.0"
+ dependencies:
+ d3-time: "npm:1 - 3"
+ checksum: 10c0/735e00fb25a7fd5d418fac350018713ae394eefddb0d745fab12bbff0517f9cdb5f807c7bbe87bb6eeb06249662f8ea84fec075f7d0cd68609735b2ceb29d206
languageName: node
linkType: hard
-"cssesc@npm:^3.0.0":
- version: 3.0.0
- resolution: "cssesc@npm:3.0.0"
- bin:
- cssesc: bin/cssesc
- checksum: 10c0/6bcfd898662671be15ae7827120472c5667afb3d7429f1f917737f3bf84c4176003228131b643ae74543f17a394446247df090c597bb9a728cce298606ed0aa7
+"d3-time@npm:1 - 3, d3-time@npm:2.1.1 - 3, d3-time@npm:3":
+ version: 3.1.0
+ resolution: "d3-time@npm:3.1.0"
+ dependencies:
+ d3-array: "npm:2 - 3"
+ checksum: 10c0/a984f77e1aaeaa182679b46fbf57eceb6ebdb5f67d7578d6f68ef933f8eeb63737c0949991618a8d29472dbf43736c7d7f17c452b2770f8c1271191cba724ca1
languageName: node
linkType: hard
-"cssstyle@npm:^4.2.1":
- version: 4.6.0
- resolution: "cssstyle@npm:4.6.0"
- dependencies:
- "@asamuzakjp/css-color": "npm:^3.2.0"
- rrweb-cssom: "npm:^0.8.0"
- checksum: 10c0/71add1b0ffafa1bedbef6855db6189b9523d3320e015a0bf3fbd504760efb9a81e1f1a225228d5fa892ee58e56d06994ca372e7f4e461cda7c4c9985fe075f65
+"d3-timer@npm:1 - 3, d3-timer@npm:3":
+ version: 3.0.1
+ resolution: "d3-timer@npm:3.0.1"
+ checksum: 10c0/d4c63cb4bb5461d7038aac561b097cd1c5673969b27cbdd0e87fa48d9300a538b9e6f39b4a7f0e3592ef4f963d858c8a9f0e92754db73116770856f2fc04561a
languageName: node
linkType: hard
-"csstype@npm:^3.0.2, csstype@npm:^3.1.0":
- version: 3.1.3
- resolution: "csstype@npm:3.1.3"
- checksum: 10c0/80c089d6f7e0c5b2bd83cf0539ab41474198579584fa10d86d0cafe0642202343cbc119e076a0b1aece191989477081415d66c9fefbf3c957fc2fc4b7009f248
+"d3-transition@npm:2 - 3, d3-transition@npm:3":
+ version: 3.0.1
+ resolution: "d3-transition@npm:3.0.1"
+ dependencies:
+ d3-color: "npm:1 - 3"
+ d3-dispatch: "npm:1 - 3"
+ d3-ease: "npm:1 - 3"
+ d3-interpolate: "npm:1 - 3"
+ d3-timer: "npm:1 - 3"
+ peerDependencies:
+ d3-selection: 2 - 3
+ checksum: 10c0/4e74535dda7024aa43e141635b7522bb70cf9d3dfefed975eb643b36b864762eca67f88fafc2ca798174f83ca7c8a65e892624f824b3f65b8145c6a1a88dbbad
languageName: node
linkType: hard
-"culori@npm:4.0.1":
- version: 4.0.1
- resolution: "culori@npm:4.0.1"
- checksum: 10c0/4efc4a41151c5c2660913a8276f6d9bc82be63c76a56251d0a975e04196b5fde63e37f2f9e4ecb5a69029c6b34320a3a0f92225dd0ed03a3503dea3e9e2b8999
+"d3-zoom@npm:3":
+ version: 3.0.0
+ resolution: "d3-zoom@npm:3.0.0"
+ dependencies:
+ d3-dispatch: "npm:1 - 3"
+ d3-drag: "npm:2 - 3"
+ d3-interpolate: "npm:1 - 3"
+ d3-selection: "npm:2 - 3"
+ d3-transition: "npm:2 - 3"
+ checksum: 10c0/ee2036479049e70d8c783d594c444fe00e398246048e3f11a59755cd0e21de62ece3126181b0d7a31bf37bcf32fd726f83ae7dea4495ff86ec7736ce5ad36fd3
+ languageName: node
+ linkType: hard
+
+"d3@npm:^7.9.0":
+ version: 7.9.0
+ resolution: "d3@npm:7.9.0"
+ dependencies:
+ d3-array: "npm:3"
+ d3-axis: "npm:3"
+ d3-brush: "npm:3"
+ d3-chord: "npm:3"
+ d3-color: "npm:3"
+ d3-contour: "npm:4"
+ d3-delaunay: "npm:6"
+ d3-dispatch: "npm:3"
+ d3-drag: "npm:3"
+ d3-dsv: "npm:3"
+ d3-ease: "npm:3"
+ d3-fetch: "npm:3"
+ d3-force: "npm:3"
+ d3-format: "npm:3"
+ d3-geo: "npm:3"
+ d3-hierarchy: "npm:3"
+ d3-interpolate: "npm:3"
+ d3-path: "npm:3"
+ d3-polygon: "npm:3"
+ d3-quadtree: "npm:3"
+ d3-random: "npm:3"
+ d3-scale: "npm:4"
+ d3-scale-chromatic: "npm:3"
+ d3-selection: "npm:3"
+ d3-shape: "npm:3"
+ d3-time: "npm:3"
+ d3-time-format: "npm:4"
+ d3-timer: "npm:3"
+ d3-transition: "npm:3"
+ d3-zoom: "npm:3"
+ checksum: 10c0/3dd9c08c73cfaa69c70c49e603c85e049c3904664d9c79a1a52a0f52795828a1ff23592dc9a7b2257e711d68a615472a13103c212032f38e016d609796e087e8
+ languageName: node
+ linkType: hard
+
+"dagre-d3-es@npm:7.0.13":
+ version: 7.0.13
+ resolution: "dagre-d3-es@npm:7.0.13"
+ dependencies:
+ d3: "npm:^7.9.0"
+ lodash-es: "npm:^4.17.21"
+ checksum: 10c0/4eca80dbbad4075311e3853930f99486024785b54210541796d4216140d91744738ee51125e2692c3532af148fbc2e690171750583916ed2ad553150abb198c7
languageName: node
linkType: hard
@@ -10143,6 +11981,13 @@ __metadata:
languageName: node
linkType: hard
+"dayjs@npm:^1.11.18":
+ version: 1.11.19
+ resolution: "dayjs@npm:1.11.19"
+ checksum: 10c0/7d8a6074a343f821f81ea284d700bd34ea6c7abbe8d93bce7aba818948957c1b7f56131702e5e890a5622cdfc05dcebe8aed0b8313bdc6838a594d7846b0b000
+ languageName: node
+ linkType: hard
+
"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3":
version: 2.6.9
resolution: "debug@npm:2.6.9"
@@ -10164,7 +12009,7 @@ __metadata:
languageName: node
linkType: hard
-"debug@npm:^4.3.5, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1":
+"debug@npm:^4.3.7, debug@npm:^4.4.1":
version: 4.4.1
resolution: "debug@npm:4.4.1"
dependencies:
@@ -10199,13 +12044,6 @@ __metadata:
languageName: node
linkType: hard
-"deep-diff@npm:^1.0.2":
- version: 1.0.2
- resolution: "deep-diff@npm:1.0.2"
- checksum: 10c0/cc3e315ba95963eba4bbb79ed88d0a37d80ba19bd3b0039b79d2ad0e19e48b0e15c692b49bcd617bbe0dcc7358d40464c993889313dd8bf806bb25978b12375d
- languageName: node
- linkType: hard
-
"deep-eql@npm:^5.0.1":
version: 5.0.2
resolution: "deep-eql@npm:5.0.2"
@@ -10227,7 +12065,7 @@ __metadata:
languageName: node
linkType: hard
-"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1":
+"deepmerge@npm:^4.2.2":
version: 4.3.1
resolution: "deepmerge@npm:4.3.1"
checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044
@@ -10293,6 +12131,15 @@ __metadata:
languageName: node
linkType: hard
+"delaunator@npm:5":
+ version: 5.0.1
+ resolution: "delaunator@npm:5.0.1"
+ dependencies:
+ robust-predicates: "npm:^3.0.2"
+ checksum: 10c0/3d7ea4d964731c5849af33fec0a271bc6753487b331fd7d43ccb17d77834706e1c383e6ab8fda0032da955e7576d1083b9603cdaf9cbdfd6b3ebd1fb8bb675a5
+ languageName: node
+ linkType: hard
+
"delayed-stream@npm:~1.0.0":
version: 1.0.0
resolution: "delayed-stream@npm:1.0.0"
@@ -10300,13 +12147,6 @@ __metadata:
languageName: node
linkType: hard
-"depd@npm:2.0.0, depd@npm:^2.0.0":
- version: 2.0.0
- resolution: "depd@npm:2.0.0"
- checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c
- languageName: node
- linkType: hard
-
"dequal@npm:^2.0.0, dequal@npm:^2.0.3":
version: 2.0.3
resolution: "dequal@npm:2.0.3"
@@ -10347,10 +12187,10 @@ __metadata:
languageName: node
linkType: hard
-"diff@npm:^7.0.0":
- version: 7.0.0
- resolution: "diff@npm:7.0.0"
- checksum: 10c0/251fd15f85ffdf814cfc35a728d526b8d2ad3de338dcbd011ac6e57c461417090766b28995f8ff733135b5fbc3699c392db1d5e27711ac4e00244768cd1d577b
+"diff@npm:^8.0.2":
+ version: 8.0.3
+ resolution: "diff@npm:8.0.3"
+ checksum: 10c0/d29321c70d3545fdcb56c5fdd76028c3f04c012462779e062303d4c3c531af80d2c360c26b871e6e2b9a971d2422d47e1779a859106c4cac4b5d2d143df70e20
languageName: node
linkType: hard
@@ -10405,6 +12245,18 @@ __metadata:
languageName: node
linkType: hard
+"dompurify@npm:^3.2.5":
+ version: 3.3.1
+ resolution: "dompurify@npm:3.3.1"
+ dependencies:
+ "@types/trusted-types": "npm:^2.0.7"
+ dependenciesMeta:
+ "@types/trusted-types":
+ optional: true
+ checksum: 10c0/fa0a8c55a436ba0d54389195e3d2337e311f56de709a2fc9efc98dbbc7746fa53bb4b74b6ac043b77a279a8f2ebd8685f0ebaa6e58c9e32e92051d529bc0baf8
+ languageName: node
+ linkType: hard
+
"dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1":
version: 1.0.1
resolution: "dunder-proto@npm:1.0.1"
@@ -10458,13 +12310,6 @@ __metadata:
languageName: node
linkType: hard
-"ee-first@npm:1.1.1":
- version: 1.1.1
- resolution: "ee-first@npm:1.1.1"
- checksum: 10c0/b5bb125ee93161bc16bfe6e56c6b04de5ad2aa44234d8f644813cc95d861a6910903132b05093706de2b706599367c4130eb6d170f6b46895686b95f87d017b7
- languageName: node
- linkType: hard
-
"ejs@npm:^3.1.6":
version: 3.1.10
resolution: "ejs@npm:3.1.10"
@@ -10544,13 +12389,6 @@ __metadata:
languageName: node
linkType: hard
-"encodeurl@npm:^2.0.0":
- version: 2.0.0
- resolution: "encodeurl@npm:2.0.0"
- checksum: 10c0/5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb
- languageName: node
- linkType: hard
-
"encoding@npm:^0.1.13":
version: 0.1.13
resolution: "encoding@npm:0.1.13"
@@ -10882,13 +12720,6 @@ __metadata:
languageName: node
linkType: hard
-"escape-html@npm:^1.0.3":
- version: 1.0.3
- resolution: "escape-html@npm:1.0.3"
- checksum: 10c0/524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3
- languageName: node
- linkType: hard
-
"escape-string-regexp@npm:^4.0.0":
version: 4.0.0
resolution: "escape-string-regexp@npm:4.0.0"
@@ -11093,7 +12924,7 @@ __metadata:
languageName: node
linkType: hard
-"esprima@npm:^4.0.0":
+"esprima@npm:^4.0.0, esprima@npm:~4.0.0":
version: 4.0.1
resolution: "esprima@npm:4.0.1"
bin:
@@ -11165,13 +12996,6 @@ __metadata:
languageName: node
linkType: hard
-"etag@npm:^1.8.1":
- version: 1.8.1
- resolution: "etag@npm:1.8.1"
- checksum: 10c0/12be11ef62fb9817314d790089a0a49fae4e1b50594135dcb8076312b7d7e470884b5100d249b28c18581b7fd52f8b485689ffae22a11ed9ec17377a33a08f84
- languageName: node
- linkType: hard
-
"event-target-shim@npm:^5.0.0":
version: 5.0.1
resolution: "event-target-shim@npm:5.0.1"
@@ -11186,22 +13010,13 @@ __metadata:
languageName: node
linkType: hard
-"eventsource-parser@npm:^3.0.0, eventsource-parser@npm:^3.0.1":
+"eventsource-parser@npm:^3.0.6":
version: 3.0.6
resolution: "eventsource-parser@npm:3.0.6"
checksum: 10c0/70b8ccec7dac767ef2eca43f355e0979e70415701691382a042a2df8d6a68da6c2fca35363669821f3da876d29c02abe9b232964637c1b6635c940df05ada78a
languageName: node
linkType: hard
-"eventsource@npm:^3.0.2":
- version: 3.0.7
- resolution: "eventsource@npm:3.0.7"
- dependencies:
- eventsource-parser: "npm:^3.0.1"
- checksum: 10c0/c48a73c38f300e33e9f11375d4ee969f25cbb0519608a12378a38068055ae8b55b6e0e8a49c3f91c784068434efe1d9f01eb49b6315b04b0da9157879ce2f67d
- languageName: node
- linkType: hard
-
"evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3":
version: 1.0.3
resolution: "evp_bytestokey@npm:1.0.3"
@@ -11284,50 +13099,6 @@ __metadata:
languageName: node
linkType: hard
-"express-rate-limit@npm:^7.5.0":
- version: 7.5.1
- resolution: "express-rate-limit@npm:7.5.1"
- peerDependencies:
- express: ">= 4.11"
- checksum: 10c0/b07de84d700a2c07c4bf2f040e7558ed5a1f660f03ed5f30bf8ff7b51e98ba7a85215640e70fc48cbbb9151066ea51239d9a1b41febc9b84d98c7915b0186161
- languageName: node
- linkType: hard
-
-"express@npm:^5.0.1":
- version: 5.1.0
- resolution: "express@npm:5.1.0"
- dependencies:
- accepts: "npm:^2.0.0"
- body-parser: "npm:^2.2.0"
- content-disposition: "npm:^1.0.0"
- content-type: "npm:^1.0.5"
- cookie: "npm:^0.7.1"
- cookie-signature: "npm:^1.2.1"
- debug: "npm:^4.4.0"
- encodeurl: "npm:^2.0.0"
- escape-html: "npm:^1.0.3"
- etag: "npm:^1.8.1"
- finalhandler: "npm:^2.1.0"
- fresh: "npm:^2.0.0"
- http-errors: "npm:^2.0.0"
- merge-descriptors: "npm:^2.0.0"
- mime-types: "npm:^3.0.0"
- on-finished: "npm:^2.4.1"
- once: "npm:^1.4.0"
- parseurl: "npm:^1.3.3"
- proxy-addr: "npm:^2.0.7"
- qs: "npm:^6.14.0"
- range-parser: "npm:^1.2.1"
- router: "npm:^2.2.0"
- send: "npm:^1.1.0"
- serve-static: "npm:^2.2.0"
- statuses: "npm:^2.0.1"
- type-is: "npm:^2.0.1"
- vary: "npm:^1.1.2"
- checksum: 10c0/80ce7c53c5f56887d759b94c3f2283e2e51066c98d4b72a4cc1338e832b77f1e54f30d0239cc10815a0f849bdb753e6a284d2fa48d4ab56faf9c501f55d751d6
- languageName: node
- linkType: hard
-
"extend-shallow@npm:^2.0.1":
version: 2.0.1
resolution: "extend-shallow@npm:2.0.1"
@@ -11597,20 +13368,6 @@ __metadata:
languageName: node
linkType: hard
-"finalhandler@npm:^2.1.0":
- version: 2.1.0
- resolution: "finalhandler@npm:2.1.0"
- dependencies:
- debug: "npm:^4.4.0"
- encodeurl: "npm:^2.0.0"
- escape-html: "npm:^1.0.3"
- on-finished: "npm:^2.4.1"
- parseurl: "npm:^1.3.3"
- statuses: "npm:^2.0.1"
- checksum: 10c0/da0bbca6d03873472ee890564eb2183f4ed377f25f3628a0fc9d16dac40bed7b150a0d82ebb77356e4c6d97d2796ad2dba22948b951dddee2c8768b0d1b9fb1f
- languageName: node
- linkType: hard
-
"find-index@npm:^0.1.1":
version: 0.1.1
resolution: "find-index@npm:0.1.1"
@@ -11778,13 +13535,6 @@ __metadata:
languageName: node
linkType: hard
-"forwarded@npm:0.2.0":
- version: 0.2.0
- resolution: "forwarded@npm:0.2.0"
- checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33
- languageName: node
- linkType: hard
-
"fragment-cache@npm:^0.2.1":
version: 0.2.1
resolution: "fragment-cache@npm:0.2.1"
@@ -11816,12 +13566,12 @@ __metadata:
languageName: node
linkType: hard
-"framer-motion@npm:^12.18.1":
- version: 12.18.1
- resolution: "framer-motion@npm:12.18.1"
+"framer-motion@npm:^12.23.25, framer-motion@npm:^12.34.3":
+ version: 12.34.3
+ resolution: "framer-motion@npm:12.34.3"
dependencies:
- motion-dom: "npm:^12.18.1"
- motion-utils: "npm:^12.18.1"
+ motion-dom: "npm:^12.34.3"
+ motion-utils: "npm:^12.29.2"
tslib: "npm:^2.4.0"
peerDependencies:
"@emotion/is-prop-valid": "*"
@@ -11834,14 +13584,7 @@ __metadata:
optional: true
react-dom:
optional: true
- checksum: 10c0/13aa6030fb619a482cb7d3fdb375a2ced54adcc11d23abf7e42b9dc8a40bc47d32fb3492dbb450e75c465c8469da72db21376719316d945829700f663af18c20
- languageName: node
- linkType: hard
-
-"fresh@npm:^2.0.0":
- version: 2.0.0
- resolution: "fresh@npm:2.0.0"
- checksum: 10c0/0557548194cb9a809a435bf92bcfbc20c89e8b5eb38861b73ced36750437251e39a111fc3a18b98531be9dd91fe1411e4969f229dc579ec0251ce6c5d4900bbc
+ checksum: 10c0/e36d8d2b33200c6d8ad8af6508090276674dcd239da8026ab19ec4f739b8943197c7b1777f28f96c7149f65ccd35efb5905cbdfdaf6e75017bcd7cc4eb69328b
languageName: node
linkType: hard
@@ -12015,6 +13758,13 @@ __metadata:
languageName: node
linkType: hard
+"get-east-asian-width@npm:^1.3.0":
+ version: 1.5.0
+ resolution: "get-east-asian-width@npm:1.5.0"
+ checksum: 10c0/bff8bbc8d81790b9477f7aa55b1806b9f082a8dc1359fff7bd8b96939622c86b729685afc2bfeb22def1fc6ef1e5228e4d87dd4e6da60bc43a5edfb03c4ee167
+ languageName: node
+ linkType: hard
+
"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0":
version: 1.3.0
resolution: "get-intrinsic@npm:1.3.0"
@@ -12293,6 +14043,13 @@ __metadata:
languageName: node
linkType: hard
+"hachure-fill@npm:^0.5.2":
+ version: 0.5.2
+ resolution: "hachure-fill@npm:0.5.2"
+ checksum: 10c0/307e3b6f9f2d3c11a82099c3f71eecbb9c440c00c1f896ac1732c23e6dbff16a92bb893d222b8b721b89cf11e58649ca60b4c24e5663f705f877cefd40153429
+ languageName: node
+ linkType: hard
+
"happy-dom@npm:^20.0.0":
version: 20.0.1
resolution: "happy-dom@npm:20.0.1"
@@ -12572,7 +14329,18 @@ __metadata:
languageName: node
linkType: hard
-"hast-util-to-html@npm:^9.0.0":
+"hast-util-sanitize@npm:^5.0.0":
+ version: 5.0.2
+ resolution: "hast-util-sanitize@npm:5.0.2"
+ dependencies:
+ "@types/hast": "npm:^3.0.0"
+ "@ungap/structured-clone": "npm:^1.0.0"
+ unist-util-position: "npm:^5.0.0"
+ checksum: 10c0/20951652078a8c21341c1c9a84f90015b2ba01cc41fa16772f122c65cda26a7adb0501fdeba5c8e37e40e2632447e8fe455d0dd2dc27d39663baacca76f2ecb6
+ languageName: node
+ linkType: hard
+
+"hast-util-to-html@npm:^9.0.0, hast-util-to-html@npm:^9.0.5":
version: 9.0.5
resolution: "hast-util-to-html@npm:9.0.5"
dependencies:
@@ -12591,7 +14359,7 @@ __metadata:
languageName: node
linkType: hard
-"hast-util-to-jsx-runtime@npm:^2.0.0":
+"hast-util-to-jsx-runtime@npm:^2.0.0, hast-util-to-jsx-runtime@npm:^2.3.6":
version: 2.3.6
resolution: "hast-util-to-jsx-runtime@npm:2.3.6"
dependencies:
@@ -12659,6 +14427,13 @@ __metadata:
languageName: node
linkType: hard
+"hast@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "hast@npm:1.0.0"
+ checksum: 10c0/a1a4ffaa99c6a4cfe6bd31e54ee919625a8ebcfc621d2d06cc76e593d7aeee4f1f430fcdbbf17ae8e249567ee7b724e4814b5eb273455d23bad8334c9bfc667d
+ languageName: node
+ linkType: hard
+
"hastscript@npm:^6.0.0":
version: 6.0.0
resolution: "hastscript@npm:6.0.0"
@@ -12782,7 +14557,7 @@ __metadata:
languageName: node
linkType: hard
-"html-url-attributes@npm:^3.0.0":
+"html-url-attributes@npm:^3.0.0, html-url-attributes@npm:^3.0.1":
version: 3.0.1
resolution: "html-url-attributes@npm:3.0.1"
checksum: 10c0/496e4908aa8b77665f348b4b03521901794f648b8ac34a581022cd6f2c97934d5c910cd91bc6593bbf2994687549037bc2520fcdc769b31484f29ffdd402acd0
@@ -12803,19 +14578,6 @@ __metadata:
languageName: node
linkType: hard
-"http-errors@npm:2.0.0, http-errors@npm:^2.0.0":
- version: 2.0.0
- resolution: "http-errors@npm:2.0.0"
- dependencies:
- depd: "npm:2.0.0"
- inherits: "npm:2.0.4"
- setprototypeof: "npm:1.2.0"
- statuses: "npm:2.0.1"
- toidentifier: "npm:1.0.1"
- checksum: 10c0/fc6f2715fe188d091274b5ffc8b3657bd85c63e969daa68ccb77afb05b071a4b62841acb7a21e417b5539014dff2ebf9550f0b14a9ff126f2734a7c1387f8e19
- languageName: node
- linkType: hard
-
"http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.2":
version: 7.0.2
resolution: "http-proxy-agent@npm:7.0.2"
@@ -12893,7 +14655,7 @@ __metadata:
languageName: node
linkType: hard
-"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3":
+"iconv-lite@npm:0.6, iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2":
version: 0.6.3
resolution: "iconv-lite@npm:0.6.3"
dependencies:
@@ -12902,15 +14664,6 @@ __metadata:
languageName: node
linkType: hard
-"iconv-lite@npm:0.7.0":
- version: 0.7.0
- resolution: "iconv-lite@npm:0.7.0"
- dependencies:
- safer-buffer: "npm:>= 2.1.2 < 3.0.0"
- checksum: 10c0/2382400469071c55b6746c531eed5fa4d033e5db6690b7331fb2a5f59a30d7a9782932e92253db26df33c1cf46fa200a3fbe524a2a7c62037c762283f188ec2f
- languageName: node
- linkType: hard
-
"idb@npm:^7.0.1":
version: 7.1.1
resolution: "idb@npm:7.1.1"
@@ -12984,7 +14737,7 @@ __metadata:
languageName: node
linkType: hard
-"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3, inherits@npm:~2.0.4":
+"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3, inherits@npm:~2.0.4":
version: 2.0.4
resolution: "inherits@npm:2.0.4"
checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2
@@ -13030,6 +14783,20 @@ __metadata:
languageName: node
linkType: hard
+"internmap@npm:1 - 2":
+ version: 2.0.3
+ resolution: "internmap@npm:2.0.3"
+ checksum: 10c0/8cedd57f07bbc22501516fbfc70447f0c6812871d471096fad9ea603516eacc2137b633633daf432c029712df0baefd793686388ddf5737e3ea15074b877f7ed
+ languageName: node
+ linkType: hard
+
+"internmap@npm:^1.0.0":
+ version: 1.0.1
+ resolution: "internmap@npm:1.0.1"
+ checksum: 10c0/60942be815ca19da643b6d4f23bd0bf4e8c97abbd080fb963fe67583b60bdfb3530448ad4486bae40810e92317bded9995cc31411218acc750d72cd4e8646eee
+ languageName: node
+ linkType: hard
+
"ip-address@npm:^10.0.1":
version: 10.0.1
resolution: "ip-address@npm:10.0.1"
@@ -13037,13 +14804,6 @@ __metadata:
languageName: node
linkType: hard
-"ipaddr.js@npm:1.9.1":
- version: 1.9.1
- resolution: "ipaddr.js@npm:1.9.1"
- checksum: 10c0/0486e775047971d3fdb5fb4f063829bac45af299ae0b82dcf3afa2145338e08290563a2a70f34b732d795ecc8311902e541a8530eeb30d75860a78ff4e94ce2a
- languageName: node
- linkType: hard
-
"is-accessor-descriptor@npm:^1.0.1":
version: 1.0.1
resolution: "is-accessor-descriptor@npm:1.0.1"
@@ -13367,20 +15127,6 @@ __metadata:
languageName: node
linkType: hard
-"is-lite@npm:^0.8.2":
- version: 0.8.2
- resolution: "is-lite@npm:0.8.2"
- checksum: 10c0/ed4b99d47ff12d0bf9730994cec8bcdee20bf46d68810f55e9e041797c76da664ab6d48a9ed2e7fb3aa52843a48ac4a083561a2235311a046551542504d995fd
- languageName: node
- linkType: hard
-
-"is-lite@npm:^1.2.1":
- version: 1.2.1
- resolution: "is-lite@npm:1.2.1"
- checksum: 10c0/53acb0f6329f0aba96fef4d883d42f3d9aabf2c42baba45821407d14b1782b9c6bea42c3eef72b37788be1acc95d6cf2df8a6b8424cb9f6eb12c08d5a7d81288
- languageName: node
- linkType: hard
-
"is-map@npm:^2.0.3":
version: 2.0.3
resolution: "is-map@npm:2.0.3"
@@ -13512,13 +15258,6 @@ __metadata:
languageName: node
linkType: hard
-"is-promise@npm:^4.0.0":
- version: 4.0.0
- resolution: "is-promise@npm:4.0.0"
- checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503
- languageName: node
- linkType: hard
-
"is-regex@npm:^1.2.1":
version: 1.2.1
resolution: "is-regex@npm:1.2.1"
@@ -14170,6 +15909,17 @@ __metadata:
languageName: node
linkType: hard
+"katex@npm:^0.16.22, katex@npm:^0.16.27":
+ version: 0.16.32
+ resolution: "katex@npm:0.16.32"
+ dependencies:
+ commander: "npm:^8.3.0"
+ bin:
+ katex: cli.js
+ checksum: 10c0/32dcceaa174271786bca378e1e8b8c2ef71fa11512c5898861f6c6bbddfcfcbf4396e53ded9f7aa81bfcc4ab0d076af1045aa13c09d01b73c6f1d28031d1905c
+ languageName: node
+ linkType: hard
+
"keyv@npm:^4.5.3, keyv@npm:^4.5.4":
version: 4.5.4
resolution: "keyv@npm:4.5.4"
@@ -14179,6 +15929,13 @@ __metadata:
languageName: node
linkType: hard
+"khroma@npm:^2.1.0":
+ version: 2.1.0
+ resolution: "khroma@npm:2.1.0"
+ checksum: 10c0/634d98753ff5d2540491cafeb708fc98de0d43f4e6795256d5c8f6e3ad77de93049ea41433928fda3697adf7bbe6fe27351858f6d23b78f8b5775ef314c59891
+ languageName: node
+ linkType: hard
+
"kind-of@npm:^3.0.2, kind-of@npm:^3.0.3, kind-of@npm:^3.2.0":
version: 3.2.2
resolution: "kind-of@npm:3.2.2"
@@ -14204,6 +15961,19 @@ __metadata:
languageName: node
linkType: hard
+"langium@npm:^4.0.0":
+ version: 4.2.1
+ resolution: "langium@npm:4.2.1"
+ dependencies:
+ chevrotain: "npm:~11.1.1"
+ chevrotain-allstar: "npm:~0.3.1"
+ vscode-languageserver: "npm:~9.0.1"
+ vscode-languageserver-textdocument: "npm:~1.0.11"
+ vscode-uri: "npm:~3.1.0"
+ checksum: 10c0/19ddf79cc3c435ec70f8eb50de255571711db7cea89d171cf80bc97e7ed73d4d0bb6b4215899df8369fa6d0e17f442f30af4ec2e9657041bf2f93be1310ba50a
+ languageName: node
+ linkType: hard
+
"layerr@npm:^3.0.0":
version: 3.0.0
resolution: "layerr@npm:3.0.0"
@@ -14211,6 +15981,20 @@ __metadata:
languageName: node
linkType: hard
+"layout-base@npm:^1.0.0":
+ version: 1.0.2
+ resolution: "layout-base@npm:1.0.2"
+ checksum: 10c0/2a55d0460fd9f6ed53d7e301b9eb3dea19bda03815d616a40665ce6dc75c1f4d62e1ca19a897da1cfaf6de1b91de59cd6f2f79ba1258f3d7fccc7d46ca7f3337
+ languageName: node
+ linkType: hard
+
+"layout-base@npm:^2.0.0":
+ version: 2.0.1
+ resolution: "layout-base@npm:2.0.1"
+ checksum: 10c0/a44df9ef3cbff9916a10f616635e22b5787c89fa62b2fec6f99e8e6ee512c7cebd22668ce32dab5a83c934ba0a309c51a678aa0b40d70853de6c357893c0a88b
+ languageName: node
+ linkType: hard
+
"leven@npm:^3.1.0":
version: 3.1.0
resolution: "leven@npm:3.1.0"
@@ -14347,6 +16131,13 @@ __metadata:
languageName: node
linkType: hard
+"lodash-es@npm:4.17.23, lodash-es@npm:^4.17.21, lodash-es@npm:^4.17.23":
+ version: 4.17.23
+ resolution: "lodash-es@npm:4.17.23"
+ checksum: 10c0/3150fb6660c14c7a6b5f23bd11597d884b140c0e862a17fdb415aaa5ef7741523182904a6b7929f04e5f60a11edb5a79499eb448734381c99ffb3c4734beeddd
+ languageName: node
+ linkType: hard
+
"lodash.clonedeep@npm:4.5.0":
version: 4.5.0
resolution: "lodash.clonedeep@npm:4.5.0"
@@ -14457,12 +16248,30 @@ __metadata:
languageName: node
linkType: hard
-"lucide-react@npm:0.536.0":
- version: 0.536.0
- resolution: "lucide-react@npm:0.536.0"
+"lucide-react@npm:^0.560.0":
+ version: 0.560.0
+ resolution: "lucide-react@npm:0.560.0"
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ checksum: 10c0/1dc1fb09a91816ed4211a6f000903c18763ebf8c1cede0aac00433f068e50e548e9c36e56e99fec68f40df4c808ff7ae0f5c375a9c8d312e2bace6157128136e
+ languageName: node
+ linkType: hard
+
+"lucide-react@npm:^0.562.0":
+ version: 0.562.0
+ resolution: "lucide-react@npm:0.562.0"
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ checksum: 10c0/c713a2490916e42c678b9df0d7309d8cdb715af1d7139c7eb49c45547901b276a7cf722548012a668dc0e337eeadf5141d5af8c8fcda6721fc58fb2d288efcba
+ languageName: node
+ linkType: hard
+
+"lucide-react@npm:^0.563.0":
+ version: 0.563.0
+ resolution: "lucide-react@npm:0.563.0"
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
- checksum: 10c0/643d6960630c5e8678c8140ccb60710b019a385c847f4ad089b2598ae3321f80ddc7f73c2b3a648576674c3e475a6effa2fc58665da9c07e568a010e677cab42
+ checksum: 10c0/4a2027be255755d64ce18040062426dec07a5da920c000d9cd330e383fa10716a584c927dc03e91daccc6e05f6f486d4f49d1bd009e5f7763aa6fcf704806554
languageName: node
linkType: hard
@@ -14613,6 +16422,24 @@ __metadata:
languageName: node
linkType: hard
+"marked@npm:^16.2.1":
+ version: 16.4.2
+ resolution: "marked@npm:16.4.2"
+ bin:
+ marked: bin/marked.js
+ checksum: 10c0/fc6051142172454f2023f3d6b31cca92879ec8e1b96457086a54c70354c74b00e1b6543a76a1fad6d399366f52b90a848f6ffb8e1d65a5baff87f3ba9b8f1847
+ languageName: node
+ linkType: hard
+
+"marked@npm:^17.0.1":
+ version: 17.0.3
+ resolution: "marked@npm:17.0.3"
+ bin:
+ marked: bin/marked.js
+ checksum: 10c0/3970f96ce3b1a7fd5bba82a6c7e4dffec9f7e0f238633e57139e8aa8fe637bccb1c1b61f2b3ed21b1afdbd4e076326f29e449d147203a0bdb9394e21e9a6a722
+ languageName: node
+ linkType: hard
+
"math-intrinsics@npm:^1.1.0":
version: 1.1.0
resolution: "math-intrinsics@npm:1.1.0"
@@ -14873,20 +16700,6 @@ __metadata:
languageName: node
linkType: hard
-"media-typer@npm:^1.1.0":
- version: 1.1.0
- resolution: "media-typer@npm:1.1.0"
- checksum: 10c0/7b4baa40b25964bb90e2121ee489ec38642127e48d0cc2b6baa442688d3fde6262bfdca86d6bbf6ba708784afcac168c06840c71facac70e390f5f759ac121b9
- languageName: node
- linkType: hard
-
-"merge-descriptors@npm:^2.0.0":
- version: 2.0.0
- resolution: "merge-descriptors@npm:2.0.0"
- checksum: 10c0/95389b7ced3f9b36fbdcf32eb946dc3dd1774c2fdf164609e55b18d03aa499b12bd3aae3a76c1c7185b96279e9803525550d3eb292b5224866060a288f335cb3
- languageName: node
- linkType: hard
-
"merge-stream@npm:^2.0.0":
version: 2.0.0
resolution: "merge-stream@npm:2.0.0"
@@ -14901,6 +16714,34 @@ __metadata:
languageName: node
linkType: hard
+"mermaid@npm:^11.12.2":
+ version: 11.12.3
+ resolution: "mermaid@npm:11.12.3"
+ dependencies:
+ "@braintree/sanitize-url": "npm:^7.1.1"
+ "@iconify/utils": "npm:^3.0.1"
+ "@mermaid-js/parser": "npm:^1.0.0"
+ "@types/d3": "npm:^7.4.3"
+ cytoscape: "npm:^3.29.3"
+ cytoscape-cose-bilkent: "npm:^4.1.0"
+ cytoscape-fcose: "npm:^2.2.0"
+ d3: "npm:^7.9.0"
+ d3-sankey: "npm:^0.12.3"
+ dagre-d3-es: "npm:7.0.13"
+ dayjs: "npm:^1.11.18"
+ dompurify: "npm:^3.2.5"
+ katex: "npm:^0.16.22"
+ khroma: "npm:^2.1.0"
+ lodash-es: "npm:^4.17.23"
+ marked: "npm:^16.2.1"
+ roughjs: "npm:^4.6.6"
+ stylis: "npm:^4.3.6"
+ ts-dedent: "npm:^2.2.0"
+ uuid: "npm:^11.1.0"
+ checksum: 10c0/a50e0e79fa913d8d0c88a8927d14b07c8236ebb595aade815152b2668ed4e3e5204884c776739ee0b473df2277a4431cf21ed98cc2a7d81995d0f5a94af93058
+ languageName: node
+ linkType: hard
+
"micromark-core-commonmark@npm:^2.0.0":
version: 2.0.3
resolution: "micromark-core-commonmark@npm:2.0.3"
@@ -14925,6 +16766,60 @@ __metadata:
languageName: node
linkType: hard
+"micromark-extension-cjk-friendly-gfm-strikethrough@npm:1.2.3":
+ version: 1.2.3
+ resolution: "micromark-extension-cjk-friendly-gfm-strikethrough@npm:1.2.3"
+ dependencies:
+ devlop: "npm:^1.1.0"
+ get-east-asian-width: "npm:^1.3.0"
+ micromark-extension-cjk-friendly-util: "npm:2.1.1"
+ micromark-util-character: "npm:^2.1.1"
+ micromark-util-chunked: "npm:^2.0.1"
+ micromark-util-resolve-all: "npm:^2.0.1"
+ micromark-util-symbol: "npm:^2.0.1"
+ peerDependencies:
+ micromark: ^4.0.0
+ micromark-util-types: ^2.0.0
+ peerDependenciesMeta:
+ micromark-util-types:
+ optional: true
+ checksum: 10c0/1c968499ab6a4cd827f6e0f041e5b75264963554befc8f592f8a9b27b0171c85eaa5e23a7d1e3793f9236da2bea0d8947741e5509c429ce6bccab97d2199e302
+ languageName: node
+ linkType: hard
+
+"micromark-extension-cjk-friendly-util@npm:2.1.1":
+ version: 2.1.1
+ resolution: "micromark-extension-cjk-friendly-util@npm:2.1.1"
+ dependencies:
+ get-east-asian-width: "npm:^1.3.0"
+ micromark-util-character: "npm:^2.1.1"
+ micromark-util-symbol: "npm:^2.0.1"
+ peerDependenciesMeta:
+ micromark-util-types:
+ optional: true
+ checksum: 10c0/967276369da925fed150c4940c7e8f4998a25a5c0805389ee0d3607eea6524992382bdfe0fb5cc80a0dadd31de543e56ad377bcf128e49329bf032124bb82fc9
+ languageName: node
+ linkType: hard
+
+"micromark-extension-cjk-friendly@npm:1.2.3":
+ version: 1.2.3
+ resolution: "micromark-extension-cjk-friendly@npm:1.2.3"
+ dependencies:
+ devlop: "npm:^1.1.0"
+ micromark-extension-cjk-friendly-util: "npm:2.1.1"
+ micromark-util-chunked: "npm:^2.0.1"
+ micromark-util-resolve-all: "npm:^2.0.1"
+ micromark-util-symbol: "npm:^2.0.1"
+ peerDependencies:
+ micromark: ^4.0.0
+ micromark-util-types: ^2.0.0
+ peerDependenciesMeta:
+ micromark-util-types:
+ optional: true
+ checksum: 10c0/3dd7b9ebaf7f69bbb316f7544b616592dfc5d271eea1237598972d4ac0a6339c9b5e59cb4e7bd4572f9a3d9bd7a5f05dc3b4ac2a432aa8b8ba1a32fbfc9ca080
+ languageName: node
+ linkType: hard
+
"micromark-extension-gfm-autolink-literal@npm:^2.0.0":
version: 2.1.0
resolution: "micromark-extension-gfm-autolink-literal@npm:2.1.0"
@@ -15090,7 +16985,7 @@ __metadata:
languageName: node
linkType: hard
-"micromark-util-character@npm:^2.0.0":
+"micromark-util-character@npm:^2.0.0, micromark-util-character@npm:^2.1.1":
version: 2.1.1
resolution: "micromark-util-character@npm:2.1.1"
dependencies:
@@ -15100,7 +16995,7 @@ __metadata:
languageName: node
linkType: hard
-"micromark-util-chunked@npm:^2.0.0":
+"micromark-util-chunked@npm:^2.0.0, micromark-util-chunked@npm:^2.0.1":
version: 2.0.1
resolution: "micromark-util-chunked@npm:2.0.1"
dependencies:
@@ -15174,7 +17069,7 @@ __metadata:
languageName: node
linkType: hard
-"micromark-util-resolve-all@npm:^2.0.0":
+"micromark-util-resolve-all@npm:^2.0.0, micromark-util-resolve-all@npm:^2.0.1":
version: 2.0.1
resolution: "micromark-util-resolve-all@npm:2.0.1"
dependencies:
@@ -15206,7 +17101,7 @@ __metadata:
languageName: node
linkType: hard
-"micromark-util-symbol@npm:^2.0.0":
+"micromark-util-symbol@npm:^2.0.0, micromark-util-symbol@npm:^2.0.1":
version: 2.0.1
resolution: "micromark-util-symbol@npm:2.0.1"
checksum: 10c0/f2d1b207771e573232436618e78c5e46cd4b5c560dd4a6d63863d58018abbf49cb96ec69f7007471e51434c60de3c9268ef2bf46852f26ff4aacd10f9da16fe9
@@ -15316,7 +17211,7 @@ __metadata:
languageName: node
linkType: hard
-"mime-db@npm:>= 1.43.0 < 2, mime-db@npm:^1.54.0":
+"mime-db@npm:>= 1.43.0 < 2":
version: 1.54.0
resolution: "mime-db@npm:1.54.0"
checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284
@@ -15348,15 +17243,6 @@ __metadata:
languageName: node
linkType: hard
-"mime-types@npm:^3.0.0, mime-types@npm:^3.0.1":
- version: 3.0.1
- resolution: "mime-types@npm:3.0.1"
- dependencies:
- mime-db: "npm:^1.54.0"
- checksum: 10c0/bd8c20d3694548089cf229016124f8f40e6a60bbb600161ae13e45f793a2d5bb40f96bbc61f275836696179c77c1d6bf4967b2a75e0a8ad40fe31f4ed5be4da5
- languageName: node
- linkType: hard
-
"mimic-fn@npm:^2.1.0":
version: 2.1.0
resolution: "mimic-fn@npm:2.1.0"
@@ -15594,12 +17480,15 @@ __metadata:
languageName: node
linkType: hard
-"motion-dom@npm:^12.18.1":
- version: 12.18.1
- resolution: "motion-dom@npm:12.18.1"
+"mlly@npm:^1.7.4, mlly@npm:^1.8.0":
+ version: 1.8.0
+ resolution: "mlly@npm:1.8.0"
dependencies:
- motion-utils: "npm:^12.18.1"
- checksum: 10c0/33914f174fc8ff27e65b579d70cb6ae2af320eb3f85d12a29c05fe046dd5966844844fbac59b9e7e98f8a325e7529666173fca7fe5e4a3aff59b9bd1eb1b3266
+ acorn: "npm:^8.15.0"
+ pathe: "npm:^2.0.3"
+ pkg-types: "npm:^1.3.1"
+ ufo: "npm:^1.6.1"
+ checksum: 10c0/f174b844ae066c71e9b128046677868e2e28694f0bbeeffbe760b2a9d8ff24de0748d0fde6fabe706700c1d2e11d3c0d7a53071b5ea99671592fac03364604ab
languageName: node
linkType: hard
@@ -15612,10 +17501,12 @@ __metadata:
languageName: node
linkType: hard
-"motion-utils@npm:^12.18.1":
- version: 12.18.1
- resolution: "motion-utils@npm:12.18.1"
- checksum: 10c0/703702d9a82db223f4b0e0437e7c00b9e3f347bf7bffb20b0b7ad171d937db823b2420dbd8bf0764def885ba6c8aac659cc3595bcd8ecd56b5e63a990a1fae07
+"motion-dom@npm:^12.34.3":
+ version: 12.34.3
+ resolution: "motion-dom@npm:12.34.3"
+ dependencies:
+ motion-utils: "npm:^12.29.2"
+ checksum: 10c0/9a336be96dbb24a2ea3cafe401043553bc326274d118b86d6414e505cd394f26c071cd420d2e71c2cf19e76abc89bfdac4a7c5c1b3842eca56b11d6b8687dfdc
languageName: node
linkType: hard
@@ -15626,11 +17517,18 @@ __metadata:
languageName: node
linkType: hard
-"motion@npm:12.18.1":
- version: 12.18.1
- resolution: "motion@npm:12.18.1"
+"motion-utils@npm:^12.29.2":
+ version: 12.29.2
+ resolution: "motion-utils@npm:12.29.2"
+ checksum: 10c0/8058fbb3467602e8263a8a6df0e5d318d00d30d7148415d2ebc13c78a3c7a1b0cbec0808bb62e82c34714979ecbed15b9fffb91bde654dbf3602c84b7d66a5b6
+ languageName: node
+ linkType: hard
+
+"motion@npm:^12.23.26, motion@npm:^12.29.2":
+ version: 12.34.3
+ resolution: "motion@npm:12.34.3"
dependencies:
- framer-motion: "npm:^12.18.1"
+ framer-motion: "npm:^12.34.3"
tslib: "npm:^2.4.0"
peerDependencies:
"@emotion/is-prop-valid": "*"
@@ -15643,7 +17541,7 @@ __metadata:
optional: true
react-dom:
optional: true
- checksum: 10c0/f90c533af3c7636ac28b819ea192b971650e672033808942eacc0bf2a7ba5e802d164763948f71faf374e07de6a069e902fe7f3cec1bc3f66064c516c3385e7b
+ checksum: 10c0/bb16391e893c2df81e1447d920cb97f54da1c2660ca648c9bfee6cc5b482f96b4bcb223eee02da40e78bd33c4211168b444e3fefefeb1177e338f0e1063b4be1
languageName: node
linkType: hard
@@ -15704,6 +17602,15 @@ __metadata:
languageName: node
linkType: hard
+"nanoid@npm:^5.1.6":
+ version: 5.1.6
+ resolution: "nanoid@npm:5.1.6"
+ bin:
+ nanoid: bin/nanoid.js
+ checksum: 10c0/27b5b055ad8332cf4f0f9f6e2a494aa7e5ded89df4cab8c8490d4eabefe72c4423971d2745d22002868b1d50576a5e42b7b05214733b19f576382323282dd26e
+ languageName: node
+ linkType: hard
+
"nanomatch@npm:^1.2.9":
version: 1.2.13
resolution: "nanomatch@npm:1.2.13"
@@ -16115,7 +18022,7 @@ __metadata:
languageName: node
linkType: hard
-"object-assign@npm:^4, object-assign@npm:^4.1.1":
+"object-assign@npm:^4.1.1":
version: 4.1.1
resolution: "object-assign@npm:4.1.1"
checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414
@@ -16199,15 +18106,6 @@ __metadata:
languageName: node
linkType: hard
-"on-finished@npm:^2.4.1":
- version: 2.4.1
- resolution: "on-finished@npm:2.4.1"
- dependencies:
- ee-first: "npm:1.1.1"
- checksum: 10c0/46fb11b9063782f2d9968863d9cbba33d77aa13c17f895f56129c274318b86500b22af3a160fe9995aa41317efcd22941b6eba747f718ced08d9a73afdb087b4
- languageName: node
- linkType: hard
-
"on-headers@npm:~1.1.0":
version: 1.1.0
resolution: "on-headers@npm:1.1.0"
@@ -16233,6 +18131,24 @@ __metadata:
languageName: node
linkType: hard
+"oniguruma-parser@npm:^0.12.1":
+ version: 0.12.1
+ resolution: "oniguruma-parser@npm:0.12.1"
+ checksum: 10c0/b843ea54cda833efb19f856314afcbd43e903ece3de489ab78c527ddec84859208052557daa9fad4bdba89ebdd15b0cc250de86b3daf8c7cbe37bac5a6a185d3
+ languageName: node
+ linkType: hard
+
+"oniguruma-to-es@npm:^4.3.4":
+ version: 4.3.4
+ resolution: "oniguruma-to-es@npm:4.3.4"
+ dependencies:
+ oniguruma-parser: "npm:^0.12.1"
+ regex: "npm:^6.0.1"
+ regex-recursion: "npm:^6.0.2"
+ checksum: 10c0/fb58459f50db71c2c4785205636186bfbb125b094c4275512a8f41f123ed3fbf61f37c455f4360ef14a56c693981aecd7da3ae2c05614a222e872c4643b463fc
+ languageName: node
+ linkType: hard
+
"openai@npm:4.91.1":
version: 4.91.1
resolution: "openai@npm:4.91.1"
@@ -16331,6 +18247,13 @@ __metadata:
languageName: node
linkType: hard
+"package-manager-detector@npm:^1.3.0":
+ version: 1.6.0
+ resolution: "package-manager-detector@npm:1.6.0"
+ checksum: 10c0/6419d0b840be64fd45bcdcb7a19f09b81b65456d5e7f7a3daac305a4c90643052122f6ac0308afe548ffee75e36148532a2002ea9d292754f1e385aa2e1ea03b
+ languageName: node
+ linkType: hard
+
"pacote@npm:^18.0.0, pacote@npm:^18.0.6":
version: 18.0.6
resolution: "pacote@npm:18.0.6"
@@ -16483,13 +18406,6 @@ __metadata:
languageName: node
linkType: hard
-"parseurl@npm:^1.3.3":
- version: 1.3.3
- resolution: "parseurl@npm:1.3.3"
- checksum: 10c0/90dd4760d6f6174adb9f20cf0965ae12e23879b5f5464f38e92fce8073354341e4b3b76fa3d878351efe7d01e617121955284cfd002ab087fba1a0726ec0b4f5
- languageName: node
- linkType: hard
-
"pascalcase@npm:^0.1.1":
version: 0.1.1
resolution: "pascalcase@npm:0.1.1"
@@ -16504,6 +18420,13 @@ __metadata:
languageName: node
linkType: hard
+"path-data-parser@npm:0.1.0, path-data-parser@npm:^0.1.0":
+ version: 0.1.0
+ resolution: "path-data-parser@npm:0.1.0"
+ checksum: 10c0/ba22d54669a8bc4a3df27431fe667900685585d1196085b803d0aa4066b83e709bbf2be7c1d2b56e706b49cc698231d55947c22abbfc4843ca424bbf8c985745
+ languageName: node
+ linkType: hard
+
"path-exists@npm:^4.0.0":
version: 4.0.0
resolution: "path-exists@npm:4.0.0"
@@ -16566,13 +18489,6 @@ __metadata:
languageName: node
linkType: hard
-"path-to-regexp@npm:^8.0.0":
- version: 8.3.0
- resolution: "path-to-regexp@npm:8.3.0"
- checksum: 10c0/ee1544a73a3f294a97a4c663b0ce71bbf1621d732d80c9c9ed201b3e911a86cb628ebad691b9d40f40a3742fe22011e5a059d8eed2cf63ec2cb94f6fb4efe67c
- languageName: node
- linkType: hard
-
"pathe@npm:^1.1.2":
version: 1.1.2
resolution: "pathe@npm:1.1.2"
@@ -16580,7 +18496,7 @@ __metadata:
languageName: node
linkType: hard
-"pathe@npm:^2.0.3":
+"pathe@npm:^2.0.1, pathe@npm:^2.0.3":
version: 2.0.3
resolution: "pathe@npm:2.0.3"
checksum: 10c0/c118dc5a8b5c4166011b2b70608762e260085180bb9e33e80a50dcdb1e78c010b1624f4280c492c92b05fc276715a4c357d1f9edc570f8f1b3d90b6839ebaca1
@@ -16643,13 +18559,6 @@ __metadata:
languageName: node
linkType: hard
-"pkce-challenge@npm:^5.0.0":
- version: 5.0.0
- resolution: "pkce-challenge@npm:5.0.0"
- checksum: 10c0/c6706d627fdbb6f22bf8cc5d60d96d6b6a7bb481399b336a3d3f4e9bfba3e167a2c32f8ec0b5e74be686a0ba3bcc9894865d4c2dd1b91cea4c05dba1f28602c3
- languageName: node
- linkType: hard
-
"pkg-dir@npm:^5.0.0":
version: 5.0.0
resolution: "pkg-dir@npm:5.0.0"
@@ -16659,10 +18568,31 @@ __metadata:
languageName: node
linkType: hard
-"popper.js@npm:^1.16.0":
- version: 1.16.1
- resolution: "popper.js@npm:1.16.1"
- checksum: 10c0/1c1a826f757edb5b8c2049dfd7a9febf6ae1e9d0e51342fc715b49a0c1020fced250d26484619883651e097c5764bbcacd2f31496e3646027f079dd83e072681
+"pkg-types@npm:^1.3.1":
+ version: 1.3.1
+ resolution: "pkg-types@npm:1.3.1"
+ dependencies:
+ confbox: "npm:^0.1.8"
+ mlly: "npm:^1.7.4"
+ pathe: "npm:^2.0.1"
+ checksum: 10c0/19e6cb8b66dcc66c89f2344aecfa47f2431c988cfa3366bdfdcfb1dd6695f87dcce37fbd90fe9d1605e2f4440b77f391e83c23255347c35cf84e7fd774d7fcea
+ languageName: node
+ linkType: hard
+
+"points-on-curve@npm:0.2.0, points-on-curve@npm:^0.2.0":
+ version: 0.2.0
+ resolution: "points-on-curve@npm:0.2.0"
+ checksum: 10c0/f0d92343fcc2ad1f48334633e580574c1e0e28038a756133e171e537f270d6d64203feada5ee556e36f448a1b46e0306dee07b30f589f4e3ad720f6ee38ef48c
+ languageName: node
+ linkType: hard
+
+"points-on-path@npm:^0.2.1":
+ version: 0.2.1
+ resolution: "points-on-path@npm:0.2.1"
+ dependencies:
+ path-data-parser: "npm:0.1.0"
+ points-on-curve: "npm:0.2.0"
+ checksum: 10c0/a7010340f9f196976f61838e767bb7b0b7f6273ab4fb9eb37c61001fe26fbfc3fcd63c96d5e85b9a4ab579213ab366f2ddaaf60e2a9253e2b91a62db33f395ba
languageName: node
linkType: hard
@@ -16867,7 +18797,7 @@ __metadata:
languageName: node
linkType: hard
-"prop-types@npm:^15.7.2, prop-types@npm:^15.8.1":
+"prop-types@npm:^15.7.2":
version: 15.8.1
resolution: "prop-types@npm:15.8.1"
dependencies:
@@ -16901,16 +18831,6 @@ __metadata:
languageName: node
linkType: hard
-"proxy-addr@npm:^2.0.7":
- version: 2.0.7
- resolution: "proxy-addr@npm:2.0.7"
- dependencies:
- forwarded: "npm:0.2.0"
- ipaddr.js: "npm:1.9.1"
- checksum: 10c0/c3eed999781a35f7fd935f398b6d8920b6fb00bbc14287bc6de78128ccc1a02c89b95b56742bf7cf0362cc333c61d138532049c7dedc7a328ef13343eff81210
- languageName: node
- linkType: hard
-
"psl@npm:^1.1.28":
version: 1.15.0
resolution: "psl@npm:1.15.0"
@@ -16957,7 +18877,7 @@ __metadata:
languageName: node
linkType: hard
-"qs@npm:^6.12.3, qs@npm:^6.14.0":
+"qs@npm:^6.12.3":
version: 6.14.0
resolution: "qs@npm:6.14.0"
dependencies:
@@ -16987,6 +18907,79 @@ __metadata:
languageName: node
linkType: hard
+"radix-ui@npm:^1.4.3":
+ version: 1.4.3
+ resolution: "radix-ui@npm:1.4.3"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.3"
+ "@radix-ui/react-accessible-icon": "npm:1.1.7"
+ "@radix-ui/react-accordion": "npm:1.2.12"
+ "@radix-ui/react-alert-dialog": "npm:1.1.15"
+ "@radix-ui/react-arrow": "npm:1.1.7"
+ "@radix-ui/react-aspect-ratio": "npm:1.1.7"
+ "@radix-ui/react-avatar": "npm:1.1.10"
+ "@radix-ui/react-checkbox": "npm:1.3.3"
+ "@radix-ui/react-collapsible": "npm:1.1.12"
+ "@radix-ui/react-collection": "npm:1.1.7"
+ "@radix-ui/react-compose-refs": "npm:1.1.2"
+ "@radix-ui/react-context": "npm:1.1.2"
+ "@radix-ui/react-context-menu": "npm:2.2.16"
+ "@radix-ui/react-dialog": "npm:1.1.15"
+ "@radix-ui/react-direction": "npm:1.1.1"
+ "@radix-ui/react-dismissable-layer": "npm:1.1.11"
+ "@radix-ui/react-dropdown-menu": "npm:2.1.16"
+ "@radix-ui/react-focus-guards": "npm:1.1.3"
+ "@radix-ui/react-focus-scope": "npm:1.1.7"
+ "@radix-ui/react-form": "npm:0.1.8"
+ "@radix-ui/react-hover-card": "npm:1.1.15"
+ "@radix-ui/react-label": "npm:2.1.7"
+ "@radix-ui/react-menu": "npm:2.1.16"
+ "@radix-ui/react-menubar": "npm:1.1.16"
+ "@radix-ui/react-navigation-menu": "npm:1.2.14"
+ "@radix-ui/react-one-time-password-field": "npm:0.1.8"
+ "@radix-ui/react-password-toggle-field": "npm:0.1.3"
+ "@radix-ui/react-popover": "npm:1.1.15"
+ "@radix-ui/react-popper": "npm:1.2.8"
+ "@radix-ui/react-portal": "npm:1.1.9"
+ "@radix-ui/react-presence": "npm:1.1.5"
+ "@radix-ui/react-primitive": "npm:2.1.3"
+ "@radix-ui/react-progress": "npm:1.1.7"
+ "@radix-ui/react-radio-group": "npm:1.3.8"
+ "@radix-ui/react-roving-focus": "npm:1.1.11"
+ "@radix-ui/react-scroll-area": "npm:1.2.10"
+ "@radix-ui/react-select": "npm:2.2.6"
+ "@radix-ui/react-separator": "npm:1.1.7"
+ "@radix-ui/react-slider": "npm:1.3.6"
+ "@radix-ui/react-slot": "npm:1.2.3"
+ "@radix-ui/react-switch": "npm:1.2.6"
+ "@radix-ui/react-tabs": "npm:1.1.13"
+ "@radix-ui/react-toast": "npm:1.2.15"
+ "@radix-ui/react-toggle": "npm:1.1.10"
+ "@radix-ui/react-toggle-group": "npm:1.1.11"
+ "@radix-ui/react-toolbar": "npm:1.1.11"
+ "@radix-ui/react-tooltip": "npm:1.2.8"
+ "@radix-ui/react-use-callback-ref": "npm:1.1.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.2.2"
+ "@radix-ui/react-use-effect-event": "npm:0.0.2"
+ "@radix-ui/react-use-escape-keydown": "npm:1.1.1"
+ "@radix-ui/react-use-is-hydrated": "npm:0.1.0"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.1"
+ "@radix-ui/react-use-size": "npm:1.1.1"
+ "@radix-ui/react-visually-hidden": "npm:1.2.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/6f227ece95a4804e85627bd20cb8c7f244ac38cead34f941210a9a9d1adc02c793850c6339b39db94ac0d57e30e95e6f7bbba2bfce951e98a91c88376a6e7da7
+ languageName: node
+ linkType: hard
+
"randomatic@npm:^3.0.0":
version: 3.1.1
resolution: "randomatic@npm:3.1.1"
@@ -17024,25 +19017,6 @@ __metadata:
languageName: node
linkType: hard
-"range-parser@npm:^1.2.1":
- version: 1.2.1
- resolution: "range-parser@npm:1.2.1"
- checksum: 10c0/96c032ac2475c8027b7a4e9fe22dc0dfe0f6d90b85e496e0f016fbdb99d6d066de0112e680805075bd989905e2123b3b3d002765149294dce0c1f7f01fcc2ea0
- languageName: node
- linkType: hard
-
-"raw-body@npm:^3.0.0":
- version: 3.0.1
- resolution: "raw-body@npm:3.0.1"
- dependencies:
- bytes: "npm:3.1.2"
- http-errors: "npm:2.0.0"
- iconv-lite: "npm:0.7.0"
- unpipe: "npm:1.0.0"
- checksum: 10c0/892f4fbd21ecab7e2fed0f045f7af9e16df7e8050879639d4e482784a2f4640aaaa33d916a0e98013f23acb82e09c2e3c57f84ab97104449f728d22f65a7d79a
- languageName: node
- linkType: hard
-
"rc@npm:^1.0.1, rc@npm:^1.1.6":
version: 1.2.8
resolution: "rc@npm:1.2.8"
@@ -17078,22 +19052,6 @@ __metadata:
languageName: node
linkType: hard
-"react-floater@npm:^0.7.9":
- version: 0.7.9
- resolution: "react-floater@npm:0.7.9"
- dependencies:
- deepmerge: "npm:^4.3.1"
- is-lite: "npm:^0.8.2"
- popper.js: "npm:^1.16.0"
- prop-types: "npm:^15.8.1"
- tree-changes: "npm:^0.9.1"
- peerDependencies:
- react: 15 - 18
- react-dom: 15 - 18
- checksum: 10c0/3fa58e968a405fb95a004897ed19c87b4991e52ebd45d837b8577eb9175ddc1dfab223bb653a0fa73ffc22fc2b2a30f2d07e924f41f41a040299793e4d2decd4
- languageName: node
- linkType: hard
-
"react-i18next@npm:15.5.1":
version: 15.5.1
resolution: "react-i18next@npm:15.5.1"
@@ -17115,16 +19073,6 @@ __metadata:
languageName: node
linkType: hard
-"react-innertext@npm:^1.1.5":
- version: 1.1.5
- resolution: "react-innertext@npm:1.1.5"
- peerDependencies:
- "@types/react": ">=0.0.0 <=99"
- react: ">=0.0.0 <=99"
- checksum: 10c0/45335918ac83334133a9fa0df4ce109e0d4a45d54b783a8eaec88811b36dd5c3bbb5d9a6af2da1eed518a6f325a6ffae4be7bd30878596e0ec1760b231a8e0ee
- languageName: node
- linkType: hard
-
"react-is@npm:^16.13.1":
version: 16.13.1
resolution: "react-is@npm:16.13.1"
@@ -17139,28 +19087,6 @@ __metadata:
languageName: node
linkType: hard
-"react-joyride@npm:2.9.3":
- version: 2.9.3
- resolution: "react-joyride@npm:2.9.3"
- dependencies:
- "@gilbarbara/deep-equal": "npm:^0.3.1"
- deep-diff: "npm:^1.0.2"
- deepmerge: "npm:^4.3.1"
- is-lite: "npm:^1.2.1"
- react-floater: "npm:^0.7.9"
- react-innertext: "npm:^1.1.5"
- react-is: "npm:^16.13.1"
- scroll: "npm:^3.0.1"
- scrollparent: "npm:^2.1.0"
- tree-changes: "npm:^0.11.2"
- type-fest: "npm:^4.27.0"
- peerDependencies:
- react: 15 - 18
- react-dom: 15 - 18
- checksum: 10c0/8045ef1cc14e1d48aebf46f9ecff43c1aecb6eacf3310f533844c5bf7b4d6390cdbed5f43424bb4d19c6a3351ca8d150d0a0e0c5c5e99138b70d52830276d554
- languageName: node
- linkType: hard
-
"react-lifecycles-compat@npm:^3.0.4":
version: 3.0.4
resolution: "react-lifecycles-compat@npm:3.0.4"
@@ -17413,6 +19339,19 @@ __metadata:
languageName: node
linkType: hard
+"recast@npm:^0.23.11":
+ version: 0.23.11
+ resolution: "recast@npm:0.23.11"
+ dependencies:
+ ast-types: "npm:^0.16.1"
+ esprima: "npm:~4.0.0"
+ source-map: "npm:~0.6.1"
+ tiny-invariant: "npm:^1.3.3"
+ tslib: "npm:^2.0.1"
+ checksum: 10c0/45b520a8f0868a5a24ecde495be9de3c48e69a54295d82a7331106554b75cfba75d16c909959d056e9ceed47a1be5e061e2db8b9ecbcd6ba44c2f3ef9a47bd18
+ languageName: node
+ linkType: hard
+
"redent@npm:^3.0.0":
version: 3.0.0
resolution: "redent@npm:3.0.0"
@@ -17511,6 +19450,31 @@ __metadata:
languageName: node
linkType: hard
+"regex-recursion@npm:^6.0.2":
+ version: 6.0.2
+ resolution: "regex-recursion@npm:6.0.2"
+ dependencies:
+ regex-utilities: "npm:^2.3.0"
+ checksum: 10c0/68e8b6889680e904b75d7f26edaf70a1a4dc1087406bff53face4c2929d918fd77c72223843fe816ac8ed9964f96b4160650e8d5909e26a998c6e9de324dadb1
+ languageName: node
+ linkType: hard
+
+"regex-utilities@npm:^2.3.0":
+ version: 2.3.0
+ resolution: "regex-utilities@npm:2.3.0"
+ checksum: 10c0/78c550a80a0af75223244fff006743922591bd8f61d91fef7c86b9b56cf9bbf8ee5d7adb6d8991b5e304c57c90103fc4818cf1e357b11c6c669b782839bd7893
+ languageName: node
+ linkType: hard
+
+"regex@npm:^6.0.1":
+ version: 6.1.0
+ resolution: "regex@npm:6.1.0"
+ dependencies:
+ regex-utilities: "npm:^2.3.0"
+ checksum: 10c0/6e0ee2a1c17d5a66dc1120dfc51899dedf6677857e83a0df4d5a822ebb8645a54a079772efc1ade382b67aad35e4e22b5bd2d33c05ed28b0e000f8f57eb0aec1
+ languageName: node
+ linkType: hard
+
"regexp.prototype.flags@npm:^1.5.3, regexp.prototype.flags@npm:^1.5.4":
version: 1.5.4
resolution: "regexp.prototype.flags@npm:1.5.4"
@@ -17576,7 +19540,16 @@ __metadata:
languageName: node
linkType: hard
-"rehype-katex@npm:7.0.1":
+"rehype-harden@npm:^1.1.7":
+ version: 1.1.8
+ resolution: "rehype-harden@npm:1.1.8"
+ dependencies:
+ unist-util-visit: "npm:^5.0.0"
+ checksum: 10c0/cdd03394f0b3f652af389f816e53d4799b46899d4745b07c9972a2a4ab6d85468370b6881149e52fca0656fee78cdb8317e103fcfdd4879c251edaa7a48b2209
+ languageName: node
+ linkType: hard
+
+"rehype-katex@npm:7.0.1, rehype-katex@npm:^7.0.1":
version: 7.0.1
resolution: "rehype-katex@npm:7.0.1"
dependencies:
@@ -17616,7 +19589,7 @@ __metadata:
languageName: node
linkType: hard
-"rehype-raw@npm:7.0.0":
+"rehype-raw@npm:7.0.0, rehype-raw@npm:^7.0.0":
version: 7.0.0
resolution: "rehype-raw@npm:7.0.0"
dependencies:
@@ -17627,6 +19600,16 @@ __metadata:
languageName: node
linkType: hard
+"rehype-sanitize@npm:^6.0.0":
+ version: 6.0.0
+ resolution: "rehype-sanitize@npm:6.0.0"
+ dependencies:
+ "@types/hast": "npm:^3.0.0"
+ hast-util-sanitize: "npm:^5.0.0"
+ checksum: 10c0/43d6c056e63c994cf56e5ee0e157052d2030dc5ac160845ee494af9a26e5906bf5ec5af56c7d90c99f9c4dc0091e45a48a168618135fb6c64a76481ad3c449e9
+ languageName: node
+ linkType: hard
+
"rehype-stringify@npm:^10.0.0":
version: 10.0.1
resolution: "rehype-stringify@npm:10.0.1"
@@ -17661,6 +19644,36 @@ __metadata:
languageName: node
linkType: hard
+"remark-cjk-friendly-gfm-strikethrough@npm:^1.2.3":
+ version: 1.2.3
+ resolution: "remark-cjk-friendly-gfm-strikethrough@npm:1.2.3"
+ dependencies:
+ micromark-extension-cjk-friendly-gfm-strikethrough: "npm:1.2.3"
+ peerDependencies:
+ "@types/mdast": ^4.0.0
+ unified: ^11.0.0
+ peerDependenciesMeta:
+ "@types/mdast":
+ optional: true
+ checksum: 10c0/29f4c682ede7ebc8a1e1a09f900a81bff5a535a154c5f87c909e6faaa92b80427988c09976e6116297147f1e6655cff997dcd1ce8dbc6fe0aff5a42a75d39908
+ languageName: node
+ linkType: hard
+
+"remark-cjk-friendly@npm:^1.2.3":
+ version: 1.2.3
+ resolution: "remark-cjk-friendly@npm:1.2.3"
+ dependencies:
+ micromark-extension-cjk-friendly: "npm:1.2.3"
+ peerDependencies:
+ "@types/mdast": ^4.0.0
+ unified: ^11.0.0
+ peerDependenciesMeta:
+ "@types/mdast":
+ optional: true
+ checksum: 10c0/6e665d4330d7b6f22a0f05291da58c57fb9e6cd1d86367f2cdef8f7c023288a74e36f9730717ec83641ecbf74eb51ffe214e862f060428113a3c729f2b48dade
+ languageName: node
+ linkType: hard
+
"remark-emoji@npm:5.0.1":
version: 5.0.1
resolution: "remark-emoji@npm:5.0.1"
@@ -17674,7 +19687,7 @@ __metadata:
languageName: node
linkType: hard
-"remark-gfm@npm:4.0.1":
+"remark-gfm@npm:4.0.1, remark-gfm@npm:^4.0.1":
version: 4.0.1
resolution: "remark-gfm@npm:4.0.1"
dependencies:
@@ -17688,7 +19701,7 @@ __metadata:
languageName: node
linkType: hard
-"remark-math@npm:6.0.0":
+"remark-math@npm:6.0.0, remark-math@npm:^6.0.0":
version: 6.0.0
resolution: "remark-math@npm:6.0.0"
dependencies:
@@ -17712,7 +19725,7 @@ __metadata:
languageName: node
linkType: hard
-"remark-rehype@npm:^11.0.0":
+"remark-rehype@npm:^11.0.0, remark-rehype@npm:^11.1.2":
version: 11.1.2
resolution: "remark-rehype@npm:11.1.2"
dependencies:
@@ -17923,6 +19936,13 @@ __metadata:
languageName: node
linkType: hard
+"robust-predicates@npm:^3.0.2":
+ version: 3.0.2
+ resolution: "robust-predicates@npm:3.0.2"
+ checksum: 10c0/4ecd53649f1c2d49529c85518f2fa69ffb2f7a4453f7fd19c042421c7b4d76c3efb48bc1c740c8f7049346d7cb58cf08ee0c9adaae595cc23564d360adb1fde4
+ languageName: node
+ linkType: hard
+
"rolldown@npm:1.0.0-beta.1":
version: 1.0.0-beta.1
resolution: "rolldown@npm:1.0.0-beta.1"
@@ -18143,16 +20163,15 @@ __metadata:
languageName: node
linkType: hard
-"router@npm:^2.2.0":
- version: 2.2.0
- resolution: "router@npm:2.2.0"
+"roughjs@npm:^4.6.6":
+ version: 4.6.6
+ resolution: "roughjs@npm:4.6.6"
dependencies:
- debug: "npm:^4.4.0"
- depd: "npm:^2.0.0"
- is-promise: "npm:^4.0.0"
- parseurl: "npm:^1.3.3"
- path-to-regexp: "npm:^8.0.0"
- checksum: 10c0/3279de7450c8eae2f6e095e9edacbdeec0abb5cb7249c6e719faa0db2dba43574b4fff5892d9220631c9abaff52dd3cad648cfea2aaace845e1a071915ac8867
+ hachure-fill: "npm:^0.5.2"
+ path-data-parser: "npm:^0.1.0"
+ points-on-curve: "npm:^0.2.0"
+ points-on-path: "npm:^0.2.1"
+ checksum: 10c0/68c11bf4516aa014cef2fe52426a9bab237c2f500d13e1a4f13b523cb5723667bf2d92b9619325efdc5bc2a193588ff5af8d51683df17cfb8720e96fe2b92b0c
languageName: node
linkType: hard
@@ -18182,6 +20201,13 @@ __metadata:
languageName: node
linkType: hard
+"rw@npm:1":
+ version: 1.3.3
+ resolution: "rw@npm:1.3.3"
+ checksum: 10c0/b1e1ef37d1e79d9dc7050787866e30b6ddcb2625149276045c262c6b4d53075ddc35f387a856a8e76f0d0df59f4cd58fe24707e40797ebee66e542b840ed6a53
+ languageName: node
+ linkType: hard
+
"rxjs@npm:^7.8.1":
version: 7.8.2
resolution: "rxjs@npm:7.8.2"
@@ -18271,20 +20297,6 @@ __metadata:
languageName: node
linkType: hard
-"scroll@npm:^3.0.1":
- version: 3.0.1
- resolution: "scroll@npm:3.0.1"
- checksum: 10c0/5b0c98089be0edb43444c7604a4866a0a4c457ac6c3c559b23b9c19e48bb9f977a5876bfeba8e567740b70c05dab75a01cef1a935faf47fdb6a505b538b413ed
- languageName: node
- linkType: hard
-
-"scrollparent@npm:^2.1.0":
- version: 2.1.0
- resolution: "scrollparent@npm:2.1.0"
- checksum: 10c0/b377ec5a461f6ed8021f0c3c6b0c76317341c33838f047e91387cdfe0ba4c28aa2a3855240458f9bcf1e18e6c8718540075eb1215fc094496300114f295b2e6b
- languageName: node
- linkType: hard
-
"semver@npm:^5.6.0":
version: 5.7.2
resolution: "semver@npm:5.7.2"
@@ -18312,25 +20324,6 @@ __metadata:
languageName: node
linkType: hard
-"send@npm:^1.1.0, send@npm:^1.2.0":
- version: 1.2.0
- resolution: "send@npm:1.2.0"
- dependencies:
- debug: "npm:^4.3.5"
- encodeurl: "npm:^2.0.0"
- escape-html: "npm:^1.0.3"
- etag: "npm:^1.8.1"
- fresh: "npm:^2.0.0"
- http-errors: "npm:^2.0.0"
- mime-types: "npm:^3.0.1"
- ms: "npm:^2.1.3"
- on-finished: "npm:^2.4.1"
- range-parser: "npm:^1.2.1"
- statuses: "npm:^2.0.1"
- checksum: 10c0/531bcfb5616948d3468d95a1fd0adaeb0c20818ba4a500f439b800ca2117971489e02074ce32796fd64a6772ea3e7235fe0583d8241dbd37a053dc3378eff9a5
- languageName: node
- linkType: hard
-
"serialize-javascript@npm:^6.0.1":
version: 6.0.2
resolution: "serialize-javascript@npm:6.0.2"
@@ -18349,6 +20342,15 @@ __metadata:
languageName: node
linkType: hard
+"seroval-plugins@npm:^1.4.2":
+ version: 1.5.0
+ resolution: "seroval-plugins@npm:1.5.0"
+ peerDependencies:
+ seroval: ^1.0
+ checksum: 10c0/a70636d35e0644e37efad37963e6d41ae9e4a02fbf1b57c89dbe4d62122908039e8a0fda1720b8a56aea93741735b2028ada6d3d50c1d40bbb67661f0de92042
+ languageName: node
+ linkType: hard
+
"seroval-plugins@npm:~1.3.0":
version: 1.3.3
resolution: "seroval-plugins@npm:1.3.3"
@@ -18365,6 +20367,13 @@ __metadata:
languageName: node
linkType: hard
+"seroval@npm:^1.4.2":
+ version: 1.5.0
+ resolution: "seroval@npm:1.5.0"
+ checksum: 10c0/aff16b14a7145388555cefd4ebd41759024ee1c2c064080fd8d4fabea4b7c89d103155cd98f5109523b8878e577da73cc6cd8abf98965f2d1f0ba19dc38317ab
+ languageName: node
+ linkType: hard
+
"seroval@npm:~1.3.0":
version: 1.3.2
resolution: "seroval@npm:1.3.2"
@@ -18387,18 +20396,6 @@ __metadata:
languageName: node
linkType: hard
-"serve-static@npm:^2.2.0":
- version: 2.2.0
- resolution: "serve-static@npm:2.2.0"
- dependencies:
- encodeurl: "npm:^2.0.0"
- escape-html: "npm:^1.0.3"
- parseurl: "npm:^1.3.3"
- send: "npm:^1.2.0"
- checksum: 10c0/30e2ed1dbff1984836cfd0c65abf5d3f3f83bcd696c99d2d3c97edbd4e2a3ff4d3f87108a7d713640d290a7b6fe6c15ddcbc61165ab2eaad48ea8d3b52c7f913
- languageName: node
- linkType: hard
-
"serve@npm:14.2.5":
version: 14.2.5
resolution: "serve@npm:14.2.5"
@@ -18476,13 +20473,6 @@ __metadata:
languageName: node
linkType: hard
-"setprototypeof@npm:1.2.0":
- version: 1.2.0
- resolution: "setprototypeof@npm:1.2.0"
- checksum: 10c0/68733173026766fa0d9ecaeb07f0483f4c2dc70ca376b3b7c40b7cda909f94b0918f6c5ad5ce27a9160bdfb475efaa9d5e705a11d8eaae18f9835d20976028bc
- languageName: node
- linkType: hard
-
"sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8":
version: 2.4.12
resolution: "sha.js@npm:2.4.12"
@@ -18519,6 +20509,22 @@ __metadata:
languageName: node
linkType: hard
+"shiki@npm:^3.19.0":
+ version: 3.22.0
+ resolution: "shiki@npm:3.22.0"
+ dependencies:
+ "@shikijs/core": "npm:3.22.0"
+ "@shikijs/engine-javascript": "npm:3.22.0"
+ "@shikijs/engine-oniguruma": "npm:3.22.0"
+ "@shikijs/langs": "npm:3.22.0"
+ "@shikijs/themes": "npm:3.22.0"
+ "@shikijs/types": "npm:3.22.0"
+ "@shikijs/vscode-textmate": "npm:^10.0.2"
+ "@types/hast": "npm:^3.0.4"
+ checksum: 10c0/a7c91d769b42a69c496848197d876ec4577f789d1e7e3b5c18136a289f1dcac805bf24d56e43abb48be9c7cc6767c0f70eb2e2f33f77f4f5377141fb6851e840
+ languageName: node
+ linkType: hard
+
"side-channel-list@npm:^1.0.0":
version: 1.0.0
resolution: "side-channel-list@npm:1.0.0"
@@ -18728,6 +20734,16 @@ __metadata:
languageName: node
linkType: hard
+"sonner@npm:^2.0.7":
+ version: 2.0.7
+ resolution: "sonner@npm:2.0.7"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ checksum: 10c0/6966ab5e892ed6aab579a175e4a24f3b48747f0fc21cb68c3e33cb41caa7a0eebeb098c210545395e47a18d585eb8734ae7dd12d2bd18c8a3294a1ee73f997d9
+ languageName: node
+ linkType: hard
+
"source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1":
version: 1.2.1
resolution: "source-map-js@npm:1.2.1"
@@ -18772,13 +20788,20 @@ __metadata:
languageName: node
linkType: hard
-"source-map@npm:^0.6.0, source-map@npm:^0.6.1":
+"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1":
version: 0.6.1
resolution: "source-map@npm:0.6.1"
checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011
languageName: node
linkType: hard
+"source-map@npm:^0.7.4":
+ version: 0.7.6
+ resolution: "source-map@npm:0.7.6"
+ checksum: 10c0/59f6f05538539b274ba771d2e9e32f6c65451982510564438e048bc1352f019c6efcdc6dd07909b1968144941c14015c2c7d4369fb7c4d7d53ae769716dcc16c
+ languageName: node
+ linkType: hard
+
"source-map@npm:^0.8.0-beta.0":
version: 0.8.0-beta.0
resolution: "source-map@npm:0.8.0-beta.0"
@@ -18915,20 +20938,6 @@ __metadata:
languageName: node
linkType: hard
-"statuses@npm:2.0.1":
- version: 2.0.1
- resolution: "statuses@npm:2.0.1"
- checksum: 10c0/34378b207a1620a24804ce8b5d230fea0c279f00b18a7209646d5d47e419d1cc23e7cbf33a25a1e51ac38973dc2ac2e1e9c647a8e481ef365f77668d72becfd0
- languageName: node
- linkType: hard
-
-"statuses@npm:^2.0.1":
- version: 2.0.2
- resolution: "statuses@npm:2.0.2"
- checksum: 10c0/a9947d98ad60d01f6b26727570f3bcceb6c8fa789da64fe6889908fe2e294d57503b14bf2b5af7605c2d36647259e856635cd4c49eab41667658ec9d0080ec3f
- languageName: node
- linkType: hard
-
"std-env@npm:^3.8.0, std-env@npm:^3.9.0":
version: 3.9.0
resolution: "std-env@npm:3.9.0"
@@ -18968,6 +20977,64 @@ __metadata:
languageName: node
linkType: hard
+"streamdown@npm:@janhq/streamdown@^1.1.6":
+ version: 1.1.6
+ resolution: "@janhq/streamdown@npm:1.1.6"
+ dependencies:
+ "@janhq/remend": "npm:^1.0.1"
+ clsx: "npm:^2.1.1"
+ hast: "npm:^1.0.0"
+ hast-util-to-jsx-runtime: "npm:^2.3.6"
+ html-url-attributes: "npm:^3.0.1"
+ lucide-react: "npm:^0.560.0"
+ marked: "npm:^17.0.1"
+ mermaid: "npm:^11.12.2"
+ rehype-harden: "npm:^1.1.7"
+ rehype-katex: "npm:^7.0.1"
+ rehype-raw: "npm:^7.0.0"
+ rehype-sanitize: "npm:^6.0.0"
+ remark-cjk-friendly: "npm:^1.2.3"
+ remark-cjk-friendly-gfm-strikethrough: "npm:^1.2.3"
+ remark-gfm: "npm:^4.0.1"
+ remark-math: "npm:^6.0.0"
+ remark-parse: "npm:^11.0.0"
+ remark-rehype: "npm:^11.1.2"
+ shiki: "npm:^3.19.0"
+ tailwind-merge: "npm:^3.4.0"
+ unified: "npm:^11.0.5"
+ unist-util-visit: "npm:^5.0.0"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/07b6d0b420672e7019b3dd3c07c5b12ac2570dea0bfa3346f5570a3b24d2d8e62400ab219056dc883f0166ff11c8bed6dffa6bf763ebe99901fa4d467b222df7
+ languageName: node
+ linkType: hard
+
+"streamdown@npm:@janhq/streamdown@^2.1.1":
+ version: 2.1.1
+ resolution: "@janhq/streamdown@npm:2.1.1"
+ dependencies:
+ "@janhq/remend": "npm:@janhq/remend@^1.1.0"
+ clsx: "npm:^2.1.1"
+ hast-util-to-jsx-runtime: "npm:^2.3.6"
+ html-url-attributes: "npm:^3.0.1"
+ marked: "npm:^17.0.1"
+ rehype-harden: "npm:^1.1.7"
+ rehype-raw: "npm:^7.0.0"
+ rehype-sanitize: "npm:^6.0.0"
+ remark-gfm: "npm:^4.0.1"
+ remark-math: "npm:^6.0.0"
+ remark-parse: "npm:^11.0.0"
+ remark-rehype: "npm:^11.1.2"
+ shiki: "npm:^3.19.0"
+ tailwind-merge: "npm:^3.4.0"
+ unified: "npm:^11.0.5"
+ unist-util-visit: "npm:^5.0.0"
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ checksum: 10c0/320f71b5b3561be1a6022b1b0bcc6e1e7e387595b7c16c0b606cd6dc484a7868666b4876adae92e0020a6d5f1a0fbf07db1163d2ee7e149bdace69fc6a207ff3
+ languageName: node
+ linkType: hard
+
"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0":
version: 4.2.3
resolution: "string-width@npm:4.2.3"
@@ -19191,6 +21258,13 @@ __metadata:
languageName: node
linkType: hard
+"stylis@npm:^4.3.6":
+ version: 4.3.6
+ resolution: "stylis@npm:4.3.6"
+ checksum: 10c0/e736d484983a34f7c65d362c67dc79b7bce388054b261c2b7b23d02eaaf280617033f65d44b1ea341854f4331a5074b885668ac8741f98c13a6cfd6443ae85d0
+ languageName: node
+ linkType: hard
+
"subarg@npm:^1.0.0":
version: 1.0.0
resolution: "subarg@npm:1.0.0"
@@ -19225,6 +21299,18 @@ __metadata:
languageName: node
linkType: hard
+"swr@npm:^2.2.5":
+ version: 2.4.0
+ resolution: "swr@npm:2.4.0"
+ dependencies:
+ dequal: "npm:^2.0.3"
+ use-sync-external-store: "npm:^1.6.0"
+ peerDependencies:
+ react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ checksum: 10c0/176097e737ac79c94ab9ff73f18f3eed104a07cb32ec2f92f8e6deaa7ce2c8227dda8391eed116a7e29b7c379460ccd2f16605bd64ea538df1c610ba54bc52e7
+ languageName: node
+ linkType: hard
+
"symbol-tree@npm:^3.2.4":
version: 3.2.4
resolution: "symbol-tree@npm:3.2.4"
@@ -19239,6 +21325,20 @@ __metadata:
languageName: node
linkType: hard
+"tailwind-merge@npm:^3.4.0":
+ version: 3.5.0
+ resolution: "tailwind-merge@npm:3.5.0"
+ checksum: 10c0/4dc588f5b5296ba3f38e1ebb41f02b6d24a8c5bb45e44b33748c118fb4b5767dd0efc464431ca3e75404056b618b5f67bec3708158baa65fed8a2fc9201e0c53
+ languageName: node
+ linkType: hard
+
+"tailwindcss@npm:4.1.17":
+ version: 4.1.17
+ resolution: "tailwindcss@npm:4.1.17"
+ checksum: 10c0/1fecf618ba9895e068e5a6d842b978f56a815bc849a28338cebbcb07b13df763715c2f8848def938403c73d59f08ffff33a4b83a977a9e38fa56adc60d1d56c8
+ languageName: node
+ linkType: hard
+
"tailwindcss@npm:4.1.4":
version: 4.1.4
resolution: "tailwindcss@npm:4.1.4"
@@ -19347,6 +21447,13 @@ __metadata:
languageName: node
linkType: hard
+"throttleit@npm:2.1.0":
+ version: 2.1.0
+ resolution: "throttleit@npm:2.1.0"
+ checksum: 10c0/1696ae849522cea6ba4f4f3beac1f6655d335e51b42d99215e196a718adced0069e48deaaf77f7e89f526ab31de5b5c91016027da182438e6f9280be2f3d5265
+ languageName: node
+ linkType: hard
+
"throttleit@npm:^1.0.0":
version: 1.0.1
resolution: "throttleit@npm:1.0.1"
@@ -19391,6 +21498,13 @@ __metadata:
languageName: node
linkType: hard
+"tinyexec@npm:^1.0.1":
+ version: 1.0.2
+ resolution: "tinyexec@npm:1.0.2"
+ checksum: 10c0/1261a8e34c9b539a9aae3b7f0bb5372045ff28ee1eba035a2a059e532198fe1a182ec61ac60fa0b4a4129f0c4c4b1d2d57355b5cb9aa2d17ac9454ecace502ee
+ languageName: node
+ linkType: hard
+
"tinyglobby@npm:^0.2.10, tinyglobby@npm:^0.2.15":
version: 0.2.15
resolution: "tinyglobby@npm:0.2.15"
@@ -19525,13 +21639,6 @@ __metadata:
languageName: node
linkType: hard
-"toidentifier@npm:1.0.1":
- version: 1.0.1
- resolution: "toidentifier@npm:1.0.1"
- checksum: 10c0/93937279934bd66cc3270016dd8d0afec14fb7c94a05c72dc57321f8bd1fa97e5bea6d1f7c89e728d077ca31ea125b78320a616a6c6cd0e6b9cb94cb864381c1
- languageName: node
- linkType: hard
-
"token.js@npm:[email protected]":
version: 0.7.31
resolution: "token.js-fork@npm:0.7.31"
@@ -19600,26 +21707,6 @@ __metadata:
languageName: node
linkType: hard
-"tree-changes@npm:^0.11.2":
- version: 0.11.3
- resolution: "tree-changes@npm:0.11.3"
- dependencies:
- "@gilbarbara/deep-equal": "npm:^0.3.1"
- is-lite: "npm:^1.2.1"
- checksum: 10c0/4479a54fb1589a0963a29e17959a6d13c5f60f962032bf23e84111b34d367d0abb56c6c17c5511a95aade7274b25eacccb651d1d88c6606151e6fdcd2e185feb
- languageName: node
- linkType: hard
-
-"tree-changes@npm:^0.9.1":
- version: 0.9.3
- resolution: "tree-changes@npm:0.9.3"
- dependencies:
- "@gilbarbara/deep-equal": "npm:^0.1.1"
- is-lite: "npm:^0.8.2"
- checksum: 10c0/e7a38ed3c22ed1195a78e800a8f08a01d44cd8f4abac421b2be6ae34f991dfbd60ce4235be4e002882f3debef95b8e0f7e027b3b758325e9b4bda905c34d3d8f
- languageName: node
- linkType: hard
-
"treeverse@npm:^3.0.0":
version: 3.0.0
resolution: "treeverse@npm:3.0.0"
@@ -19650,6 +21737,13 @@ __metadata:
languageName: node
linkType: hard
+"ts-dedent@npm:^2.2.0":
+ version: 2.2.0
+ resolution: "ts-dedent@npm:2.2.0"
+ checksum: 10c0/175adea838468cc2ff7d5e97f970dcb798bbcb623f29c6088cb21aa2880d207c5784be81ab1741f56b9ac37840cbaba0c0d79f7f8b67ffe61c02634cafa5c303
+ languageName: node
+ linkType: hard
+
"tslib@npm:^1.11.1":
version: 1.14.1
resolution: "tslib@npm:1.14.1"
@@ -19657,7 +21751,7 @@ __metadata:
languageName: node
linkType: hard
-"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.2, tslib@npm:^2.8.0":
+"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.2, tslib@npm:^2.8.0":
version: 2.8.1
resolution: "tslib@npm:2.8.1"
checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62
@@ -19762,24 +21856,6 @@ __metadata:
languageName: node
linkType: hard
-"type-fest@npm:^4.27.0":
- version: 4.41.0
- resolution: "type-fest@npm:4.41.0"
- checksum: 10c0/f5ca697797ed5e88d33ac8f1fec21921839871f808dc59345c9cf67345bfb958ce41bd821165dbf3ae591cedec2bf6fe8882098dfdd8dc54320b859711a2c1e4
- languageName: node
- linkType: hard
-
-"type-is@npm:^2.0.0, type-is@npm:^2.0.1":
- version: 2.0.1
- resolution: "type-is@npm:2.0.1"
- dependencies:
- content-type: "npm:^1.0.5"
- media-typer: "npm:^1.1.0"
- mime-types: "npm:^3.0.0"
- checksum: 10c0/7f7ec0a060b16880bdad36824ab37c26019454b67d73e8a465ed5a3587440fbe158bc765f0da68344498235c877e7dbbb1600beccc94628ed05599d667951b99
- languageName: node
- linkType: hard
-
"typed-array-buffer@npm:^1.0.3":
version: 1.0.3
resolution: "typed-array-buffer@npm:1.0.3"
@@ -19887,6 +21963,13 @@ __metadata:
languageName: node
linkType: hard
+"ufo@npm:^1.6.1":
+ version: 1.6.3
+ resolution: "ufo@npm:1.6.3"
+ checksum: 10c0/bf0e4ebff99e54da1b9c7182ac2f40475988b41faa881d579bc97bc2a0509672107b0a0e94c4b8d31a0ab8c4bf07f4aa0b469ac6da8536d56bda5b085ea2e953
+ languageName: node
+ linkType: hard
+
"ulidx@npm:2.4.1, ulidx@npm:^2.3.0":
version: 2.4.1
resolution: "ulidx@npm:2.4.1"
@@ -19967,7 +22050,7 @@ __metadata:
languageName: node
linkType: hard
-"unified@npm:11.0.5, unified@npm:^11.0.0, unified@npm:^11.0.4":
+"unified@npm:11.0.5, unified@npm:^11.0.0, unified@npm:^11.0.4, unified@npm:^11.0.5":
version: 11.0.5
resolution: "unified@npm:11.0.5"
dependencies:
@@ -20125,13 +22208,6 @@ __metadata:
languageName: node
linkType: hard
-"unpipe@npm:1.0.0":
- version: 1.0.0
- resolution: "unpipe@npm:1.0.0"
- checksum: 10c0/193400255bd48968e5c5383730344fbb4fa114cdedfab26e329e50dd2d81b134244bb8a72c6ac1b10ab0281a58b363d06405632c9d49ca9dfd5e90cbd7d0f32c
- languageName: node
- linkType: hard
-
"unplugin@npm:^2.1.2":
version: 2.3.10
resolution: "unplugin@npm:2.3.10"
@@ -20300,6 +22376,15 @@ __metadata:
languageName: node
linkType: hard
+"use-stick-to-bottom@npm:^1.0.48, use-stick-to-bottom@npm:^1.1.1":
+ version: 1.1.3
+ resolution: "use-stick-to-bottom@npm:1.1.3"
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ checksum: 10c0/60408d47b4ddac959a8f170fe9806cdea94fd8a51d3b58cbcce6246ef9babde56d1a5f1a14cb12f474d351430145464992aaac008178924c60191b6c61954bf7
+ languageName: node
+ linkType: hard
+
"use-sync-external-store@npm:^1.5.0":
version: 1.5.0
resolution: "use-sync-external-store@npm:1.5.0"
@@ -20345,7 +22430,7 @@ __metadata:
languageName: node
linkType: hard
-"uuid@npm:11.1.0":
+"uuid@npm:11.1.0, uuid@npm:^11.1.0":
version: 11.1.0
resolution: "uuid@npm:11.1.0"
bin:
@@ -20396,14 +22481,14 @@ __metadata:
languageName: node
linkType: hard
-"vary@npm:^1, vary@npm:^1.1.2, vary@npm:~1.1.2":
+"vary@npm:~1.1.2":
version: 1.1.2
resolution: "vary@npm:1.1.2"
checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f
languageName: node
linkType: hard
-"vaul@npm:1.1.2":
+"vaul@npm:^1.1.2":
version: 1.1.2
resolution: "vaul@npm:1.1.2"
dependencies:
@@ -20519,29 +22604,37 @@ __metadata:
languageName: node
linkType: hard
-"vite@npm:5.4.20, vite@npm:^5.0.0":
- version: 5.4.20
- resolution: "vite@npm:5.4.20"
+"vite@npm:6.3.2":
+ version: 6.3.2
+ resolution: "vite@npm:6.3.2"
dependencies:
- esbuild: "npm:^0.21.3"
+ esbuild: "npm:^0.25.0"
+ fdir: "npm:^6.4.3"
fsevents: "npm:~2.3.3"
- postcss: "npm:^8.4.43"
- rollup: "npm:^4.20.0"
+ picomatch: "npm:^4.0.2"
+ postcss: "npm:^8.5.3"
+ rollup: "npm:^4.34.9"
+ tinyglobby: "npm:^0.2.12"
peerDependencies:
- "@types/node": ^18.0.0 || >=20.0.0
+ "@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.4.0
+ terser: ^5.16.0
+ tsx: ^4.8.1
+ yaml: ^2.4.2
dependenciesMeta:
fsevents:
optional: true
peerDependenciesMeta:
"@types/node":
optional: true
+ jiti:
+ optional: true
less:
optional: true
lightningcss:
@@ -20556,43 +22649,39 @@ __metadata:
optional: true
terser:
optional: true
+ tsx:
+ optional: true
+ yaml:
+ optional: true
bin:
vite: bin/vite.js
- checksum: 10c0/391a1fdd7e05445d60aa3b15d6c1cffcdd92c5d154da375bf06b9cd5633c2387ebee0e8f2fceed3226a63dff36c8ef18fb497662dde8c135133c46670996c7a1
+ checksum: 10c0/08681e83e8338f3915cee729d8296bb9cfd53f71d6796816445d58cd84a8387396a3f5f3e179c52b09e98ccf7247ec3fabb50b95b0e7f3289a619ef8bf71bd8a
languageName: node
linkType: hard
-"vite@npm:6.3.2":
- version: 6.3.2
- resolution: "vite@npm:6.3.2"
+"vite@npm:^5.0.0":
+ version: 5.4.20
+ resolution: "vite@npm:5.4.20"
dependencies:
- esbuild: "npm:^0.25.0"
- fdir: "npm:^6.4.3"
+ esbuild: "npm:^0.21.3"
fsevents: "npm:~2.3.3"
- picomatch: "npm:^4.0.2"
- postcss: "npm:^8.5.3"
- rollup: "npm:^4.34.9"
- tinyglobby: "npm:^0.2.12"
+ postcss: "npm:^8.4.43"
+ rollup: "npm:^4.20.0"
peerDependencies:
- "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0
- jiti: ">=1.21.0"
+ "@types/node": ^18.0.0 || >=20.0.0
less: "*"
lightningcss: ^1.21.0
sass: "*"
sass-embedded: "*"
stylus: "*"
sugarss: "*"
- terser: ^5.16.0
- tsx: ^4.8.1
- yaml: ^2.4.2
+ terser: ^5.4.0
dependenciesMeta:
fsevents:
optional: true
peerDependenciesMeta:
"@types/node":
optional: true
- jiti:
- optional: true
less:
optional: true
lightningcss:
@@ -20607,13 +22696,9 @@ __metadata:
optional: true
terser:
optional: true
- tsx:
- optional: true
- yaml:
- optional: true
bin:
vite: bin/vite.js
- checksum: 10c0/08681e83e8338f3915cee729d8296bb9cfd53f71d6796816445d58cd84a8387396a3f5f3e179c52b09e98ccf7247ec3fabb50b95b0e7f3289a619ef8bf71bd8a
+ checksum: 10c0/391a1fdd7e05445d60aa3b15d6c1cffcdd92c5d154da375bf06b9cd5633c2387ebee0e8f2fceed3226a63dff36c8ef18fb497662dde8c135133c46670996c7a1
languageName: node
linkType: hard
@@ -20672,56 +22757,6 @@ __metadata:
languageName: node
linkType: hard
-"vitest@npm:2.1.9, vitest@npm:^2.1.8":
- version: 2.1.9
- resolution: "vitest@npm:2.1.9"
- dependencies:
- "@vitest/expect": "npm:2.1.9"
- "@vitest/mocker": "npm:2.1.9"
- "@vitest/pretty-format": "npm:^2.1.9"
- "@vitest/runner": "npm:2.1.9"
- "@vitest/snapshot": "npm:2.1.9"
- "@vitest/spy": "npm:2.1.9"
- "@vitest/utils": "npm:2.1.9"
- chai: "npm:^5.1.2"
- debug: "npm:^4.3.7"
- expect-type: "npm:^1.1.0"
- magic-string: "npm:^0.30.12"
- pathe: "npm:^1.1.2"
- std-env: "npm:^3.8.0"
- tinybench: "npm:^2.9.0"
- tinyexec: "npm:^0.3.1"
- tinypool: "npm:^1.0.1"
- tinyrainbow: "npm:^1.2.0"
- vite: "npm:^5.0.0"
- vite-node: "npm:2.1.9"
- why-is-node-running: "npm:^2.3.0"
- peerDependencies:
- "@edge-runtime/vm": "*"
- "@types/node": ^18.0.0 || >=20.0.0
- "@vitest/browser": 2.1.9
- "@vitest/ui": 2.1.9
- happy-dom: "*"
- jsdom: "*"
- peerDependenciesMeta:
- "@edge-runtime/vm":
- optional: true
- "@types/node":
- optional: true
- "@vitest/browser":
- optional: true
- "@vitest/ui":
- optional: true
- happy-dom:
- optional: true
- jsdom:
- optional: true
- bin:
- vitest: vitest.mjs
- checksum: 10c0/e339e16dccacf4589ff43cb1f38c7b4d14427956ae8ef48702af6820a9842347c2b6c77356aeddb040329759ca508a3cb2b104ddf78103ea5bc98ab8f2c3a54e
- languageName: node
- linkType: hard
-
"vitest@npm:3.2.4, vitest@npm:^3.1.3":
version: 3.2.4
resolution: "vitest@npm:3.2.4"
@@ -20778,6 +22813,56 @@ __metadata:
languageName: node
linkType: hard
+"vitest@npm:^2.1.8":
+ version: 2.1.9
+ resolution: "vitest@npm:2.1.9"
+ dependencies:
+ "@vitest/expect": "npm:2.1.9"
+ "@vitest/mocker": "npm:2.1.9"
+ "@vitest/pretty-format": "npm:^2.1.9"
+ "@vitest/runner": "npm:2.1.9"
+ "@vitest/snapshot": "npm:2.1.9"
+ "@vitest/spy": "npm:2.1.9"
+ "@vitest/utils": "npm:2.1.9"
+ chai: "npm:^5.1.2"
+ debug: "npm:^4.3.7"
+ expect-type: "npm:^1.1.0"
+ magic-string: "npm:^0.30.12"
+ pathe: "npm:^1.1.2"
+ std-env: "npm:^3.8.0"
+ tinybench: "npm:^2.9.0"
+ tinyexec: "npm:^0.3.1"
+ tinypool: "npm:^1.0.1"
+ tinyrainbow: "npm:^1.2.0"
+ vite: "npm:^5.0.0"
+ vite-node: "npm:2.1.9"
+ why-is-node-running: "npm:^2.3.0"
+ peerDependencies:
+ "@edge-runtime/vm": "*"
+ "@types/node": ^18.0.0 || >=20.0.0
+ "@vitest/browser": 2.1.9
+ "@vitest/ui": 2.1.9
+ happy-dom: "*"
+ jsdom: "*"
+ peerDependenciesMeta:
+ "@edge-runtime/vm":
+ optional: true
+ "@types/node":
+ optional: true
+ "@vitest/browser":
+ optional: true
+ "@vitest/ui":
+ optional: true
+ happy-dom:
+ optional: true
+ jsdom:
+ optional: true
+ bin:
+ vitest: vitest.mjs
+ checksum: 10c0/e339e16dccacf4589ff43cb1f38c7b4d14427956ae8ef48702af6820a9842347c2b6c77356aeddb040329759ca508a3cb2b104ddf78103ea5bc98ab8f2c3a54e
+ languageName: node
+ linkType: hard
+
"vm-browserify@npm:^1.0.1":
version: 1.1.2
resolution: "vm-browserify@npm:1.1.2"
@@ -20792,6 +22877,55 @@ __metadata:
languageName: node
linkType: hard
+"vscode-jsonrpc@npm:8.2.0":
+ version: 8.2.0
+ resolution: "vscode-jsonrpc@npm:8.2.0"
+ checksum: 10c0/0789c227057a844f5ead55c84679206227a639b9fb76e881185053abc4e9848aa487245966cc2393fcb342c4541241b015a1a2559fddd20ac1e68945c95344e6
+ languageName: node
+ linkType: hard
+
+"vscode-languageserver-protocol@npm:3.17.5":
+ version: 3.17.5
+ resolution: "vscode-languageserver-protocol@npm:3.17.5"
+ dependencies:
+ vscode-jsonrpc: "npm:8.2.0"
+ vscode-languageserver-types: "npm:3.17.5"
+ checksum: 10c0/5f38fd80da9868d706eaa4a025f4aff9c3faad34646bcde1426f915cbd8d7e8b6c3755ce3fef6eebd256ba3145426af1085305f8a76e34276d2e95aaf339a90b
+ languageName: node
+ linkType: hard
+
+"vscode-languageserver-textdocument@npm:~1.0.11":
+ version: 1.0.12
+ resolution: "vscode-languageserver-textdocument@npm:1.0.12"
+ checksum: 10c0/534349894b059602c4d97615a1147b6c4c031141c2093e59657f54e38570f5989c21b376836f13b9375419869242e9efb4066643208b21ab1e1dee111a0f00fb
+ languageName: node
+ linkType: hard
+
+"vscode-languageserver-types@npm:3.17.5":
+ version: 3.17.5
+ resolution: "vscode-languageserver-types@npm:3.17.5"
+ checksum: 10c0/1e1260de79a2cc8de3e46f2e0182cdc94a7eddab487db5a3bd4ee716f67728e685852707d72c059721ce500447be9a46764a04f0611e94e4321ffa088eef36f8
+ languageName: node
+ linkType: hard
+
+"vscode-languageserver@npm:~9.0.1":
+ version: 9.0.1
+ resolution: "vscode-languageserver@npm:9.0.1"
+ dependencies:
+ vscode-languageserver-protocol: "npm:3.17.5"
+ bin:
+ installServerIntoExtension: bin/installServerIntoExtension
+ checksum: 10c0/8a0838d77c98a211c76e54bd3a6249fc877e4e1a73322673fb0e921168d8e91de4f170f1d4ff7e8b6289d0698207afc6aba6662d4c1cd8e4bd7cae96afd6b0c2
+ languageName: node
+ linkType: hard
+
+"vscode-uri@npm:~3.1.0":
+ version: 3.1.0
+ resolution: "vscode-uri@npm:3.1.0"
+ checksum: 10c0/5f6c9c10fd9b1664d71fab4e9fbbae6be93c7f75bb3a1d9d74399a88ab8649e99691223fd7cef4644376cac6e94fa2c086d802521b9a8e31c5af3e60f0f35624
+ languageName: node
+ linkType: hard
+
"w3c-xmlserializer@npm:^5.0.0":
version: 5.0.0
resolution: "w3c-xmlserializer@npm:5.0.0"
@@ -21319,15 +23453,6 @@ __metadata:
languageName: node
linkType: hard
-"zod-to-json-schema@npm:^3.24.1":
- version: 3.24.6
- resolution: "zod-to-json-schema@npm:3.24.6"
- peerDependencies:
- zod: ^3.24.1
- checksum: 10c0/b907ab6d057100bd25a37e5545bf5f0efa5902cd84d3c3ec05c2e51541431a47bd9bf1e5e151a244273409b45f5986d55b26e5d207f98abc5200702f733eb368
- languageName: node
- linkType: hard
-
"zod@npm:^3.23.8":
version: 3.25.76
resolution: "zod@npm:3.25.76"
@@ -21342,6 +23467,13 @@ __metadata:
languageName: node
linkType: hard
+"zod@npm:^4.1.13":
+ version: 4.3.6
+ resolution: "zod@npm:4.3.6"
+ checksum: 10c0/860d25a81ab41d33aa25f8d0d07b091a04acb426e605f396227a796e9e800c44723ed96d0f53a512b57be3d1520f45bf69c0cb3b378a232a00787a2609625307
+ languageName: node
+ linkType: hard
+
"zustand@npm:5.0.3":
version: 5.0.3
resolution: "zustand@npm:5.0.3"
@@ -21363,27 +23495,6 @@ __metadata:
languageName: node
linkType: hard
-"zustand@npm:5.0.8":
- version: 5.0.8
- resolution: "zustand@npm:5.0.8"
- peerDependencies:
- "@types/react": ">=18.0.0"
- immer: ">=9.0.6"
- react: ">=18.0.0"
- use-sync-external-store: ">=1.2.0"
- peerDependenciesMeta:
- "@types/react":
- optional: true
- immer:
- optional: true
- react:
- optional: true
- use-sync-external-store:
- optional: true
- checksum: 10c0/e865a6f7f1c0e03571701db5904151aaa7acefd6f85541a117085e129bf16e8f60b11f8cc82f277472de5c7ad5dcb201e1b0a89035ea0b40c9d9aab3cd24c8ad
- languageName: node
- linkType: hard
-
"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4":
version: 2.0.4
resolution: "zwitch@npm:2.0.4"