Overview
Thumper-Run’s desktop app exposes a set of IPC (Inter-Process Communication) commands that the Leptos frontend calls through Tauri’s invoke bridge. Each command is defined as a #[tauri::command] in the Rust backend, registered in the Tauri invoke handler, and called from the frontend via invoke_tauri(cmd, args).
This page documents every public IPC command, organized by module. Parameters and return types are shown as simplified Rust-like signatures. All commands are async and return ApiResponse<T> which wraps the result in a success/error envelope.
Launcher
The launcher module manages app lifecycle: installation, launch, stop, and uninstall. These are the most frequently called IPC commands.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| install_app | app_id: String | InstallResult | Install an app from the catalog (clone repo, create venv, download models) |
| launch_app | app_id: String | LaunchResult | Launch an installed app (starts process, runs health check) |
| stop_app | app_id: String | () | Stop a running app (sends SIGTERM, then SIGKILL after timeout) |
| uninstall_app | app_id: String | () | Remove an installed app (deletes venv, config; optionally keeps models) |
| get_installed_apps | (none) | Vec<AppInfo> | List all installed apps with status, version, and disk usage |
| get_app_status | app_id: String | AppStatus | Get current status of an app (NotInstalled, Installed, Running, Error) |
| get_running_apps | (none) | Vec<RunningApp> | List all currently running apps with PID and uptime |
| get_app_logs | app_id: String, lines: u32 | Vec<String> | Get recent log lines from an app’s stdout/stderr |
| get_catalog | (none) | Vec<CatalogEntry> | Fetch the full app catalog (bundled + remote) |
| get_system_info | (none) | SystemInfo | Detect GPU, CPU, RAM, disk space, and OS details |
| download_app_models | app_id: String | DownloadResult | Download missing models for an installed app |
| update_app | app_id: String | UpdateResult | Update an installed app to the latest version |
| get_app_disk_usage | app_id: String | DiskUsage | Calculate disk usage for an app (venv, models, outputs) |
| open_app_directory | app_id: String | () | Open the app’s install directory in the system file manager |
| collect_launch_patches | app_id: String | Vec<Patch> | Evaluate and return all patches that would apply at launch |
Models
The models module handles model discovery, inspection, download, and cache management across HuggingFace cache, local directories, and the Thumper model store.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| model_discover_all | (none) | Vec<ModelInfo> | Scan all model locations (HF cache, local dirs, Thumper store) |
| model_get_info | model_id: String | ModelInfo | Get detailed info for a specific discovered model |
| model_delete | model_id: String | () | Delete a model from disk (with confirmation in frontend) |
| model_verify | model_id: String | VerifyResult | Verify SHA-256 checksum against manifest |
| model_fork | model_id: String, target: String | String | Copy a model to a new location (symlink where possible) |
| model_share | model_id: String | ShareInfo | Generate a shareable link or export package for a model |
| model_cache_cleanup | dry_run: bool | CleanupResult | Read-only unavailable result; destructive cleanup is disabled pending authoritative ownership and liveness |
| model_disk_usage | (none) | Vec<LocationUsage> | Per-location disk usage breakdown (HF cache, local, store) |
| model_download | url: String, target: String | DownloadResult | Download a model file with resumable .part support |
| model_link_health | model_id: String | LinkHealth | Check symlink integrity for a model’s linked files |
Agent
The agent module provides an AI assistant that can interact with installed apps, execute tools, and manage workflows on your behalf.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| agent_chat | session_id: String, message: String | ChatResponse | Send a message to the agent and receive a streamed response |
| agent_list_tools | (none) | Vec<ToolInfo> | List all available agent tools with descriptions |
| agent_execute_tool | tool_name: String, args: Value | ToolResult | Execute a specific agent tool directly |
| agent_new_session | (none) | String | Create a new agent session and return the session ID |
| agent_get_history | session_id: String | Vec<Message> | Retrieve the full message history for a session |
NPU
The NPU module interfaces with Neural Processing Units (AMD XDNA, Intel NPU, Qualcomm Hexagon) for efficient on-device inference using ONNX Runtime and the GenAI API.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| npu_detect | (none) | NpuInfo | Detect available NPU hardware and driver version |
| npu_benchmark | model_id: String, iterations: u32 | BenchmarkResult | Run inference benchmark on NPU with a specified model |
| npu_list_models | (none) | Vec<NpuModel> | List models compatible with the detected NPU |
| npu_load_model | model_id: String | () | Load a model onto the NPU for inference |
| npu_generate | prompt: String, max_tokens: u32 | GenResult | Run text generation on the NPU using the loaded model |
Gallery
The gallery module manages generated assets (images, audio, video) with metadata extraction and file watching for real-time updates.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| gallery_scan | (none) | ScanResult | Scan all output directories and index new assets |
| gallery_get_images | page: u32, per_page: u32 | Vec<GalleryItem> | Paginated list of gallery items sorted by creation date |
| gallery_get_metadata | item_id: String | AssetMetadata | Extract full generation metadata (prompt, model, seed, steps) |
| gallery_delete | item_id: String | () | Delete a gallery item from disk and index |
| gallery_open_file | item_id: String | () | Open the asset file in the system’s default viewer |
Settings
The settings module provides read/write access to user preferences, stored in the CRDT-backed settings document for cross-device sync.
| Command | Parameters | Returns | Description |
|---|---|---|---|
| get_settings | (none) | Settings | Read the full settings document |
| update_settings | key: String, value: Value | () | Update a single settings key (triggers CRDT sync) |
| get_api_keys | (none) | Vec<ApiKeyEntry> | List stored API keys (names only, not values) |
| set_api_key | service: String, key: String | () | Store an API key in the OS keychain |
| delete_api_key | service: String | () | Remove an API key from the OS keychain |
Events
Settings changes emit Tauri events that the frontend listens to for reactive updates:
- settings-changed — fired when any settings key is updated
- app-status-changed — fired when an app’s status changes (install, launch, stop)
- download-progress — fired every 500ms during model downloads with bytes/total
Key Takeaways
- All IPC commands are async and return ApiResponse<T>
- Commands are desktop-only — the web shell uses HTTP endpoints
- Use invoke_tauri(cmd, args) from the frontend after checking is_tauri_available()
- Download progress is emitted as Tauri events, not return values
- API keys are stored in the OS keychain, not in settings