tauri-agent-plugin 0.0.2

Agent-facing control surface for live Tauri apps using compact semantic trees.
Documentation

tauri-agent

Headless agent debugger for Tauri apps.

tauri-agent is a protocol-first control surface for agents that need to inspect, drive, and debug live Tauri applications. One JSON-RPC 2.0 method set — semantic tree snapshots, @ref actions, input synthesis, screenshots, logs / events / network / IPC capture, dialogs, waiters, and recording — reachable from a CLI, an MCP server, guest helpers, and Rust commands, all routing into a single bridge inside the instrumented webview.

# drive a running app the CLI discovers by app id
tauri-agent tree  --app dev.byeongsu.tauri-agent.fixture
tauri-agent find  --role button --name Forge --app dev.byeongsu.tauri-agent.fixture
tauri-agent click @3 --app dev.byeongsu.tauri-agent.fixture

Quickstart

  1. Register the plugin in src-tauri:

    tauri::Builder::default()
      .plugin(tauri_agent_plugin::init())
      .run(tauri::generate_context!())?;
    
  2. Grant the permission in src-tauri/capabilities/*.json ({ "permissions": ["core:default", "agent:default"] }).

  3. Install the guest instrumentation in your frontend — bridge commands hang until it runs:

    import { WebviewAgentInstrumentation } from '@byeongsu-hong/tauri-agent-plugin'
    new WebviewAgentInstrumentation({ windowLabel: 'main' }).install()
    
  4. Enable the inline server in tauri.conf.json for out-of-process control.

  5. Verify: tauri-agent attach --app <your.app.identifier>.

Full walkthrough → docs/adopting.md.

Documentation

MCP

tauri-agent-mcp

Exposes the protocol as tauri_<method> stdio tools, each accepting the same connection inputs as the CLI (app, port/host, or html/fromHtml). See docs/commands.md.

Develop

bun install
bun run build      # produces dist-js (the fixture imports it)
bun run check      # typecheck + vitest + build
bun run check:rust # cargo fmt --check + clippy -D warnings + test

The examples/fixture-app is the first real live-bridge target and ships a headless --self-test mode exercised in CI.

License

MIT OR Apache-2.0.