tauri-bridge-setup
Tauri Dev Bridge Setup
Add the dev bridge to a Tauri app so tauri-agent-tools can inspect DOM, evaluate JS, monitor IPC, take element screenshots, and interact with the UI. Bridge v0.7 also exposes process tree, capability audit, devtools URL, and health endpoints.
The bridge runs only in debug builds and is stripped from release builds automatically.
Re-copying for v0.8 (optional enrichment — not required)
Upgrading from v0.7: Bridge v0.8 adds cursor-mode
/logsreads (non-draining, long-polling) that powerlogs,rust-logs, andcapture(includinglogs --follow) and let multiple log consumers coexist. It is a drop-in re-copy ofdev_bridge.rs— nomain.rschanges this time. Without it,logs --followemits a one-time note and degrades to drain polling.
Re-copying for v0.7 (optional enrichment — not required)
Upgrading from v0.6: The bridge surface grew with four new endpoints (
/process,/capabilities,/devtools,/health) andstart_bridgenow returns a third tuple element (the sidecar registry). These are optional enrichment: as of CLI v0.8 the commands that use them (process-tree,capabilities audit,webview attach,health) feature-detect viaGET /versionand degrade gracefully against an older/vendored bridge — they emit a clearnote:(and fall back to an OS/eval path where possible) instead of failing. So you are not forced to re-syncdev_bridge.rsjust to keep using the CLI. To unlock the richer structured output, re-copydev_bridge.rsfrom the latestexamples/tauri-bridge/src/dev_bridge.rsand adjust yourmain.rsto destructure the new return shape (Step 3). Pass--strictto any of those commands to turn a missing endpoint back into a hard error.
Bridge Endpoints
The bridge exposes eight HTTP endpoints on a random localhost port: