Skip to main content

Overview

The Tempest desktop app is Tauri 2: a Rust backend with a React frontend that communicates over IPC. Every command the frontend can call is registered in a single generate_handler! list in src-tauri/src/lib.rs — 144 commands in total. Definitions live in lib.rs itself and in a set of focused backend modules (tasks.rs, automations.rs, claude_bridge.rs, and so on). Three properties hold across the surface:
  • Errors are strings. Every fallible command returns Result<T, String> with a human-readable message. No structured error codes.
  • Blocking work runs on worker threads. Git, PTY spawning, Docker, and network calls run on dedicated blocking threads so they never starve Tauri’s bounded IPC worker pool.
  • Streaming uses Channels. Long-running output (terminal bytes, hook lines) flows through a tauri::Channel passed at call time rather than global events.

Module map

Git and worktrees

PTY, shell, and sessions

create_pty_session in full

The launch policy is enforced before any resource is acquired: a command not in policy.permitted_agents is rejected, and skip-permission flags are rejected when the project disallows them. When db_isolation is set and the workspace has a registered base image, the database branch is created in the background and delivered into the live session once ready.

File and workspace helpers

Atlas and Token Intelligence

See Token Intelligence for what the graph does at runtime.

Canvas MCP

Database branches

See Database Branches for the workflow.

SQLite persistence (db_*)

Twenty-nine commands back the frontend’s SQLite mirrors. They come in load / upsert / delete trios per entity, all talking to tempest.db in the app data dir (see State Management).

Service proxy and IDE panels

Tasks

Ten commands feed the Tasks page from GitHub and Linear, with a shared in-memory cache invalidated via tasks_cache_invalidate.

Automations

Nine commands manage scheduled agent runs. The scheduler in automations.rs emits automation:dispatch when an automation fires. See Automations for scheduling semantics.

Notes

Chat bridges

Five commands back the built-in chat surface without a terminal: a Claude Code bridge that spawns the CLI in stream mode, and a Warp-powered multi-provider bridge. See Chat for how these are surfaced.

Quota, ingest, and secrets

Secrets live under the keyring service tempest-byok — never in the database. See API Keys.

Extensions

Pairing relay

See Mobile for the pairing flow.

Misc

Events

Commands are request/response. Push updates flow as global Tauri events:
Terminal output is not a global event. PTY bytes stream over the per-session Channel passed to create_pty_session, so each chunk is delivered directly to the session’s own subscriber with no broadcast filtering.

Examples

Streaming a PTY session

Reading git status

Building a database branch

Because every command rejects with a plain string, a single catch (e: string) is all the error handling a caller needs — and because heavy work runs on blocking threads, a slow git fetch never blocks other IPC traffic.