Skip to main content

Tauri Shell

Desktop host: Tauri v2 + WebView, IPC commands, window management, and JSON-RPC bridge to the embedded openhuman-core Rust runtime.

Responsibilities

  1. Web UI - Load Vite build from app/dist (or dev server on port 1420)
  2. IPC - Expose a small set of explicit Tauri commands
  3. Core lifecycle - Start the in-process core server and proxy JSON-RPC via core_rpc_relay
  4. 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

CommandPurpose
core_rpc_relayForward to local openhuman-core HTTP JSON-RPC

Window Management

CommandPurpose
show_windowShow main window
hide_windowHide main window
toggle_windowToggle visibility
minimize_windowMinimize
maximize_windowMaximize
close_windowClose

AI Configuration

CommandPurpose
ai_get_configBuild AIPreview from bundled prompts
write_ai_config_fileWrite a single .md

Workspace File Linking

CommandPurpose
open_workspace_pathOpen file with OS default app
reveal_workspace_pathReveal in OS file manager
preview_workspace_textRead 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