From 244702d3498f3af081c3eda7ebee76c61f8d7342 Mon Sep 17 00:00:00 2001 From: Steven Enamakel <31011319+senamakel@users.noreply.github.com> Date: Sun, 29 Mar 2026 10:30:18 -0700 Subject: [PATCH] Feat/refactor UI code (#52) * Enhance autocomplete functionality and settings panel - Added a new AutocompletePanel component for managing inline autocomplete settings, including options for enabling/disabling, debounce timing, and style configurations. - Integrated autocomplete status tracking and logging within the panel to provide real-time feedback on the autocomplete engine's state. - Updated settings navigation to include the new autocomplete settings route, improving user accessibility to autocomplete features. - Introduced new Tauri commands for managing autocomplete operations, including start, stop, and current status retrieval, enhancing interaction with the autocomplete engine. - Refactored existing code to streamline autocomplete-related functionalities and improve overall maintainability. * Update TypeScript configuration and add new assets - Modified `tsconfig.json` to adjust path aliases and include directories for improved module resolution. - Added new SVG and image assets to the public directory, enhancing the application's visual resources. - Introduced multiple Lottie animation JSON files for dynamic UI elements, expanding the application's animation capabilities. * Update project structure and paths for Tauri integration - Adjusted paths in the pull request template and various workflow files to reflect the new project structure, moving Tauri-related files under the `app` directory. - Updated commands in the build and release workflows to ensure compatibility with the new file locations. - Enhanced the test workflow to create the necessary `.env` file in the correct directory for end-to-end testing. - Added new markdown files for agent prompts and configuration, establishing a foundation for OpenHuman's AI capabilities. * Refactor project paths and update configurations for Tauri integration - Adjusted script paths in package.json to reflect the new project structure, ensuring compatibility with the updated directory layout. - Modified tsconfig.json to correct path aliases and include directories for improved module resolution. - Introduced a new utility for resolving development paths, enhancing the ability to locate the `rust-core/ai` directory across different project structures. - Updated Cargo.toml and tauri.conf.json to align with the new directory structure, ensuring proper resource and dependency management. - Added a new dev_paths module to streamline path resolution logic, improving maintainability and clarity in the codebase. * Refactor project structure and update configurations for Tauri integration - Adjusted paths in .gitignore, Cargo.toml, and various scripts to reflect the new directory layout, moving Tauri-related files under the `app` directory. - Introduced a new package.json file to manage workspace scripts and dependencies effectively. - Updated end-to-end build and run scripts to ensure compatibility with the new project structure. - Enhanced documentation in CONTRIBUTING.md to guide contributors on the updated project organization and Tauri command usage. * Refactor Tauri command invocations to use dedicated utility functions - Replaced direct `invoke` calls with utility functions from `tauriCommands` for improved readability and maintainability across multiple components. - Updated `SkillsGrid`, `Skills`, `SkillProvider`, and `SkillManager` to utilize the new command structure, enhancing consistency in Tauri command handling. - Introduced a new `coreRpcClient` for managing core RPC relay requests, streamlining error handling and request processing. - Added a new `core_rpc_relay` command in the Tauri backend to facilitate communication with the core service, ensuring better service management and error reporting. * Refactor Tauri command invocations in intelligence stats and memory manager - Replaced direct `invoke` calls with utility functions from `tauriCommands` in `useIntelligenceStats` and `MemoryManager` for improved readability and maintainability. - Updated the `aiListMemoryFiles`, `aiReadMemoryFile`, and `aiWriteMemoryFile` functions to utilize the new command structure, enhancing consistency in Tauri command handling. - Introduced new command handling in the Rust backend for `ai.list_memory_files`, `ai.read_memory_file`, and `ai.write_memory_file`, streamlining communication with the core service. * Refactor SkillsGrid and remove SelfEvolveModal component - Removed the SelfEvolveModal component to streamline the SkillsGrid functionality. - Updated the SkillsGrid to utilize the runtimeDiscoverSkills function for loading skills, replacing the previous invoke method. - Simplified the skill entry normalization process by integrating it directly into the skills loading logic. - Enhanced error handling during skill loading to improve robustness and user feedback. * Refactor Tauri command invocations to use coreRpcClient - Replaced direct `invoke` calls with `callCoreRpc` in various components, including `useIntelligenceStats`, `MemoryManager`, `SessionManager`, and `transcript` functions, enhancing code readability and maintainability. - Updated the Rust backend to handle new command structures for memory and session management, streamlining communication with the core service. - Improved consistency in handling Tauri commands across the application. * Refactor Tauri command invocations to utilize coreRpcClient - Replaced direct `invoke` calls with `callCoreRpc` in `tauriCommands.ts` and `tauriSocket.ts`, enhancing code readability and maintainability. - Updated the Rust backend to support new command structures for authentication and session management, streamlining communication with the core service. - Removed legacy socket reporting methods in `tauriSocket.ts`, reflecting a shift towards event-driven socket state management. - Improved consistency in handling Tauri commands across the application, aligning with recent refactoring efforts. * Remove pre-commit hook and update TODO list with completed tasks and new objectives. This includes separating the binary from the Tauri codebase, integrating accessibility service installation, and removing Android/iOS support from the codebase. * Add core server functionality with dispatch and RPC handling - Introduced new modules for core server operations, including dispatching RPC requests and handling various AI and memory-related commands. - Implemented a robust structure for managing authentication, configuration, and session states through the `openhuman` namespace. - Added helper functions for loading configurations, managing memory files, and processing authentication profiles. - Established a new routing system using Axum for handling HTTP requests, including health checks and RPC endpoints. - Enhanced error handling and logging throughout the new functionalities to improve maintainability and user feedback. * Implement core server CLI and modular structure - Introduced a new CLI module for the core server, enabling various commands for server management, health checks, and configuration settings. - Established a modular structure for core server functionalities, including dispatching RPC requests and managing settings for models, memory, and runtime. - Added comprehensive tests to validate the functionality of accessibility and autocomplete commands, ensuring robust error handling and schema compliance. - Enhanced the overall organization of the core server codebase, improving maintainability and readability. * Implement AI RPC dispatch functionality - Introduced a new `ai_rpc` module for handling various AI-related commands, including memory file operations and session management. - Enhanced the `try_dispatch` function to support commands such as listing, reading, writing memory files, and managing session states. - Updated the core server dispatch module to integrate the new AI RPC functionality, improving modularity and maintainability. - Refactored existing code to ensure consistent parameter parsing and error handling across AI commands. * Update TODO list and refactor Rust core server files - Added new tasks to the TODO list for documentation updates and feature flag cleanup. - Introduced `Arc` import in `cli.rs` for improved concurrency handling. - Cleaned up imports in `helpers.rs` and added conditional compilation for `tauri-host`. - Removed unused `value_only` function in `types.rs` and added `#[allow(dead_code)]` to `SocketConnectParams` and `SocketEmitParams`. - Enhanced `try_dispatch` function in `dispatch/mod.rs` for non-tauri-host scenarios. - Updated `try_dispatch` in `openhuman/platform.rs` to correctly handle session parameters. - Modified `screen_intelligence` configuration in tests to include new properties for better session management. * Refactor import statements and enhance code readability - Cleaned up import statements across multiple files for improved organization and consistency. - Reformatted code in `cli.rs`, `helpers.rs`, and various dispatch modules to enhance readability. - Ensured consistent parameter handling in `try_dispatch` functions, improving maintainability. - Removed unnecessary whitespace and adjusted formatting for better code clarity. * Refactor project structure and enhance AI memory management - Consolidated the `openhuman-core` package into a single `Cargo.toml` file, removing the previous `rust-core` directory. - Introduced new modules for AI memory management, including filesystem-based storage and encryption functionalities. - Added Tauri commands for initializing memory and session management, enhancing user interaction with memory files. - Implemented JSON-based storage for memory chunks and session transcripts, improving data accessibility and organization. - Updated dependencies and features in `Cargo.toml` to support new functionalities and ensure compatibility. * Update build and release workflows to reflect project structure changes - Adjusted paths in GitHub Actions workflows to accommodate the consolidation of the `openhuman-core` package into a single `Cargo.toml`. - Updated import statements in various files to point to the new locations of markdown resources. - Modified the Tauri configuration to reflect the new resource paths, ensuring proper access to AI prompts. - Enhanced the staging script to build the standalone binary from the updated project structure. * Refactor AI directory resolution and update documentation - Updated the logic for resolving AI directory paths to reflect the new project structure, replacing references to `rust-core/ai` with `src/ai/prompts`. - Enhanced the `find_ai_directory` function across multiple modules to utilize the new path resolution methods. - Updated documentation comments to clarify the new directory structure and fallback mechanisms for loading AI prompts. * Rename `openhuman-core` to `openhuman` across the project - Updated package names in `Cargo.toml` and `Cargo.lock` to reflect the new naming convention. - Adjusted references in GitHub Actions workflows and scripts to use the new package name. - Modified CLI command names and error messages to align with the updated naming. - Ensured consistency in executable file names and paths throughout the codebase. * Refactor project commands and update package scripts - Updated package.json to change workspace references from `openhuman` to `app` for build, compile, dev, format, lint, and test scripts. - Removed outdated memory and chat command files to streamline the codebase and improve maintainability. - Adjusted the `lib.rs` file to reflect changes in memory command handling, transitioning to use `callCoreRpc` for Neocortex memory operations. - Cleaned up the commands module by removing unused imports and consolidating functionality. * Add Tauri host support and new daemon configuration - Introduced new modules for Tauri host functionality, including `desktop` and `daemon_host`. - Added static variables and initialization functions for managing the desktop app handle and resource directory. - Updated import paths for `HeartbeatEngine` to improve clarity and organization. - Implemented configuration loading and saving for daemon UI preferences, enhancing user experience. * Update package names in project configuration - Changed workspace references in package.json from `app` to `openhuman-app` for consistency. - Updated the name field in the app's package.json to reflect the new naming convention. * Remove Tauri host feature flags from core server modules - Eliminated conditional compilation for Tauri host in `lib.rs`, `helpers.rs`, and `dispatch` modules. - Streamlined socket management functions and dispatch logic by removing unused code related to Tauri host. - Improved code clarity and maintainability by consolidating socket-related functionality. * Enhance Tauri host feature integration and update dependencies - Added `tauri-host` as a default feature in `Cargo.toml` to streamline feature management. - Removed explicit feature flag from `openhuman` dependency in `app/src-tauri/Cargo.toml` for cleaner configuration. - Updated Tauri command attributes in various modules to conditionally compile with the `tauri-host` feature, improving modularity. - Expanded TODO list to include migration support from OpenClaw, indicating future development focus. * Refactor authentication and credential management in OpenHuman - Introduced new modules for handling authentication profiles and tokens, including `anthropic_token`, `openai_oauth`, and `profiles`. - Removed unused Tauri host-related code from core server modules, enhancing clarity and maintainability. - Updated `Cargo.toml` and `Cargo.lock` to reflect the removal of the `rquickjs` dependency and other package adjustments. - Streamlined memory client initialization in dispatch logic to utilize the new `local_memory` module. - Enhanced code organization by consolidating credential management functionalities and improving the overall structure of the OpenHuman module. * Enhance Rust core RPC structure and streamline helper functions - Introduced a dedicated `rpc.rs` file for each domain in the Rust core to manage JSON-RPC and CLI behavior, improving code organization and clarity. - Refactored helper functions to utilize `rpc_invocation_from_outcome` for consistent handling of RPC responses across various modules. - Removed unused authentication and credential management functions from `helpers.rs`, consolidating relevant logic into the new RPC structure. - Updated dispatch logic in multiple modules to leverage the new RPC functions, enhancing maintainability and reducing code duplication. * Enhance Rust core RPC structure and streamline helper functions - Introduced a dedicated `rpc.rs` file for each domain in the Rust core to manage JSON-RPC and CLI behavior, improving code organization and clarity. - Refactored helper functions to utilize `rpc_invocation_from_outcome` for consistent handling of RPC responses across various modules. - Removed unused authentication and credential management functions from `helpers.rs`, consolidating relevant logic into the new RPC structure. - Updated dispatch logic in multiple modules to leverage the new RPC functions, enhancing maintainability and reducing code duplication. * Refactor OpenHuman configuration loading and enhance onboarding RPC - Replaced the `load_openhuman_config` function with a new `load_config_with_timeout` method to improve timeout handling during configuration loading. - Consolidated configuration loading logic across various modules, reducing redundancy and enhancing maintainability. - Introduced new RPC functions for applying settings related to models, memory, screen intelligence, gateway, tunnel, runtime, and browser, streamlining the update process. - Added onboarding helpers in a new `onboard` module, including a JSON-RPC controller for model refresh operations, improving onboarding flow management. * Refactor CLI and configuration management in OpenHuman - Consolidated CLI-related functionality by introducing new modules for settings and credentials management, enhancing code organization. - Removed redundant functions and streamlined the configuration loading process, improving maintainability. - Added new CLI helpers for screenshot tools and workspace initialization, facilitating better user experience and onboarding. - Enhanced JSON-RPC responses to be more compatible with CLI requirements, ensuring consistent output across various commands. * Remove gateway settings and related functionality from OpenHuman - Eliminated the GatewaySettingsUpdate interface and associated functions from the codebase, streamlining configuration management. - Removed references to gateway settings in the CLI and configuration modules, enhancing clarity and maintainability. - Deleted the gateway module and its related components, including rate limiting and client handling, to simplify the architecture. - Updated Cargo.toml and Cargo.lock to reflect the removal of dependencies related to gateway functionality. * Update documentation and improve clarity in OpenHuman - Revised comments in the `mod.rs`, `traits.rs`, and `pairing.rs` files to enhance clarity and accuracy. - Updated descriptions related to security policy, long-running processes, and pairing functionality for better understanding. * Refactor loading prop in TauriCommandsPanel for cleaner code - Simplified the loading prop assignment in the TauriCommandsPanel component by removing unnecessary line breaks, enhancing readability and maintainability. * Add OpenSSL dependency and implement OAuth authentication features - Added OpenSSL as a dependency in `Cargo.toml` to support cryptographic operations. - Introduced new OAuth-related structures and parameters in `types.rs` for handling authentication flows. - Implemented OAuth connection and integration token fetching in `auth_socket.rs`, enhancing the authentication capabilities of the OpenHuman module. - Created new modules for managing authentication profiles and responses, improving the organization of authentication-related code. - Removed deprecated `anthropic_token` and `openai_oauth` modules to streamline credential management. - Updated `Cargo.lock` to reflect the addition of the OpenSSL dependency. * Refactor OpenHuman module and update dependencies - Added OpenHuman integration entry in the registry for improved backend inference handling. - Updated various files to enhance code clarity and organization, including adjustments to OAuth client methods and integration tests. - Refactored import statements and removed unnecessary line breaks for better readability. - Updated `Cargo.lock` to reflect changes in dependencies and ensure consistency across the project. * Implement desktop host features and refactor runtime handling - Introduced new modules for memory management, socket handling, and command definitions to support desktop host functionality. - Refactored QuickJS runtime initialization to log errors when the engine is not linked, improving clarity on runtime status. - Added placeholder commands for chat and model interactions, indicating unavailability in the desktop build while maintaining structure for future integration. - Enhanced organization of the codebase by creating dedicated files for runtime and utility functions, streamlining the development process. - Updated documentation to reflect new modules and their purposes, ensuring better understanding for future contributors. * Add CLI banner and print function to enhance user experience - Introduced a new CLI banner with branding and GitHub link for user engagement. - Implemented a `print_cli_banner` function to display the banner when running the CLI, improving visibility and user interaction. - Updated the CLI entry point to call the new banner function, ensuring it appears at startup. * Add API integration and update dependencies - Introduced new API modules for handling HTTP requests and WebSocket connections to the TinyHumans backend. - Added `ureq` dependency for simplified HTTP client functionality, updating `Cargo.toml` and `Cargo.lock` accordingly. - Implemented configuration and JWT handling in the new `api` module, enhancing session management and API interactions. - Refactored existing code to utilize the new API helpers, improving code organization and maintainability. - Updated documentation to reflect new API functionalities and usage guidelines. * Refactor settings fetching and update dependencies - Removed the `ureq` dependency and associated functions for fetching settings, streamlining the codebase. - Updated the `fetch_settings` method to utilize `reqwest` for HTTP requests, enhancing consistency and reliability in API interactions. - Adjusted the `Cargo.toml` to reflect the removal of `ureq`, ensuring dependencies are up to date. * Update `ureq` dependency to version 3.3.0 in `Cargo.lock` - Removed the specific version constraint for `ureq`, allowing for more flexibility in dependency resolution. - Updated the `Cargo.lock` to reflect the new version of `ureq`, ensuring compatibility with recent changes in the codebase. * Enhance JSON-RPC logging and CLI initialization - Introduced a new `rpc_log` module for structured logging of JSON-RPC requests and responses, including redaction of sensitive parameters. - Updated `execute_core_cli` to initialize logging with a default level and timestamp format. - Enhanced logging in `rpc_handler` and `dispatch` functions to provide detailed insights into method calls and their execution times. - Improved error handling logging to capture method failures with context, aiding in debugging and monitoring. * Refactor HTTP server setup and add integration tests - Introduced a new `build_core_http_router` function to encapsulate the HTTP routing logic, improving code organization and readability. - Updated the `run_server` function to utilize the new router function, streamlining server initialization. - Added comprehensive integration tests for the JSON-RPC API, ensuring robust functionality and error handling in real-world scenarios. * Enhance OpenHuman backend integration and refactor provider handling - Added support for the OpenHuman backend in the TauriCommandsPanel, including default configurations and validation for API keys. - Introduced a new REPL command in the CLI for interactive RPC communication, allowing for dynamic mode switching and message handling. - Refactored provider creation logic to streamline the integration of the OpenHuman backend, removing deprecated provider overrides and ensuring consistent usage across the codebase. - Updated various components to improve error handling and user feedback related to provider selection and API interactions. * Refactor provider handling and update default model settings - Removed provider override states from the AgentChatPanel and TauriCommandsPanel components, simplifying state management. - Updated local storage handling to exclude provider overrides, ensuring cleaner data storage. - Changed default model settings across various components and backend configurations to use "neocortex-mk1" as the new default model. - Enhanced error handling and validation logic in the TauriCommandsPanel, focusing on model and temperature settings. - Streamlined integration tests and removed deprecated provider validation logic to improve code clarity and maintainability. * Refactor code for improved readability and consistency - Adjusted formatting in several files to enhance code clarity, including consistent parameter passing and alignment. - Simplified match statement syntax in the `run_models` function for better readability. - Streamlined assertions in tests to maintain consistency in error handling checks. - Updated default model name handling in the `AgentBuilder` for cleaner initialization. * Refactor API URL handling and enhance error reporting - Updated the `effective_api_url` function to improve clarity in resolving the API base URL, incorporating environment variable checks. - Enhanced diagnostics in the configuration check to provide clearer messages regarding the API URL status. - Introduced new error formatting functions to improve the clarity of error messages related to API transport issues. - Refactored error handling in the OpenAiCompatibleProvider to utilize the new error formatting, ensuring consistent and informative error reporting. * Refactor API client initialization for consistency - Updated the instantiation of `BackendOAuthClient` to consistently pass the API URL by reference across multiple functions. - Simplified the match statement in the `run_models_refresh` function for improved readability. * Enhance REPL command handling and add fallback mechanisms - Improved error handling in the REPL command processing, providing clearer feedback for command execution failures. - Introduced a fallback mechanism for the `agent_chat` RPC call, allowing for graceful degradation to a simpler chat method or a direct backend curl transport if the primary call fails. - Added a new `backend_chat_via_curl` function to handle chat requests using curl as a last resort, ensuring continued functionality in case of RPC issues. - Updated the `agent_chat_simple` function to support model overrides and temperature settings, enhancing flexibility in chat interactions. * Update default Ollama model settings for consistency - Changed the default Ollama model and vision model to "gemma3:4b-it-qat" for improved alignment across configurations. - Ensured consistent model naming to enhance clarity in model usage within the local AI module. * Implement login token consumption and enhance error handling - Added functionality to consume login tokens via a new API endpoint, returning a JWT for authenticated sessions. - Improved error handling in the Conversations component, introducing a fallback mechanism for chat interactions when the primary method is unavailable. - Updated UserProvider to restore session tokens automatically, enhancing user experience during authentication. - Refactored thread API to support the new login token consumption logic, ensuring seamless integration with the backend. * Update HTTP client configuration to use Rustls TLS - Replaced the HTTP/1.1 only setting with Rustls TLS in the OpenAiCompatibleProvider's client builder for enhanced security. - Ensured consistent application of the new TLS setting across multiple client instances. * Add Local AI command support and enhance error handling - Introduced a new `LocalAi` command in the CLI for managing local AI runtime operations, including status checks, asset downloads, and prompt handling. - Added detailed argument structures for various local AI functionalities, improving command usability. - Enhanced error reporting in the `LocalAiService` by including response details in error messages for better debugging and user feedback. - Refactored existing error handling to provide clearer context on failures during API interactions. * Add local AI module with Ollama integration and model management - Introduced a new local AI module that includes functionality for automatic installation of the Ollama runtime across different operating systems (Windows, macOS, Linux). - Implemented model ID resolution and management, providing default settings for various AI models and ensuring compatibility with user configurations. - Added HTTP API structures and request handling for Ollama, enabling interaction with the local AI service for generating responses and managing assets. - Developed utility functions for parsing model outputs and managing workspace paths, enhancing the overall structure and usability of the local AI service. - Established a comprehensive service layer for managing local AI operations, including status tracking and error handling for improved user experience. * Refactor local AI service structure and enhance asset management - Simplified the local AI module by reorganizing the service structure, introducing new modules for model IDs, paths, and asset management. - Added comprehensive asset status tracking for various AI models, including chat, vision, embedding, STT, and TTS, with improved error handling. - Implemented methods for downloading models and assets, ensuring better management of local AI resources. - Updated visibility of service methods to enhance encapsulation and maintainability within the local AI service. * Enhance local AI module with new download progress tracking and unit tests - Added new structures for tracking download progress of various AI models, including detailed status and metrics. - Implemented unit tests for model ID resolution, parsing suggestions, and asset path resolution to ensure robust functionality. - Refactored service methods to improve encapsulation and maintainability, enhancing the overall structure of the local AI service. - Updated existing tests to cover new functionalities and ensure consistent behavior across the module. * Implement new local AI download functionalities and refactor model management - Added support for downloading all local AI assets and tracking download progress, enhancing user experience and resource management. - Introduced new RPC methods for fetching download progress and managing asset states, improving the overall functionality of the local AI module. - Refactored existing model management code to utilize the new model catalog, ensuring better organization and maintainability. - Updated relevant tests to cover new functionalities and ensure consistent behavior across the local AI service. * Add new interfaces and functions for local AI download progress tracking - Introduced `LocalAiDownloadProgressItem` and `LocalAiDownloadsProgress` interfaces to structure download progress data for various AI models. - Implemented `openhumanLocalAiDownloadAllAssets` and `openhumanLocalAiDownloadsProgress` functions to facilitate downloading all assets and tracking their progress. - Enhanced error handling for Tauri environment checks in new functions, ensuring robust operation within the local AI module. * Refactor agent loop structure and introduce modular components - Deleted the `loop_.rs` file and reorganized the agent loop into multiple modules for better maintainability and clarity. - Introduced new files for handling credentials, history management, tool instructions, memory context, and parsing logic. - Implemented functions for scrubbing sensitive credentials, managing conversation history, and building tool instructions. - Enhanced the overall structure of the agent loop to facilitate easier testing and future development. * Refactor authentication structure and migrate to credentials module - Moved authentication-related functionality from `auth_profiles` to a new `credentials` module for better organization and clarity. - Updated references in the API and core server to reflect the new module structure. - Introduced new data structures and methods for managing authentication profiles, including session support and response handling. - Removed the obsolete `auth_profiles` module to streamline the codebase and enhance maintainability. * Add screen intelligence module with capture and context management - Introduced new modules for screen capture and context management, specifically targeting macOS. - Implemented functionality to capture screen images and retrieve foreground application context. - Added data structures for managing application context and window bounds. - Established limits for screenshot sizes and context character counts to ensure efficient resource management. - Enhanced helper functions for input action validation and vision summary processing. - Set up a modular structure for better maintainability and future enhancements. * Refactor screen intelligence module and remove obsolete components - Deleted unused files related to screen intelligence, including context and permissions management, to streamline the codebase. - Refactored the capture functionality to improve organization and maintainability. - Updated function signatures for better clarity and consistency. - Enhanced the overall structure of the screen intelligence module for future development and testing. * Enhance autocomplete CLI functionality and refactor related code - Added new options for the autocomplete command in the CLI, allowing users to run the autocomplete loop in the current process or spawn a detached process. - Introduced `AutocompleteStartCliOptions` struct to encapsulate the new command-line arguments. - Refactored the `autocomplete_start_cli` function to handle the new options and improve process management for the autocomplete service. - Updated documentation in `CLAUDE.md` to clarify the separation of concerns between routing and controller logic in the codebase. * Enhance autocomplete error handling and improve focused text context retrieval - Added a new function to identify "no text candidate" errors, improving error management in the autocomplete engine. - Refactored the `focused_text_context` and `focused_text_context_verbose` functions to enhance clarity and reliability in retrieving application context. - Updated the return format of the `focused_text_context_verbose` function to use a separator for better data parsing. - Added a new TODO item for allowing users to select LLM model versions based on their CPU capabilities. * Remove Docker, Native, and WASM runtime implementations along with related traits and tests - Deleted the DockerRuntime, NativeRuntime, and WasmRuntime implementations to streamline the codebase. - Removed associated traits and factory functions for runtime creation. - Eliminated all related tests to ensure a clean removal of unused components. - This refactor aims to simplify the runtime management and prepare for future enhancements. * Add quickjs-runtime feature and introduce runtime module - Added a new feature flag for `quickjs-runtime` in `Cargo.toml` to enable its usage. - Created a new `runtime.rs` module to implement `NativeRuntime` and `DockerRuntime` with associated traits for runtime management. - Updated the `skills` module to reference the correct path for `SkillConfig`. - Removed the obsolete `skillforge` module from the `openhuman` namespace to streamline the codebase. - Enhanced the `skills` module with new structures and functions for managing skills, including initialization and loading logic. * Refactor autocomplete configuration to remove legacy disabled apps - Updated the default configuration for `AutocompleteConfig` to remove the legacy disabled apps ('terminal' and 'code'), allowing for broader usage of Codex/CLI. - Introduced a migration function to handle legacy disabled apps during configuration loading, ensuring custom user preferences remain intact. - This change enhances the flexibility of the autocomplete feature by preventing unnecessary restrictions on application usage. * Update rquickjs dependencies in Cargo.lock - Updated the rquickjs and rquickjs-core dependencies to versions 0.11.0 and 0.9.0 respectively, ensuring compatibility with the latest features and fixes. - Added new entries for rquickjs-sys and its corresponding version 0.9.0 to the dependency list, enhancing the project's runtime capabilities. - This update improves the overall stability and performance of the application by leveraging the latest improvements in the rquickjs ecosystem. * Add terminal application detection to autocomplete logic - Introduced a new function `is_terminal_app` to identify terminal applications based on their names, enhancing the autocomplete feature's context awareness. - Updated the `focused_text_context_verbose` function to allow terminal applications to bypass text role checks when the input value is not empty, improving user experience in terminal environments. - This change aims to provide better support for terminal-based applications in the autocomplete system. * Add terminal input context extraction and noise line detection - Introduced functions to identify terminal-like buffers and filter out noise lines in terminal input, enhancing the autocomplete engine's context awareness. - Updated the `focused_text_context` logic to utilize the new terminal context extraction, improving the handling of text in terminal applications. - Enhanced the `focused_text_context_verbose` function to better retrieve static text values from UI elements, ensuring accurate context representation in terminal environments. - These changes aim to improve user experience and functionality for terminal-based applications in the autocomplete system. * Enhance autocomplete engine state management and error handling - Added new fields `last_escape_down` and `last_overlay_signature` to `EngineState` for improved state tracking. - Implemented `try_reject_via_escape` method to handle escape key interactions, allowing users to reject suggestions more intuitively. - Updated error handling to display notifications for different states (ready, accepted, rejected, error) using `show_overflow_badge`. - Refactored state updates to ensure consistent management of suggestion and phase transitions, enhancing overall user experience in the autocomplete system. * Implement periodic status logging in autocomplete service - Added a polling mechanism to log the status of the autocomplete engine at regular intervals. - Enhanced logging to capture changes in phase, application name, suggestions, and errors, improving visibility during service execution. - Refactored the `autocomplete_start_cli` function to integrate the new logging functionality, ensuring a more informative user experience while the service is running. * Refactor memory dispatch logic and remove local memory implementation - Updated the memory dispatch functions to utilize the new `memory_rpc` module, enhancing the handling of memory operations such as document management and namespace queries. - Removed the local memory implementation, including database interactions and related functions, to streamline the codebase and improve maintainability. - Introduced new RPC calls for document operations (put, list, delete) and context queries, ensuring a more efficient and consistent approach to memory management. - This refactor aims to enhance the overall architecture and performance of the memory handling system. * Remove macOS-specific overflow badge functionality and related helper functions - Deleted the `show_overflow_badge` and `escape_applescript_string` functions, which were specific to macOS, to streamline the codebase. - Refactored the `show_overflow_badge` function to provide a no-op implementation for non-macOS platforms, enhancing cross-platform compatibility. - This change simplifies the autocomplete module by removing platform-dependent code, improving maintainability and clarity. * Enhance text application logic in autocomplete module - Updated the `apply_text_to_focused_field` function to improve interaction with focused UI elements on macOS. - The new implementation retrieves the current value of the focused element and appends the provided text, ensuring better handling of text input. - Enhanced error reporting to include stderr output when applying suggestions fails, improving debugging capabilities. - These changes aim to provide a more robust and user-friendly experience in the autocomplete functionality. * Refactor Landlock feature configuration for Linux support - Moved the `landlock` and `rppal` dependencies under a conditional target configuration for Linux in both `Cargo.toml` files, ensuring they are only included when building for Linux. - Updated the `landlock.rs` module to check for both the `sandbox-landlock` feature and the Linux target OS, improving the conditional compilation logic. - This change enhances cross-platform compatibility and ensures that Landlock functionality is only available on supported systems. * Update dependencies and enhance Tauri integration - Updated the Tauri dependency in `Cargo.toml` to include the `tray-icon` feature, enabling system tray support. - Introduced a new `rust-toolchain.toml` file to pin the Rust version to 1.93.0, ensuring compatibility with the matrix-sdk. - Modified GitHub workflows to use the specified Rust version from `rust-toolchain.toml` instead of the stable version, improving build consistency. - Refactored Tauri commands to utilize a new `wrapCommandResult` function for better response handling. - Added a new `tray` module in `openhuman` for managing system tray functionality, enhancing the desktop experience. - Updated various command implementations to streamline service management and improve error handling. * Refactor core process handling and enhance encryption features - Removed the `openhuman` dependency from `Cargo.lock` and `Cargo.toml`, streamlining the project structure. - Updated the core process handling to fall back to a child process when in-process execution is unavailable, improving error handling and logging. - Introduced new encryption commands (`ai_init_encryption`, `ai_encrypt`, `ai_decrypt`) to enhance security features, utilizing AES-GCM for data protection. - Added a new `tray` module for managing system tray functionality, improving user experience on desktop platforms. - Refactored various command implementations to improve service management and error handling, ensuring a more robust application architecture. * Remove unused modules and refactor daemon host configuration - Deleted the `daemon_host_config`, `memory`, `models`, `openhuman_daemon`, `tray`, `chat`, `conscious_loop`, and `runtime` modules to streamline the codebase. - Refactored the daemon host configuration logic into the `openhuman` module, consolidating related functionality. - Updated command implementations to utilize the new configuration methods, ensuring consistent handling of daemon host settings. - This cleanup enhances maintainability and reduces complexity in the project structure. * Refactor memory management and update Tauri dependencies - Removed the `tray-icon` feature from the Tauri dependency in `Cargo.toml` to streamline the configuration. - Deleted the `core:tray:default` capability from the default capabilities JSON, simplifying the capabilities structure. - Refactored memory handling in tests to utilize `UnifiedMemory` instead of `SqliteMemory`, enhancing consistency across memory operations. - Updated memory store, recall, and forget functionalities to support a global namespace, improving memory management and retrieval processes. - Enhanced error handling and logging in memory operations to provide clearer feedback during execution. * Remove AI encryption commands and related functionality - Deleted the `ai_init_encryption`, `ai_encrypt`, and `ai_decrypt` functions to streamline the codebase and remove unused features. - Updated the command registration in the `run` function to reflect the removal of these encryption commands, enhancing maintainability and reducing complexity. * Add OAuth integration token handling and channel connection management - Introduced functions to fetch and encrypt integration tokens using OAuth, enhancing security for token management. - Updated the channel connections API to support OAuth integration, including listing, connecting, and disconnecting channels. - Implemented checks for supported channels and authentication modes, improving the robustness of channel connection handling. - Enhanced error handling for integration token retrieval to ensure required fields are present before proceeding. * Refactor project structure and update documentation - Renamed the project from "Outsourced" to "OpenHuman" and revised the project summary to reflect its focus on AI-powered assistance for crypto communities. - Restructured the repository layout, detailing the purpose of each directory and its contents. - Updated runtime scope to clarify platform support and Tauri's desktop-only focus. - Enhanced documentation across various files, including architecture, services, and routing, to improve clarity and usability for contributors. - Removed outdated sections and streamlined commands for development and production builds, ensuring consistency in the documentation. * Implement REPL session management and multimodal support - Introduced a new REPL session management system, allowing for session-specific interactions with agents. - Added functions for starting, chatting, resetting, and ending REPL sessions, enhancing user experience and control. - Implemented multimodal message handling, enabling the processing of images alongside text in user messages. - Updated the project structure to include new modules for identity and multimodal functionalities, improving organization and maintainability. - Enhanced error handling and logging for session operations, providing clearer feedback during execution. * Refactor memory store implementation and introduce unified memory management - Removed the legacy memory store implementation and replaced it with a new unified memory management system. - Introduced a `MemoryClient` for handling document storage, retrieval, and namespace management. - Added support for key-value storage and graph data structures within the unified memory framework. - Enhanced the `UnifiedMemory` struct with methods for document upsertion, querying, and namespace operations. - Updated the project structure to include new modules for memory types, factories, and traits, improving organization and maintainability. - Improved error handling and logging across memory operations for clearer feedback during execution. * Implement QuickJS skill instance management - Removed the previous QjsSkillInstance implementation and replaced it with a new modular structure. - Introduced separate modules for event loop management, instance handling, JavaScript handlers, and utility functions. - Enhanced the event loop to efficiently manage QuickJS runtime tasks, including timer callbacks and message processing. - Added support for asynchronous tool calls and lifecycle management within the QuickJS context. - Improved error handling and logging throughout the new implementation for better debugging and user feedback. - Updated documentation to reflect the new structure and functionality of the QuickJS skill instance. --- .github/pull_request_template.md | 2 +- .github/workflows/build.yml | 15 +- .github/workflows/release.yml | 33 +- .github/workflows/test.yml | 22 +- .github/workflows/typecheck.yml | 2 +- .gitignore | 3 +- .husky/pre-commit | 0 CLAUDE.md | 551 +- CONTRIBUTING.md | 2 +- Cargo.lock | 826 +- Cargo.toml | 113 +- .prettierignore => app/.prettierignore | 0 .prettierrc => app/.prettierrc | 0 eslint.config.js => app/eslint.config.js | 0 app/package.json | 102 +- postcss.config.js => app/postcss.config.js | 0 {public => app/public}/alpha.svg | 0 {public => app/public}/bg-dark.png | Bin {public => app/public}/bg.jpg | Bin {public => app/public}/bg.png | Bin {public => app/public}/logo.png | Bin {public => app/public}/lottie/analytics.json | 0 {public => app/public}/lottie/connect2.json | 0 {public => app/public}/lottie/connection.json | 0 {public => app/public}/lottie/safe.json | 0 {public => app/public}/lottie/safe2.json | 0 {public => app/public}/lottie/safe3.json | 0 {public => app/public}/lottie/trophy.json | 0 {public => app/public}/lottie/wave.json | 0 app/src-tauri/.gitignore | 1 + {src-tauri => app/src-tauri}/Cargo.lock | 1552 +-- app/src-tauri/Cargo.toml | 167 +- app/src-tauri/build.rs | 33 +- app/src-tauri/capabilities/default.json | 15 +- app/src-tauri/icons/128x128.png | Bin 3512 -> 5025 bytes app/src-tauri/icons/128x128@2x.png | Bin 7012 -> 10806 bytes app/src-tauri/icons/32x32.png | Bin 974 -> 1070 bytes {src-tauri => app/src-tauri}/icons/64x64.png | Bin app/src-tauri/icons/Square107x107Logo.png | Bin 2863 -> 4130 bytes app/src-tauri/icons/Square142x142Logo.png | Bin 3858 -> 5574 bytes app/src-tauri/icons/Square150x150Logo.png | Bin 3966 -> 5937 bytes app/src-tauri/icons/Square284x284Logo.png | Bin 7737 -> 12184 bytes app/src-tauri/icons/Square30x30Logo.png | Bin 903 -> 998 bytes app/src-tauri/icons/Square310x310Logo.png | Bin 8591 -> 13449 bytes app/src-tauri/icons/Square44x44Logo.png | Bin 1299 -> 1459 bytes app/src-tauri/icons/Square71x71Logo.png | Bin 2011 -> 2533 bytes app/src-tauri/icons/Square89x89Logo.png | Bin 2468 -> 3279 bytes app/src-tauri/icons/StoreLogo.png | Bin 1523 -> 1738 bytes app/src-tauri/icons/icon.icns | Bin 98451 -> 117167 bytes app/src-tauri/icons/icon.ico | Bin 86642 -> 19494 bytes app/src-tauri/icons/icon.png | Bin 14183 -> 23922 bytes .../src-tauri}/images/background-dmg.png | Bin app/src-tauri/src/commands/core_relay.rs | 81 + app/src-tauri/src/commands/mod.rs | 11 + app/src-tauri/src/commands/openhuman.rs | 129 + .../src-tauri}/src/commands/window.rs | 0 .../src-tauri}/src/core_process.rs | 83 +- {src-tauri => app/src-tauri}/src/core_rpc.rs | 0 app/src-tauri/src/lib.rs | 654 +- app/src-tauri/src/main.rs | 11 +- app/src-tauri/src/utils/dev_paths.rs | 30 + app/src-tauri/src/utils/mod.rs | 1 + app/src-tauri/tauri.conf.json | 42 +- app/src/App.css | 4 +- app/src/App.tsx | 103 +- {src => app/src}/AppRoutes.tsx | 0 {src => app/src}/SOUL.md | 0 {src => app/src}/__tests__/setup.ts | 0 .../src}/assets/icons/ExchangeIcon.tsx | 0 {src => app/src}/assets/icons/GmailIcon.tsx | 0 {src => app/src}/assets/icons/GoogleIcon.tsx | 0 {src => app/src}/assets/icons/WalletIcon.tsx | 0 {src => app/src}/assets/icons/binance.svg | 0 {src => app/src}/assets/icons/metamask.svg | 0 {src => app/src}/assets/icons/notion.svg | 0 {src => app/src}/assets/icons/telegram.svg | 0 .../src}/components/ConnectionIndicator.tsx | 0 .../src}/components/DefaultRedirect.tsx | 0 .../src}/components/DesignSystemShowcase.tsx | 0 .../src}/components/ErrorFallbackScreen.tsx | 0 .../components/ErrorReportNotification.tsx | 0 .../components/GmailConnectionIndicator.tsx | 0 .../src}/components/LottieAnimation.tsx | 0 {src => app/src}/components/MiniSidebar.tsx | 0 .../src}/components/PrivacyFeatureCard.tsx | 0 .../src}/components/ProgressIndicator.tsx | 0 .../src}/components/ProtectedRoute.tsx | 0 {src => app/src}/components/PublicRoute.tsx | 0 .../components/RotatingTetrahedronCanvas.tsx | 0 {src => app/src}/components/SkillsGrid.tsx | 166 +- .../TelegramConnectionIndicator.tsx | 0 .../src}/components/TypewriterGreeting.tsx | 0 .../src}/components/WalletInfoSection.tsx | 0 .../__tests__/ConnectionIndicator.test.tsx | 0 .../__tests__/ProtectedRoute.test.tsx | 0 .../components/__tests__/PublicRoute.test.tsx | 0 .../daemon/DaemonHealthIndicator.tsx | 0 .../components/daemon/DaemonHealthPanel.tsx | 0 .../intelligence/ActionableCard.tsx | 0 .../intelligence/ConfirmationModal.tsx | 0 .../intelligence/MemoryWorkspace.tsx | 0 .../src}/components/intelligence/Toast.tsx | 0 .../src}/components/intelligence/index.ts | 0 .../src}/components/intelligence/mockData.ts | 0 .../src}/components/intelligence/utils.ts | 0 .../components/oauth/OAuthLoginSection.tsx | 0 .../components/oauth/OAuthProviderButton.tsx | 0 .../src}/components/oauth/providerConfigs.tsx | 0 .../src}/components/settings/SettingsHome.tsx | 17 + .../components/SettingsBackButton.tsx | 0 .../settings/components/SettingsHeader.tsx | 0 .../settings/components/SettingsMenuItem.tsx | 0 .../components/SettingsPanelLayout.tsx | 0 .../settings/hooks/useSettingsAnimation.ts | 0 .../settings/hooks/useSettingsNavigation.ts | 2 + .../components/settings/panels/AIPanel.tsx | 0 .../settings/panels/AccessibilityPanel.tsx | 0 .../settings/panels/AdvancedPanel.tsx | 0 .../settings/panels/AgentChatPanel.tsx | 27 +- .../settings/panels/AutocompletePanel.tsx | 484 + .../settings/panels/BillingPanel.tsx | 0 .../settings/panels/ConnectionsPanel.tsx | 0 .../settings/panels/CronJobsPanel.tsx | 0 .../settings/panels/DeveloperOptionsPanel.tsx | 0 .../settings/panels/LocalModelPanel.tsx | 0 .../settings/panels/MemoryDebugPanel.tsx | 0 .../settings/panels/MessagingPanel.tsx | 0 .../settings/panels/PrivacyPanel.tsx | 0 .../settings/panels/ProfilePanel.tsx | 0 .../panels/ScreenIntelligencePanel.tsx | 0 .../settings/panels/SkillsPanel.tsx | 0 .../settings/panels/TauriCommandsPanel.tsx | 391 +- .../settings/panels/TeamInvitesPanel.tsx | 0 .../settings/panels/TeamManagementPanel.tsx | 0 .../settings/panels/TeamMembersPanel.tsx | 0 .../components/settings/panels/TeamPanel.tsx | 0 .../__tests__/AccessibilityPanel.test.tsx | 0 .../panels/__tests__/billingHelpers.test.ts | 0 .../panels/__tests__/memoryDebugUtils.test.ts | 0 .../settings/panels/billingHelpers.ts | 0 .../panels/components/ActionPanel.tsx | 0 .../settings/panels/components/InputGroup.tsx | 0 .../panels/components/SectionCard.tsx | 0 .../panels/components/ValidatedField.tsx | 0 .../settings/panels/memoryDebugUtils.ts | 0 .../components/skills/SetupFormRenderer.tsx | 0 .../skills/SkillManagementPanel.tsx | 0 .../components/skills/SkillSetupModal.tsx | 0 .../components/skills/SkillSetupWizard.tsx | 16 +- {src => app/src}/components/skills/shared.tsx | 0 {src => app/src}/data/countries.ts | 0 {src => app/src}/hooks/useConsciousItems.ts | 0 {src => app/src}/hooks/useDaemonHealth.ts | 0 {src => app/src}/hooks/useDaemonLifecycle.ts | 0 .../src}/hooks/useIntelligenceApiFallback.ts | 0 .../src}/hooks/useIntelligenceSocket.ts | 0 .../src}/hooks/useIntelligenceStats.ts | 9 +- {src => app/src}/hooks/useSocket.ts | 0 {src => app/src}/hooks/useToolsUpdates.ts | 0 {src => app/src}/hooks/useUser.ts | 0 {src => app/src}/index.css | 0 {src => app/src}/index.html | 0 .../src}/lib/ai/__tests__/loader.test.ts | 0 .../ai/constitution/__tests__/loader.test.ts | 0 .../constitution/__tests__/validator.test.ts | 0 .../ai/constitution/default-constitution.md | 0 .../src}/lib/ai/constitution/loader.ts | 0 {src => app/src}/lib/ai/constitution/types.ts | 0 .../src}/lib/ai/constitution/validator.ts | 0 {src => app/src}/lib/ai/entities/manager.ts | 0 {src => app/src}/lib/ai/entities/query.ts | 0 {src => app/src}/lib/ai/entities/types.ts | 0 {src => app/src}/lib/ai/index.ts | 0 {src => app/src}/lib/ai/loader.ts | 0 .../lib/ai/memory/__tests__/chunker.test.ts | 0 .../__tests__/context-formatter.test.ts | 0 .../lib/ai/memory/__tests__/dedup.test.ts | 0 {src => app/src}/lib/ai/memory/chunker.ts | 0 .../src}/lib/ai/memory/context-formatter.ts | 0 .../src}/lib/ai/memory/context-loader.ts | 0 {src => app/src}/lib/ai/memory/dedup.ts | 0 {src => app/src}/lib/ai/memory/encryption.ts | 0 .../src}/lib/ai/memory/hybrid-search.ts | 13 +- {src => app/src}/lib/ai/memory/manager.ts | 45 +- {src => app/src}/lib/ai/memory/schema.ts | 0 {src => app/src}/lib/ai/memory/types.ts | 0 .../lib/ai/prompts/__tests__/sections.test.ts | 0 .../prompts/__tests__/system-prompt.test.ts | 0 .../lib/ai/prompts/sections/constitution.ts | 0 .../src}/lib/ai/prompts/sections/context.ts | 0 .../prompts/sections/crypto-intelligence.ts | 0 .../src}/lib/ai/prompts/sections/identity.ts | 0 .../lib/ai/prompts/sections/memory-recall.ts | 0 .../src}/lib/ai/prompts/sections/skills.ts | 0 .../src}/lib/ai/prompts/sections/tools.ts | 0 .../src}/lib/ai/prompts/system-prompt.ts | 0 {src => app/src}/lib/ai/prompts/templates.ts | 0 .../ai/providers/__tests__/embeddings.test.ts | 0 {src => app/src}/lib/ai/providers/custom.ts | 0 .../src}/lib/ai/providers/embeddings.ts | 0 .../src}/lib/ai/providers/interface.ts | 0 {src => app/src}/lib/ai/providers/openai.ts | 0 .../__tests__/session-capture.test.ts | 0 .../sessions/__tests__/tool-compress.test.ts | 0 .../lib/ai/sessions/__tests__/types.test.ts | 0 .../src}/lib/ai/sessions/compaction.ts | 0 {src => app/src}/lib/ai/sessions/manager.ts | 38 +- .../src}/lib/ai/sessions/memory-flush.ts | 0 .../src}/lib/ai/sessions/session-capture.ts | 0 .../src}/lib/ai/sessions/tool-compress.ts | 0 .../src}/lib/ai/sessions/transcript.ts | 28 +- {src => app/src}/lib/ai/sessions/types.ts | 0 {src => app/src}/lib/ai/soul/loader.ts | 4 +- {src => app/src}/lib/ai/soul/types.ts | 0 .../lib/ai/tools/__tests__/loader.test.ts | 2 +- .../lib/ai/tools/__tests__/registry.test.ts | 0 {src => app/src}/lib/ai/tools/loader.ts | 2 +- {src => app/src}/lib/ai/tools/memory-read.ts | 0 .../src}/lib/ai/tools/memory-search.ts | 0 {src => app/src}/lib/ai/tools/memory-write.ts | 0 {src => app/src}/lib/ai/tools/registry.ts | 0 {src => app/src}/lib/ai/tools/types.ts | 0 {src => app/src}/lib/ai/tools/web-search.ts | 0 {src => app/src}/lib/ai/types.ts | 0 .../lib/channels/__tests__/routing.test.ts | 0 {src => app/src}/lib/channels/routing.ts | 0 .../src}/lib/gmail/services/metadataSync.ts | 0 .../src}/lib/intelligence/chatTools.ts | 0 .../lib/mcp/__tests__/errorHandler.test.ts | 0 .../lib/mcp/__tests__/rateLimiter.test.ts | 0 .../src}/lib/mcp/__tests__/validation.test.ts | 0 {src => app/src}/lib/mcp/errorHandler.ts | 0 {src => app/src}/lib/mcp/index.ts | 0 {src => app/src}/lib/mcp/logger.ts | 0 {src => app/src}/lib/mcp/rateLimiter.ts | 0 {src => app/src}/lib/mcp/transport.ts | 0 {src => app/src}/lib/mcp/types.ts | 0 {src => app/src}/lib/mcp/validation.ts | 0 .../src}/lib/notion/services/metadataSync.ts | 0 {src => app/src}/lib/skills/hooks.ts | 0 {src => app/src}/lib/skills/index.ts | 0 {src => app/src}/lib/skills/manager.ts | 22 +- {src => app/src}/lib/skills/paths.ts | 0 {src => app/src}/lib/skills/runtime.ts | 8 +- {src => app/src}/lib/skills/sync.ts | 0 {src => app/src}/lib/skills/tool-bridge.ts | 0 {src => app/src}/lib/skills/transport.ts | 16 +- {src => app/src}/lib/skills/types.ts | 0 {src => app/src}/lib/tools/auto-update.ts | 0 {src => app/src}/lib/tools/file-watcher.ts | 0 app/src/main.tsx | 31 +- {src => app/src}/pages/Agents.tsx | 0 {src => app/src}/pages/Conversations.tsx | 52 +- {src => app/src}/pages/Home.tsx | 0 {src => app/src}/pages/Intelligence.tsx | 0 {src => app/src}/pages/Invites.tsx | 0 {src => app/src}/pages/Mnemonic.tsx | 0 {src => app/src}/pages/Settings.tsx | 2 + {src => app/src}/pages/Skills.tsx | 4 +- {src => app/src}/pages/Welcome.tsx | 0 .../src}/pages/__tests__/skillsSyncUi.test.ts | 0 .../src}/pages/onboarding/Onboarding.tsx | 0 .../pages/onboarding/steps/AnalyticsStep.tsx | 0 .../pages/onboarding/steps/ConnectStep.tsx | 0 .../pages/onboarding/steps/FeaturesStep.tsx | 0 .../pages/onboarding/steps/GetStartedStep.tsx | 0 .../pages/onboarding/steps/InviteCodeStep.tsx | 0 .../pages/onboarding/steps/PrivacyStep.tsx | 0 {src => app/src}/pages/skillsSyncUi.ts | 0 {src => app/src}/polyfills.ts | 0 {src => app/src}/providers/AIProvider.tsx | 0 .../src}/providers/IntelligenceProvider.tsx | 0 {src => app/src}/providers/SkillProvider.tsx | 4 +- {src => app/src}/providers/SocketProvider.tsx | 0 {src => app/src}/providers/UserProvider.tsx | 27 +- .../__tests__/agentToolRegistry.test.ts | 0 .../src}/services/agentToolRegistry.ts | 0 {src => app/src}/services/analytics.ts | 0 .../services/api/__tests__/billingApi.test.ts | 0 .../services/api/__tests__/teamApi.test.ts | 0 .../services/api/__tests__/userApi.test.ts | 0 .../src}/services/api/actionableItemsApi.ts | 0 {src => app/src}/services/api/apiKeysApi.ts | 0 app/src/services/api/authApi.ts | 101 + {src => app/src}/services/api/billingApi.ts | 0 app/src/services/api/channelConnectionsApi.ts | 195 + {src => app/src}/services/api/creditsApi.ts | 0 {src => app/src}/services/api/feedbackApi.ts | 0 {src => app/src}/services/api/inferenceApi.ts | 0 {src => app/src}/services/api/inviteApi.ts | 0 {src => app/src}/services/api/settingsApi.ts | 0 {src => app/src}/services/api/teamApi.ts | 0 {src => app/src}/services/api/threadApi.ts | 8 + {src => app/src}/services/api/tunnelsApi.ts | 0 {src => app/src}/services/api/userApi.ts | 0 {src => app/src}/services/apiClient.ts | 0 {src => app/src}/services/chatService.ts | 0 app/src/services/coreRpcClient.ts | 41 + .../src}/services/daemonHealthService.ts | 0 {src => app/src}/services/errorReportQueue.ts | 0 {src => app/src}/services/intelligenceApi.ts | 0 {src => app/src}/services/socketService.ts | 0 .../__tests__/accessibilitySlice.test.ts | 0 .../src}/store/__tests__/aiSlice.test.ts | 0 .../store/__tests__/authSelectors.test.ts | 0 .../src}/store/__tests__/authSlice.test.ts | 0 .../__tests__/channelConnectionsSlice.test.ts | 0 .../store/__tests__/socketSelectors.test.ts | 0 .../src}/store/__tests__/socketSlice.test.ts | 0 .../src}/store/__tests__/teamSlice.test.ts | 0 .../src}/store/__tests__/userSlice.test.ts | 0 {src => app/src}/store/accessibilitySlice.ts | 0 {src => app/src}/store/aiSlice.ts | 0 {src => app/src}/store/authSelectors.ts | 0 {src => app/src}/store/authSlice.ts | 0 .../src}/store/channelConnectionsSlice.ts | 0 {src => app/src}/store/daemonSlice.ts | 0 {src => app/src}/store/gmailSlice.ts | 0 {src => app/src}/store/hooks.ts | 0 {src => app/src}/store/index.ts | 0 {src => app/src}/store/intelligenceSlice.ts | 0 {src => app/src}/store/inviteSlice.ts | 0 {src => app/src}/store/notionSlice.ts | 0 {src => app/src}/store/skillsSlice.ts | 0 {src => app/src}/store/socketSelectors.ts | 0 {src => app/src}/store/socketSlice.ts | 0 {src => app/src}/store/teamSlice.ts | 0 {src => app/src}/store/threadSlice.ts | 0 {src => app/src}/store/userSlice.ts | 0 {src => app/src}/styles/theme.css | 0 {src => app/src}/test/handlers.ts | 0 {src => app/src}/test/server.ts | 0 {src => app/src}/test/setup.ts | 0 {src => app/src}/test/test-utils.tsx | 0 {src => app/src}/types/agent.ts | 0 {src => app/src}/types/api.ts | 0 {src => app/src}/types/channels.ts | 0 {src => app/src}/types/global.d.ts | 0 .../src}/types/intelligence-chat-api.ts | 0 {src => app/src}/types/intelligence.ts | 0 {src => app/src}/types/invite.ts | 0 {src => app/src}/types/oauth.ts | 0 {src => app/src}/types/onboarding.ts | 0 {src => app/src}/types/team.ts | 0 {src => app/src}/types/thread.ts | 0 .../src}/utils/__tests__/sanitize.test.ts | 0 .../__tests__/tauriCoreBridge.e2e.test.ts | 8 +- {src => app/src}/utils/config.ts | 0 {src => app/src}/utils/cryptoKeys.ts | 0 {src => app/src}/utils/deeplink.ts | 0 .../src}/utils/desktopDeepLinkListener.ts | 0 .../src}/utils/integrationTokensCrypto.ts | 0 .../src}/utils/intelligenceTransforms.ts | 0 {src => app/src}/utils/openUrl.ts | 0 {src => app/src}/utils/sanitize.ts | 0 {src => app/src}/utils/tauriCommands.ts | 640 +- {src => app/src}/utils/tauriSocket.ts | 44 +- app/src/vite-env.d.ts | 12 + tailwind.config.js => app/tailwind.config.js | 0 {test => app/test}/e2e/globals.d.ts | 0 {test => app/test}/e2e/helpers/app-helpers.ts | 0 .../test}/e2e/helpers/deep-link-helpers.ts | 0 .../test}/e2e/helpers/element-helpers.ts | 0 {test => app/test}/e2e/mock-server.ts | 0 .../e2e/specs/auth-access-control.spec.ts | 0 .../test}/e2e/specs/card-payment-flow.spec.ts | 0 .../e2e/specs/crypto-payment-flow.spec.ts | 0 .../test}/e2e/specs/gmail-flow.spec.ts | 0 .../e2e/specs/local-model-runtime.spec.ts | 0 .../test}/e2e/specs/login-flow.spec.ts | 0 .../test}/e2e/specs/navigation.spec.ts | 0 .../test}/e2e/specs/notion-flow.spec.ts | 0 {test => app/test}/e2e/specs/smoke.spec.ts | 0 .../test}/e2e/specs/tauri-commands.spec.ts | 0 .../test}/e2e/specs/telegram-flow.spec.ts | 0 {test => app/test}/tsconfig.e2e.json | 0 {test => app/test}/vitest.config.ts | 0 {test => app/test}/wdio.conf.ts | 10 +- app/tsconfig.json | 5 + app/vite.config.ts | 37 +- app/yarn.lock | 8317 +++++++++++++++++ docs/ARCHITECTURE.md | 16 +- docs/TODO.md | 24 +- docs/src-tauri/01-architecture.md | 162 +- docs/src-tauri/02-commands.md | 352 +- docs/src-tauri/03-services.md | 308 +- docs/src-tauri/README.md | 412 +- docs/src/01-architecture.md | 211 +- docs/src/03-services.md | 182 +- docs/src/04-mcp-system.md | 434 +- docs/src/05-pages-routing.md | 38 +- docs/src/07-providers.md | 254 +- docs/src/README.md | 100 +- package.json | 130 +- public/tauri.svg | 6 - public/vite.svg | 1 - rust-core/Cargo.toml | 110 - rust-core/src/auth/anthropic_token.rs | 86 - rust-core/src/auth/mod.rs | 395 - rust-core/src/auth/openai_oauth.rs | 510 - rust-core/src/core_server.rs | 2451 ----- rust-core/src/memory/db.rs | 69 - rust-core/src/memory/extraction.rs | 201 - rust-core/src/memory/ingestion.rs | 190 - rust-core/src/memory/mod.rs | 211 - rust-core/src/openhuman/accessibility/mod.rs | 1 - rust-core/src/openhuman/agent/loop_.rs | 2961 ------ .../src/openhuman/config/schema/gateway.rs | 81 - rust-core/src/openhuman/gateway/client.rs | 65 - rust-core/src/openhuman/gateway/constants.rs | 39 - .../src/openhuman/gateway/handlers/health.rs | 43 - .../src/openhuman/gateway/handlers/linq.rs | 128 - .../src/openhuman/gateway/handlers/mod.rs | 13 - .../src/openhuman/gateway/handlers/pair.rs | 97 - .../src/openhuman/gateway/handlers/webhook.rs | 261 - .../openhuman/gateway/handlers/whatsapp.rs | 170 - rust-core/src/openhuman/gateway/mod.rs | 14 - rust-core/src/openhuman/gateway/models.rs | 23 - rust-core/src/openhuman/gateway/rate_limit.rs | 154 - rust-core/src/openhuman/gateway/server.rs | 297 - rust-core/src/openhuman/gateway/state.rs | 35 - rust-core/src/openhuman/gateway/tests.rs | 995 -- rust-core/src/openhuman/hardware/discover.rs | 45 - .../src/openhuman/hardware/introspect.rs | 121 - rust-core/src/openhuman/hardware/mod.rs | 124 - rust-core/src/openhuman/hardware/registry.rs | 102 - rust-core/src/openhuman/local_ai/mod.rs | 1740 ---- rust-core/src/openhuman/memory/backend.rs | 162 - rust-core/src/openhuman/memory/hygiene.rs | 540 -- rust-core/src/openhuman/memory/lucid.rs | 685 -- rust-core/src/openhuman/memory/markdown.rs | 355 - rust-core/src/openhuman/memory/mod.rs | 536 -- rust-core/src/openhuman/memory/none.rs | 87 - rust-core/src/openhuman/memory/postgres.rs | 349 - rust-core/src/openhuman/memory/snapshot.rs | 470 - rust-core/src/openhuman/memory/sqlite.rs | 1900 ---- rust-core/src/openhuman/memory/vector.rs | 402 - rust-core/src/openhuman/observability/log.rs | 168 - rust-core/src/openhuman/observability/mod.rs | 155 - .../src/openhuman/observability/multi.rs | 163 - rust-core/src/openhuman/observability/noop.rs | 83 - rust-core/src/openhuman/observability/otel.rs | 522 -- .../src/openhuman/observability/prometheus.rs | 384 - .../src/openhuman/observability/traits.rs | 154 - .../src/openhuman/observability/verbose.rs | 101 - .../openhuman/peripherals/arduino_flash.rs | 144 - .../openhuman/peripherals/arduino_upload.rs | 161 - .../peripherals/capabilities_tool.rs | 99 - rust-core/src/openhuman/peripherals/mod.rs | 146 - .../src/openhuman/peripherals/nucleo_flash.rs | 83 - rust-core/src/openhuman/peripherals/rpi.rs | 173 - rust-core/src/openhuman/peripherals/serial.rs | 275 - rust-core/src/openhuman/peripherals/traits.rs | 33 - .../src/openhuman/peripherals/uno_q_bridge.rs | 151 - .../src/openhuman/peripherals/uno_q_setup.rs | 144 - .../src/openhuman/providers/anthropic.rs | 1112 --- rust-core/src/openhuman/providers/bedrock.rs | 1246 --- rust-core/src/openhuman/providers/copilot.rs | 707 -- rust-core/src/openhuman/providers/gemini.rs | 756 -- rust-core/src/openhuman/providers/glm.rs | 361 - rust-core/src/openhuman/providers/mod.rs | 2447 ----- rust-core/src/openhuman/providers/ollama.rs | 955 -- rust-core/src/openhuman/providers/openai.rs | 668 -- .../src/openhuman/providers/openai_codex.rs | 647 -- .../src/openhuman/providers/openrouter.rs | 755 -- rust-core/src/openhuman/rag/mod.rs | 395 - rust-core/src/openhuman/runtime/docker.rs | 275 - rust-core/src/openhuman/runtime/mod.rs | 87 - rust-core/src/openhuman/runtime/native.rs | 92 - rust-core/src/openhuman/runtime/traits.rs | 103 - rust-core/src/openhuman/runtime/wasm.rs | 687 -- rust-core/src/openhuman/service/mod.rs | 784 -- .../src/openhuman/skillforge/evaluate.rs | 272 - .../src/openhuman/skillforge/integrate.rs | 252 - rust-core/src/openhuman/skillforge/mod.rs | 255 - rust-core/src/openhuman/skillforge/scout.rs | 339 - rust-core/src/openhuman/skills/mod.rs | 761 -- .../src/openhuman/skills/symlink_tests.rs | 116 - rust-core/src/runtime/mod.rs | 22 - rust-core/src/runtime/qjs_skill_instance.rs | 1459 --- rust-toolchain.toml | 6 + scripts/e2e-build.sh | 12 +- scripts/e2e-run-all-flows.sh | 2 +- scripts/e2e-run-spec.sh | 3 + scripts/stage-core-sidecar.mjs | 46 +- scripts/tauri_create_dmg.sh | 4 +- scripts/test-ci-local.sh | 2 +- scripts/tools-generator/discover-tools.js | 132 +- src-tauri/.gitignore | 8 - src-tauri/Cargo.toml | 175 - src-tauri/build.rs | 33 - src-tauri/capabilities/default.json | 22 - src-tauri/icons/128x128.png | Bin 5025 -> 0 bytes src-tauri/icons/128x128@2x.png | Bin 10806 -> 0 bytes src-tauri/icons/32x32.png | Bin 1070 -> 0 bytes src-tauri/icons/Square107x107Logo.png | Bin 4130 -> 0 bytes src-tauri/icons/Square142x142Logo.png | Bin 5574 -> 0 bytes src-tauri/icons/Square150x150Logo.png | Bin 5937 -> 0 bytes src-tauri/icons/Square284x284Logo.png | Bin 12184 -> 0 bytes src-tauri/icons/Square30x30Logo.png | Bin 998 -> 0 bytes src-tauri/icons/Square310x310Logo.png | Bin 13449 -> 0 bytes src-tauri/icons/Square44x44Logo.png | Bin 1459 -> 0 bytes src-tauri/icons/Square71x71Logo.png | Bin 2533 -> 0 bytes src-tauri/icons/Square89x89Logo.png | Bin 3279 -> 0 bytes src-tauri/icons/StoreLogo.png | Bin 1738 -> 0 bytes src-tauri/icons/icon.icns | Bin 117167 -> 0 bytes src-tauri/icons/icon.ico | Bin 19494 -> 0 bytes src-tauri/icons/icon.png | Bin 23922 -> 0 bytes src-tauri/src/commands/auth.rs | 57 - src-tauri/src/commands/chat.rs | 1178 --- src-tauri/src/commands/conscious_loop.rs | 569 -- src-tauri/src/commands/memory.rs | 245 - src-tauri/src/commands/mod.rs | 25 - src-tauri/src/commands/model.rs | 92 - src-tauri/src/commands/openhuman.rs | 1082 --- src-tauri/src/commands/runtime.rs | 854 -- src-tauri/src/commands/socket.rs | 62 - src-tauri/src/commands/unified_skills.rs | 86 - src-tauri/src/lib.rs | 1195 --- src-tauri/src/main.rs | 15 - src-tauri/src/memory/mod.rs | 1 - src-tauri/src/models/mod.rs | 2 - src-tauri/src/openhuman_daemon/mod.rs | 463 - src-tauri/src/runtime/mod.rs | 11 - src-tauri/src/services/mod.rs | 5 - .../src/services/notification_service.rs | 64 - src-tauri/src/services/session_service.rs | 161 - src-tauri/src/services/socket_service.rs | 187 - src-tauri/src/unified_skills/generator.rs | 233 - src-tauri/src/unified_skills/llm_generator.rs | 471 - src-tauri/src/unified_skills/mod.rs | 266 - .../src/unified_skills/openclaw_executor.rs | 254 - src-tauri/src/unified_skills/self_evolve.rs | 252 - src-tauri/src/unified_skills/skill_tester.rs | 505 - src-tauri/src/utils/config.rs | 25 - src-tauri/src/utils/mod.rs | 1 - src-tauri/tauri.conf.json | 70 - src/App.css | 116 - src/App.tsx | 66 - {rust-core/src => src}/ai/encryption.rs | 0 {rust-core/src => src}/ai/memory_fs.rs | 0 {rust-core/src => src}/ai/mod.rs | 0 {rust-core/ai => src/ai/prompts}/AGENTS.md | 0 {rust-core/ai => src/ai/prompts}/BOOTSTRAP.md | 0 .../ai => src/ai/prompts}/CONSCIOUS_LOOP.md | 0 {rust-core/ai => src/ai/prompts}/IDENTITY.md | 0 {rust-core/ai => src/ai/prompts}/MEMORY.md | 0 {rust-core/ai => src/ai/prompts}/README.md | 0 {rust-core/ai => src/ai/prompts}/SOUL.md | 0 {rust-core/ai => src/ai/prompts}/TOOLS.md | 0 {rust-core/ai => src/ai/prompts}/USER.md | 0 {rust-core/src => src}/ai/sessions.rs | 0 src/api/config.rs | 32 + src/api/jwt.rs | 9 + src/api/mod.rs | 21 + src/api/rest.rs | 421 + src/api/socket.rs | 14 + src/assets/react.svg | 1 - {rust-core/src => src}/bin/openhuman.rs | 0 src/components/skills/SelfEvolveModal.tsx | 517 - src/core_server/cli.rs | 1262 +++ src/core_server/config_rpc_bridge.rs | 64 + src/core_server/dispatch/ai_rpc.rs | 318 + src/core_server/dispatch/core.rs | 17 + src/core_server/dispatch/memory.rs | 113 + src/core_server/dispatch/mod.rs | 42 + .../dispatch/openhuman/auth_socket.rs | 214 + src/core_server/dispatch/openhuman/config.rs | 143 + src/core_server/dispatch/openhuman/cron.rs | 78 + .../dispatch/openhuman/local_ai.rs | 303 + src/core_server/dispatch/openhuman/mod.rs | 34 + src/core_server/dispatch/openhuman/ops.rs | 166 + .../dispatch/openhuman/platform.rs | 203 + src/core_server/helpers.rs | 135 + src/core_server/json_rpc.rs | 91 + src/core_server/mod.rs | 87 + src/core_server/repl.rs | 501 + src/core_server/rpc_log.rs | 129 + src/core_server/server.rs | 93 + src/core_server/tests.rs | 58 + src/core_server/types.rs | 362 + {rust-core/src => src}/lib.rs | 9 +- src/main.tsx | 30 - {rust-core/src => src}/models/auth.rs | 0 {rust-core/src => src}/models/mod.rs | 0 {rust-core/src => src}/models/socket.rs | 0 .../src => src}/openhuman/agent/agent.rs | 79 +- .../src => src}/openhuman/agent/classifier.rs | 0 .../src => src}/openhuman/agent/dispatcher.rs | 0 src/openhuman/agent/host_runtime.rs | 133 + .../openhuman/agent}/identity.rs | 0 src/openhuman/agent/loop_/credentials.rs | 43 + src/openhuman/agent/loop_/history.rs | 139 + src/openhuman/agent/loop_/instructions.rs | 32 + src/openhuman/agent/loop_/memory_context.rs | 34 + src/openhuman/agent/loop_/mod.rs | 16 + src/openhuman/agent/loop_/parse.rs | 566 ++ src/openhuman/agent/loop_/session.rs | 591 ++ src/openhuman/agent/loop_/tests.rs | 1148 +++ src/openhuman/agent/loop_/tool_loop.rs | 267 + .../openhuman/agent/memory_loader.rs | 1 + {rust-core/src => src}/openhuman/agent/mod.rs | 4 + .../openhuman/agent}/multimodal.rs | 0 .../src => src}/openhuman/agent/prompt.rs | 2 +- .../src => src}/openhuman/agent/tests.rs | 9 - .../src => src}/openhuman/agent/traits.rs | 98 +- .../src => src}/openhuman/approval/mod.rs | 0 .../src => src}/openhuman/autocomplete/mod.rs | 337 +- src/openhuman/autocomplete/rpc.rs | 203 + .../src => src}/openhuman/channels/cli.rs | 0 .../openhuman/channels/commands.rs | 2 +- .../src => src}/openhuman/channels/context.rs | 2 - .../openhuman/channels/dingtalk.rs | 0 .../src => src}/openhuman/channels/discord.rs | 0 .../openhuman/channels/email_channel.rs | 0 .../openhuman/channels/imessage.rs | 0 .../src => src}/openhuman/channels/irc.rs | 0 .../src => src}/openhuman/channels/lark.rs | 0 .../src => src}/openhuman/channels/linq.rs | 8 +- .../src => src}/openhuman/channels/matrix.rs | 0 .../openhuman/channels/mattermost.rs | 0 .../src => src}/openhuman/channels/mod.rs | 0 .../src => src}/openhuman/channels/prompt.rs | 2 +- .../src => src}/openhuman/channels/qq.rs | 0 .../src => src}/openhuman/channels/routes.rs | 1 - .../openhuman/channels/runtime/dispatch.rs | 1 - .../openhuman/channels/runtime/mod.rs | 3 + .../openhuman/channels/runtime/startup.rs | 18 +- .../openhuman/channels/runtime/supervision.rs | 0 .../src => src}/openhuman/channels/signal.rs | 0 .../src => src}/openhuman/channels/slack.rs | 0 .../openhuman/channels/telegram.rs | 11 - .../openhuman/channels/tests/common.rs | 0 .../openhuman/channels/tests/context.rs | 2 - .../openhuman/channels/tests/health.rs | 0 .../openhuman/channels/tests/identity.rs | 0 .../openhuman/channels/tests/memory.rs | 8 +- .../openhuman/channels/tests/mod.rs | 0 .../openhuman/channels/tests/prompt.rs | 0 .../channels/tests/runtime_dispatch.rs | 3 - .../channels/tests/runtime_tool_calls.rs | 13 +- .../src => src}/openhuman/channels/traits.rs | 0 .../openhuman/channels/whatsapp.rs | 8 +- .../openhuman/channels/whatsapp_storage.rs | 0 .../openhuman/channels/whatsapp_web.rs | 1 + .../src => src}/openhuman/config/daemon.rs | 0 .../src => src}/openhuman/config/mod.rs | 20 +- src/openhuman/config/rpc.rs | 391 + .../openhuman/config/schema/accessibility.rs | 0 .../openhuman/config/schema/agent.rs | 5 +- .../openhuman/config/schema/autocomplete.rs | 2 +- .../openhuman/config/schema/autonomy.rs | 0 .../openhuman/config/schema/channels.rs | 0 .../openhuman/config/schema/defaults.rs | 2 +- .../openhuman/config/schema/hardware.rs | 0 .../openhuman/config/schema/heartbeat_cron.rs | 0 .../openhuman/config/schema/identity_cost.rs | 8 + .../openhuman/config/schema/load.rs | 68 +- .../openhuman/config/schema/local_ai.rs | 0 .../openhuman/config/schema/mod.rs | 10 +- .../openhuman/config/schema/observability.rs | 0 .../openhuman/config/schema/proxy.rs | 0 .../openhuman/config/schema/routes.rs | 1 - .../openhuman/config/schema/runtime.rs | 0 .../openhuman/config/schema/storage_memory.rs | 0 .../openhuman/config/schema/tools.rs | 0 .../openhuman/config/schema/tunnel.rs | 0 src/openhuman/config/settings_cli.rs | 55 + {rust-core/src => src}/openhuman/cost/mod.rs | 0 .../src => src}/openhuman/cost/tracker.rs | 0 .../src => src}/openhuman/cost/types.rs | 0 src/openhuman/credentials/cli.rs | 104 + src/openhuman/credentials/mod.rs | 245 + .../openhuman/credentials}/profiles.rs | 0 src/openhuman/credentials/responses.rs | 27 + src/openhuman/credentials/rpc.rs | 313 + src/openhuman/credentials/session_support.rs | 124 + {rust-core/src => src}/openhuman/cron/mod.rs | 1 + src/openhuman/cron/rpc.rs | 121 + .../src => src}/openhuman/cron/schedule.rs | 0 .../src => src}/openhuman/cron/scheduler.rs | 1 - .../src => src}/openhuman/cron/store.rs | 0 .../src => src}/openhuman/cron/types.rs | 0 src/openhuman/dev_paths.rs | 40 + .../src => src}/openhuman/doctor/mod.rs | 129 +- src/openhuman/doctor/rpc.rs | 18 + .../src => src}/openhuman/health/mod.rs | 2 + src/openhuman/health/rpc.rs | 8 + .../src => src}/openhuman/heartbeat/engine.rs | 21 +- .../src => src}/openhuman/heartbeat/mod.rs | 8 +- .../src => src}/openhuman/integrations/mod.rs | 5 +- .../openhuman/integrations/registry.rs | 221 +- src/openhuman/integrations/rpc.rs | 25 + src/openhuman/local_ai/install.rs | 99 + src/openhuman/local_ai/mod.rs | 43 + src/openhuman/local_ai/model_ids.rs | 133 + src/openhuman/local_ai/ollama_api.rs | 86 + src/openhuman/local_ai/parse.rs | 70 + src/openhuman/local_ai/paths.rs | 200 + src/openhuman/local_ai/rpc.rs | 468 + src/openhuman/local_ai/service/assets.rs | 453 + src/openhuman/local_ai/service/bootstrap.rs | 196 + src/openhuman/local_ai/service/mod.rs | 18 + .../local_ai/service/ollama_admin.rs | 334 + .../local_ai/service/public_infer.rs | 208 + src/openhuman/local_ai/service/speech.rs | 109 + .../local_ai/service/vision_embed.rs | 150 + src/openhuman/local_ai/types.rs | 160 + .../src => src}/openhuman/memory/chunker.rs | 0 .../openhuman/memory/embeddings.rs | 0 src/openhuman/memory/mod.rs | 11 + .../openhuman/memory/response_cache.rs | 0 src/openhuman/memory/rpc.rs | 240 + src/openhuman/memory/store/client.rs | 208 + src/openhuman/memory/store/factories.rs | 55 + src/openhuman/memory/store/memory_trait.rs | 170 + src/openhuman/memory/store/mod.rs | 16 + src/openhuman/memory/store/types.rs | 31 + .../memory/store/unified/documents.rs | 230 + src/openhuman/memory/store/unified/graph.rs | 125 + src/openhuman/memory/store/unified/helpers.rs | 102 + src/openhuman/memory/store/unified/init.rs | 150 + src/openhuman/memory/store/unified/kv.rs | 113 + src/openhuman/memory/store/unified/mod.rs | 23 + src/openhuman/memory/store/unified/query.rs | 157 + .../src => src}/openhuman/memory/traits.rs | 4 + .../openhuman/migration/mod.rs | 2 + src/openhuman/migration/rpc.rs | 18 + {rust-core/src => src}/openhuman/mod.rs | 22 +- .../openhuman/model_catalog}/mod.rs | 3 +- .../openhuman/model_catalog}/models.rs | 121 +- src/openhuman/model_catalog/rpc.rs | 13 + .../openhuman/providers/compatible.rs | 40 +- src/openhuman/providers/mod.rs | 369 + src/openhuman/providers/openhuman_backend.rs | 159 + .../openhuman/providers/reliable.rs | 2 +- .../src => src}/openhuman/providers/router.rs | 0 .../src => src}/openhuman/providers/traits.rs | 0 src/openhuman/rpc/mod.rs | 40 + src/openhuman/screen_intelligence/capture.rs | 131 + src/openhuman/screen_intelligence/context.rs | 34 + .../openhuman/screen_intelligence/engine.rs | 854 +- src/openhuman/screen_intelligence/helpers.rs | 206 + src/openhuman/screen_intelligence/limits.rs | 7 + src/openhuman/screen_intelligence/mod.rs | 17 + .../screen_intelligence/permissions.rs | 146 + src/openhuman/screen_intelligence/rpc.rs | 178 + src/openhuman/screen_intelligence/tests.rs | 158 + src/openhuman/screen_intelligence/types.rs | 180 + .../src => src}/openhuman/security/audit.rs | 0 .../openhuman/security/bubblewrap.rs | 0 .../src => src}/openhuman/security/detect.rs | 0 .../src => src}/openhuman/security/docker.rs | 0 .../openhuman/security/firejail.rs | 0 .../openhuman/security/landlock.rs | 27 +- .../src => src}/openhuman/security/mod.rs | 2 + .../src => src}/openhuman/security/pairing.rs | 16 +- .../src => src}/openhuman/security/policy.rs | 2 +- src/openhuman/security/rpc.rs | 19 + .../src => src}/openhuman/security/secrets.rs | 0 .../src => src}/openhuman/security/traits.rs | 0 src/openhuman/service/common.rs | 168 + .../mod.rs => src/openhuman/service/daemon.rs | 0 .../openhuman/service/daemon_host.rs | 30 +- src/openhuman/service/linux.rs | 141 + src/openhuman/service/macos.rs | 288 + src/openhuman/service/mod.rs | 109 + src/openhuman/service/rpc.rs | 33 + src/openhuman/service/windows.rs | 142 + .../openhuman/skills}/bridge/cron_bridge.rs | 2 +- .../openhuman/skills}/bridge/db.rs | 0 .../openhuman/skills}/bridge/log_bridge.rs | 0 .../openhuman/skills}/bridge/mod.rs | 0 .../openhuman/skills}/bridge/net.rs | 0 .../openhuman/skills}/bridge/skills_bridge.rs | 2 +- .../openhuman/skills}/bridge/store.rs | 0 .../openhuman/skills}/bridge/tauri_bridge.rs | 0 .../openhuman/skills}/cron_scheduler.rs | 2 +- .../openhuman/skills}/loader.rs | 0 .../openhuman/skills}/manifest.rs | 8 +- src/openhuman/skills/mod.rs | 155 + .../openhuman/skills}/ping_scheduler.rs | 4 +- .../openhuman/skills}/preferences.rs | 0 .../openhuman/skills}/qjs_engine.rs | 23 +- .../skills/qjs_skill_instance/event_loop.rs | 454 + .../skills/qjs_skill_instance/instance.rs | 245 + .../skills/qjs_skill_instance/js_handlers.rs | 666 ++ .../skills/qjs_skill_instance/js_helpers.rs | 101 + .../skills/qjs_skill_instance/mod.rs | 17 + .../skills/qjs_skill_instance/types.rs | 48 + .../skills}/quickjs_libs/bootstrap.js | 0 .../openhuman/skills}/quickjs_libs/mod.rs | 0 .../skills}/quickjs_libs/qjs_ops/mod.rs | 4 +- .../skills}/quickjs_libs/qjs_ops/ops_core.rs | 2 +- .../skills}/quickjs_libs/qjs_ops/ops_net.rs | 0 .../skills}/quickjs_libs/qjs_ops/ops_state.rs | 67 +- .../quickjs_libs/qjs_ops/ops_storage.rs | 2 +- .../skills}/quickjs_libs/qjs_ops/types.rs | 0 .../openhuman/skills}/quickjs_libs/storage.rs | 0 .../openhuman/skills}/skill_registry.rs | 4 +- .../openhuman/skills}/socket_manager.rs | 19 +- .../runtime => src/openhuman/skills}/types.rs | 35 - .../runtime => src/openhuman/skills}/utils.rs | 0 .../src => src}/openhuman/tools/browser.rs | 0 .../openhuman/tools/browser_open.rs | 0 .../src => src}/openhuman/tools/composio.rs | 0 .../src => src}/openhuman/tools/cron_add.rs | 0 .../src => src}/openhuman/tools/cron_list.rs | 0 .../openhuman/tools/cron_remove.rs | 0 .../src => src}/openhuman/tools/cron_run.rs | 0 .../src => src}/openhuman/tools/cron_runs.rs | 0 .../openhuman/tools/cron_update.rs | 0 .../src => src}/openhuman/tools/delegate.rs | 68 +- .../src => src}/openhuman/tools/file_read.rs | 0 .../src => src}/openhuman/tools/file_write.rs | 0 .../openhuman/tools/git_operations.rs | 0 .../openhuman/tools/hardware_board_info.rs | 0 .../openhuman/tools/hardware_memory_map.rs | 0 .../openhuman/tools/hardware_memory_read.rs | 0 .../openhuman/tools/http_request.rs | 0 .../src => src}/openhuman/tools/image_info.rs | 0 src/openhuman/tools/image_output.rs | 42 + src/openhuman/tools/local_cli.rs | 147 + .../openhuman/tools/memory_forget.rs | 80 +- .../openhuman/tools/memory_recall.rs | 46 +- .../openhuman/tools/memory_store.rs | 45 +- {rust-core/src => src}/openhuman/tools/mod.rs | 12 +- .../openhuman/tools/proxy_config.rs | 0 .../src => src}/openhuman/tools/pushover.rs | 0 .../src => src}/openhuman/tools/schedule.rs | 0 .../src => src}/openhuman/tools/schema.rs | 2 +- .../src => src}/openhuman/tools/screenshot.rs | 0 .../src => src}/openhuman/tools/shell.rs | 4 +- .../src => src}/openhuman/tools/traits.rs | 0 .../openhuman/tools/web_search_tool.rs | 0 src/openhuman/tray/mod.rs | 92 + .../openhuman/tunnel/cloudflare.rs | 0 .../src => src}/openhuman/tunnel/custom.rs | 0 .../src => src}/openhuman/tunnel/mod.rs | 4 +- .../src => src}/openhuman/tunnel/ngrok.rs | 0 .../src => src}/openhuman/tunnel/none.rs | 0 .../src => src}/openhuman/tunnel/tailscale.rs | 0 {rust-core/src => src}/openhuman/util.rs | 2 +- src/openhuman/workspace/mod.rs | 108 + src/services/api/authApi.ts | 43 - src/services/api/channelConnectionsApi.ts | 55 - src/vite-env.d.ts | 13 - tests/json_rpc_e2e.rs | 224 + tsconfig.json | 29 - tsconfig.node.json | 10 - vite.config.ts | 63 - 851 files changed, 32695 insertions(+), 52534 deletions(-) delete mode 100644 .husky/pre-commit rename .prettierignore => app/.prettierignore (100%) rename .prettierrc => app/.prettierrc (100%) rename eslint.config.js => app/eslint.config.js (100%) rename postcss.config.js => app/postcss.config.js (100%) rename {public => app/public}/alpha.svg (100%) rename {public => app/public}/bg-dark.png (100%) rename {public => app/public}/bg.jpg (100%) rename {public => app/public}/bg.png (100%) rename {public => app/public}/logo.png (100%) rename {public => app/public}/lottie/analytics.json (100%) rename {public => app/public}/lottie/connect2.json (100%) rename {public => app/public}/lottie/connection.json (100%) rename {public => app/public}/lottie/safe.json (100%) rename {public => app/public}/lottie/safe2.json (100%) rename {public => app/public}/lottie/safe3.json (100%) rename {public => app/public}/lottie/trophy.json (100%) rename {public => app/public}/lottie/wave.json (100%) rename {src-tauri => app/src-tauri}/Cargo.lock (90%) rename {src-tauri => app/src-tauri}/icons/64x64.png (100%) rename {src-tauri => app/src-tauri}/images/background-dmg.png (100%) create mode 100644 app/src-tauri/src/commands/core_relay.rs create mode 100644 app/src-tauri/src/commands/mod.rs create mode 100644 app/src-tauri/src/commands/openhuman.rs rename {src-tauri => app/src-tauri}/src/commands/window.rs (100%) rename {src-tauri => app/src-tauri}/src/core_process.rs (77%) rename {src-tauri => app/src-tauri}/src/core_rpc.rs (100%) create mode 100644 app/src-tauri/src/utils/dev_paths.rs create mode 100644 app/src-tauri/src/utils/mod.rs rename {src => app/src}/AppRoutes.tsx (100%) rename {src => app/src}/SOUL.md (100%) rename {src => app/src}/__tests__/setup.ts (100%) rename {src => app/src}/assets/icons/ExchangeIcon.tsx (100%) rename {src => app/src}/assets/icons/GmailIcon.tsx (100%) rename {src => app/src}/assets/icons/GoogleIcon.tsx (100%) rename {src => app/src}/assets/icons/WalletIcon.tsx (100%) rename {src => app/src}/assets/icons/binance.svg (100%) rename {src => app/src}/assets/icons/metamask.svg (100%) rename {src => app/src}/assets/icons/notion.svg (100%) rename {src => app/src}/assets/icons/telegram.svg (100%) rename {src => app/src}/components/ConnectionIndicator.tsx (100%) rename {src => app/src}/components/DefaultRedirect.tsx (100%) rename {src => app/src}/components/DesignSystemShowcase.tsx (100%) rename {src => app/src}/components/ErrorFallbackScreen.tsx (100%) rename {src => app/src}/components/ErrorReportNotification.tsx (100%) rename {src => app/src}/components/GmailConnectionIndicator.tsx (100%) rename {src => app/src}/components/LottieAnimation.tsx (100%) rename {src => app/src}/components/MiniSidebar.tsx (100%) rename {src => app/src}/components/PrivacyFeatureCard.tsx (100%) rename {src => app/src}/components/ProgressIndicator.tsx (100%) rename {src => app/src}/components/ProtectedRoute.tsx (100%) rename {src => app/src}/components/PublicRoute.tsx (100%) rename {src => app/src}/components/RotatingTetrahedronCanvas.tsx (100%) rename {src => app/src}/components/SkillsGrid.tsx (59%) rename {src => app/src}/components/TelegramConnectionIndicator.tsx (100%) rename {src => app/src}/components/TypewriterGreeting.tsx (100%) rename {src => app/src}/components/WalletInfoSection.tsx (100%) rename {src => app/src}/components/__tests__/ConnectionIndicator.test.tsx (100%) rename {src => app/src}/components/__tests__/ProtectedRoute.test.tsx (100%) rename {src => app/src}/components/__tests__/PublicRoute.test.tsx (100%) rename {src => app/src}/components/daemon/DaemonHealthIndicator.tsx (100%) rename {src => app/src}/components/daemon/DaemonHealthPanel.tsx (100%) rename {src => app/src}/components/intelligence/ActionableCard.tsx (100%) rename {src => app/src}/components/intelligence/ConfirmationModal.tsx (100%) rename {src => app/src}/components/intelligence/MemoryWorkspace.tsx (100%) rename {src => app/src}/components/intelligence/Toast.tsx (100%) rename {src => app/src}/components/intelligence/index.ts (100%) rename {src => app/src}/components/intelligence/mockData.ts (100%) rename {src => app/src}/components/intelligence/utils.ts (100%) rename {src => app/src}/components/oauth/OAuthLoginSection.tsx (100%) rename {src => app/src}/components/oauth/OAuthProviderButton.tsx (100%) rename {src => app/src}/components/oauth/providerConfigs.tsx (100%) rename {src => app/src}/components/settings/SettingsHome.tsx (96%) rename {src => app/src}/components/settings/components/SettingsBackButton.tsx (100%) rename {src => app/src}/components/settings/components/SettingsHeader.tsx (100%) rename {src => app/src}/components/settings/components/SettingsMenuItem.tsx (100%) rename {src => app/src}/components/settings/components/SettingsPanelLayout.tsx (100%) rename {src => app/src}/components/settings/hooks/useSettingsAnimation.ts (100%) rename {src => app/src}/components/settings/hooks/useSettingsNavigation.ts (97%) rename {src => app/src}/components/settings/panels/AIPanel.tsx (100%) rename {src => app/src}/components/settings/panels/AccessibilityPanel.tsx (100%) rename {src => app/src}/components/settings/panels/AdvancedPanel.tsx (100%) rename {src => app/src}/components/settings/panels/AgentChatPanel.tsx (84%) create mode 100644 app/src/components/settings/panels/AutocompletePanel.tsx rename {src => app/src}/components/settings/panels/BillingPanel.tsx (100%) rename {src => app/src}/components/settings/panels/ConnectionsPanel.tsx (100%) rename {src => app/src}/components/settings/panels/CronJobsPanel.tsx (100%) rename {src => app/src}/components/settings/panels/DeveloperOptionsPanel.tsx (100%) rename {src => app/src}/components/settings/panels/LocalModelPanel.tsx (100%) rename {src => app/src}/components/settings/panels/MemoryDebugPanel.tsx (100%) rename {src => app/src}/components/settings/panels/MessagingPanel.tsx (100%) rename {src => app/src}/components/settings/panels/PrivacyPanel.tsx (100%) rename {src => app/src}/components/settings/panels/ProfilePanel.tsx (100%) rename {src => app/src}/components/settings/panels/ScreenIntelligencePanel.tsx (100%) rename {src => app/src}/components/settings/panels/SkillsPanel.tsx (100%) rename {src => app/src}/components/settings/panels/TauriCommandsPanel.tsx (78%) rename {src => app/src}/components/settings/panels/TeamInvitesPanel.tsx (100%) rename {src => app/src}/components/settings/panels/TeamManagementPanel.tsx (100%) rename {src => app/src}/components/settings/panels/TeamMembersPanel.tsx (100%) rename {src => app/src}/components/settings/panels/TeamPanel.tsx (100%) rename {src => app/src}/components/settings/panels/__tests__/AccessibilityPanel.test.tsx (100%) rename {src => app/src}/components/settings/panels/__tests__/billingHelpers.test.ts (100%) rename {src => app/src}/components/settings/panels/__tests__/memoryDebugUtils.test.ts (100%) rename {src => app/src}/components/settings/panels/billingHelpers.ts (100%) rename {src => app/src}/components/settings/panels/components/ActionPanel.tsx (100%) rename {src => app/src}/components/settings/panels/components/InputGroup.tsx (100%) rename {src => app/src}/components/settings/panels/components/SectionCard.tsx (100%) rename {src => app/src}/components/settings/panels/components/ValidatedField.tsx (100%) rename {src => app/src}/components/settings/panels/memoryDebugUtils.ts (100%) rename {src => app/src}/components/skills/SetupFormRenderer.tsx (100%) rename {src => app/src}/components/skills/SkillManagementPanel.tsx (100%) rename {src => app/src}/components/skills/SkillSetupModal.tsx (100%) rename {src => app/src}/components/skills/SkillSetupWizard.tsx (97%) rename {src => app/src}/components/skills/shared.tsx (100%) rename {src => app/src}/data/countries.ts (100%) rename {src => app/src}/hooks/useConsciousItems.ts (100%) rename {src => app/src}/hooks/useDaemonHealth.ts (100%) rename {src => app/src}/hooks/useDaemonLifecycle.ts (100%) rename {src => app/src}/hooks/useIntelligenceApiFallback.ts (100%) rename {src => app/src}/hooks/useIntelligenceSocket.ts (100%) rename {src => app/src}/hooks/useIntelligenceStats.ts (91%) rename {src => app/src}/hooks/useSocket.ts (100%) rename {src => app/src}/hooks/useToolsUpdates.ts (100%) rename {src => app/src}/hooks/useUser.ts (100%) rename {src => app/src}/index.css (100%) rename {src => app/src}/index.html (100%) rename {src => app/src}/lib/ai/__tests__/loader.test.ts (100%) rename {src => app/src}/lib/ai/constitution/__tests__/loader.test.ts (100%) rename {src => app/src}/lib/ai/constitution/__tests__/validator.test.ts (100%) rename {src => app/src}/lib/ai/constitution/default-constitution.md (100%) rename {src => app/src}/lib/ai/constitution/loader.ts (100%) rename {src => app/src}/lib/ai/constitution/types.ts (100%) rename {src => app/src}/lib/ai/constitution/validator.ts (100%) rename {src => app/src}/lib/ai/entities/manager.ts (100%) rename {src => app/src}/lib/ai/entities/query.ts (100%) rename {src => app/src}/lib/ai/entities/types.ts (100%) rename {src => app/src}/lib/ai/index.ts (100%) rename {src => app/src}/lib/ai/loader.ts (100%) rename {src => app/src}/lib/ai/memory/__tests__/chunker.test.ts (100%) rename {src => app/src}/lib/ai/memory/__tests__/context-formatter.test.ts (100%) rename {src => app/src}/lib/ai/memory/__tests__/dedup.test.ts (100%) rename {src => app/src}/lib/ai/memory/chunker.ts (100%) rename {src => app/src}/lib/ai/memory/context-formatter.ts (100%) rename {src => app/src}/lib/ai/memory/context-loader.ts (100%) rename {src => app/src}/lib/ai/memory/dedup.ts (100%) rename {src => app/src}/lib/ai/memory/encryption.ts (100%) rename {src => app/src}/lib/ai/memory/hybrid-search.ts (92%) rename {src => app/src}/lib/ai/memory/manager.ts (83%) rename {src => app/src}/lib/ai/memory/schema.ts (100%) rename {src => app/src}/lib/ai/memory/types.ts (100%) rename {src => app/src}/lib/ai/prompts/__tests__/sections.test.ts (100%) rename {src => app/src}/lib/ai/prompts/__tests__/system-prompt.test.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/constitution.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/context.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/crypto-intelligence.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/identity.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/memory-recall.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/skills.ts (100%) rename {src => app/src}/lib/ai/prompts/sections/tools.ts (100%) rename {src => app/src}/lib/ai/prompts/system-prompt.ts (100%) rename {src => app/src}/lib/ai/prompts/templates.ts (100%) rename {src => app/src}/lib/ai/providers/__tests__/embeddings.test.ts (100%) rename {src => app/src}/lib/ai/providers/custom.ts (100%) rename {src => app/src}/lib/ai/providers/embeddings.ts (100%) rename {src => app/src}/lib/ai/providers/interface.ts (100%) rename {src => app/src}/lib/ai/providers/openai.ts (100%) rename {src => app/src}/lib/ai/sessions/__tests__/session-capture.test.ts (100%) rename {src => app/src}/lib/ai/sessions/__tests__/tool-compress.test.ts (100%) rename {src => app/src}/lib/ai/sessions/__tests__/types.test.ts (100%) rename {src => app/src}/lib/ai/sessions/compaction.ts (100%) rename {src => app/src}/lib/ai/sessions/manager.ts (88%) rename {src => app/src}/lib/ai/sessions/memory-flush.ts (100%) rename {src => app/src}/lib/ai/sessions/session-capture.ts (100%) rename {src => app/src}/lib/ai/sessions/tool-compress.ts (100%) rename {src => app/src}/lib/ai/sessions/transcript.ts (75%) rename {src => app/src}/lib/ai/sessions/types.ts (100%) rename {src => app/src}/lib/ai/soul/loader.ts (98%) rename {src => app/src}/lib/ai/soul/types.ts (100%) rename {src => app/src}/lib/ai/tools/__tests__/loader.test.ts (99%) rename {src => app/src}/lib/ai/tools/__tests__/registry.test.ts (100%) rename {src => app/src}/lib/ai/tools/loader.ts (99%) rename {src => app/src}/lib/ai/tools/memory-read.ts (100%) rename {src => app/src}/lib/ai/tools/memory-search.ts (100%) rename {src => app/src}/lib/ai/tools/memory-write.ts (100%) rename {src => app/src}/lib/ai/tools/registry.ts (100%) rename {src => app/src}/lib/ai/tools/types.ts (100%) rename {src => app/src}/lib/ai/tools/web-search.ts (100%) rename {src => app/src}/lib/ai/types.ts (100%) rename {src => app/src}/lib/channels/__tests__/routing.test.ts (100%) rename {src => app/src}/lib/channels/routing.ts (100%) rename {src => app/src}/lib/gmail/services/metadataSync.ts (100%) rename {src => app/src}/lib/intelligence/chatTools.ts (100%) rename {src => app/src}/lib/mcp/__tests__/errorHandler.test.ts (100%) rename {src => app/src}/lib/mcp/__tests__/rateLimiter.test.ts (100%) rename {src => app/src}/lib/mcp/__tests__/validation.test.ts (100%) rename {src => app/src}/lib/mcp/errorHandler.ts (100%) rename {src => app/src}/lib/mcp/index.ts (100%) rename {src => app/src}/lib/mcp/logger.ts (100%) rename {src => app/src}/lib/mcp/rateLimiter.ts (100%) rename {src => app/src}/lib/mcp/transport.ts (100%) rename {src => app/src}/lib/mcp/types.ts (100%) rename {src => app/src}/lib/mcp/validation.ts (100%) rename {src => app/src}/lib/notion/services/metadataSync.ts (100%) rename {src => app/src}/lib/skills/hooks.ts (100%) rename {src => app/src}/lib/skills/index.ts (100%) rename {src => app/src}/lib/skills/manager.ts (97%) rename {src => app/src}/lib/skills/paths.ts (100%) rename {src => app/src}/lib/skills/runtime.ts (96%) rename {src => app/src}/lib/skills/sync.ts (100%) rename {src => app/src}/lib/skills/tool-bridge.ts (100%) rename {src => app/src}/lib/skills/transport.ts (87%) rename {src => app/src}/lib/skills/types.ts (100%) rename {src => app/src}/lib/tools/auto-update.ts (100%) rename {src => app/src}/lib/tools/file-watcher.ts (100%) rename {src => app/src}/pages/Agents.tsx (100%) rename {src => app/src}/pages/Conversations.tsx (95%) rename {src => app/src}/pages/Home.tsx (100%) rename {src => app/src}/pages/Intelligence.tsx (100%) rename {src => app/src}/pages/Invites.tsx (100%) rename {src => app/src}/pages/Mnemonic.tsx (100%) rename {src => app/src}/pages/Settings.tsx (95%) rename {src => app/src}/pages/Skills.tsx (98%) rename {src => app/src}/pages/Welcome.tsx (100%) rename {src => app/src}/pages/__tests__/skillsSyncUi.test.ts (100%) rename {src => app/src}/pages/onboarding/Onboarding.tsx (100%) rename {src => app/src}/pages/onboarding/steps/AnalyticsStep.tsx (100%) rename {src => app/src}/pages/onboarding/steps/ConnectStep.tsx (100%) rename {src => app/src}/pages/onboarding/steps/FeaturesStep.tsx (100%) rename {src => app/src}/pages/onboarding/steps/GetStartedStep.tsx (100%) rename {src => app/src}/pages/onboarding/steps/InviteCodeStep.tsx (100%) rename {src => app/src}/pages/onboarding/steps/PrivacyStep.tsx (100%) rename {src => app/src}/pages/skillsSyncUi.ts (100%) rename {src => app/src}/polyfills.ts (100%) rename {src => app/src}/providers/AIProvider.tsx (100%) rename {src => app/src}/providers/IntelligenceProvider.tsx (100%) rename {src => app/src}/providers/SkillProvider.tsx (98%) rename {src => app/src}/providers/SocketProvider.tsx (100%) rename {src => app/src}/providers/UserProvider.tsx (53%) rename {src => app/src}/services/__tests__/agentToolRegistry.test.ts (100%) rename {src => app/src}/services/agentToolRegistry.ts (100%) rename {src => app/src}/services/analytics.ts (100%) rename {src => app/src}/services/api/__tests__/billingApi.test.ts (100%) rename {src => app/src}/services/api/__tests__/teamApi.test.ts (100%) rename {src => app/src}/services/api/__tests__/userApi.test.ts (100%) rename {src => app/src}/services/api/actionableItemsApi.ts (100%) rename {src => app/src}/services/api/apiKeysApi.ts (100%) create mode 100644 app/src/services/api/authApi.ts rename {src => app/src}/services/api/billingApi.ts (100%) create mode 100644 app/src/services/api/channelConnectionsApi.ts rename {src => app/src}/services/api/creditsApi.ts (100%) rename {src => app/src}/services/api/feedbackApi.ts (100%) rename {src => app/src}/services/api/inferenceApi.ts (100%) rename {src => app/src}/services/api/inviteApi.ts (100%) rename {src => app/src}/services/api/settingsApi.ts (100%) rename {src => app/src}/services/api/teamApi.ts (100%) rename {src => app/src}/services/api/threadApi.ts (90%) rename {src => app/src}/services/api/tunnelsApi.ts (100%) rename {src => app/src}/services/api/userApi.ts (100%) rename {src => app/src}/services/apiClient.ts (100%) rename {src => app/src}/services/chatService.ts (100%) create mode 100644 app/src/services/coreRpcClient.ts rename {src => app/src}/services/daemonHealthService.ts (100%) rename {src => app/src}/services/errorReportQueue.ts (100%) rename {src => app/src}/services/intelligenceApi.ts (100%) rename {src => app/src}/services/socketService.ts (100%) rename {src => app/src}/store/__tests__/accessibilitySlice.test.ts (100%) rename {src => app/src}/store/__tests__/aiSlice.test.ts (100%) rename {src => app/src}/store/__tests__/authSelectors.test.ts (100%) rename {src => app/src}/store/__tests__/authSlice.test.ts (100%) rename {src => app/src}/store/__tests__/channelConnectionsSlice.test.ts (100%) rename {src => app/src}/store/__tests__/socketSelectors.test.ts (100%) rename {src => app/src}/store/__tests__/socketSlice.test.ts (100%) rename {src => app/src}/store/__tests__/teamSlice.test.ts (100%) rename {src => app/src}/store/__tests__/userSlice.test.ts (100%) rename {src => app/src}/store/accessibilitySlice.ts (100%) rename {src => app/src}/store/aiSlice.ts (100%) rename {src => app/src}/store/authSelectors.ts (100%) rename {src => app/src}/store/authSlice.ts (100%) rename {src => app/src}/store/channelConnectionsSlice.ts (100%) rename {src => app/src}/store/daemonSlice.ts (100%) rename {src => app/src}/store/gmailSlice.ts (100%) rename {src => app/src}/store/hooks.ts (100%) rename {src => app/src}/store/index.ts (100%) rename {src => app/src}/store/intelligenceSlice.ts (100%) rename {src => app/src}/store/inviteSlice.ts (100%) rename {src => app/src}/store/notionSlice.ts (100%) rename {src => app/src}/store/skillsSlice.ts (100%) rename {src => app/src}/store/socketSelectors.ts (100%) rename {src => app/src}/store/socketSlice.ts (100%) rename {src => app/src}/store/teamSlice.ts (100%) rename {src => app/src}/store/threadSlice.ts (100%) rename {src => app/src}/store/userSlice.ts (100%) rename {src => app/src}/styles/theme.css (100%) rename {src => app/src}/test/handlers.ts (100%) rename {src => app/src}/test/server.ts (100%) rename {src => app/src}/test/setup.ts (100%) rename {src => app/src}/test/test-utils.tsx (100%) rename {src => app/src}/types/agent.ts (100%) rename {src => app/src}/types/api.ts (100%) rename {src => app/src}/types/channels.ts (100%) rename {src => app/src}/types/global.d.ts (100%) rename {src => app/src}/types/intelligence-chat-api.ts (100%) rename {src => app/src}/types/intelligence.ts (100%) rename {src => app/src}/types/invite.ts (100%) rename {src => app/src}/types/oauth.ts (100%) rename {src => app/src}/types/onboarding.ts (100%) rename {src => app/src}/types/team.ts (100%) rename {src => app/src}/types/thread.ts (100%) rename {src => app/src}/utils/__tests__/sanitize.test.ts (100%) rename {src => app/src}/utils/__tests__/tauriCoreBridge.e2e.test.ts (86%) rename {src => app/src}/utils/config.ts (100%) rename {src => app/src}/utils/cryptoKeys.ts (100%) rename {src => app/src}/utils/deeplink.ts (100%) rename {src => app/src}/utils/desktopDeepLinkListener.ts (100%) rename {src => app/src}/utils/integrationTokensCrypto.ts (100%) rename {src => app/src}/utils/intelligenceTransforms.ts (100%) rename {src => app/src}/utils/openUrl.ts (100%) rename {src => app/src}/utils/sanitize.ts (100%) rename {src => app/src}/utils/tauriCommands.ts (63%) rename {src => app/src}/utils/tauriSocket.ts (92%) rename tailwind.config.js => app/tailwind.config.js (100%) rename {test => app/test}/e2e/globals.d.ts (100%) rename {test => app/test}/e2e/helpers/app-helpers.ts (100%) rename {test => app/test}/e2e/helpers/deep-link-helpers.ts (100%) rename {test => app/test}/e2e/helpers/element-helpers.ts (100%) rename {test => app/test}/e2e/mock-server.ts (100%) rename {test => app/test}/e2e/specs/auth-access-control.spec.ts (100%) rename {test => app/test}/e2e/specs/card-payment-flow.spec.ts (100%) rename {test => app/test}/e2e/specs/crypto-payment-flow.spec.ts (100%) rename {test => app/test}/e2e/specs/gmail-flow.spec.ts (100%) rename {test => app/test}/e2e/specs/local-model-runtime.spec.ts (100%) rename {test => app/test}/e2e/specs/login-flow.spec.ts (100%) rename {test => app/test}/e2e/specs/navigation.spec.ts (100%) rename {test => app/test}/e2e/specs/notion-flow.spec.ts (100%) rename {test => app/test}/e2e/specs/smoke.spec.ts (100%) rename {test => app/test}/e2e/specs/tauri-commands.spec.ts (100%) rename {test => app/test}/e2e/specs/telegram-flow.spec.ts (100%) rename {test => app/test}/tsconfig.e2e.json (100%) rename {test => app/test}/vitest.config.ts (100%) rename {test => app/test}/wdio.conf.ts (82%) create mode 100644 app/yarn.lock delete mode 100644 public/tauri.svg delete mode 100644 public/vite.svg delete mode 100644 rust-core/Cargo.toml delete mode 100644 rust-core/src/auth/anthropic_token.rs delete mode 100644 rust-core/src/auth/mod.rs delete mode 100644 rust-core/src/auth/openai_oauth.rs delete mode 100644 rust-core/src/core_server.rs delete mode 100644 rust-core/src/memory/db.rs delete mode 100644 rust-core/src/memory/extraction.rs delete mode 100644 rust-core/src/memory/ingestion.rs delete mode 100644 rust-core/src/memory/mod.rs delete mode 100644 rust-core/src/openhuman/accessibility/mod.rs delete mode 100644 rust-core/src/openhuman/agent/loop_.rs delete mode 100644 rust-core/src/openhuman/config/schema/gateway.rs delete mode 100644 rust-core/src/openhuman/gateway/client.rs delete mode 100644 rust-core/src/openhuman/gateway/constants.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/health.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/linq.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/mod.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/pair.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/webhook.rs delete mode 100644 rust-core/src/openhuman/gateway/handlers/whatsapp.rs delete mode 100644 rust-core/src/openhuman/gateway/mod.rs delete mode 100644 rust-core/src/openhuman/gateway/models.rs delete mode 100644 rust-core/src/openhuman/gateway/rate_limit.rs delete mode 100644 rust-core/src/openhuman/gateway/server.rs delete mode 100644 rust-core/src/openhuman/gateway/state.rs delete mode 100644 rust-core/src/openhuman/gateway/tests.rs delete mode 100644 rust-core/src/openhuman/hardware/discover.rs delete mode 100644 rust-core/src/openhuman/hardware/introspect.rs delete mode 100644 rust-core/src/openhuman/hardware/mod.rs delete mode 100644 rust-core/src/openhuman/hardware/registry.rs delete mode 100644 rust-core/src/openhuman/local_ai/mod.rs delete mode 100644 rust-core/src/openhuman/memory/backend.rs delete mode 100644 rust-core/src/openhuman/memory/hygiene.rs delete mode 100644 rust-core/src/openhuman/memory/lucid.rs delete mode 100644 rust-core/src/openhuman/memory/markdown.rs delete mode 100644 rust-core/src/openhuman/memory/mod.rs delete mode 100644 rust-core/src/openhuman/memory/none.rs delete mode 100644 rust-core/src/openhuman/memory/postgres.rs delete mode 100644 rust-core/src/openhuman/memory/snapshot.rs delete mode 100644 rust-core/src/openhuman/memory/sqlite.rs delete mode 100644 rust-core/src/openhuman/memory/vector.rs delete mode 100644 rust-core/src/openhuman/observability/log.rs delete mode 100644 rust-core/src/openhuman/observability/mod.rs delete mode 100644 rust-core/src/openhuman/observability/multi.rs delete mode 100644 rust-core/src/openhuman/observability/noop.rs delete mode 100644 rust-core/src/openhuman/observability/otel.rs delete mode 100644 rust-core/src/openhuman/observability/prometheus.rs delete mode 100644 rust-core/src/openhuman/observability/traits.rs delete mode 100644 rust-core/src/openhuman/observability/verbose.rs delete mode 100644 rust-core/src/openhuman/peripherals/arduino_flash.rs delete mode 100644 rust-core/src/openhuman/peripherals/arduino_upload.rs delete mode 100644 rust-core/src/openhuman/peripherals/capabilities_tool.rs delete mode 100644 rust-core/src/openhuman/peripherals/mod.rs delete mode 100644 rust-core/src/openhuman/peripherals/nucleo_flash.rs delete mode 100644 rust-core/src/openhuman/peripherals/rpi.rs delete mode 100644 rust-core/src/openhuman/peripherals/serial.rs delete mode 100644 rust-core/src/openhuman/peripherals/traits.rs delete mode 100644 rust-core/src/openhuman/peripherals/uno_q_bridge.rs delete mode 100644 rust-core/src/openhuman/peripherals/uno_q_setup.rs delete mode 100644 rust-core/src/openhuman/providers/anthropic.rs delete mode 100644 rust-core/src/openhuman/providers/bedrock.rs delete mode 100644 rust-core/src/openhuman/providers/copilot.rs delete mode 100644 rust-core/src/openhuman/providers/gemini.rs delete mode 100644 rust-core/src/openhuman/providers/glm.rs delete mode 100644 rust-core/src/openhuman/providers/mod.rs delete mode 100644 rust-core/src/openhuman/providers/ollama.rs delete mode 100644 rust-core/src/openhuman/providers/openai.rs delete mode 100644 rust-core/src/openhuman/providers/openai_codex.rs delete mode 100644 rust-core/src/openhuman/providers/openrouter.rs delete mode 100644 rust-core/src/openhuman/rag/mod.rs delete mode 100644 rust-core/src/openhuman/runtime/docker.rs delete mode 100644 rust-core/src/openhuman/runtime/mod.rs delete mode 100644 rust-core/src/openhuman/runtime/native.rs delete mode 100644 rust-core/src/openhuman/runtime/traits.rs delete mode 100644 rust-core/src/openhuman/runtime/wasm.rs delete mode 100644 rust-core/src/openhuman/service/mod.rs delete mode 100644 rust-core/src/openhuman/skillforge/evaluate.rs delete mode 100644 rust-core/src/openhuman/skillforge/integrate.rs delete mode 100644 rust-core/src/openhuman/skillforge/mod.rs delete mode 100644 rust-core/src/openhuman/skillforge/scout.rs delete mode 100644 rust-core/src/openhuman/skills/mod.rs delete mode 100644 rust-core/src/openhuman/skills/symlink_tests.rs delete mode 100644 rust-core/src/runtime/mod.rs delete mode 100644 rust-core/src/runtime/qjs_skill_instance.rs create mode 100644 rust-toolchain.toml delete mode 100644 src-tauri/.gitignore delete mode 100644 src-tauri/Cargo.toml delete mode 100644 src-tauri/build.rs delete mode 100644 src-tauri/capabilities/default.json delete mode 100644 src-tauri/icons/128x128.png delete mode 100644 src-tauri/icons/128x128@2x.png delete mode 100644 src-tauri/icons/32x32.png delete mode 100644 src-tauri/icons/Square107x107Logo.png delete mode 100644 src-tauri/icons/Square142x142Logo.png delete mode 100644 src-tauri/icons/Square150x150Logo.png delete mode 100644 src-tauri/icons/Square284x284Logo.png delete mode 100644 src-tauri/icons/Square30x30Logo.png delete mode 100644 src-tauri/icons/Square310x310Logo.png delete mode 100644 src-tauri/icons/Square44x44Logo.png delete mode 100644 src-tauri/icons/Square71x71Logo.png delete mode 100644 src-tauri/icons/Square89x89Logo.png delete mode 100644 src-tauri/icons/StoreLogo.png delete mode 100644 src-tauri/icons/icon.icns delete mode 100644 src-tauri/icons/icon.ico delete mode 100644 src-tauri/icons/icon.png delete mode 100644 src-tauri/src/commands/auth.rs delete mode 100644 src-tauri/src/commands/chat.rs delete mode 100644 src-tauri/src/commands/conscious_loop.rs delete mode 100644 src-tauri/src/commands/memory.rs delete mode 100644 src-tauri/src/commands/mod.rs delete mode 100644 src-tauri/src/commands/model.rs delete mode 100644 src-tauri/src/commands/openhuman.rs delete mode 100644 src-tauri/src/commands/runtime.rs delete mode 100644 src-tauri/src/commands/socket.rs delete mode 100644 src-tauri/src/commands/unified_skills.rs delete mode 100644 src-tauri/src/lib.rs delete mode 100644 src-tauri/src/main.rs delete mode 100644 src-tauri/src/memory/mod.rs delete mode 100644 src-tauri/src/models/mod.rs delete mode 100644 src-tauri/src/openhuman_daemon/mod.rs delete mode 100644 src-tauri/src/runtime/mod.rs delete mode 100644 src-tauri/src/services/mod.rs delete mode 100644 src-tauri/src/services/notification_service.rs delete mode 100644 src-tauri/src/services/session_service.rs delete mode 100644 src-tauri/src/services/socket_service.rs delete mode 100644 src-tauri/src/unified_skills/generator.rs delete mode 100644 src-tauri/src/unified_skills/llm_generator.rs delete mode 100644 src-tauri/src/unified_skills/mod.rs delete mode 100644 src-tauri/src/unified_skills/openclaw_executor.rs delete mode 100644 src-tauri/src/unified_skills/self_evolve.rs delete mode 100644 src-tauri/src/unified_skills/skill_tester.rs delete mode 100644 src-tauri/src/utils/config.rs delete mode 100644 src-tauri/src/utils/mod.rs delete mode 100644 src-tauri/tauri.conf.json delete mode 100644 src/App.css delete mode 100644 src/App.tsx rename {rust-core/src => src}/ai/encryption.rs (100%) rename {rust-core/src => src}/ai/memory_fs.rs (100%) rename {rust-core/src => src}/ai/mod.rs (100%) rename {rust-core/ai => src/ai/prompts}/AGENTS.md (100%) rename {rust-core/ai => src/ai/prompts}/BOOTSTRAP.md (100%) rename {rust-core/ai => src/ai/prompts}/CONSCIOUS_LOOP.md (100%) rename {rust-core/ai => src/ai/prompts}/IDENTITY.md (100%) rename {rust-core/ai => src/ai/prompts}/MEMORY.md (100%) rename {rust-core/ai => src/ai/prompts}/README.md (100%) rename {rust-core/ai => src/ai/prompts}/SOUL.md (100%) rename {rust-core/ai => src/ai/prompts}/TOOLS.md (100%) rename {rust-core/ai => src/ai/prompts}/USER.md (100%) rename {rust-core/src => src}/ai/sessions.rs (100%) create mode 100644 src/api/config.rs create mode 100644 src/api/jwt.rs create mode 100644 src/api/mod.rs create mode 100644 src/api/rest.rs create mode 100644 src/api/socket.rs delete mode 100644 src/assets/react.svg rename {rust-core/src => src}/bin/openhuman.rs (100%) delete mode 100644 src/components/skills/SelfEvolveModal.tsx create mode 100644 src/core_server/cli.rs create mode 100644 src/core_server/config_rpc_bridge.rs create mode 100644 src/core_server/dispatch/ai_rpc.rs create mode 100644 src/core_server/dispatch/core.rs create mode 100644 src/core_server/dispatch/memory.rs create mode 100644 src/core_server/dispatch/mod.rs create mode 100644 src/core_server/dispatch/openhuman/auth_socket.rs create mode 100644 src/core_server/dispatch/openhuman/config.rs create mode 100644 src/core_server/dispatch/openhuman/cron.rs create mode 100644 src/core_server/dispatch/openhuman/local_ai.rs create mode 100644 src/core_server/dispatch/openhuman/mod.rs create mode 100644 src/core_server/dispatch/openhuman/ops.rs create mode 100644 src/core_server/dispatch/openhuman/platform.rs create mode 100644 src/core_server/helpers.rs create mode 100644 src/core_server/json_rpc.rs create mode 100644 src/core_server/mod.rs create mode 100644 src/core_server/repl.rs create mode 100644 src/core_server/rpc_log.rs create mode 100644 src/core_server/server.rs create mode 100644 src/core_server/tests.rs create mode 100644 src/core_server/types.rs rename {rust-core/src => src}/lib.rs (51%) delete mode 100644 src/main.tsx rename {rust-core/src => src}/models/auth.rs (100%) rename {rust-core/src => src}/models/mod.rs (100%) rename {rust-core/src => src}/models/socket.rs (100%) rename {rust-core/src => src}/openhuman/agent/agent.rs (89%) rename {rust-core/src => src}/openhuman/agent/classifier.rs (100%) rename {rust-core/src => src}/openhuman/agent/dispatcher.rs (100%) create mode 100644 src/openhuman/agent/host_runtime.rs rename {rust-core/src/openhuman => src/openhuman/agent}/identity.rs (100%) create mode 100644 src/openhuman/agent/loop_/credentials.rs create mode 100644 src/openhuman/agent/loop_/history.rs create mode 100644 src/openhuman/agent/loop_/instructions.rs create mode 100644 src/openhuman/agent/loop_/memory_context.rs create mode 100644 src/openhuman/agent/loop_/mod.rs create mode 100644 src/openhuman/agent/loop_/parse.rs create mode 100644 src/openhuman/agent/loop_/session.rs create mode 100644 src/openhuman/agent/loop_/tests.rs create mode 100644 src/openhuman/agent/loop_/tool_loop.rs rename {rust-core/src => src}/openhuman/agent/memory_loader.rs (99%) rename {rust-core/src => src}/openhuman/agent/mod.rs (79%) rename {rust-core/src/openhuman => src/openhuman/agent}/multimodal.rs (100%) rename {rust-core/src => src}/openhuman/agent/prompt.rs (99%) rename {rust-core/src => src}/openhuman/agent/tests.rs (99%) rename {rust-core/src => src}/openhuman/agent/traits.rs (84%) rename {rust-core/src => src}/openhuman/approval/mod.rs (100%) rename {rust-core/src => src}/openhuman/autocomplete/mod.rs (65%) create mode 100644 src/openhuman/autocomplete/rpc.rs rename {rust-core/src => src}/openhuman/channels/cli.rs (100%) rename {rust-core/src => src}/openhuman/channels/commands.rs (99%) rename {rust-core/src => src}/openhuman/channels/context.rs (98%) rename {rust-core/src => src}/openhuman/channels/dingtalk.rs (100%) rename {rust-core/src => src}/openhuman/channels/discord.rs (100%) rename {rust-core/src => src}/openhuman/channels/email_channel.rs (100%) rename {rust-core/src => src}/openhuman/channels/imessage.rs (100%) rename {rust-core/src => src}/openhuman/channels/irc.rs (100%) rename {rust-core/src => src}/openhuman/channels/lark.rs (100%) rename {rust-core/src => src}/openhuman/channels/linq.rs (98%) rename {rust-core/src => src}/openhuman/channels/matrix.rs (100%) rename {rust-core/src => src}/openhuman/channels/mattermost.rs (100%) rename {rust-core/src => src}/openhuman/channels/mod.rs (100%) rename {rust-core/src => src}/openhuman/channels/prompt.rs (99%) rename {rust-core/src => src}/openhuman/channels/qq.rs (100%) rename {rust-core/src => src}/openhuman/channels/routes.rs (99%) rename {rust-core/src => src}/openhuman/channels/runtime/dispatch.rs (99%) rename {rust-core/src => src}/openhuman/channels/runtime/mod.rs (65%) rename {rust-core/src => src}/openhuman/channels/runtime/startup.rs (96%) rename {rust-core/src => src}/openhuman/channels/runtime/supervision.rs (100%) rename {rust-core/src => src}/openhuman/channels/signal.rs (100%) rename {rust-core/src => src}/openhuman/channels/slack.rs (100%) rename {rust-core/src => src}/openhuman/channels/telegram.rs (99%) rename {rust-core/src => src}/openhuman/channels/tests/common.rs (100%) rename {rust-core/src => src}/openhuman/channels/tests/context.rs (97%) rename {rust-core/src => src}/openhuman/channels/tests/health.rs (100%) rename {rust-core/src => src}/openhuman/channels/tests/identity.rs (100%) rename {rust-core/src => src}/openhuman/channels/tests/memory.rs (95%) rename {rust-core/src => src}/openhuman/channels/tests/mod.rs (100%) rename {rust-core/src => src}/openhuman/channels/tests/prompt.rs (100%) rename {rust-core/src => src}/openhuman/channels/tests/runtime_dispatch.rs (97%) rename {rust-core/src => src}/openhuman/channels/tests/runtime_tool_calls.rs (97%) rename {rust-core/src => src}/openhuman/channels/traits.rs (100%) rename {rust-core/src => src}/openhuman/channels/whatsapp.rs (99%) rename {rust-core/src => src}/openhuman/channels/whatsapp_storage.rs (100%) rename {rust-core/src => src}/openhuman/channels/whatsapp_web.rs (99%) rename {rust-core/src => src}/openhuman/config/daemon.rs (100%) rename {rust-core/src => src}/openhuman/config/mod.rs (70%) create mode 100644 src/openhuman/config/rpc.rs rename {rust-core/src => src}/openhuman/config/schema/accessibility.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/agent.rs (92%) rename {rust-core/src => src}/openhuman/config/schema/autocomplete.rs (94%) rename {rust-core/src => src}/openhuman/config/schema/autonomy.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/channels.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/defaults.rs (57%) rename {rust-core/src => src}/openhuman/config/schema/hardware.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/heartbeat_cron.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/identity_cost.rs (97%) rename {rust-core/src => src}/openhuman/config/schema/load.rs (92%) rename {rust-core/src => src}/openhuman/config/schema/local_ai.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/mod.rs (95%) rename {rust-core/src => src}/openhuman/config/schema/observability.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/proxy.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/routes.rs (97%) rename {rust-core/src => src}/openhuman/config/schema/runtime.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/storage_memory.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/tools.rs (100%) rename {rust-core/src => src}/openhuman/config/schema/tunnel.rs (100%) create mode 100644 src/openhuman/config/settings_cli.rs rename {rust-core/src => src}/openhuman/cost/mod.rs (100%) rename {rust-core/src => src}/openhuman/cost/tracker.rs (100%) rename {rust-core/src => src}/openhuman/cost/types.rs (100%) create mode 100644 src/openhuman/credentials/cli.rs create mode 100644 src/openhuman/credentials/mod.rs rename {rust-core/src/auth => src/openhuman/credentials}/profiles.rs (100%) create mode 100644 src/openhuman/credentials/responses.rs create mode 100644 src/openhuman/credentials/rpc.rs create mode 100644 src/openhuman/credentials/session_support.rs rename {rust-core/src => src}/openhuman/cron/mod.rs (99%) create mode 100644 src/openhuman/cron/rpc.rs rename {rust-core/src => src}/openhuman/cron/schedule.rs (100%) rename {rust-core/src => src}/openhuman/cron/scheduler.rs (99%) rename {rust-core/src => src}/openhuman/cron/store.rs (100%) rename {rust-core/src => src}/openhuman/cron/types.rs (100%) create mode 100644 src/openhuman/dev_paths.rs rename {rust-core/src => src}/openhuman/doctor/mod.rs (87%) create mode 100644 src/openhuman/doctor/rpc.rs rename {rust-core/src => src}/openhuman/health/mod.rs (99%) create mode 100644 src/openhuman/health/rpc.rs rename {rust-core/src => src}/openhuman/heartbeat/engine.rs (91%) rename {rust-core/src => src}/openhuman/heartbeat/mod.rs (73%) rename {rust-core/src => src}/openhuman/integrations/mod.rs (97%) rename {rust-core/src => src}/openhuman/integrations/registry.rs (80%) create mode 100644 src/openhuman/integrations/rpc.rs create mode 100644 src/openhuman/local_ai/install.rs create mode 100644 src/openhuman/local_ai/mod.rs create mode 100644 src/openhuman/local_ai/model_ids.rs create mode 100644 src/openhuman/local_ai/ollama_api.rs create mode 100644 src/openhuman/local_ai/parse.rs create mode 100644 src/openhuman/local_ai/paths.rs create mode 100644 src/openhuman/local_ai/rpc.rs create mode 100644 src/openhuman/local_ai/service/assets.rs create mode 100644 src/openhuman/local_ai/service/bootstrap.rs create mode 100644 src/openhuman/local_ai/service/mod.rs create mode 100644 src/openhuman/local_ai/service/ollama_admin.rs create mode 100644 src/openhuman/local_ai/service/public_infer.rs create mode 100644 src/openhuman/local_ai/service/speech.rs create mode 100644 src/openhuman/local_ai/service/vision_embed.rs create mode 100644 src/openhuman/local_ai/types.rs rename {rust-core/src => src}/openhuman/memory/chunker.rs (100%) rename {rust-core/src => src}/openhuman/memory/embeddings.rs (100%) create mode 100644 src/openhuman/memory/mod.rs rename {rust-core/src => src}/openhuman/memory/response_cache.rs (100%) create mode 100644 src/openhuman/memory/rpc.rs create mode 100644 src/openhuman/memory/store/client.rs create mode 100644 src/openhuman/memory/store/factories.rs create mode 100644 src/openhuman/memory/store/memory_trait.rs create mode 100644 src/openhuman/memory/store/mod.rs create mode 100644 src/openhuman/memory/store/types.rs create mode 100644 src/openhuman/memory/store/unified/documents.rs create mode 100644 src/openhuman/memory/store/unified/graph.rs create mode 100644 src/openhuman/memory/store/unified/helpers.rs create mode 100644 src/openhuman/memory/store/unified/init.rs create mode 100644 src/openhuman/memory/store/unified/kv.rs create mode 100644 src/openhuman/memory/store/unified/mod.rs create mode 100644 src/openhuman/memory/store/unified/query.rs rename {rust-core/src => src}/openhuman/memory/traits.rs (96%) rename rust-core/src/openhuman/migration.rs => src/openhuman/migration/mod.rs (99%) create mode 100644 src/openhuman/migration/rpc.rs rename {rust-core/src => src}/openhuman/mod.rs (69%) rename {rust-core/src/openhuman/onboard => src/openhuman/model_catalog}/mod.rs (82%) rename {rust-core/src/openhuman/onboard => src/openhuman/model_catalog}/models.rs (81%) create mode 100644 src/openhuman/model_catalog/rpc.rs rename {rust-core/src => src}/openhuman/providers/compatible.rs (98%) create mode 100644 src/openhuman/providers/mod.rs create mode 100644 src/openhuman/providers/openhuman_backend.rs rename {rust-core/src => src}/openhuman/providers/reliable.rs (99%) rename {rust-core/src => src}/openhuman/providers/router.rs (100%) rename {rust-core/src => src}/openhuman/providers/traits.rs (100%) create mode 100644 src/openhuman/rpc/mod.rs create mode 100644 src/openhuman/screen_intelligence/capture.rs create mode 100644 src/openhuman/screen_intelligence/context.rs rename rust-core/src/openhuman/screen_intelligence/mod.rs => src/openhuman/screen_intelligence/engine.rs (53%) create mode 100644 src/openhuman/screen_intelligence/helpers.rs create mode 100644 src/openhuman/screen_intelligence/limits.rs create mode 100644 src/openhuman/screen_intelligence/mod.rs create mode 100644 src/openhuman/screen_intelligence/permissions.rs create mode 100644 src/openhuman/screen_intelligence/rpc.rs create mode 100644 src/openhuman/screen_intelligence/tests.rs create mode 100644 src/openhuman/screen_intelligence/types.rs rename {rust-core/src => src}/openhuman/security/audit.rs (100%) rename {rust-core/src => src}/openhuman/security/bubblewrap.rs (100%) rename {rust-core/src => src}/openhuman/security/detect.rs (100%) rename {rust-core/src => src}/openhuman/security/docker.rs (100%) rename {rust-core/src => src}/openhuman/security/firejail.rs (100%) rename {rust-core/src => src}/openhuman/security/landlock.rs (90%) rename {rust-core/src => src}/openhuman/security/mod.rs (99%) rename {rust-core/src => src}/openhuman/security/pairing.rs (96%) rename {rust-core/src => src}/openhuman/security/policy.rs (99%) create mode 100644 src/openhuman/security/rpc.rs rename {rust-core/src => src}/openhuman/security/secrets.rs (100%) rename {rust-core/src => src}/openhuman/security/traits.rs (100%) create mode 100644 src/openhuman/service/common.rs rename rust-core/src/openhuman/daemon/mod.rs => src/openhuman/service/daemon.rs (100%) rename src-tauri/src/daemon_host_config.rs => src/openhuman/service/daemon_host.rs (60%) create mode 100644 src/openhuman/service/linux.rs create mode 100644 src/openhuman/service/macos.rs create mode 100644 src/openhuman/service/mod.rs create mode 100644 src/openhuman/service/rpc.rs create mode 100644 src/openhuman/service/windows.rs rename {rust-core/src/runtime => src/openhuman/skills}/bridge/cron_bridge.rs (94%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/db.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/log_bridge.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/mod.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/net.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/skills_bridge.rs (98%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/store.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/bridge/tauri_bridge.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/cron_scheduler.rs (99%) rename {rust-core/src/runtime => src/openhuman/skills}/loader.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/manifest.rs (95%) create mode 100644 src/openhuman/skills/mod.rs rename {rust-core/src/runtime => src/openhuman/skills}/ping_scheduler.rs (98%) rename {rust-core/src/runtime => src/openhuman/skills}/preferences.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/qjs_engine.rs (97%) create mode 100644 src/openhuman/skills/qjs_skill_instance/event_loop.rs create mode 100644 src/openhuman/skills/qjs_skill_instance/instance.rs create mode 100644 src/openhuman/skills/qjs_skill_instance/js_handlers.rs create mode 100644 src/openhuman/skills/qjs_skill_instance/js_helpers.rs create mode 100644 src/openhuman/skills/qjs_skill_instance/mod.rs create mode 100644 src/openhuman/skills/qjs_skill_instance/types.rs rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/bootstrap.js (100%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/mod.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/mod.rs (91%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/ops_core.rs (98%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/ops_net.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/ops_state.rs (76%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/ops_storage.rs (99%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/qjs_ops/types.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/quickjs_libs/storage.rs (100%) rename {rust-core/src/runtime => src/openhuman/skills}/skill_registry.rs (98%) rename {rust-core/src/runtime => src/openhuman/skills}/socket_manager.rs (98%) rename {rust-core/src/runtime => src/openhuman/skills}/types.rs (81%) rename {rust-core/src/runtime => src/openhuman/skills}/utils.rs (100%) rename {rust-core/src => src}/openhuman/tools/browser.rs (100%) rename {rust-core/src => src}/openhuman/tools/browser_open.rs (100%) rename {rust-core/src => src}/openhuman/tools/composio.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_add.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_list.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_remove.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_run.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_runs.rs (100%) rename {rust-core/src => src}/openhuman/tools/cron_update.rs (100%) rename {rust-core/src => src}/openhuman/tools/delegate.rs (91%) rename {rust-core/src => src}/openhuman/tools/file_read.rs (100%) rename {rust-core/src => src}/openhuman/tools/file_write.rs (100%) rename {rust-core/src => src}/openhuman/tools/git_operations.rs (100%) rename {rust-core/src => src}/openhuman/tools/hardware_board_info.rs (100%) rename {rust-core/src => src}/openhuman/tools/hardware_memory_map.rs (100%) rename {rust-core/src => src}/openhuman/tools/hardware_memory_read.rs (100%) rename {rust-core/src => src}/openhuman/tools/http_request.rs (100%) rename {rust-core/src => src}/openhuman/tools/image_info.rs (100%) create mode 100644 src/openhuman/tools/image_output.rs create mode 100644 src/openhuman/tools/local_cli.rs rename {rust-core/src => src}/openhuman/tools/memory_forget.rs (69%) rename {rust-core/src => src}/openhuman/tools/memory_recall.rs (74%) rename {rust-core/src => src}/openhuman/tools/memory_store.rs (77%) rename {rust-core/src => src}/openhuman/tools/mod.rs (97%) rename {rust-core/src => src}/openhuman/tools/proxy_config.rs (100%) rename {rust-core/src => src}/openhuman/tools/pushover.rs (100%) rename {rust-core/src => src}/openhuman/tools/schedule.rs (100%) rename {rust-core/src => src}/openhuman/tools/schema.rs (99%) rename {rust-core/src => src}/openhuman/tools/screenshot.rs (100%) rename {rust-core/src => src}/openhuman/tools/shell.rs (99%) rename {rust-core/src => src}/openhuman/tools/traits.rs (100%) rename {rust-core/src => src}/openhuman/tools/web_search_tool.rs (100%) create mode 100644 src/openhuman/tray/mod.rs rename {rust-core/src => src}/openhuman/tunnel/cloudflare.rs (100%) rename {rust-core/src => src}/openhuman/tunnel/custom.rs (100%) rename {rust-core/src => src}/openhuman/tunnel/mod.rs (98%) rename {rust-core/src => src}/openhuman/tunnel/ngrok.rs (100%) rename {rust-core/src => src}/openhuman/tunnel/none.rs (100%) rename {rust-core/src => src}/openhuman/tunnel/tailscale.rs (100%) rename {rust-core/src => src}/openhuman/util.rs (98%) create mode 100644 src/openhuman/workspace/mod.rs delete mode 100644 src/services/api/authApi.ts delete mode 100644 src/services/api/channelConnectionsApi.ts delete mode 100644 src/vite-env.d.ts create mode 100644 tests/json_rpc_e2e.rs delete mode 100644 tsconfig.json delete mode 100644 tsconfig.node.json delete mode 100644 vite.config.ts diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fd4d01cd6..d78c36820 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,7 +16,7 @@ ## Testing - [ ] `yarn -s compile` -- [ ] `cargo check --manifest-path src-tauri/Cargo.toml` +- [ ] `cargo check --manifest-path app/src-tauri/Cargo.toml` - [ ] Other checks run (list commands) - [ ] Manual validation completed (list scenarios) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99ed92be7..555471715 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: cache: 'yarn' - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@1.93.0 with: targets: x86_64-unknown-linux-gnu @@ -44,7 +44,7 @@ jobs: id: cargo-lock-fingerprint shell: bash run: | - echo "hash=$(tail -n +8 src-tauri/Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT" + echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT" - name: Cache Cargo registry and git sources uses: actions/cache@v4 @@ -73,16 +73,17 @@ jobs: run: cd skills && yarn install --frozen-lockfile - name: Build sidecar core binary - run: cargo build --manifest-path rust-core/Cargo.toml --release --target x86_64-unknown-linux-gnu --bin openhuman + run: cargo build --manifest-path Cargo.toml --release --target x86_64-unknown-linux-gnu --bin openhuman - name: Stage sidecar for Tauri bundler run: | - mkdir -p src-tauri/binaries - # Workspace root target/ (not rust-core/target/) — see root Cargo.toml [workspace] - cp target/x86_64-unknown-linux-gnu/release/openhuman src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu - chmod +x src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu + mkdir -p app/src-tauri/binaries + # Release artifacts for the root package land in repo root target/ + cp target/x86_64-unknown-linux-gnu/release/openhuman app/src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu + chmod +x app/src-tauri/binaries/openhuman-x86_64-unknown-linux-gnu - name: Build Tauri app + working-directory: app run: | TAURI_CONFIG_OVERRIDE='{"bundle":{"createUpdaterArtifacts":false}}' yarn tauri build -c "$TAURI_CONFIG_OVERRIDE" --bundles none -- --target x86_64-unknown-linux-gnu diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd68aeb5e..277cec2d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,9 +79,9 @@ jobs: throw new Error(`Invalid release_type: ${releaseType}`); } - const packagePath = 'package.json'; - const tauriPath = 'src-tauri/tauri.conf.json'; - const cargoPath = 'src-tauri/Cargo.toml'; + const packagePath = 'app/package.json'; + const tauriPath = 'app/src-tauri/tauri.conf.json'; + const cargoPath = 'app/src-tauri/Cargo.toml'; const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8')); const match = String(pkg.version || '').match(/^(\d+)\.(\d+)\.(\d+)$/); @@ -119,7 +119,7 @@ jobs: `$1${nextVersion}$3`, ); if (updatedCargo === cargo) { - throw new Error('Failed to update [package].version in src-tauri/Cargo.toml'); + throw new Error('Failed to update [package].version in app/src-tauri/Cargo.toml'); } fs.writeFileSync(cargoPath, updatedCargo); @@ -147,7 +147,7 @@ jobs: VERSION: ${{ steps.bump.outputs.version }} TAG: ${{ steps.bump.outputs.tag }} run: | - git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml + git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml git commit -m "chore(release): v${VERSION}" git push origin main @@ -244,8 +244,8 @@ jobs: node-version: 24.x cache: yarn - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - name: Install Rust (rust-toolchain.toml) + uses: dtolnay/rust-toolchain@1.93.0 with: targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} @@ -260,7 +260,7 @@ jobs: id: cargo-lock-fingerprint shell: bash run: | - echo "hash=$(tail -n +8 src-tauri/Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT" + echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT" - name: Cache Cargo registry and git sources uses: actions/cache@v4 @@ -287,7 +287,7 @@ jobs: env: BASE_URL: ${{ vars.BASE_URL }} UPDATER_PUBLIC_KEY: ${{ secrets.UPDATER_PUBLIC_KEY }} - WITH_UPDATER: 'true' + WITH_UPDATER: "true" with: script: | const workspacePath = process.env.GITHUB_WORKSPACE.replace(/\\/g, '/'); @@ -313,12 +313,14 @@ jobs: CORE_DIR="openhuman_core" elif [ -f "rust-core/Cargo.toml" ]; then CORE_DIR="rust-core" + elif [ -f "Cargo.toml" ] && grep -q '^name = "openhuman"' Cargo.toml; then + CORE_DIR="." else - echo "No core Cargo manifest found (expected openhuman_core/Cargo.toml or rust-core/Cargo.toml)" + echo "No core Cargo manifest found (expected root Cargo.toml with openhuman, openhuman_core/Cargo.toml, or rust-core/Cargo.toml)" exit 1 fi - SIDE_CAR_BASE="$(node -e "const fs=require('fs');const c=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));const b=(c.bundle&&Array.isArray(c.bundle.externalBin)&&c.bundle.externalBin[0])||'binaries/openhuman';process.stdout.write(String(b).split('/').pop());")" + SIDE_CAR_BASE="$(node -e "const fs=require('fs');const c=JSON.parse(fs.readFileSync('app/src-tauri/tauri.conf.json','utf8'));const b=(c.bundle&&Array.isArray(c.bundle.externalBin)&&c.bundle.externalBin[0])||'binaries/openhuman';process.stdout.write(String(b).split('/').pop());")" CORE_BIN_NAME="${SIDE_CAR_BASE}" echo "core_dir=$CORE_DIR" >> "$GITHUB_OUTPUT" @@ -346,9 +348,9 @@ jobs: - name: Stage sidecar for Tauri bundler shell: bash run: | - mkdir -p src-tauri/binaries + mkdir -p app/src-tauri/binaries SOURCE="$CORE_TARGET_DIR/$CORE_BIN_NAME" - DEST="src-tauri/binaries/$SIDECAR_BASE-$MATRIX_TARGET" + DEST="app/src-tauri/binaries/$SIDECAR_BASE-$MATRIX_TARGET" cp "$SOURCE" "$DEST" chmod +x "$DEST" env: @@ -370,9 +372,10 @@ jobs: BASE_URL: ${{ vars.BASE_URL }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY || secrets.UPDATER_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || secrets.UPDATER_PRIVATE_KEY_PASSWORD }} - WITH_UPDATER: 'true' + WITH_UPDATER: "true" MACOSX_DEPLOYMENT_TARGET: ${{ matrix.settings.platform == 'macos-latest' && '10.15' || '' }} with: + projectPath: app # Tools discovery now uses a JS mock registry (no Rust discovery # binary target), so there is no extra helper executable for Tauri # to copy/sign inside release app bundles. @@ -391,7 +394,7 @@ jobs: if: matrix.settings.platform == 'macos-latest' shell: bash run: | - APP_PATH="src-tauri/target/${{ matrix.settings.target }}/release/bundle/macos/OpenHuman.app" + APP_PATH="target/${{ matrix.settings.target }}/release/bundle/macos/OpenHuman.app" echo "Inspecting bundle at: $APP_PATH" ls -la "$APP_PATH/Contents/MacOS" ls -la "$APP_PATH/Contents/Resources" | grep openhuman || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d88795ac..2a917b474 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 24.x - cache: 'yarn' + cache: "yarn" - name: Cache node modules id: yarn-cache @@ -64,8 +64,8 @@ jobs: with: fetch-depth: 1 - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - name: Install Rust (rust-toolchain.toml) + uses: dtolnay/rust-toolchain@1.93.0 with: targets: x86_64-unknown-linux-gnu @@ -91,11 +91,11 @@ jobs: restore-keys: | ${{ runner.os }}-rust-test-cargo- - - name: Test rust-core (openhuman-core) - run: cargo test -p openhuman-core + - name: Test rust-core (openhuman) + run: cargo test -p openhuman - name: Test src-tauri (OpenHuman) - run: cargo test -p OpenHuman + run: cargo test --manifest-path app/src-tauri/Cargo.toml e2e-macos: name: E2E (macOS / Appium) @@ -112,10 +112,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 24.x - cache: 'yarn' + cache: "yarn" - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - name: Install Rust (rust-toolchain.toml) + uses: dtolnay/rust-toolchain@1.93.0 - name: Install dependencies run: yarn install --frozen-lockfile @@ -124,7 +124,7 @@ jobs: run: cd skills && yarn install --frozen-lockfile - name: Ensure .env exists for E2E build - run: touch .env + run: touch app/.env - name: Install Appium and mac2 driver run: | @@ -134,7 +134,7 @@ jobs: - name: Build E2E app bundle run: yarn test:e2e:build env: - E2E_SKIP_CARGO_CLEAN: '1' + E2E_SKIP_CARGO_CLEAN: "1" - name: Run all E2E flows run: yarn test:e2e:all:flows diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 92064cab7..54a17c2ee 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -44,7 +44,7 @@ jobs: run: yarn install --frozen-lockfile - name: Type check TypeScript files - run: npx tsc + run: yarn typecheck env: NODE_ENV: test diff --git a/.gitignore b/.gitignore index 838620ff8..c465bb0da 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ pnpm-debug.log* lerna-debug.log* package-lock.json -yarn.lock node_modules dist @@ -35,7 +34,7 @@ scripts/ci-secrets.local.json *.sln *.sw? references/ -src-tauri/runtime-skill-* +app/src-tauri/runtime-skill-* .mypy_cache .ruff_cache .kotlin diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index e69de29bb..000000000 diff --git a/CLAUDE.md b/CLAUDE.md index e2f279968..778ca0d57 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,520 +1,167 @@ -## Project Summary +# OpenHuman -Cross-platform crypto community communication platform built with **Tauri v2** (React 19 + Rust). Targets desktop (Windows, macOS) and mobile (Android, iOS). Features deep Telegram integration via MTProto, real-time Socket.io communication, V8-based skill execution engine, and an MCP (Model Context Protocol) tool system for AI-driven Telegram interactions. +**AI-powered assistant for crypto communities — React + Tauri v2 desktop app with a Rust core (JSON-RPC / CLI) and sandboxed QuickJS skills.** -## Runtime Scope +This file orients contributors and coding agents. Authoritative narrative architecture: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md). Frontend layout: [`docs/src/README.md`](docs/src/README.md). Tauri shell: [`docs/src-tauri/README.md`](docs/src-tauri/README.md). -- Tauri host/runtime is desktop-only. -- Always run and validate Tauri codepaths as desktop (`windows`, `macOS`, `linux`). -- Do not add or maintain Android/iOS/web runtime branches inside `src-tauri`. +--- -## App Theme & Design System +## Repository layout -**Design Philosophy**: Premium, sophisticated crypto platform with calm, trustworthy aesthetic. +| Path | Role | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`app/`** | Yarn workspace **`openhuman-app`**: Vite + React (`app/src/`), Tauri desktop host (`app/src-tauri/`), Vitest tests | +| **Repo root `src/`** | Rust library **`openhuman_core`** and **`openhuman`** CLI binary (`src/bin/openhuman.rs`) — `core_server`, `openhuman::*` domains, skills runtime (QuickJS / `rquickjs`), MCP routing in the core process | +| **`skills/`** | Skill packages (built into `skills/skills` for bundling) | +| **`Cargo.toml`** (root) | Core crate; `cargo build --bin openhuman` produces the sidecar the UI stages via `app`’s `core:stage` | +| **`docs/`** | Architecture and module guides (numbered pages under `docs/src/`, `docs/src-tauri/`) | -### Color Palette +Commands in documentation assume the **repo root** unless noted: `yarn dev` runs the `app` workspace. -- **Primary**: Ocean blue (`#4A83DD`) optimized for dark backgrounds -- **Sage**: Success green (`#4DC46F`) for growth indicators -- **Amber**: Warning (`#E8A838`) for attention states -- **Coral**: Error (`#F56565`) soft professional red -- **Canvas**: Background layers (`#FAFAF9` to `#D4D4D1`) with subtle warmth -- **Market Colors**: Bullish green, bearish red, Bitcoin orange, Ethereum purple +--- -### Typography +## Runtime scope -- **Primary**: Inter (premium font stack) -- **Display**: Cabinet Grotesk for headings -- **Mono**: JetBrains Mono for code -- **Scale**: Sophisticated sizing with negative letter spacing for elegance +- **Shipped product**: desktop — Windows, macOS, Linux (see [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) “Platform reach”). +- **Tauri host** (`app/src-tauri`): **desktop-only** (`compile_error!` for non-desktop targets). Do not add Android/iOS branches inside `app/src-tauri`. +- **Core binary** (`openhuman`): spawned/staged as a **sidecar**; the Web UI talks to it over HTTP (`core_rpc_relay` + `core_rpc` client), not by re-implementing domain logic in the shell. -### Component System +--- -- **Shadows**: Glow effects, subtle to float depth levels -- **Animations**: Fade-in, slide-in, scale-in with cubic-bezier easing -- **Border Radius**: Smooth system from `xs` (0.25rem) to `5xl` (2rem) -- **Spacing**: Extended scale including custom values (4.5, 13, 15, etc.) - -### Current UI State - -- Uses HashRouter (not BrowserRouter) as seen in `App.tsx:1` -- 153 TypeScript files total in src/ -- Sophisticated Tailwind config with custom color system and animations - -## Commands +## Commands (from repository root) ```bash -# Frontend dev server only (port 1420) +# Frontend + Tauri dev (workspace delegates to app/) yarn dev -# Desktop dev with hot-reload (starts Vite + Tauri) +# Desktop with Tauri (loads env via scripts/load-dotenv.sh) yarn tauri dev -# Desktop dev with enhanced debugging (RUST_BACKTRACE and RUST_LOG enabled) -yarn dev:app +# Production UI build (app workspace) +yarn build -# Production build (TypeScript compile + Vite build + Tauri bundle) -yarn tauri build +# Typecheck / lint / format (app workspace) +yarn typecheck +yarn lint +yarn format +yarn format:check -# Debug build with .app bundle (required for deep link testing on macOS) -# On macOS, openhuman:// only works when running the .app, not `tauri dev` -yarn tauri build --debug --bundles app -yarn macos:dev +# Stage openhuman core binary next to Tauri resources (required for core RPC) +cd app && yarn core:stage -# Android -yarn tauri android dev -yarn tauri android build +# Skills (under skills/) +yarn workspace openhuman-app skills:build +yarn workspace openhuman-app skills:watch -# iOS -yarn tauri ios dev -yarn tauri ios build +# Rust — core library + CLI (repo root) +cargo check --manifest-path Cargo.toml +cargo build --manifest-path Cargo.toml --bin openhuman -# Skills development -yarn skills:build # Build skills in development mode -yarn skills:watch # Watch skills for changes - -# AI Configuration -yarn tools:generate # Discover tools from V8 runtime and generate TOOLS.md - -# Rust checks -cargo check --manifest-path src-tauri/Cargo.toml -cargo clippy --manifest-path src-tauri/Cargo.toml +# Rust — Tauri shell only +cargo check --manifest-path app/src-tauri/Cargo.toml ``` -No test framework is currently configured. **ESLint and Prettier are configured** with Husky pre-commit/pre-push hooks for code quality enforcement. +**Tests**: Vitest in `app/` (`yarn test`, `yarn test:coverage`). Rust tests via `cargo test` at repo root as wired in `app/package.json`. -## Architecture +**Quality**: ESLint + Prettier + Husky in the `app` workspace. -### Provider Chain (App.tsx) +--- -The app wraps in this order: `Redux Provider` → `PersistGate` → `SocketProvider` → `TelegramProvider` → `HashRouter` → `AppRoutes`. **Note**: Now uses HashRouter instead of BrowserRouter. This ordering matters because Socket.io and Telegram providers depend on Redux auth state. +## Frontend (`app/src/`) -### State Management (Redux Toolkit + Persist) +### Provider chain (`app/src/App.tsx`) -State lives in `src/store/` using Redux Toolkit slices: +Order matters for auth and realtime: -- **authSlice** — JWT token, onboarding completion flag (persisted) -- **userSlice** — user profile -- **socketSlice** — connection status, socket ID -- **telegramSlice** — connection/auth status, chats, messages, threads (selectively persisted; loading/error states excluded) -- **aiSlice** — AI system state, memory management, session tracking -- **skillsSlice** — skills catalog, setup status, management state, V8 runtime integration -- **teamSlice** — team management, member invites, permissions +`Redux Provider` → `PersistGate` → **`UserProvider`** → **`SocketProvider`** → **`AIProvider`** → **`SkillProvider`** → **`HashRouter`** → `AppRoutes`. -Redux Persist stores auth and telegram state (storage backend is configurable; default uses localStorage). The telegram slice has a complex nested structure in `src/store/telegram/` with separate files for types, reducers, extraReducers, and thunks. +There is **no** `TelegramProvider` in the current tree; Telegram may appear in UI copy or legacy settings, but MTProto is not an active provider here. -### LocalStorage +### State (`app/src/store/`) -- **Do not use `localStorage` (or `sessionStorage`) for app state or feature logic.** Use Redux (and Redux Persist where needed) instead. -- **Remove any existing `localStorage` usage** when touching related code. User-scoped data (auth, onboarding, Telegram session, socket state) lives in Redux, keyed by user id where applicable. Telegram session is in `telegram.byUser[userId].sessionString`, not localStorage. -- **Exceptions**: Redux-persist may use a localStorage-backed storage adapter by default; that is the persistence layer, not app logic. Any other remaining usage (e.g. deep-link `deepLinkHandled` flag) should be migrated to Redux or similar when that code is modified. -- **General rule**: Avoid adding new `localStorage` or `sessionStorage` usage; prefer Redux and remove existing usage when you work on affected areas. +Redux Toolkit slices include **auth**, **user**, **socket**, **ai**, **skills**, **team**, and related modules. Prefer Redux (and persist where configured) over ad hoc `localStorage` for app state; see project rules for exceptions. -### Service Layer (Singletons) +### Services (`app/src/services/`) -- **mtprotoService** (`src/services/mtprotoService.ts`) — Telegram MTProto client via `telegram` npm package. Session stored in Redux (`telegram.byUser[userId].sessionString`), not localStorage. Auto-retries FLOOD_WAIT up to 60s. -- **socketService** (`src/services/socketService.ts`) — Socket.io client. Auth token passed in socket `auth` object (not query string). Transports: polling first, then WebSocket. Enhanced with Rust-native Socket.io client for persistent connections. -- **apiClient** (`src/services/apiClient.ts`) — HTTP client for REST backend. +Singleton-style modules include **`apiClient`**, **`socketService`**, **`coreRpcClient`** (HTTP bridge to the core process), and domain **`api/*`** clients. There is **no** `mtprotoService` in this tree. -### MCP System (`src/lib/mcp/`) +### MCP (`app/src/lib/mcp/`) -Model Context Protocol implementation for AI tool execution over Socket.io: +Transport, validation, and types for JSON-RPC-style messaging over Socket.io — **not** a large Telegram tool pack. Tooling for agents is driven by the **skills** system and backend; see `agentToolRegistry.ts` and core RPC. -- `transport.ts` — Socket.io JSON-RPC 2.0 transport with 30s timeout -- `telegram/server.ts` — TelegramMCPServer manages 99 tool definitions -- `telegram/tools/` — Individual tool files (one per Telegram API operation) -- Tools use `big-integer` library for Telegram's large integer IDs +### Routing (`app/src/AppRoutes.tsx`) -### Routing (`src/AppRoutes.tsx`) +Hash routes include `/`, `/onboarding`, `/mnemonic`, `/home`, `/intelligence`, `/skills`, `/conversations`, `/invites`, `/agents`, `/settings/*`, plus `DefaultRedirect`. **No** dedicated `/login` route in `AppRoutes` (auth flows use the welcome/onboarding paths). -``` -/ → Welcome (public) -/login → Login (public) -/onboarding → Onboarding (protected, requires auth, not yet onboarded) -/home → Home (protected, requires auth + onboarded) -* → DefaultRedirect (routes based on auth state) -``` +### AI configuration -`PublicRoute` redirects authenticated users away. `ProtectedRoute` enforces auth and optionally onboarding status. +Bundled prompts live under **`src/ai/prompts/`** at the **repository root** (also bundled via `app/src-tauri/tauri.conf.json` `resources`). Loaders under `app/src/lib/ai/` use `?raw` imports, optional remote fetch, and in Tauri **`ai_get_config` / `ai_refresh_config`** for packaged content. -### Deep Link Auth Flow +--- -Web-to-desktop handoff using `openhuman://` URL scheme: +## Tauri shell (`app/src-tauri/`) -1. User authenticates in browser -2. Browser redirects to `openhuman://auth?token=` -3. Tauri catches the deep link, Rust `exchange_token` command calls backend via `reqwest` (bypasses CORS) -4. Backend returns `sessionToken` + user object -5. App stores session in Redux, navigates to onboarding/home +Thin desktop host: window management, daemon health bridging, **core process lifecycle** (`core_process`, `CoreProcessHandle`), and **JSON-RPC relay** to the **`openhuman`** sidecar (`core_rpc_relay`, `core_rpc`). -Key file: `src/utils/desktopDeepLinkListener.ts` (lazy-loaded in `main.tsx`). Uses a `deepLinkHandled` flag to prevent infinite reload loops. Deep links do NOT work in `tauri dev` on macOS — must use built `.app` bundle. +Registered IPC commands (see [`docs/src-tauri/02-commands.md`](docs/src-tauri/02-commands.md)) include **`greet`**, **`write_ai_config_file`**, **`ai_get_config`**, **`ai_refresh_config`**, **`core_rpc_relay`**, **window** commands, and **OpenHuman service / daemon host** helpers (`openhuman_*`). -### Rust Backend (`src-tauri/src/lib.rs`) +Deep link plugin is registered where supported; behavior is platform-specific (see platform notes below). -Enhanced Rust backend with comprehensive skill execution and runtime management: +--- -**Core Commands:** +## Rust core (repo root `src/`) -- `greet` — demo command -- `exchange_token` — CORS-free HTTP POST to backend for token exchange (desktop only) +- **`openhuman/`** — Domain logic (skills, memory, channels, config, …). RPC controllers live in **`rpc.rs`** files per domain; use **`RpcOutcome`** pattern per [`AGENTS.md`](AGENTS.md) / internal rules. +- **`src/openhuman/` module layout**: **New** functionality must live in a **dedicated subdirectory** (its own folder/module, e.g. `openhuman/my_domain/mod.rs` plus related files, or a new subfolder under an existing domain). Do **not** add new standalone `*.rs` files directly at `src/openhuman/` root; place new code in a module directory and declare it from `mod.rs` (or merge into an existing domain folder). +- **`core_server/`** — Transport only: Axum/HTTP, JSON-RPC envelope, CLI parsing, **dispatch** (`core_server::dispatch`) — **no** heavy business logic here. +- **Layering**: Implementation in `openhuman::/`, controllers in `openhuman::/rpc.rs`, routes in `core_server/`. -**Runtime Management:** +Skills runtime uses **QuickJS** (`rquickjs`) in **`src/openhuman/skills/`** (e.g. `qjs_skill_instance.rs`, `qjs_engine.rs`), not V8/deno_core in this repository. -- `discover_skills` — V8 skill discovery and manifest parsing -- `enable_skill` / `disable_skill` — skill lifecycle management -- `get_skill_preferences` / `set_skill_preferences` — skill configuration -- `connect_to_socket` — Rust-native Socket.io connection -- `get_socket_status` — connection status monitoring +--- -**Android Support:** +## App theme & design system -- `RuntimeService` — background service for skill execution -- Notification permissions and foreground service management -- Android logging integration with logcat +**Design intent**: Premium, calm crypto UI — ocean primary (`#4A83DD`), sage / amber / coral semantic colors, Inter + Cabinet Grotesk + JetBrains Mono, Tailwind with custom radii/spacing/shadows. Details: [`docs/DESIGN_GUIDELINES.md`](docs/DESIGN_GUIDELINES.md). -Deep link plugin registered at setup. `register_all()` called only on Windows/Linux (panics on macOS). +--- -### V8 Runtime System (`src-tauri/src/runtime/`) +## Environment variables (Vite) -Advanced JavaScript execution engine for skills using V8 (via deno_core): +Set in `.env` for the **`app`** workspace (`VITE_*` exposed to the client): -**Core Components:** +| Variable | Purpose | +| ------------------------- | ------------------------------------------------------------------------- | +| `VITE_BACKEND_URL` | API base (default in code: production API; see `app/src/utils/config.ts`) | +| `VITE_SENTRY_DSN` | Optional Sentry DSN | +| `VITE_SKILLS_GITHUB_REPO` | Skills catalog GitHub repo slug | -- `v8_engine.rs` — V8 JavaScript runtime initialization and management -- `v8_skill_instance.rs` — Individual skill execution contexts and lifecycle -- `skill_registry.rs` — Skill discovery, registration, and state management -- `manifest.rs` — Skill manifest parsing with platform compatibility checks -- `socket_manager.rs` — Persistent Socket.io connections with reconnection logic -- `cron_scheduler.rs` — Scheduled task execution for time-based skills -- `preferences.rs` — Skill configuration and settings persistence +--- -**Bridge System (`src-tauri/src/runtime/bridge/`):** +## Git workflow -- `skills_bridge.rs` — Skill-to-skill communication and state sharing -- `tauri_bridge.rs` — Frontend-backend IPC and environment access -- `net.rs` — HTTP/fetch operations for skills -- `db.rs` — Database operations and storage management -- `store.rs` — Key-value storage for skill data -- `log_bridge.rs` — Structured logging from skills -- `cron_bridge.rs` — Cron job scheduling and management +- **Public repo**; push to your working branch; PRs target **`main`**. +- Use [`.github/pull_request_template.md`](.github/pull_request_template.md); AI-generated PR text should follow its sections and checklist. -**Quickjs Integration (`src-tauri/src/services/quickjs/`):** +--- -- `service.rs` — High-level client management with V8 integration -- `bootstrap.js` — V8 JavaScript bootstrap environment -- `ops/mod.rs` — Native operations for WebSocket, timers, and async handling -- `storage.rs` — Persistent storage for sessions and data +## Key patterns (concise) -**Platform Support:** +- **`src/openhuman/`**: New features go in a **folder/module**, not new root-level `src/openhuman/*.rs` files (see Rust core section). +- **File size**: Prefer ≤ ~500 lines per source file; split modules when growing. +- **Pre-merge checks** (when touching code): Prettier, ESLint, `tsc --noEmit` in `app/`; `cargo fmt` + `cargo check` for changed Rust (`Cargo.toml` at root and/or `app/src-tauri/Cargo.toml` as appropriate). +- **No dynamic imports** in app code (static `import` only); use try/catch around Tauri APIs where needed. +- **Type-only imports**: `import type` where appropriate. +- **Dual socket / tool sync**: If you change realtime protocol, keep **frontend** (`socketService` / MCP transport) and **core** socket behavior aligned (see [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) dual-socket section). -- Desktop platforms: Full V8 runtime with all features -- Mobile platforms: Error handling with feature availability checks -- Platform-specific skill filtering based on manifest declarations +--- -## Environment Variables +## Platform notes -Set in `.env` (Vite exposes `VITE_*` prefixed vars): +- **macOS deep links**: Often require a built **`.app`** bundle; not only `tauri dev`. See [`docs/telegram-login-desktop.md`](docs/telegram-login-desktop.md) if applicable. +- **`window.__TAURI__`**: Not assumed at module load; guard Tauri usage accordingly. +- **Core sidecar**: Must be staged/built so `core_rpc` can reach the `openhuman` binary (see `scripts/stage-core-sidecar.mjs`). -| Variable | Purpose | -| --------------------------- | ------------------------------------------------------------------- | -| `VITE_BACKEND_URL` | Backend API URL (default: `http://localhost:5005`) | -| `VITE_SENTRY_DSN` | Sentry DSN for error reporting (optional) | -| `VITE_DEBUG` | Debug mode flag | -| `OPENHUMAN_DAEMON_INTERNAL` | Force internal daemon mode (default: false, uses external services) | +--- -Production defaults are in `src/utils/config.ts`. - -## AI Configuration System - -OpenHumanuses an OpenClaw-compliant AI configuration system that automatically injects persona and tool context into every user message for consistent AI behavior. - -### Configuration Files - -All AI configuration lives in the `/ai/` directory: - -- **`/ai/SOUL.md`** - AI personality, voice, tone, and behavior patterns -- **`/ai/TOOLS.md`** - Auto-generated documentation of all available tools (generated via `yarn tools:generate`) -- **`/ai/IDENTITY.md`** - Core identity and values (TODO) -- **`/ai/AGENTS.md`** - Agent roles and specializations (TODO) -- **`/ai/USER.md`** - User adaptation strategies (TODO) -- **`/ai/BOOTSTRAP.md`** - Initialization procedures (TODO) -- **`/ai/MEMORY.md`** - Long-term knowledge and patterns (TODO) - -### Modular Loader System - -```typescript -// Individual loaders with multi-layer caching -loadSoul() → SoulConfig // Personality, voice, behavior -loadTools() → ToolsConfig // Available tools and capabilities - -// Unified loader -loadAIConfig() → AIConfig // Combined SOUL + TOOLS configuration -``` - -**Caching Strategy:** - -- Memory cache (immediate) -- localStorage cache (30min TTL) -- GitHub remote (latest) -- Bundled fallback (reliable) - -**TODO**: Set up public AI configuration repository to eliminate 404 fallback errors - -- Current: AI config loaders try GitHub URLs first (fail with 404), then fallback to bundled files -- Console shows: "Failed to load resource: the server responded with a status of 404" -- Affected: Settings → AI Configuration "Refresh Soul/Tools" buttons -- Files: `src/lib/ai/soul/loader.ts`, `src/lib/ai/tools/loader.ts` - -### Unified Injection System - -Every user message automatically gets AI context injected: - -```typescript -// Unified injection (recommended) -import { injectAll } from '../lib/ai/injector'; -// Individual injections (for specific needs) -import { injectSoul, injectTools } from '../lib/ai/injector'; - -const injectedMessage = await injectAll(userMessage); - -const soulMessage = await injectSoul(userMessage); -const toolsMessage = await injectTools(userMessage); -``` - -**Message Format:** - -``` -[PERSONA_CONTEXT] -I am OpenHuman that incredibly smart, funny friend who loves helping people get stuff done -Personality: Curious & Enthusiastic, Witty & Engaging, Empathetic -Voice: Conversational, Use humor naturally but don't force it -[/PERSONA_CONTEXT] - -[TOOLS_CONTEXT] -4 tools across 3 skills -Categories: Communication (2), Productivity (1), Email (1) -Key skills: telegram, notion, gmail -[/TOOLS_CONTEXT] - -User message: Hello! -``` - -### Dynamic TOOLS.md Generation - -TOOLS.md is automatically generated from the V8 skills runtime: - -```bash -# Discover tools and generate documentation -yarn tools:generate - -# Integration in build pipeline -yarn skills:build && yarn tools:generate && tsc && vite build -``` - -**Process:** - -1. **Discovery**: Spawns Tauri runtime to call `runtime_all_tools()` -2. **Parsing**: Extracts tool definitions with JSON Schema -3. **Formatting**: Generates OpenClaw-compliant markdown -4. **Bundling**: Includes in app for AI context injection - -**Generated Output:** - -- Professional documentation with usage examples -- Environment-specific configurations -- Tool categorization by skill -- Statistics and metadata - -### Integration Points - -AI context injection happens in 4 places: - -1. **`src/pages/Conversations.tsx`** - Main chat interface -2. **`src/store/threadSlice.ts`** - Redux sendMessage thunk -3. **`src/services/api/threadApi.ts`** - API layer -4. **`src/utils/tauriCommands.ts`** - Tauri agent chat - -All use the unified `injectAll()` function for consistency. - -### Settings UI - -View and manage AI configuration in **Settings → AI Configuration**: - -- Live SOUL personality preview -- TOOLS statistics and categories -- Individual refresh buttons -- Source indicators (GitHub vs bundled) -- Combined "Refresh All" functionality - -## Recent Changes - -Key updates from recent commits (cd9ebcd to current): - -### Major Runtime Transition - -- **V8 Runtime Migration** (`99c20ea`, `0f6a092`): Complete transition from QuickJS to V8 - - Replaced QuickJS with V8 (via deno_core) for improved JavaScript execution and WASM support - - Enhanced skill management with V8 runtime including improved performance and compatibility - - New V8 skill instance handling with advanced execution contexts - - Updated dependencies and Cargo.toml to reflect V8 integration - - Platform compatibility checks and enhanced manifest handling - -### Android Platform Support - -- **Full Android Integration** (`ce06cfc`, `a2578b9`): Production-ready mobile platform support - - Complete Android project generation with MainActivity and RuntimeService - - Background service for persistent skill execution on Android - - Notification permission handling and foreground service management - - Android logging integration with logcat for better debugging - - Deep link support configuration in AndroidManifest.xml - -### Enhanced Socket & Runtime Management - -- **Rust-Native Socket.io Client** (`68d397e`): Persistent connection infrastructure - - Native Rust Socket.io implementation for improved reliability - - Enhanced socket connection handling with reconnection logic - - Dynamic backend URL configuration support - - Improved error handling and connection status monitoring - -### Skills System Improvements - -- **Advanced Skill Management** (`e841c86`, `719e6e5`): Enhanced skill lifecycle and configuration - - Skill setup pipeline with contextual Enable/Setup/Configure/Retry buttons - - Platform filtering for skills with manifest-based compatibility checks - - Enhanced skill status derivation and connection indicators - - Environment variable exposure to skills (whitelisted values) - - Improved skill discovery and manifest processing with logging - -### Major Additions - -- **ESLint & Prettier Integration** (`5896966`): Complete code quality toolchain - - ES module syntax for ESLint configuration with enhanced TypeScript support - - Husky pre-commit/pre-push hooks for automatic formatting and linting - - Type-only imports standardization across codebase - - Consolidated import statements and improved code organization - - GitHub workflows updated with Prettier and ESLint checks -- **Advanced Skills System** (`10ec1b3`): Comprehensive skill management platform - - Dynamic skills loading from local directory via Rust integration - - SkillSetupModal with conditional rendering (wizard vs management panel) - - Background GitHub sync for skills catalog updates - - Skills table with setup status indicators and management controls - - Enhanced skill metadata with setup hooks and descriptions -- **Team Management Features** (`10ec1b3`): Multi-user collaboration system - - TeamPanel, TeamMembersPanel, and TeamInvitesPanel components - - Redux state management for teams, members, and invites - - Team API integration with CRUD operations - - Settings modal routing for team management paths - - Role-based permissions and invitation system -- **AI System Enhancements**: Advanced memory and session management - - Hybrid search with encryption for AI memory - - Constitution-based AI behavior with GitHub integration - - Entity graph migration to Neo4j backend - - Session capture and transcript management - - Memory chunking and context formatting -- **Enhanced CI/CD Pipeline** (`b1d7bce`): Production-ready deployment - - XGH_TOKEN authentication for openhumanxyz/openhuman releases - - Python sidecar setup and caching for cross-platform builds - - Tauri configuration updates (com.openhuman.app identifier) - - GitHub Pages deployment with optimized workflows - - Version tagging and environment variable management -- **Device Detection & Download System** (`9d74721`, `b5bccd2`): Enhanced multi-architecture download support - - Optimized asset parsing using Maps for unique architecture links per platform - - Enhanced DownloadScreen.tsx with architecture-specific download options - - Improved device detection for Windows, macOS, Linux, and Android platforms - - Added preference logic for more specific filenames in asset parsing - - Support for multiple architectures (x64, aarch64) with intelligent sorting -- **Version Bump**: Project updated to v0.20.0 (`891517c`) - -### Design System Updates - -- **Settings Modal UI**: Clean 520px white modal contrasting with glass morphism theme -- **Animations**: 200ms entry animations, 250ms panel transitions, chevron hover effects -- **Lottie Animations**: Integrated into onboarding flow (`334673e`) -- **Connection Components**: Added Telegram and Gmail connection indicators -- **Routing**: Switched to HashRouter for better desktop app compatibility -- **Theme**: Implemented sophisticated color system with premium crypto aesthetic - -### Component Structure - -- **200+ TypeScript files** across `src/` directory with comprehensive tooling -- **AI System Architecture** (`src/lib/ai/`): Advanced artificial intelligence platform - - Memory management with encryption, chunking, and hybrid search - - Constitution-based behavior with GitHub integration - - Entity graph with Neo4j backend integration - - Session capture, transcript management, and tool compression - - Provider system with OpenAI integration and custom providers -- **Skills Management System**: Dynamic skill platform with Rust integration - - SkillsGrid.tsx - Skills catalog with setup status and management - - SkillSetupModal.tsx - Conditional wizard/management panel rendering - - SkillProvider.tsx - GitHub sync and local directory integration - - Skills submodule integration with background updates -- **Team Collaboration Features**: Multi-user workspace management - - TeamPanel.tsx - Team overview with member management - - TeamMembersPanel.tsx - Member roles and permissions - - TeamInvitesPanel.tsx - Invitation system with role assignment - - Team API integration with Redux state management -- **Settings Modal System**: Comprehensive configuration interface - - SettingsModal.tsx - Main container with URL routing - - SettingsLayout.tsx - Modal wrapper with createPortal - - Enhanced panels: Billing, Team, Connections, Privacy, Profile - - Hooks: useSettingsNavigation.ts, useSettingsAnimation.ts -- **Download System**: Enhanced multi-platform distribution - - DownloadScreen.tsx - Platform detection with architecture support - - deviceDetection.ts - Comprehensive device/architecture utilities - - GitHub API integration for real-time release assets -- **Code Quality Infrastructure**: ESLint, Prettier, and Husky integration - - Pre-commit/pre-push hooks with TypeScript compilation checks - - Standardized type-only imports and consolidated statements - - GitHub workflow integration with automated quality checks - -## Git Workflow - -- **Repository visibility**: The project is public. -- **Push target**: Pushes should go to your working branch in the public repository (or your fork if your access model requires it). -- **PR target**: Open pull requests against the public upstream repository, targeting the **`main`** branch. -- **PR template required**: Use `.github/pull_request_template.md` for all pull requests. -- **AI tooling rule**: Any AI-generated PR description must follow the template sections in order and keep all checklist items. - -## Key Patterns - -- **MANDATORY: Pre-completion checks**: Before considering ANY task complete, ALWAYS run these checks and fix all errors: - 1. `npx prettier --check .` (formatting) - 2. `npx eslint .` (lint) - 3. `npx tsc --noEmit` (TypeScript) - 4. `cargo fmt --manifest-path src-tauri/Cargo.toml` (Rust formatting, if Rust files were changed) - 5. `cargo check --manifest-path src-tauri/Cargo.toml` (Rust compilation, if Rust files were changed) -- **Code Quality**: ESLint and Prettier enforce code standards with Husky hooks. Use type-only imports (`import type`) and consolidate imports from same modules. -- **Frontend scope**: The frontend (`src/`) is primarily a REST API client to `rust-core/`; Rust code in `src-tauri/` manages the core process lifecycle and bridge surface. -- **Core feature exposure**: Any new feature added in `rust-core/` must be exposed through both the CLI and a REST API so it can be integrated into the UI without backend rewrites. -- **No dynamic imports**: All imports must be static `import` statements at the top of the file. Do not use `await import()` or `import().then()` inside functions or code blocks. Use try/catch around Tauri API calls for non-Tauri environments instead. -- **No localStorage**: Avoid `localStorage` and `sessionStorage`; use Redux (and persist) for app state. Remove any direct usage when working on affected code. -- **AI System Integration**: Use `src/lib/ai/` for memory management, constitution loading, entity queries, and session capture. AI providers abstracted through interface pattern. -- **AI Configuration System**: OpenClaw-compliant AI configuration with dynamic TOOLS.md generation. Use `loadSoul()`, `loadTools()`, `loadAIConfig()` for configuration loading, and `injectAll()` for unified SOUL + TOOLS injection into user messages. -- **V8 Skills Runtime**: Skills execute in V8 JavaScript engine on desktop platforms. Use `SkillProvider` for GitHub sync, `SkillsGrid` for management interface, and Rust runtime commands for lifecycle management. Platform filtering ensures skills only run on supported platforms. -- **Team Collaboration**: Team features in `src/components/settings/panels/Team*`. Use Redux `teamSlice` for state management and `teamApi` for backend operations. -- **Device Detection**: Use `deviceDetection.ts` utilities for platform/architecture detection. Support multiple architectures per platform (x64, aarch64) with intelligent preference logic. -- **GitHub Integration**: Fetch release assets via GitHub API (`fetchLatestRelease()`) and parse by architecture (`parseReleaseAssetsByArchitecture()`). Use Maps for efficient unique architecture tracking. -- **Download System**: Platform-specific file type support (.exe/.msi for Windows, .dmg for macOS, .AppImage/.deb/.rpm for Linux, .apk for Android) with fallback links. -- **Modal System**: Settings modal uses `createPortal` pattern with URL-based routing. Clean white design (not glass morphism) for system settings. Navigate with `/settings` paths for different panels. -- **Component Reuse**: Connection management reuses `connectOptions` array and components from onboarding flow. Maintains consistent UX patterns across features. -- **Redux Integration**: Multiple slices (auth, user, telegram, ai, skills, team) with Redux Persist. Use typed hooks and selectors. State functions accept optional `userId` param. -- **Node polyfills**: Vite config (`vite.config.ts`) polyfills `buffer`, `process`, `util`, `os`, `crypto`, `stream` for the `telegram` package which requires Node APIs. -- **Telegram IDs**: Use `big-integer` library, not native JS numbers (Telegram IDs exceed `Number.MAX_SAFE_INTEGER`). -- **MCP tool files**: Each tool in `src/lib/mcp/telegram/tools/` exports a handler conforming to `TelegramMCPToolHandler` interface. Tool names are typed in `src/lib/mcp/telegram/types.ts`. -- **Tauri IPC**: Frontend calls Rust via `invoke()` from `@tauri-apps/api/core`. Rust commands are registered in `generate_handler![]` macro. Enhanced with runtime management commands for V8 skill execution and Socket.io integration. -- **CORS workaround**: External HTTP requests from the WebView hit CORS. Use Rust `reqwest` via Tauri commands instead of browser `fetch()`. -- **Hash Routing**: Uses HashRouter for desktop app compatibility and deep link handling. -- **Integration Libraries**: Each integration (Telegram, future Gmail, etc.) lives under `src/lib//` with its own `state/`, `services/`, `api/` subdirectories. Domain-specific services belong in the integration folder, not in `src/services/` (which holds only cross-cutting services like socketService, apiClient). -- **Unit Tests**: All unit tests live in `__tests__/` folders co-located with the code they test. Use Jest with TypeScript support. -- **Runtime Platform Differences**: V8 runtime is desktop-only. Mobile platforms use feature detection and graceful degradation. Skills with platform restrictions are filtered during discovery. -- **Socket Management**: Rust-native Socket.io client provides persistent connections with automatic reconnection. Use `connect_to_socket` command instead of frontend-only socket connections for reliability. -- **Dual Socket Codebase**: Socket event handling exists in **both** the TypeScript frontend (`src/services/socketService.ts`, `src/utils/tauriSocket.ts`) and the Rust backend (`src-tauri/src/runtime/socket_manager.rs`). **Any new socket event or protocol change must be implemented in both codebases.** The web frontend handles events directly via Socket.io; the Rust backend handles them over raw WebSocket with Engine.IO/Socket.IO framing. Example: `tool:sync` is emitted from both `src/lib/skills/sync.ts` (web mode) and `socket_manager.rs` (Rust mode, on connect + skill lifecycle changes). - -## Platform Gotchas - -- **macOS deep links**: Require `.app` bundle (not `tauri dev`). Clear WebKit caches when debugging stale content: `rm -rf ~/Library/WebKit/com.openhuman.app ~/Library/Caches/com.openhuman.app` -- **Cargo caching**: May serve stale frontend assets on incremental builds. Run `cargo clean --manifest-path src-tauri/Cargo.toml` if the app shows outdated UI. -- **`window.__TAURI__`**: Not available at module load time. Use static imports and try/catch around Tauri API calls (not around imports). -- **Android background services**: RuntimeService requires notification permissions (API 33+) and foreground service type specification (API 34+). Use Android logging (`android_logger`) for debug output in logcat. -- **V8 runtime limitations**: V8 engine is desktop-only. Android skills should use lightweight alternatives or server-side execution patterns. -- **Socket connections**: Persistent Socket.io connections via Rust backend work better than WebView-based connections on mobile platforms. +_Last aligned with monorepo layout (`app/` + root `src/`), QuickJS skills in `openhuman_core`, and Tauri shell IPC as of repo state._ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 754b2f58c..6650b7654 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,7 +98,7 @@ Maintainers will review and may request changes. Once approved, your PR will be - **Imports**: Use static `import`/`import type` at the top of the file. No dynamic `import()` for app code; use try/catch around Tauri API calls in non-Tauri environments instead. - **Code style**: ESLint and Prettier are authoritative. Use type-only imports where appropriate and consolidate imports from the same module. - **Telegram IDs**: Use the `big-integer` library; do not rely on native JavaScript numbers for Telegram IDs. -- **Tauri**: Commands are in Rust under `src-tauri`; frontend uses `invoke()` from `@tauri-apps/api/core`. Handle missing `window.__TAURI__` where the app can run outside Tauri. +- **Tauri**: Commands are in Rust under `app/src-tauri`; frontend uses `invoke()` from `@tauri-apps/api/core`. Handle missing `window.__TAURI__` where the app can run outside Tauri. Install JS deps from the repo root (`yarn install`) so the `app` workspace is linked; most scripts are also available as `yarn