mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
* chore: update AlphaHuman version to 0.49.3 and configure updater plugin in tauri.conf.json - Bumped the AlphaHuman package version in Cargo.lock to 0.49.3. - Added updater configuration in tauri.conf.json to enable automatic updates with specified endpoints. * refactor: rename AlphaHuman to OpenHuman across the codebase - Updated all instances of "AlphaHuman" to "OpenHuman" in comments, tooltips, and constants to reflect the new branding. - Adjusted relevant documentation and prompts to ensure consistency with the new name. * refactor: update documentation and configurations to reflect OpenHuman branding - Replaced all instances of "AlphaHuman" with "OpenHuman" in documentation, comments, and configuration files to ensure consistency with the new branding. - Updated deep link URLs and related authentication flows to use the new "openhuman://" scheme. - Adjusted paths and references in the skills system and other related files to align with the new project name.te * refactor: standardize OpenHuman references and update configurations - Replaced all instances of "AlphaHuman" with "OpenHuman" across documentation, comments, and configuration files to maintain branding consistency. - Updated URLs and paths to reflect the new "openhuman://" scheme. - Adjusted environment variable names and related settings to align with the new project identity. - Enhanced documentation for clarity and accuracy regarding the OpenHuman framework.r * chore: update subproject commit reference in skills directory * refactor: update backend URL to reflect new service domain - Changed default backend URL from "https://api.openhuman.xyz" to "https://api.tinyhumans.ai" in both JavaScript and Rust configuration files. - Ensured consistency across the codebase regarding the new backend service endpoint. * feat: introduce identity and migration modules for OpenHuman - Added a new identity module to support AIEOS v1.1 JSON format, including structures for identity, psychology, linguistics, motivations, capabilities, physicality, history, and interests. - Implemented a migration module to facilitate data migration from OpenClaw memory, including SQLite and Markdown sources, with detailed reporting on migration statistics and warnings. - Established utility functions for handling multimodal content and image processing within the OpenHuman framework. - Enhanced the agent system with new dispatcher and classifier functionalities to improve tool management and message classification. * chore: remove Android project files and configurations - Deleted various Android project files including .editorconfig, .gitignore, build.gradle.kts, gradle.properties, and others to clean up the project structure. - Removed all related resources, layouts, and source files from the Android app directory to streamline the codebase. - This cleanup is part of a larger effort to refactor and simplify the project structure. * refactor: update login flow and remove Telegram integration - Removed the TelegramLoginButton component and its references from the OAuthLoginSection, streamlining the login options. - Updated the AppRoutes to remove the login route, reflecting changes in the authentication flow. - Enhanced the RotatingTetrahedronCanvas component with improved geometry and lighting effects for better visual presentation. - Adjusted the TypewriterGreeting component's styling for consistency. - Cleaned up the Welcome page to integrate the OAuthLoginSection directly, improving user experience. * chore: update subproject commit reference in skills directory * chore: update test configurations and improve test assertions - Modified test scripts in package.json to use a specific Vitest configuration file for consistency. - Updated assertions in loader tests to ensure loading durations are non-negative. - Enhanced tool loading tests to clarify expected behavior regarding localStorage and cache management. - Adjusted agent tool registry tests to improve error handling and ensure accurate statistics. - Refined device detection tests to reflect updated fallback URLs. * fix: enhance parameter formatting and remove unused components - Updated the `formatParameters` function to handle cases where schema properties are empty, returning a more informative response. - Deleted the `DownloadScreen` component and associated device detection utilities to streamline the codebase and remove unused functionality. - Adjusted tests to reflect changes in the tool loading and agent tool registry, ensuring accuracy in assertions. * chore: simplify Vitest configuration by removing unused include patterns - Updated the Vitest configuration to remove unnecessary test file patterns, streamlining the test setup for better clarity and maintainability. * refactor: update paths and comments for AI configuration and file watching - Modified Vite configuration to ignore only the `src-tauri` directory. - Updated logging messages to reflect the correct path for writing AI configuration files. - Adjusted fetch calls in the file watcher to use the new path for `TOOLS.md`. - Revised comments and logic in Rust code to clarify the handling of AI configuration file paths, including legacy fallback options. * chore: remove unused updater secrets from GitHub Actions workflow - Deleted UPDATER_GIST_URL and UPDATER_GIST_ID environment variables from the package-and-publish workflow, streamlining the configuration. * chore: comment out Vitest thresholds for clarity - Commented out the thresholds section in the Vitest configuration to improve clarity and maintainability, as it is currently not in use. * ran formatter * chore: update updater public key in tauri configuration - Replaced the existing public key in the updater plugin configuration with a new value to ensure proper functionality and security. * chore: update ESLint configuration and refactor components - Added `localStorage` and `sessionStorage` as readonly globals in ESLint configuration for better linting support. - Removed unused imports from `SkillsPanel.tsx` to clean up the code. - Changed the type of `watcherInterval` in `file-watcher.ts` for improved type safety. - Refactored toast management logic in `Intelligence.tsx` to enhance clarity and maintainability. - Simplified import statements in `IntelligenceProvider.tsx` for consistency. - Streamlined object property shorthand in `agentToolRegistry.ts` for cleaner code. * refactor: improve error handling and type safety in Intelligence component - Enhanced toast notification logic to defer state updates, preventing potential issues with setState in effects. - Updated the source filter dispatch to use a more specific type for improved type safety. * refactor: enhance type safety across various components and services - Updated type definitions from `any` to `unknown` in multiple files to improve type safety and prevent potential runtime errors. - Refactored state management in `TauriCommandsPanel` to use more specific types. - Adjusted context and parameters in several interfaces to ensure consistent typing. - Added ESLint directive to `polyfills.ts` for intentional global assignments. - Streamlined type handling in utility functions and API responses for better clarity and maintainability. * refactor: streamline import statements and improve code clarity - Consolidated import statements in `agentToolRegistry.ts` and `intelligenceSlice.ts` for better readability. - Simplified the `createTestStore` function in `test-utils.tsx` to enhance code conciseness. - Cleaned up the `isExecutionStepProgressEvent` function in `intelligence-chat-api.ts` for improved clarity and maintainability.
7.0 KiB
7.0 KiB
macOS Background Execution - Menu Bar & Autostart
Overview
Complete implementation of macOS background execution features including system tray menu bar app and launch at login functionality for the Outsourced crypto community platform.
Features Implemented
1. System Tray (Menu Bar App)
- Tray icon appears in macOS menu bar
- Click to toggle window visibility (left-click on icon)
- Context menu with two options:
- "Show/Hide Window" - Toggle window visibility
- "Quit" - Exit application completely
- Window starts hidden on launch (background execution)
- Close button minimizes to tray instead of quitting app
2. Launch at Login (Autostart)
- LaunchAgent configuration for macOS
- Configurable autostart via plugin API
- Command-line flags support for launch arguments
- Native macOS integration using Launch Services
Implementation Details
Dependencies Added
Cargo.toml:
tauri = { version = "2", features = ["tray-icon", "macos-private-api"] }
tauri-plugin-autostart = "2"
Configuration Changes
tauri.conf.json:
{
"app": {
"windows": [
{
"visible": false, // Start hidden
"decorations": true,
"resizable": true,
"center": true
}
],
"trayIcon": {
"id": "main-tray",
"iconPath": "icons/icon.png",
"iconAsTemplate": true,
"menuOnLeftClick": false,
"tooltip": "Outsourced - Crypto Community Platform"
},
"macOSPrivateApi": true // Required for advanced tray features
}
}
capabilities/default.json:
{
"permissions": [
"core:tray:default",
"autostart:default",
"autostart:allow-enable",
"autostart:allow-disable",
"autostart:allow-is-enabled"
]
}
Rust Implementation
Key Components:
- Toggle Window Visibility - Helper function to show/hide main window
- Setup Tray - Creates system tray with menu and event handlers
- Window Close Handler - macOS-specific override to minimize instead of quit
- Autostart Plugin - Configured with LaunchAgent for macOS
Code Structure (src-tauri/src/lib.rs):
// System tray with menu
fn setup_tray(app: &AppHandle) -> Result<(), Box<dyn std::error::Error>> {
// Creates "Show/Hide Window" and "Quit" menu items
// Handles left-click on tray icon to toggle visibility
// Menu click events for show/hide and quit actions
}
// Main app setup
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_autostart::init(
tauri_plugin_autostart::MacosLauncher::LaunchAgent,
Some(vec!["--flag1", "--flag2"]),
))
.setup(|app| {
// Desktop-only tray setup
#[cfg(desktop)]
setup_tray(app.handle())?;
// macOS-specific close behavior
#[cfg(target_os = "macos")]
// Override close button to hide instead of quit
})
}
Platform-Specific Behavior
macOS
- Tray icon appears in menu bar
- Close button hides window (minimizes to tray)
- LaunchAgent for autostart integration
- Native macOS menu bar styling
Windows/Linux
- Tray icon in system tray
- Same menu functionality
- Platform-appropriate autostart mechanisms
Mobile (iOS/Android)
- Tray features disabled (desktop-only)
- Autostart not applicable on mobile
Usage
From Frontend (Future Integration)
Control autostart via Tauri commands:
import { invoke } from '@tauri-apps/api/core';
// Enable autostart
await invoke('plugin:autostart|enable');
// Disable autostart
await invoke('plugin:autostart|disable');
// Check if enabled
const isEnabled = await invoke<boolean>('plugin:autostart|is_enabled');
Tray Behavior
User Actions:
- Left-click tray icon → Toggle window visibility
- Right-click tray icon → Open context menu
- "Show/Hide Window" → Toggle visibility
- "Quit" → Exit application
- Close window button → Hide window (macOS only)
Testing
Build & Test
# Clean build
cargo clean --manifest-path src-tauri/Cargo.toml
# Build debug app bundle (required for tray testing on macOS)
npm run tauri build -- --debug --bundles app
# Install to Applications
cp -R src-tauri/target/debug/bundle/macos/tauri-app.app /Applications/
# Launch and test
open /Applications/tauri-app.app
Verification Checklist
- Tray icon appears in menu bar
- Left-click toggles window visibility
- Context menu has "Show/Hide Window" and "Quit"
- Close button hides window (doesn't quit)
- Window can be shown again from tray
- Quit option properly exits app
- Window starts hidden on launch
- Autostart can be enabled/disabled
Build Requirements
macOS Deep Link & Tray Testing
- Must use
.appbundle (nottauri dev) tauri devdoes NOT support deep links or full tray functionality- Use debug build:
npm run tauri build -- --debug --bundles app
Cargo Cache Issues
If UI appears outdated after rebuild:
cargo clean --manifest-path src-tauri/Cargo.toml
npm run tauri build -- --debug --bundles app
WebKit Cache
Clear WebKit cache if needed:
rm -rf ~/Library/WebKit/com.openhuman.app
rm -rf ~/Library/Caches/com.openhuman.app
Configuration Options
Autostart Arguments
Customize launch arguments in lib.rs:
.plugin(tauri_plugin_autostart::init(
tauri_plugin_autostart::MacosLauncher::LaunchAgent,
Some(vec!["--minimized", "--silent"]), // Custom flags
))
Tray Icon
Change tray icon path in tauri.conf.json:
{
"trayIcon": {
"iconPath": "icons/custom-tray-icon.png",
"iconAsTemplate": true // Adapts to dark/light menu bar
}
}
Window Behavior
Adjust window settings:
{
"windows": [
{
"visible": false, // Start hidden
"decorations": true, // Show title bar
"resizable": true, // Allow resize
"center": true // Center on screen
}
]
}
Known Limitations
- Menu bar icon styling - Uses template mode for dark/light theme adaptation
- LaunchAgent delay - macOS may have slight delay before launching at login
- Bundle requirement - Full functionality requires
.appbundle, nottauri dev - Desktop-only - Mobile platforms don't support system tray
Future Enhancements
Potential improvements for future development:
- Settings Integration - Add autostart toggle in settings modal
- Notification Support - Show notifications from tray
- Quick Actions - Add more tray menu items
- Status Indicators - Show connection status in tray icon
- Tray Tooltip - Dynamic tooltip with app status
Security Considerations
macOS Private API
- Required for advanced tray features
- Approved by Apple for this use case
- No App Store restrictions for direct distribution
LaunchAgent
- Installed in user's LaunchAgents directory
- User can disable via System Settings
- Respects macOS security policies
Implementation completed: 2026-01-29 Status: Fully functional, tested, and production-ready