Tauri Shell
Desktop host: Tauri v2 + WebView, IPC commands, window management, and JSON-RPC bridge to the embedded openhuman-core Rust runtime.
Responsibilities
- Web UI - Load Vite build from
app/dist(or dev server on port 1420) - IPC - Expose a small set of explicit Tauri commands
- Core lifecycle - Start the in-process core server and proxy JSON-RPC via
core_rpc_relay - Window + Tray - Desktop window behavior and system tray
Core Process Model
app/package.json core:stage is a no-op保留为空操作 for script compatibility. The desktop app links core in-process, so local builds no longer need a分级 openhuman-core-* sidecar under app/src-tauri/binaries/.
Tauri IPC Commands
Core JSON-RPC Relay
| Command | Purpose |
|---|---|
core_rpc_relay | Forward to local openhuman-core HTTP JSON-RPC |
Window Management
| Command | Purpose |
|---|---|
show_window | Show main window |
hide_window | Hide main window |
toggle_window | Toggle visibility |
minimize_window | Minimize |
maximize_window | Maximize |
close_window | Close |
AI Configuration
| Command | Purpose |
|---|---|
ai_get_config | Build AIPreview from bundled prompts |
write_ai_config_file | Write a single .md |
Workspace File Linking
| Command | Purpose |
|---|---|
open_workspace_path | Open file with OS default app |
reveal_workspace_path | Reveal in OS file manager |
preview_workspace_text | Read text preview |
Core Bridge
React (invoke)
→ core_rpc_relay { method, params }
→ core_rpc::call HTTP POST to OPENHUMAN_CORE_RPC_URL
→ embedded openhuman core server
Directory Structure
app/src-tauri/src/
├── lib.rs # run(), tray/menu actions, plugins
├── main.rs # Binary entry point
├── core_process.rs # CoreProcessHandle
├── core_rpc.rs # HTTP client to core
├── commands/
│ ├── core_relay.rs # core_rpc_relay
│ ├── openhuman.rs # Daemon host config
│ └── window.rs # Window commands
└── utils/
└── dev_paths.rs # Resolve bundled AI prompts paths
Next Steps
- Frontend Architecture - React UI
- Architecture Overview - Complete architecture