mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 06:32:24 +00:00
2955fd4eec94327c701178b8fea07f7496e28bfa
16
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2955fd4eec |
Refactor testing scripts in package.json and update dependencies (#4)
- Simplified test scripts in package.json by removing specific config references for vitest. - Updated @tauri-apps/api dependency version to 2.10.1. - Removed unused dependencies from yarn.lock and updated Cargo.toml and Cargo.lock for tinyhumansai to version 0.1.4. - Enhanced memory management in Conversations and Login components by ensuring async token synchronization. - Introduced recall_memory command in Tauri for improved context retrieval from memory. |
||
|
|
a0654c0b67 |
feat: add macOS build scripts and update input schema handling
- Introduced new build scripts for macOS targeting Intel architecture, including options for debug and release builds. - Updated input schema handling in the skill instance to ensure consistent naming with the `inputSchema` property for better compatibility with JSON serialization. |
||
|
|
232767c19a |
feat: integrate TinyHumans memory client for skill data synchronization
- Added `syncMemoryClientToken` utility to synchronize JWT token with the TinyHumans memory client after user login and Redux rehydration. - Updated `PersistGate` in `App.tsx` to call `syncMemoryClientToken` on lift. - Modified `SkillManagementPanel` to use `triggerSync` for skill management instead of stopping and starting skills. - Implemented memory commands in Tauri for initializing and querying the TinyHumans memory client. - Enhanced skill instance handling to persist sync data and clear memory on OAuth revocation. - Introduced a new memory module to manage skill data synchronization effectively. |
||
|
|
8eaf682d83 |
remove: deprecated QuickJS runtime and associated libraries
- Deleted `bootstrap.js`, `qjs_ops`, and `mod.rs` from QuickJS runtime module. - Removed unused QuickJS-related code, including APIs for browser-like shims, IndexedDB, WebSocket, TDLib, and OAuth. - Simplified project structure by eliminating redundant QuickJS dependencies. |
||
|
|
c3718d9e4f |
Feat/final flow check (#155)
* feat: add mnemonic recovery flow and encryption key management - Introduced a new Mnemonic page for users to generate or import their recovery phrase. - Updated routing to redirect users to the Mnemonic page after onboarding. - Enhanced state management to store and retrieve AES encryption keys derived from the mnemonic. - Added utility functions for generating and validating BIP39 mnemonic phrases. - Updated selectors and reducers to handle encryption key state in the auth slice. - Included new dependencies for cryptographic operations. * feat: integrate Web3 wallet functionality and enhance state management - Added WalletInfoSection component to display connected wallet address, network, and balance. - Updated auth slice to manage primary wallet address derived from mnemonic. - Enhanced SkillManager to pass wallet address as load parameters for wallet skill. - Introduced utility function to derive EVM wallet address from mnemonic. - Updated dependencies for cryptographic operations related to wallet functionality. * fix: improve error handling and network selection in WalletInfoSection - Enhanced the parsing of network data to ensure robustness against undefined values. - Updated network selection logic to prioritize valid entries and provide a fallback. - Improved error logging for better debugging of wallet information loading issues. - Adjusted balance retrieval to handle cases where chain_id may be missing. * feat: add socket event contract for Tauri integration - Documented the socket event contract for communication between the backend and frontend in Tauri mode. - Introduced constants for `REQUEST_ENCRYPTION_KEY` and `ENCRYPTION_KEY_EVENT` to facilitate encryption key management. - Updated `setupTauriSocketListeners` to handle the encryption key request and response flow. * Refactor wallet information fetching and connection status handling - Updated `WalletInfoSection` to improve loading state management and error handling during wallet info retrieval. - Introduced a retry mechanism for fetching wallet information with a maximum of 5 attempts. - Enhanced connection status logic in `SkillsGrid` to treat missing authentication status as connected. - Added a new method in `SkillManager` to set the wallet address and notify the wallet skill accordingly. * feat: add integration token fetching and decryption functionality - Introduced `fetchIntegrationTokens` API call to retrieve encrypted OAuth tokens for integrations. - Implemented decryption logic for integration tokens using a provided key. - Enhanced deep link handling to support fetching and storing integration tokens upon successful OAuth login. - Added utility functions for hex and base64 conversions to facilitate token decryption. - Updated `authApi.ts` and `desktopDeepLinkListener.ts` to integrate new functionality. * refactor: move integration token encryption/decryption logic to a new utility file - Extracted encryption and decryption functions for integration tokens into `integrationTokensCrypto.ts`. - Removed redundant functions from `desktopDeepLinkListener.ts` to streamline the code. - Updated deep link handling to store only the encrypted tokens instead of decrypted ones. - Improved type definitions for integration tokens and their payloads. * feat: enhance Gmail skill integration and state management - Updated `SkillManager` to accept an optional access token for Gmail during OAuth completion. - Introduced `gmailSlice` to manage Gmail user profile and emails in the Redux store. - Implemented synchronization of Gmail skill state with the Redux store to keep user data updated. - Refactored `SkillProvider` to handle Gmail state changes and fetch initial state from the backend. - Adjusted deep link handling to pass decrypted access tokens for Gmail integration. - Modified API endpoint for onboarding completion to remove the Telegram prefix. * feat: implement Gmail metadata synchronization to backend - Added a new utility function `syncGmailMetadataToBackend` to emit Gmail profile and email summaries to the backend via the `integration:metadata-sync` socket event. - Updated `SkillProvider` to call the new synchronization function, ensuring Gmail skill state is sent to the backend when updated. * refactor: update Tauri socket event handling and improve Mnemonic component typing - Revised the Tauri socket event contract to clarify that encryption key handling is managed via the API instead of the socket. - Removed outdated socket event constants related to encryption key requests from `tauriSocket.ts`. - Enhanced type definitions in the `Mnemonic` component by specifying the event type for keyboard events. * fix: update Gmail provider constant and adjust metadata synchronization logic - Changed the constant for the Google provider from 'google' to 'gmail' for clarity. - Commented out the email metadata synchronization logic in `syncGmailMetadataToBackend` to prevent potential issues with undefined email states. * feat: implement Gmail metadata synchronization service - Added a new file `metadataSync.ts` to handle the synchronization of Gmail profile and email summaries to the backend via the `integration:metadata-sync` socket event. - Updated import paths in `SkillProvider` to reflect the new location of the Gmail metadata synchronization function. - Enhanced type definitions for Gmail profile and email summaries to ensure proper data structure during synchronization. * refactor: clean up code formatting and improve readability across multiple components - Standardized import statements and formatting in various files, including `WalletInfoSection`, `AgentChatPanel`, and `SkillsPanel`. - Enhanced readability by adjusting line breaks and spacing in JSX elements and function definitions. - Improved consistency in the use of arrow functions and destructuring across components. - Updated type definitions and ensured proper alignment of code for better maintainability. * feat: enhance error handling in WalletInfoSection and improve user feedback - Added error reporting functionality in `WalletInfoSection` to capture and enqueue errors when wallet info fails to load. - Updated `Mnemonic` component to handle user state more robustly, ensuring encryption key is only set if the user is loaded. - Refactored `TauriCommandsPanel` to improve string comparisons for loading states by converting to lowercase. - Adjusted deep link handling in `desktopDeepLinkListener` to use trimmed hex values for encryption key conversion. * fix: improve balance parsing and error handling in WalletInfoSection - Updated balance parsing logic in `WalletInfoSection` to ensure that non-finite values default to zero. - Enhanced error handling in `desktopDeepLinkListener` by adding error reporting for invalid encryption keys and conversion failures, improving user feedback and debugging capabilities. * Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check * chore: update submodule URL for skills repository to use HTTPS * chore: update skills submodule to latest commit and enhance SkillsGrid component - Updated the skills submodule to the latest commit for improved functionality. - Refactored `SkillsGrid` to better handle skill setup logic, ensuring accurate representation of skills with setup requirements. - Cleaned up code formatting and improved readability in various components, including `SkillActionButton` and `desktopDeepLinkListener`. * feat: implement Notion metadata synchronization and user profile management - Added a new service `metadataSync.ts` to handle synchronization of Notion user metadata to the backend via the `integration:metadata-sync` socket event. - Introduced a new Redux slice `notionSlice.ts` for managing the Notion user profile state. - Updated `SkillProvider` to fetch and sync Notion user profile upon connection, ensuring seamless integration with the backend. - Enhanced the store configuration to include the new Notion reducer. * refactor: remove unnecessary console warnings in SkillProvider - Eliminated console warnings related to Notion user retrieval errors and auto-loading skills, streamlining the logging process for better clarity and reducing noise in the console output. - Improved code readability by cleaning up commented-out warning messages that were no longer needed. |
||
|
|
f4801726f3 |
Fix async tool calls not fetching data in QuickJS runtime (#102)
* Implement data synchronization feature in SkillManagementPanel - Added a new `handleSync` function to trigger manual synchronization for skills, enhancing user control over data updates. - Integrated skill state management to track synchronization progress, errors, and completion status. - Updated the UI to display synchronization status, including progress indicators and error messages, improving user feedback during sync operations. - Enhanced the SkillManager and SkillRuntime classes to support the new sync functionality, ensuring proper handling of sync requests and lifecycle hooks. Updated subproject commit reference in the skills directory. * Implement Conversations UI with two-panel thread layout and resizable sidebar Add full Conversations feature: thread types, API service, Redux slice, and a two-panel page with a draggable resize handle. Uncomment Conversations nav item in MiniSidebar and enable prefix-based active state matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add Intelligence page and integrate intelligence stats hook - Introduced a new Intelligence page with a skill management interface, allowing users to view and manage skills. - Implemented the `useIntelligenceStats` hook to fetch and display session statistics, memory files, and entity counts. - Enhanced the SkillsGrid component to utilize shared skill icons and status displays, improving UI consistency. - Added functionality for skill synchronization and management, including action buttons for skill setup and syncing. - Updated the Conversations page to support sending messages with optimistic UI updates, enhancing user experience. This commit lays the groundwork for a more interactive and informative intelligence management feature. * Update subproject commit reference in skills directory and enhance fetch handling in bootstrap.js - Updated the subproject commit reference in the skills directory to the latest version. - Modified the fetch implementation in bootstrap.js to ensure options are sent as a JSON string and to parse the JSON response, improving data handling and error management. * Update subproject commit reference in skills directory and comment out Conversations nav item in MiniSidebar - Updated the subproject commit reference in the skills directory to the latest version. - Commented out the Conversations navigation item in MiniSidebar for future implementation. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
105a5fc08f |
Fix/tuesday (#97)
* Update submodule URL for skills and refresh commit reference - Changed the submodule URL for the "skills" repository to use SSH instead of HTTPS. - Updated the subproject commit reference in the skills directory to the latest commit. * Update subproject commit reference for skills to latest version b5d138f * updated skills * Update ping interval and refactor context usage in QjsSkillInstance - Reduced the PING_INTERVAL from 60 seconds to 5 seconds for more frequent pings. - Refactored the context parameter in lifecycle calls and message handling functions to use the runtime context, improving consistency and performance. - Updated subproject commit reference for skills to the latest version. |
||
|
|
e23b3643bd |
Add invite codes feature (#94)
* Refactor import statement in store configuration for clarity - Combined the import of `configureStore` and `Middleware` from '@reduxjs/toolkit' into a single line for improved readability. * Add invite codes feature with onboarding step and dedicated page Implement frontend for the invite codes system: users get 5 invite codes to share, can redeem codes for free credits, and new users are prompted during onboarding (step 1) to enter an invite code. - Add invite types, API service, and Redux slice - Add InviteCodeStep as first onboarding step (skip-able) - Add /invites page with redeem input and code list with copy buttons - Add "Invite Friends" nav item to sidebar - Update UserReferral interface to match backend PR #418 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update reqwest dependency to enable HTTP/2 support and switch to rustls TLS in network requests - Modified Cargo.toml to include the "http2" feature for reqwest. - Updated network request implementations in bridge and ops_net modules to use rustls TLS instead of native TLS for improved security and compatibility. * Update event loop to handle async tool calls and improve message processing - Introduced a `PendingToolCall` struct to manage in-flight async tool calls. - Enhanced the event loop to check for completion of async tool calls and handle timeouts. - Updated message handling to support async tool execution, allowing the event loop to process other messages concurrently. - Refactored `handle_tool_call` to differentiate between synchronous and asynchronous tool results. - Modified JavaScript fetch functions to use async/await for improved readability and performance. * Enhance skill instance with initial ping verification and job driving - Added an immediate ping to verify the connection health during skill execution, logging the result or any errors encountered. - Updated the event loop to drive jobs asynchronously after the initial ping check. - Removed unnecessary logging statements from the network operations for cleaner output. * Update subproject commit reference in skills directory --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
6df6877b96 |
Add skill ping/health-check system (#85)
* 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. * Add skill ping/health-check system for connection monitoring Periodic (5-min) onPing() calls verify skill service connections are healthy. Auth errors stop the skill; network errors update connection status while keeping the skill running for retry. Skills without onPing are treated as healthy (backward compatible). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Move skill ping/health-check from frontend to Rust backend The frontend ping loop only runs while React is active, but the Rust backend keeps skills running independently. This adds a PingScheduler (modeled after CronScheduler) that pings all running skills every 5 minutes from a background Tokio task and acts on auth/network failures. The redundant frontend ping loop is removed since SkillProvider already listens for the Tauri events the Rust scheduler emits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Refactor package-and-publish workflow for consistency Updated formatting in the package-and-publish.yml file to use consistent quotation styles for strings. Removed unnecessary branch entry from the pull_request section to streamline the workflow configuration. * Update logging configuration and adjust ping interval for improved performance - Enhanced logging setup in `lib.rs` to allow customizable verbosity and color-coded output based on log levels and tags. - Reduced ping interval in `ping_scheduler.rs` from 5 minutes to 1 minute for more frequent health checks on skills. - Added functionality to suppress TDLib's native C++ logs based on environment variable settings in `manager.rs`. * Update subproject commit reference in skills directory and remove logging from get_session_token function for improved security * Enhance error handling in skill message processing - Added a new `Error` variant to the `SkillMessage` enum to notify skills of errors from async operations, including error type, message, source, and recoverability. - Updated the `handle_message` function to handle `SkillMessage::Error`, invoking the `onError` JavaScript handler and logging any failures in the handler execution. - Updated subproject commit reference in the skills directory. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
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 |
||
|
|
ab9e7b7a0f |
Refactor code for improved readability and functionality
- Simplified error handling in `useModelStatus` and `ModelProvider` by consolidating dispatch calls. - Streamlined greeting array initialization in `Welcome` component for better readability. - Enhanced `SkillProvider` to listen for skill state changes and dispatch updates accordingly. - Updated Rust backend to sync published state and emit events for skill state changes. - Introduced a `dirty` flag in `SkillState` to track modifications for efficient state management. |
||
|
|
af15c7c8e1 |
Enhance SkillsGrid and Manifest Handling
- Added `ignoreInProduction` property to `SkillListEntry` and updated processing logic to filter skills based on the `IS_DEV` flag. - Updated Rust structures in the Tauri backend to include `ignoreInProduction` in the skill manifest. - Refactored desktop deep link listener to remove unnecessary `IS_DEV` checks. - Improved JSON serialization handling in QuickJS skill instance. |
||
|
|
890b20e876 |
Refactor to QuickJS Integration and Update Documentation
- Replaced TDLib references with QuickJS in the CLAUDE.md documentation. - Updated service paths and imports in the Rust codebase to reflect the transition to QuickJS. - Added a new bootstrap.js file for QuickJS runtime, providing necessary browser-like API shims. - Enhanced the TODO list with tasks for allowing bundling of unverified skills and coding new skills independently. - Introduced a new storage layer for IndexedDB emulation and updated related operations for QuickJS compatibility. |
||
|
|
3f6431f457 |
Enhance SkillSetupWizard and SkillManager for OAuth-only skills
- Updated SkillSetupWizard to handle cases where no setup steps are returned, indicating an OAuth-only skill. - Modified SkillManager's startSetup method to return null for skills that do not implement setup/start. - Enhanced SkillRuntime's setupStart method to return null if no setup step is available, improving error handling. - Updated SkillProvider to include OAuth configuration details in skill discovery. |
||
|
|
65d42f2526 |
Implement OAuth flow in SkillSetupWizard and enhance skill manager
- Added support for OAuth in the SkillSetupWizard, allowing skills to handle OAuth login and state management. - Introduced new OAuthLoginView component for user interaction during OAuth processes. - Updated SkillManager to notify skills of successful OAuth completion and manage OAuth credentials. - Enhanced deep link handling to support OAuth success and error states. - Modified SkillManifest to include OAuth configuration details. - Updated runtime and backend to accommodate OAuth functionality, ensuring skills can utilize OAuth for authentication. |
||
|
|
ceb03fb2bc |
Fix/prod build (#51)
* chore: add CI secrets management and local testing script - Added ci-secrets.example.json to provide a template for CI secrets configuration. - Introduced test-ci-local.sh script to facilitate local testing of the package-and-publish workflow using act. - Updated .gitignore to exclude the actual ci-secrets.json file containing sensitive tokens. * chore: enhance local testing and environment loading scripts - Added scripts to load environment variables from .env and JSON files, improving local development setup. - Introduced ci-event.json to simulate GitHub event payloads for local CI testing. - Updated test-ci-local.sh to utilize the new event JSON for better integration with local testing workflows. - Modified .gitignore to include ci-secrets.local.json for local secret management. * chore: enhance environment loading and improve V8 memory management - Updated load-env.sh to conditionally load ci-secrets.local.json and set APPLE_PASSWORD for notarization. - Introduced a delay in auto-starting skills to prevent memory spikes during initialization. - Adjusted V8 runtime memory settings to minimize initial heap allocation, reducing the risk of OOM errors. * chore: update version bump workflow to modify tauri.conf.json - Changed the version update process to reflect changes in tauri.conf.json instead of Cargo.toml. - Adjusted the commit message to indicate the inclusion of tauri.conf.json in the version bump process. * chore: migrate from V8 to QuickJS runtime and update related configurations - Replaced V8 runtime references with QuickJS throughout the codebase, including updates to initialization and error handling. - Modified package.json to change the build command for macOS to source environment variables correctly. - Updated Cargo.toml to remove deno_core dependency and include rquickjs with appropriate features. - Cleaned up unused V8-related code and comments in the runtime modules. - Adjusted skill manifest checks to support QuickJS compatibility. * refactor: implement QuickJS runtime and remove V8 references - Replaced V8 engine with QuickJS in the runtime module, updating related imports and initialization logic. - Introduced new `qjs_engine.rs` and `qjs_skill_instance.rs` files to handle QuickJS-specific functionality. - Removed the deprecated `v8_skill_instance.rs` and associated V8-related code. - Updated JavaScript bootstrap code to align with QuickJS operations and APIs. - Adjusted documentation and comments to reflect the transition to QuickJS. * refactor: update IdbStorage to use parking_lot::Mutex for improved concurrency - Changed the connection management in IdbStorage from RwLock to parking_lot::Mutex for better performance. - Updated related methods to reflect the new locking mechanism, enhancing the efficiency of database operations. - Adjusted the IdbOpenResult struct to include serde::Serialize for potential serialization needs. * refactor: update QuickJS skill instance and timer management - Modified memory limit and stack size settings in QjsSkillInstance to be asynchronous, improving performance. - Cleaned up imports in qjs_ops.rs by removing unused dependencies and enhancing function definitions for clarity. - Refactored timer management functions for better readability and efficiency, including renaming and restructuring comments. * chore: update package.json scripts and clean up build.rs - Added a new script for running the Tauri app with environment variable loading. - Simplified the macOS development command to use a dedicated build script. - Removed unnecessary environment variable logging from build.rs to streamline the build process. - Cleaned up commented-out sections in the GitHub Actions workflow for Android packaging. |