Files
openhuman/src-tauri/Cargo.toml
T
Steven EnamakelandGitHub 4be6693599 Fix OAuth credential lifecycle and JWT token sync for skills (#82)
* Refactor BillingPanel to use updated user usage structure

- Changed the usage data source in BillingPanel from activeTeam to user, aligning with the new IUserUsage interface.
- Updated the display of token usage percentage and progress bar to reflect the new usage metrics (spentThisCycleUsd and cycleBudgetUsd).
- Cleaned up commented-out code and improved layout for better readability and user experience.

* Update OAuth credential handling in SkillManager and related state management

- Introduced `setSkillOAuthCredential` action to manage OAuth credentials in the Redux store.
- Enhanced `SkillManager` to persist and restore OAuth credentials during skill setup and disconnection.
- Updated `SkillState` interface to include `oauthCredential` for better state management.
- Refactored related components to ensure seamless integration of OAuth handling.
- Updated subproject commit reference in the skills directory.

* Update connection indicator messages and enhance OAuth credential handling

- Changed the default description in the ConnectionIndicator component to refer to "Your device" instead of "Your browser."
- Removed hardcoded connection indicator in GetStartedStep to use the updated description.
- Improved OAuth credential management by restoring persisted credentials on startup and ensuring they are cleared from the store when revoked.
- Updated HTTP client configuration to use native TLS for better compatibility across platforms.
- Cleaned up Cargo.lock and Cargo.toml by removing unused dependencies and ensuring proper feature flags for reqwest.

* Enhance OAuth credential management in QjsSkillInstance

- Removed redundant comment regarding OAuth credential restoration.
- Implemented lazy-loading of persisted OAuth credentials before tool calls.
- Cleared OAuth credentials from memory upon skill stop and marked as disconnected in the store.
- Updated comments for clarity on credential handling during OAuth operations.

* Refactor JWT token retrieval to use session token method

- Updated the JWT token retrieval in multiple functions to utilize the new `get_session_token` method from `__ops`, enhancing security and consistency in token management.
- Added the `get_session_token` function to the operations core for improved session handling.

* update bootstrap

* Add middleware to sync JWT token with Rust SESSION_SERVICE

- Introduced `syncTokenToRust` middleware to synchronize the JWT token with the Rust SESSION_SERVICE whenever the `setToken` action is dispatched or the auth state is rehydrated.
- Enhanced the `get_session_token` function in Rust to log the retrieved token for better debugging and monitoring.
- Updated Redux store configuration to include the new middleware, improving token management and security.

* update skills

* Update subproject commit reference in skills directory to indicate a dirty state

* Remove unused ConnectionIndicator import from GetStartedStep component
2026-02-10 01:25:14 +05:30

104 lines
3.5 KiB
TOML

[package]
name = "AlphaHuman"
version = "0.30.0"
description = "AlphaHuman - AI-powered Super Assistant"
authors = ["AlphaHuman"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
# The `_lib` suffix may seem redundant but it is necessary
# to make the lib name unique and wouldn't conflict with the bin name.
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
name = "tauri_app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
# Tauri core and plugins
tauri = { version = "2", features = ["tray-icon", "macos-private-api"] }
tauri-plugin-opener = "2"
tauri-plugin-deep-link = "2.0.0"
tauri-plugin-os = "2"
# tauri-plugin-autostart moved to desktop-only target section
# tauri-plugin-notification moved to desktop-only target section
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# HTTP client: rustls for cross-platform TLS (Android), native-tls for desktop skill HTTP
# (some APIs/CDNs use TLS configs that rustls can't negotiate — native-tls uses OS TLS stack)
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls", "native-tls", "stream"] }
# Async runtime
tokio = { version = "1", features = ["full", "sync"] }
# keyring moved to desktop-only target section (not supported on Android/iOS)
# Concurrency utilities
once_cell = "1.19"
parking_lot = "0.12"
# Logging
log = "0.4"
env_logger = "0.11"
# AI module dependencies
base64 = "0.22"
aes-gcm = "0.10"
argon2 = "0.5"
rand = "0.8"
dirs = "5"
sha2 = "0.10"
uuid = { version = "1", features = ["v4"] }
# V8 JavaScript runtime moved to desktop-only (not available on Android/iOS)
# WebSocket client for TDLib connections
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }
# HTTP streaming support for fetch polyfill
futures = "0.3"
# Embedded SQLite for skill databases
rusqlite = { version = "0.31", features = ["bundled"] }
# Date/time utilities
chrono = { version = "0.4", features = ["serde"] }
# Cron expression parsing for scheduled skill tasks
cron = "0.12"
# Stream/Sink utilities for WebSocket and HTTP streaming
futures-util = "0.3"
# Android uses a simpler approach - no persistent Socket.io (use web socket from frontend)
[target.'cfg(target_os = "android")'.dependencies]
# Android logging (routes Rust `log` crate to logcat)
android_logger = "0.14"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
keyring = "3"
tauri-plugin-autostart = "2"
tauri-plugin-notification = "2"
# QuickJS JavaScript runtime (via quickjs-rs)
# Only available on desktop - prebuilt binaries don't exist for Android/iOS
rquickjs = { version = "0.11", features = ["futures", "macro", "loader", "parallel"] }
# TDLib Rust bindings (desktop only - downloads prebuilt TDLib for linking)
# On macOS, the bundled dylib is replaced with a source-built version (see build.rs)
# to ensure macOS 10.15 deployment target compatibility.
tdlib-rs = { version = "1.2", features = ["download-tdlib"] }
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.build-dependencies]
# TDLib build configuration (download-tdlib for all desktop platforms)
tdlib-rs = { version = "1.2", features = ["download-tdlib"] }
[features]
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]