File size: 4,586 Bytes
d086025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Introduction

**Victauri** — Verified Introspection & Control for Tauri Applications.

Victauri is full-stack testing for Tauri apps. Click a button in the frontend, verify the Rust command ran, confirm the database row was written — from a single test, on macOS, Windows, and Linux, in CI. Unlike browser automation tools like Playwright — which can't even attach to a Tauri webview on macOS or Linux — Victauri runs inside the app process with simultaneous access to the webview DOM, the IPC layer, the Rust backend, the database, and native window state (the database and backend *introspection* tools — `query_db`, `app_state`, `app_info`, memory/process stats — are read-only; `invoke_command` can deliberately call mutating commands, exactly like the frontend).

It works by embedding a lightweight server inside your Tauri app's own process — debug builds only; the server is gated behind `#[cfg(debug_assertions)]`, so `init()` is a no-op and nothing listens in release. Your test suite, `curl`, or CI talks to it over a plain REST/HTTP API. No WebDriver, no Selenium grid, no browser dependency.

And because that same server also speaks the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), any AI agent — Claude Code, Cursor, Windsurf — gets the exact same full-stack access for interactive debugging. **Testing is the job; the agent integration is the bonus.**

## Who Is This For?

- **Tauri app developers** who want real full-stack tests (frontend → IPC → Rust → database) instead of frontend mocks that lie about the backend
- **QA and CI engineers** who need cross-platform end-to-end tests without standing up a WebDriver/Selenium grid or paying for macOS runners
- **AI agent developers** who need to drive, debug, or inspect a running Tauri application over MCP

## Key Value Proposition

One plugin, one line of code, full-stack access:

| Layer | What You Get |
|-------|-------------|
| **WebView** | DOM snapshots, element interaction, JS evaluation, CSS inspection |
| **IPC** | Command registry, invoke commands, intercept and log IPC traffic |
| **Backend** | State reading, memory tracking, process diagnostics |
| **Windows** | Multi-window management, screenshots, positioning |
| **Time-Travel** | Record sessions, checkpoint state, replay events |

All of this is exposed two ways from the same server: a plain **REST/HTTP API** (`POST /api/tools/{name}`) that your test suite, shell scripts, and CI call directly — no handshake, no session — and the **[Model Context Protocol (MCP)](https://modelcontextprotocol.io/)** for AI agents. Write deterministic tests against REST; connect Claude Code, Cursor, or any MCP client when you want an agent to drive the app interactively.

## Design Principles

1. **Same-process** — The MCP server runs inside the Tauri app process, not as a separate sidecar. This gives sub-millisecond tool response times and direct `AppHandle` access.

2. **Zero runtime cost in release** — The server is gated behind `#[cfg(debug_assertions)]`, so `init()` is a no-op and nothing listens in release builds. (The crate still compiles in as a dependency; add it as a `dev-dependency` if you want it absent from the release binary entirely.)

3. **Full-stack** — WebView + IPC + Backend + DB, not just DOM. Cross-boundary verification catches state drift between frontend and backend.

4. **MCP-native** — Speaks the protocol AI agents already understand. No custom SDKs or adapters needed.

5. **Cross-platform** — Works identically on Windows, macOS, and Linux. No CDP dependency.

6. **Plugin, not framework** — One line in `Cargo.toml` to add, one line to remove. Your app architecture stays unchanged.

## Project Structure

Victauri ships as several published crates with distinct roles:

- `victauri-plugin` — Tauri plugin: embedded MCP server + JS bridge (add to your app)
- `victauri-test` — test client + assertion helpers (add to your tests)
- `victauri-cli` — CLI: `init`, `check`, `test`, `record`, `watch`, `coverage`
- `victauri-macros` — proc macros: `#[inspectable]`
- `victauri-watchdog` — crash-recovery health monitor

## Current Status

Victauri is published to crates.io. It was evaluated against 5 real-world open-source Tauri apps (Kanri, En Croissant, Surrealist, Duckling, Lettura) with 96.9% of checks passing and zero changes required to the apps. Supports Tauri 2.0+ with rmcp 3.1 (MCP protocol `2026-07-28`, backward compatible down to `2024-11-05`).

Victauri is open source (Apache-2.0) and built by [4DA Systems](https://4da.ai).