tauri-agent-tools 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/tauri-agent-tools/SKILL.md +105 -12
- package/.agents/skills/tauri-bridge-setup/SKILL.md +42 -6
- package/AGENTS.md +9 -7
- package/README.md +53 -13
- package/dist/bridge/client.d.ts +5 -2
- package/dist/bridge/client.js +38 -3
- package/dist/bridge/client.js.map +1 -1
- package/dist/cli.js +22 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/capture.d.ts +3 -0
- package/dist/commands/capture.js +218 -0
- package/dist/commands/capture.js.map +1 -0
- package/dist/commands/check.d.ts +5 -0
- package/dist/commands/check.js +174 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/diff.js +6 -2
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/eval.js +16 -3
- package/dist/commands/eval.js.map +1 -1
- package/dist/commands/interact/click.d.ts +6 -0
- package/dist/commands/interact/click.js +102 -0
- package/dist/commands/interact/click.js.map +1 -0
- package/dist/commands/interact/focus.d.ts +3 -0
- package/dist/commands/interact/focus.js +40 -0
- package/dist/commands/interact/focus.js.map +1 -0
- package/dist/commands/interact/navigate.d.ts +3 -0
- package/dist/commands/interact/navigate.js +49 -0
- package/dist/commands/interact/navigate.js.map +1 -0
- package/dist/commands/interact/scroll.d.ts +11 -0
- package/dist/commands/interact/scroll.js +110 -0
- package/dist/commands/interact/scroll.js.map +1 -0
- package/dist/commands/interact/select.d.ts +3 -0
- package/dist/commands/interact/select.js +59 -0
- package/dist/commands/interact/select.js.map +1 -0
- package/dist/commands/interact/shared.d.ts +23 -0
- package/dist/commands/interact/shared.js +62 -0
- package/dist/commands/interact/shared.js.map +1 -0
- package/dist/commands/interact/type.d.ts +6 -0
- package/dist/commands/interact/type.js +59 -0
- package/dist/commands/interact/type.js.map +1 -0
- package/dist/commands/invoke.d.ts +3 -0
- package/dist/commands/invoke.js +53 -0
- package/dist/commands/invoke.js.map +1 -0
- package/dist/commands/probe.d.ts +2 -0
- package/dist/commands/probe.js +117 -0
- package/dist/commands/probe.js.map +1 -0
- package/dist/commands/shared.d.ts +10 -4
- package/dist/commands/shared.js +23 -3
- package/dist/commands/shared.js.map +1 -1
- package/dist/commands/storeInspect.d.ts +13 -0
- package/dist/commands/storeInspect.js +156 -0
- package/dist/commands/storeInspect.js.map +1 -0
- package/dist/platform/detect.js +65 -37
- package/dist/platform/detect.js.map +1 -1
- package/dist/platform/x11.js +3 -1
- package/dist/platform/x11.js.map +1 -1
- package/dist/schemas/bridge.d.ts +34 -0
- package/dist/schemas/bridge.js +13 -0
- package/dist/schemas/bridge.js.map +1 -1
- package/dist/schemas/commands.d.ts +126 -0
- package/dist/schemas/commands.js +28 -0
- package/dist/schemas/commands.js.map +1 -1
- package/dist/schemas/index.d.ts +3 -2
- package/dist/schemas/index.js +3 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/interact.d.ts +118 -0
- package/dist/schemas/interact.js +31 -0
- package/dist/schemas/interact.js.map +1 -0
- package/dist/util/image.js +5 -2
- package/dist/util/image.js.map +1 -1
- package/dist/util/magick.d.ts +21 -0
- package/dist/util/magick.js +46 -0
- package/dist/util/magick.js.map +1 -0
- package/examples/tauri-bridge/src/dev_bridge.rs +88 -2
- package/package.json +1 -1
- package/rust-bridge/README.md +7 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tauri-agent-tools
|
|
3
|
-
description: CLI for inspecting Tauri desktop apps — DOM queries, screenshots,
|
|
4
|
-
version: 0.
|
|
5
|
-
tags: [tauri, desktop, debugging, screenshot, dom, inspection, diff, mutations, snapshot]
|
|
3
|
+
description: CLI for inspecting and interacting with Tauri desktop apps — DOM queries, screenshots, interaction (click/type/scroll), IPC monitoring, store inspection, structured assertions
|
|
4
|
+
version: 0.6.0
|
|
5
|
+
tags: [tauri, desktop, debugging, screenshot, dom, inspection, diff, mutations, snapshot, interaction, click, type, scroll, invoke, probe, capture, check, store-inspect]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# tauri-agent-tools
|
|
9
9
|
|
|
10
|
-
CLI tool for agent-driven inspection
|
|
10
|
+
CLI tool for agent-driven inspection and interaction with Tauri desktop applications. Inspection commands are read-only. Interaction commands (click, type, scroll, etc.) are debug-only — they only work when the app runs with the dev bridge enabled.
|
|
11
11
|
|
|
12
12
|
## Prerequisites
|
|
13
13
|
|
|
@@ -33,11 +33,14 @@ npm install -g tauri-agent-tools
|
|
|
33
33
|
Some commands require the Rust dev bridge running inside the Tauri app. Others work standalone.
|
|
34
34
|
|
|
35
35
|
**Bridge required** (needs running Tauri app with bridge):
|
|
36
|
-
`screenshot --selector`, `dom`, `eval`, `wait --selector`, `wait --eval`, `ipc-monitor`, `console-monitor`, `rust-logs`, `storage`, `page-state`, `mutations`, `snapshot`
|
|
36
|
+
`screenshot --selector`, `dom`, `eval`, `wait --selector`, `wait --eval`, `ipc-monitor`, `console-monitor`, `rust-logs`, `storage`, `page-state`, `mutations`, `snapshot`, `click`, `type`, `scroll`, `focus`, `navigate`, `select`, `invoke`, `capture`, `check`, `store-inspect`
|
|
37
37
|
|
|
38
38
|
**Standalone** (no bridge needed):
|
|
39
39
|
`screenshot --title` (full window only), `wait --title`, `list-windows`, `info`, `diff`
|
|
40
40
|
|
|
41
|
+
**Optional bridge:**
|
|
42
|
+
`probe` (works standalone to discover bridges, richer output with bridge)
|
|
43
|
+
|
|
41
44
|
The bridge auto-discovers via token files in `/tmp/tauri-dev-bridge-*.token`. No manual port/token configuration needed.
|
|
42
45
|
|
|
43
46
|
## Core Workflows
|
|
@@ -134,13 +137,84 @@ tauri-agent-tools mutations ".sidebar" --attributes --duration 5000
|
|
|
134
137
|
tauri-agent-tools dom --text "Settings" --first --json
|
|
135
138
|
```
|
|
136
139
|
|
|
140
|
+
### Interact with the app
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Click a button
|
|
144
|
+
tauri-agent-tools click ".submit-btn" --json
|
|
145
|
+
|
|
146
|
+
# Type into an input
|
|
147
|
+
tauri-agent-tools type "#search" "hello world" --json
|
|
148
|
+
|
|
149
|
+
# Clear and retype
|
|
150
|
+
tauri-agent-tools type "#email" "new@email.com" --clear --json
|
|
151
|
+
|
|
152
|
+
# Scroll to bottom
|
|
153
|
+
tauri-agent-tools scroll --to-bottom --json
|
|
154
|
+
|
|
155
|
+
# Scroll element into view
|
|
156
|
+
tauri-agent-tools scroll --selector "#item-42" --into-view
|
|
157
|
+
|
|
158
|
+
# Focus an element
|
|
159
|
+
tauri-agent-tools focus "#username" --json
|
|
160
|
+
|
|
161
|
+
# Navigate to a route
|
|
162
|
+
tauri-agent-tools navigate "/settings" --json
|
|
163
|
+
|
|
164
|
+
# Select a dropdown value
|
|
165
|
+
tauri-agent-tools select "#country" "US" --json
|
|
166
|
+
|
|
167
|
+
# Toggle a checkbox
|
|
168
|
+
tauri-agent-tools select "input[type=checkbox]" --toggle --json
|
|
169
|
+
|
|
170
|
+
# Invoke a Tauri IPC command
|
|
171
|
+
tauri-agent-tools invoke get_release_context --json
|
|
172
|
+
tauri-agent-tools invoke save_item '{"id": 42}' --json
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Probe, capture, and check (workflow commands)
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Discover targets and check bridge health
|
|
179
|
+
tauri-agent-tools probe --json
|
|
180
|
+
|
|
181
|
+
# Capture a full debug evidence bundle
|
|
182
|
+
tauri-agent-tools capture -o /tmp/debug --json
|
|
183
|
+
# Produces: manifest.json, screenshot.png, dom.json, page-state.json, storage.json, console-errors.json, rust-logs.json
|
|
184
|
+
|
|
185
|
+
# Run structured assertions
|
|
186
|
+
tauri-agent-tools check --selector ".app-ready" --no-errors --json
|
|
187
|
+
tauri-agent-tools check --eval "document.querySelectorAll('.block').length > 0" --json
|
|
188
|
+
tauri-agent-tools check --text "Workflow loaded" --json
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Inspect reactive stores
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Auto-detect framework and list all stores
|
|
195
|
+
tauri-agent-tools store-inspect --json
|
|
196
|
+
|
|
197
|
+
# Inspect a specific store
|
|
198
|
+
tauri-agent-tools store-inspect --store executionStore --json
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Target specific apps and windows
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Target a specific app by PID
|
|
205
|
+
tauri-agent-tools page-state --pid 12345 --json
|
|
206
|
+
|
|
207
|
+
# Target a specific window in a multi-window app
|
|
208
|
+
tauri-agent-tools eval "document.title" --window-label overlay --json
|
|
209
|
+
```
|
|
210
|
+
|
|
137
211
|
## Command Reference
|
|
138
212
|
|
|
139
213
|
| Command | Key Flags | Bridge? | Description |
|
|
140
214
|
|---------|-----------|---------|-------------|
|
|
141
215
|
| `screenshot` | `--selector <css>`, `--title <regex>`, `-o <path>`, `--max-width <n>` | selector: yes, title: no | Capture window or DOM element screenshot |
|
|
142
216
|
| `dom` | `[selector]`, `--depth <n>`, `--styles`, `--text <pattern>`, `--mode accessibility`, `--json` | yes | Query DOM structure or find elements by text |
|
|
143
|
-
| `eval` | `<js-expression>` | yes | Evaluate JavaScript in webview |
|
|
217
|
+
| `eval` | `<js-expression>`, `--file <path>` | yes | Evaluate JavaScript in webview |
|
|
144
218
|
| `wait` | `--selector <css>`, `--eval <js>`, `--title <regex>`, `--timeout <ms>` | selector/eval: yes | Wait for a condition |
|
|
145
219
|
| `list-windows` | `--tauri`, `--json` | no | List visible windows |
|
|
146
220
|
| `info` | `--title <regex>`, `--json` | no | Window geometry and display info |
|
|
@@ -149,14 +223,33 @@ tauri-agent-tools dom --text "Settings" --first --json
|
|
|
149
223
|
| `rust-logs` | `--level <lvl>`, `--target <regex>`, `--source <src>`, `--duration <ms>`, `--json` | yes | Monitor Rust logs and sidecar output |
|
|
150
224
|
| `storage` | `--type <local\|session\|cookies\|all>`, `--key <name>`, `--json` | yes | Inspect browser storage |
|
|
151
225
|
| `page-state` | `--json` | yes | URL, title, viewport, scroll, document size |
|
|
152
|
-
| `diff` | `<image1> <image2>`, `-o <path>`, `--threshold <pct>`, `--json` | no | Compare two screenshots
|
|
153
|
-
| `mutations` | `<selector>`, `--attributes`, `--duration <ms>`, `--json` | yes | Watch DOM mutations
|
|
154
|
-
| `snapshot` | `-o <prefix>`, `-s <css>`, `--dom-depth <n>`, `--eval <js>`, `--json` | yes |
|
|
226
|
+
| `diff` | `<image1> <image2>`, `-o <path>`, `--threshold <pct>`, `--json` | no | Compare two screenshots |
|
|
227
|
+
| `mutations` | `<selector>`, `--attributes`, `--duration <ms>`, `--json` | yes | Watch DOM mutations |
|
|
228
|
+
| `snapshot` | `-o <prefix>`, `-s <css>`, `--dom-depth <n>`, `--eval <js>`, `--json` | yes | Screenshot + DOM + page state + storage |
|
|
229
|
+
| `click` | `<selector>`, `--double`, `--right`, `--wait <ms>`, `--json` | yes | Click a DOM element |
|
|
230
|
+
| `type` | `<selector> <text>`, `--clear`, `--json` | yes | Type text into an input |
|
|
231
|
+
| `scroll` | `--selector <css>`, `--by <px>`, `--to-top`, `--to-bottom`, `--into-view`, `--json` | yes | Scroll window or element |
|
|
232
|
+
| `focus` | `<selector>`, `--json` | yes | Focus a DOM element |
|
|
233
|
+
| `navigate` | `<target>`, `--json` | yes | Navigate within the app |
|
|
234
|
+
| `select` | `<selector> [value]`, `--toggle`, `--json` | yes | Select dropdown or toggle checkbox |
|
|
235
|
+
| `invoke` | `<command> [args-json]`, `--json` | yes | Invoke a Tauri IPC command |
|
|
236
|
+
| `probe` | `--pid <n>`, `--json` | optional | Discover targets and bridge health |
|
|
237
|
+
| `capture` | `-o <dir>`, `-s <css>`, `--logs-duration <ms>`, `--json` | yes | Full debug evidence bundle |
|
|
238
|
+
| `check` | `--selector`, `--text`, `--eval`, `--no-errors`, `--json` | yes | Structured assertions (exit 0/1) |
|
|
239
|
+
| `store-inspect` | `--framework`, `--store <name>`, `--depth <n>`, `--json` | yes | Inspect reactive store state |
|
|
240
|
+
|
|
241
|
+
## Targeting Flags
|
|
242
|
+
|
|
243
|
+
All bridge-dependent commands support these flags:
|
|
244
|
+
- `--port <n>` / `--token <s>` — explicit bridge config (skips auto-discovery)
|
|
245
|
+
- `--pid <n>` — target a specific app by PID
|
|
246
|
+
- `--window-label <label>` — target a specific webview window (default: main)
|
|
155
247
|
|
|
156
248
|
## Important Notes
|
|
157
249
|
|
|
158
|
-
- **
|
|
250
|
+
- **Inspection commands are read-only.** They don't modify app state.
|
|
251
|
+
- **Interaction commands are debug-only.** They only work with the dev bridge (debug builds).
|
|
159
252
|
- **Use `--json`** for structured, parseable output in automation.
|
|
160
|
-
- **Always use `--duration`** with `ipc-monitor`, `console-monitor`, `rust-logs`, and `mutations
|
|
253
|
+
- **Always use `--duration`** with `ipc-monitor`, `console-monitor`, `rust-logs`, and `mutations`.
|
|
161
254
|
- **`screenshot --selector`** requires both the bridge AND platform screenshot tools (`imagemagick`).
|
|
162
|
-
- **
|
|
255
|
+
- **Multi-app targeting:** Use `--pid` to target a specific app. Use `probe` to discover all running bridges.
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tauri-bridge-setup
|
|
3
3
|
description: How to add the tauri-agent-tools Rust dev bridge to a Tauri application
|
|
4
|
-
version: 0.
|
|
5
|
-
tags: [tauri, rust, bridge, setup, integration]
|
|
4
|
+
version: 0.6.0
|
|
5
|
+
tags: [tauri, rust, bridge, setup, integration, multi-window]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Tauri Dev Bridge Setup
|
|
9
9
|
|
|
10
|
-
Add the dev bridge to a Tauri app so `tauri-agent-tools` can inspect DOM, evaluate JS, monitor IPC,
|
|
10
|
+
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.
|
|
11
11
|
|
|
12
12
|
The bridge runs **only in debug builds** and is stripped from release builds automatically.
|
|
13
13
|
|
|
14
|
+
## Bridge Endpoints
|
|
15
|
+
|
|
16
|
+
The bridge exposes four HTTP endpoints on a random localhost port:
|
|
17
|
+
|
|
18
|
+
| Endpoint | Method | Auth | Purpose |
|
|
19
|
+
|----------|--------|------|---------|
|
|
20
|
+
| `/eval` | POST | token | Evaluate JS in a webview (supports `window` param for multi-window) |
|
|
21
|
+
| `/logs` | POST | token | Drain Rust tracing logs and sidecar output |
|
|
22
|
+
| `/describe` | POST | token | Report PID, window labels, and capabilities |
|
|
23
|
+
| `/version` | GET | none | Bridge version and available endpoints |
|
|
24
|
+
|
|
14
25
|
## Step 1 — Add Cargo dependencies
|
|
15
26
|
|
|
16
27
|
Add to your Tauri app's `src-tauri/Cargo.toml` under `[dependencies]`:
|
|
@@ -91,14 +102,35 @@ If you already have a `.setup()` call, add the `if cfg!(debug_assertions) { ...
|
|
|
91
102
|
Build and run the Tauri app in dev mode, then:
|
|
92
103
|
|
|
93
104
|
```bash
|
|
94
|
-
#
|
|
95
|
-
tauri-agent-tools
|
|
105
|
+
# Discover the bridge and check health
|
|
106
|
+
tauri-agent-tools probe --json
|
|
96
107
|
|
|
97
108
|
# Should return DOM tree
|
|
98
109
|
tauri-agent-tools dom --depth 2
|
|
99
110
|
```
|
|
100
111
|
|
|
101
|
-
Both commands succeeding confirms the bridge is working.
|
|
112
|
+
Both commands succeeding confirms the bridge is working. The `probe` output shows bridge version, available endpoints, window labels, and PID.
|
|
113
|
+
|
|
114
|
+
## Multi-Window Apps
|
|
115
|
+
|
|
116
|
+
The bridge supports evaluating JS in any named webview window. The `/eval` endpoint accepts an optional `window` field (defaults to `"main"`). The `/describe` endpoint reports all registered window labels.
|
|
117
|
+
|
|
118
|
+
From the CLI, use `--window-label` to target a specific window:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Eval in a secondary window
|
|
122
|
+
tauri-agent-tools eval "document.title" --window-label overlay --json
|
|
123
|
+
|
|
124
|
+
# Screenshot a specific window's element
|
|
125
|
+
tauri-agent-tools screenshot --selector ".content" --window-label settings -o /tmp/settings.png
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Use `probe` to discover available windows:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
tauri-agent-tools probe --json
|
|
132
|
+
# → { "bridges": [{ "windows": ["main", "overlay", "settings"], ... }] }
|
|
133
|
+
```
|
|
102
134
|
|
|
103
135
|
## Optional: Sidecar Log Capture
|
|
104
136
|
|
|
@@ -134,3 +166,7 @@ Then monitor with: `tauri-agent-tools rust-logs --source sidecar --duration 1000
|
|
|
134
166
|
**Port conflicts:**
|
|
135
167
|
- The bridge picks a random port. If it fails, check the app's stderr for "Failed to start dev bridge".
|
|
136
168
|
- Ensure no firewall blocks localhost connections.
|
|
169
|
+
|
|
170
|
+
**Multi-window eval fails:**
|
|
171
|
+
- Verify the window label matches exactly (case-sensitive). Use `probe --json` to list available labels.
|
|
172
|
+
- The default label is `"main"` — omit `--window-label` to target it.
|
package/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tauri-agent-tools
|
|
2
2
|
|
|
3
|
-
CLI tool for agent-driven inspection
|
|
3
|
+
CLI tool for agent-driven inspection and interaction with Tauri desktop applications. **Not an MCP server** — invoke commands directly via shell.
|
|
4
4
|
|
|
5
5
|
## Agent Skills
|
|
6
6
|
|
|
@@ -8,23 +8,25 @@ This package includes two [Agent Skills](https://agentskills.io):
|
|
|
8
8
|
|
|
9
9
|
| Skill | Path | Purpose |
|
|
10
10
|
|-------|------|---------|
|
|
11
|
-
| `tauri-agent-tools` | `.agents/skills/tauri-agent-tools/SKILL.md` | Using
|
|
11
|
+
| `tauri-agent-tools` | `.agents/skills/tauri-agent-tools/SKILL.md` | Using all 25 CLI commands to inspect and interact with Tauri apps |
|
|
12
12
|
| `tauri-bridge-setup` | `.agents/skills/tauri-bridge-setup/SKILL.md` | Adding the Rust dev bridge to a Tauri project |
|
|
13
13
|
|
|
14
14
|
## Quick Reference
|
|
15
15
|
|
|
16
16
|
**Install:** `npm install -g tauri-agent-tools`
|
|
17
17
|
|
|
18
|
-
**
|
|
18
|
+
**Inspection commands are read-only.** Interaction commands (click, type, scroll, etc.) are debug-only — they only work with the dev bridge.
|
|
19
19
|
|
|
20
20
|
**Standalone commands** (no bridge needed):
|
|
21
|
-
`list-windows`, `info`, `screenshot --title`, `wait --title`
|
|
21
|
+
`list-windows`, `info`, `screenshot --title`, `wait --title`, `diff`
|
|
22
22
|
|
|
23
23
|
**Bridge-required commands** (Tauri app must have dev bridge running):
|
|
24
|
-
`dom`, `eval`, `screenshot --selector`, `wait --selector/--eval`, `ipc-monitor`, `console-monitor`, `rust-logs`, `storage`, `page-state`, `mutations`, `snapshot`
|
|
24
|
+
`dom`, `eval`, `screenshot --selector`, `wait --selector/--eval`, `ipc-monitor`, `console-monitor`, `rust-logs`, `storage`, `page-state`, `mutations`, `snapshot`, `click`, `type`, `scroll`, `focus`, `navigate`, `select`, `invoke`, `capture`, `check`, `store-inspect`
|
|
25
25
|
|
|
26
|
-
**
|
|
27
|
-
`
|
|
26
|
+
**Optional bridge:**
|
|
27
|
+
`probe` (works standalone to discover bridges, richer output with bridge)
|
|
28
|
+
|
|
29
|
+
**Multi-app targeting:** Use `--pid <n>` to target a specific app. Use `--window-label <label>` for multi-window apps.
|
|
28
30
|
|
|
29
31
|
**Bridge auto-discovery:** The CLI finds the running bridge via token files in `/tmp/tauri-dev-bridge-*.token`. No manual configuration needed.
|
|
30
32
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Agent-driven inspection toolkit for Tauri desktop apps**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
25 commands to screenshot, inspect, interact with, and monitor Tauri apps from the CLI.
|
|
8
8
|
|
|
9
9
|
[](https://github.com/cesarandreslopez/tauri-agent-tools/actions/workflows/ci.yml)
|
|
10
10
|
[](https://www.npmjs.com/package/tauri-agent-tools)
|
|
@@ -121,8 +121,15 @@ Evaluate a JavaScript expression in the Tauri app.
|
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
123
|
tauri-agent-tools eval "document.title"
|
|
124
|
+
tauri-agent-tools eval --file script.js
|
|
124
125
|
```
|
|
125
126
|
|
|
127
|
+
| Option | Description |
|
|
128
|
+
|--------|-------------|
|
|
129
|
+
| `<js-expression>` | Inline JavaScript to evaluate |
|
|
130
|
+
| `--file <path>` | Load JavaScript from a file instead |
|
|
131
|
+
| `--window-label <label>` | Target a specific webview window (default: main) |
|
|
132
|
+
|
|
126
133
|
### `wait`
|
|
127
134
|
|
|
128
135
|
Wait for a condition to be met.
|
|
@@ -244,6 +251,39 @@ Monitor Rust backend logs and sidecar output in real-time. Unlike `console-monit
|
|
|
244
251
|
| `--duration <ms>` | Auto-stop after N milliseconds |
|
|
245
252
|
| `--json` | Output one JSON object per line |
|
|
246
253
|
|
|
254
|
+
### Interaction Commands
|
|
255
|
+
|
|
256
|
+
Interaction commands dispatch DOM events inside the webview. They require the dev bridge (debug builds only).
|
|
257
|
+
|
|
258
|
+
| Command | Description |
|
|
259
|
+
|---------|-------------|
|
|
260
|
+
| `click <selector>` | Click a DOM element (`--double`, `--right`, `--wait <ms>`) |
|
|
261
|
+
| `type <selector> <text>` | Type text into an input (`--clear` to empty first) |
|
|
262
|
+
| `scroll` | Scroll window or element (`--by <px>`, `--to-top`, `--to-bottom`, `--into-view`) |
|
|
263
|
+
| `focus <selector>` | Focus a DOM element |
|
|
264
|
+
| `navigate <target>` | Navigate within the app (route path or URL) |
|
|
265
|
+
| `select <selector> [value]` | Select dropdown value or toggle checkbox (`--toggle`) |
|
|
266
|
+
| `invoke <command> [args-json]` | Invoke a Tauri IPC command |
|
|
267
|
+
|
|
268
|
+
### Workflow Commands
|
|
269
|
+
|
|
270
|
+
| Command | Description |
|
|
271
|
+
|---------|-------------|
|
|
272
|
+
| `probe` | Discover running bridges, check health, list windows |
|
|
273
|
+
| `capture -o <dir>` | Full debug evidence bundle (screenshot, DOM, page state, storage, console errors, Rust logs) |
|
|
274
|
+
| `check` | Structured assertions (`--selector`, `--text`, `--eval`, `--no-errors`) — exits 0/1 |
|
|
275
|
+
| `store-inspect` | Inspect reactive store state (Pinia, Vue devtools, custom hooks) |
|
|
276
|
+
|
|
277
|
+
### Targeting Flags
|
|
278
|
+
|
|
279
|
+
All bridge-dependent commands support:
|
|
280
|
+
|
|
281
|
+
| Flag | Description |
|
|
282
|
+
|------|-------------|
|
|
283
|
+
| `--port <n>` / `--token <s>` | Explicit bridge config (skips auto-discovery) |
|
|
284
|
+
| `--pid <n>` | Target a specific app by PID |
|
|
285
|
+
| `--window-label <label>` | Target a specific webview window (default: main) |
|
|
286
|
+
|
|
247
287
|
## How It Works
|
|
248
288
|
|
|
249
289
|
```
|
|
@@ -257,7 +297,7 @@ screenshot --selector ".toolbar" --title "My App"
|
|
|
257
297
|
├─► Compute crop region:
|
|
258
298
|
│ element rect from bridge + viewport offset (outerHeight - innerHeight)
|
|
259
299
|
│
|
|
260
|
-
└─►
|
|
300
|
+
└─► ImageMagick crop: png:- -crop WxH+X+Y +repage png:-
|
|
261
301
|
```
|
|
262
302
|
|
|
263
303
|
The crop accounts for window decoration (title bar, borders) by comparing `window.innerHeight` from the bridge with the actual window height from `xdotool`.
|
|
@@ -274,14 +314,13 @@ The crop accounts for window decoration (title bar, borders) by comparing `windo
|
|
|
274
314
|
|
|
275
315
|
## Design Decisions
|
|
276
316
|
|
|
277
|
-
###
|
|
317
|
+
### Inspection is read-only, interaction is debug-only
|
|
278
318
|
|
|
279
|
-
|
|
319
|
+
Inspection commands (screenshot, dom, eval, storage, etc.) are strictly read-only — they never modify app state. Interaction commands (click, type, scroll, focus, navigate, select, invoke) use eval-based DOM event dispatch and **only work with the dev bridge** (debug builds). Native input injection (xdotool, Accessibility API) is deliberately avoided:
|
|
280
320
|
|
|
281
|
-
- **Native input
|
|
282
|
-
- **
|
|
283
|
-
- **
|
|
284
|
-
- **Read-only is a safer contract for dev tool automation.** Tools that can only observe cannot corrupt application state, trigger unintended side effects, or create security vulnerabilities in CI pipelines.
|
|
321
|
+
- **Native input is system-wide and risky.** X11 injection operates globally, not per-window — it can grab the cursor and require a hard reboot.
|
|
322
|
+
- **Eval-based dispatch is per-window and sandboxed.** Interaction commands dispatch DOM events inside the webview via the bridge. They can't affect other apps or the OS.
|
|
323
|
+
- **Debug-only by design.** The bridge is compiled out of release builds (`cfg!(debug_assertions)`), so interaction commands cannot run against production apps.
|
|
285
324
|
|
|
286
325
|
### Why no MCP server mode
|
|
287
326
|
|
|
@@ -294,11 +333,12 @@ This tool is a CLI that runs commands and exits — not a persistent MCP server.
|
|
|
294
333
|
|
|
295
334
|
## Safety Guarantees
|
|
296
335
|
|
|
297
|
-
- **No input injection** — no
|
|
298
|
-
- **No xcap crate** — uses `xdotool` + ImageMagick
|
|
336
|
+
- **No native input injection** — no xdotool type/mousemove, no Accessibility API sends. Interaction commands use eval-based DOM dispatch inside the webview only.
|
|
337
|
+
- **No xcap crate** — uses `xdotool` + ImageMagick (read-only X11 operations)
|
|
299
338
|
- **No daemon** — CLI runs and exits, no background processes
|
|
300
339
|
- **No `.mcp.json`** — never auto-starts
|
|
301
|
-
- **
|
|
340
|
+
- **Inspection commands are read-only** — `xdotool search`, `getwindowgeometry`, `import -window`
|
|
341
|
+
- **Interaction commands are debug-only** — require the dev bridge, compiled out of release builds
|
|
302
342
|
- **Token authenticated bridge** — random 32-char token, localhost-only
|
|
303
343
|
- **`execFile` (array args)** — never `exec` (shell string), prevents command injection
|
|
304
344
|
- **Window ID validated** — must match `/^\d+$/`
|
|
@@ -309,7 +349,7 @@ This package ships [Agent Skills](https://agentskills.io) so AI coding agents ca
|
|
|
309
349
|
|
|
310
350
|
| Skill | Description |
|
|
311
351
|
|-------|-------------|
|
|
312
|
-
| `tauri-agent-tools` | Using all
|
|
352
|
+
| `tauri-agent-tools` | Using all 25 CLI commands to inspect and interact with Tauri apps |
|
|
313
353
|
| `tauri-bridge-setup` | Adding the Rust dev bridge to a Tauri project |
|
|
314
354
|
|
|
315
355
|
<details>
|
|
@@ -363,7 +403,7 @@ Full documentation is available at the [docs site](https://cesarandreslopez.gith
|
|
|
363
403
|
- [Installation](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/installation/) — system requirements and setup
|
|
364
404
|
- [Quick Start](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/quick-start/) — get running in 5 minutes
|
|
365
405
|
- [Bridge Setup](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/bridge-setup/) — integrate the Rust bridge into your Tauri app
|
|
366
|
-
- [Command Reference](https://cesarandreslopez.github.io/tauri-agent-tools/commands/) — all
|
|
406
|
+
- [Command Reference](https://cesarandreslopez.github.io/tauri-agent-tools/commands/) — all 25 commands with examples
|
|
367
407
|
- [Platform Support](https://cesarandreslopez.github.io/tauri-agent-tools/platform-support/) — X11, Wayland, macOS details
|
|
368
408
|
- [Architecture](https://cesarandreslopez.github.io/tauri-agent-tools/architecture/overview/) — how it works under the hood
|
|
369
409
|
|
package/dist/bridge/client.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { BridgeConfig } from '../schemas/bridge.js';
|
|
2
|
-
import type { ElementRect, RustLogEntry } from '../schemas/bridge.js';
|
|
2
|
+
import type { ElementRect, RustLogEntry, DescribeResponse, VersionResponse } from '../schemas/bridge.js';
|
|
3
3
|
import type { A11yNode } from '../schemas/dom.js';
|
|
4
4
|
export declare class BridgeClient {
|
|
5
5
|
private baseUrl;
|
|
6
6
|
private token;
|
|
7
|
-
|
|
7
|
+
private windowLabel;
|
|
8
|
+
constructor(config: BridgeConfig, windowLabel?: string);
|
|
8
9
|
eval(js: string, timeout?: number): Promise<unknown>;
|
|
9
10
|
getElementRect(selector: string): Promise<ElementRect | null>;
|
|
10
11
|
getViewportSize(): Promise<{
|
|
@@ -15,4 +16,6 @@ export declare class BridgeClient {
|
|
|
15
16
|
getAccessibilityTree(selector?: string, depth?: number): Promise<A11yNode | null>;
|
|
16
17
|
fetchLogs(timeout?: number): Promise<RustLogEntry[]>;
|
|
17
18
|
ping(): Promise<boolean>;
|
|
19
|
+
describe(): Promise<DescribeResponse | null>;
|
|
20
|
+
version(): Promise<VersionResponse | null>;
|
|
18
21
|
}
|
package/dist/bridge/client.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { ElementRectSchema, ViewportSizeSchema, BridgeEvalResponseSchema, BridgeLogsResponseSchema, } from '../schemas/bridge.js';
|
|
1
|
+
import { ElementRectSchema, ViewportSizeSchema, BridgeEvalResponseSchema, BridgeLogsResponseSchema, DescribeResponseSchema, VersionResponseSchema, } from '../schemas/bridge.js';
|
|
2
2
|
import { A11yNodeSchema } from '../schemas/dom.js';
|
|
3
3
|
export class BridgeClient {
|
|
4
4
|
baseUrl;
|
|
5
5
|
token;
|
|
6
|
-
|
|
6
|
+
windowLabel;
|
|
7
|
+
constructor(config, windowLabel) {
|
|
7
8
|
this.baseUrl = `http://127.0.0.1:${config.port}`;
|
|
8
9
|
this.token = config.token;
|
|
10
|
+
this.windowLabel = windowLabel;
|
|
9
11
|
}
|
|
10
12
|
async eval(js, timeout = 5000) {
|
|
13
|
+
const body = { js, token: this.token };
|
|
14
|
+
if (this.windowLabel !== undefined) {
|
|
15
|
+
body.window = this.windowLabel;
|
|
16
|
+
}
|
|
11
17
|
const res = await fetch(`${this.baseUrl}/eval`, {
|
|
12
18
|
method: 'POST',
|
|
13
19
|
headers: { 'Content-Type': 'application/json' },
|
|
14
|
-
body: JSON.stringify(
|
|
20
|
+
body: JSON.stringify(body),
|
|
15
21
|
signal: AbortSignal.timeout(timeout),
|
|
16
22
|
});
|
|
17
23
|
if (!res.ok) {
|
|
@@ -137,5 +143,34 @@ export class BridgeClient {
|
|
|
137
143
|
return false;
|
|
138
144
|
}
|
|
139
145
|
}
|
|
146
|
+
async describe() {
|
|
147
|
+
try {
|
|
148
|
+
const res = await fetch(`${this.baseUrl}/describe`, {
|
|
149
|
+
method: 'POST',
|
|
150
|
+
headers: { 'Content-Type': 'application/json' },
|
|
151
|
+
body: JSON.stringify({ token: this.token }),
|
|
152
|
+
signal: AbortSignal.timeout(5000),
|
|
153
|
+
});
|
|
154
|
+
if (!res.ok)
|
|
155
|
+
return null;
|
|
156
|
+
return DescribeResponseSchema.parse(await res.json());
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async version() {
|
|
163
|
+
try {
|
|
164
|
+
const res = await fetch(`${this.baseUrl}/version`, {
|
|
165
|
+
signal: AbortSignal.timeout(5000),
|
|
166
|
+
});
|
|
167
|
+
if (!res.ok)
|
|
168
|
+
return null;
|
|
169
|
+
return VersionResponseSchema.parse(await res.json());
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
140
175
|
}
|
|
141
176
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/bridge/client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/bridge/client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,OAAO,YAAY;IACf,OAAO,CAAS;IAChB,KAAK,CAAS;IACd,WAAW,CAAqB;IAExC,YAAY,MAAoB,EAAE,WAAoB;QACpD,IAAI,CAAC,OAAO,GAAG,oBAAoB,MAAM,CAAC,IAAI,EAAE,CAAC;QACjD,IAAI,C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ED
|
@@ -23,6 +23,17 @@ import { registerMutations } from './commands/mutations.js';
|
|
|
23
23
|
import { registerSnapshot } from './commands/snapshot.js';
|
|
24
24
|
import { registerDiff } from './commands/diff.js';
|
|
25
25
|
import { registerRustLogs } from './commands/rustLogs.js';
|
|
26
|
+
import { registerClick } from './commands/interact/click.js';
|
|
27
|
+
import { registerType } from './commands/interact/type.js';
|
|
28
|
+
import { registerScroll } from './commands/interact/scroll.js';
|
|
29
|
+
import { registerFocus } from './commands/interact/focus.js';
|
|
30
|
+
import { registerNavigate } from './commands/interact/navigate.js';
|
|
31
|
+
import { registerSelect } from './commands/interact/select.js';
|
|
32
|
+
import { registerInvoke } from './commands/invoke.js';
|
|
33
|
+
import { registerStoreInspect } from './commands/storeInspect.js';
|
|
34
|
+
import { registerCheck } from './commands/check.js';
|
|
35
|
+
import { registerProbe } from './commands/probe.js';
|
|
36
|
+
import { registerCapture } from './commands/capture.js';
|
|
26
37
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
27
38
|
const pkg = PackageJsonSchema.parse(JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8')));
|
|
28
39
|
const program = new Command()
|
|
@@ -61,6 +72,17 @@ registerMutations(program);
|
|
|
61
72
|
registerSnapshot(program, getAdapter);
|
|
62
73
|
registerDiff(program);
|
|
63
74
|
registerRustLogs(program);
|
|
75
|
+
registerClick(program);
|
|
76
|
+
registerType(program);
|
|
77
|
+
registerScroll(program);
|
|
78
|
+
registerFocus(program);
|
|
79
|
+
registerNavigate(program);
|
|
80
|
+
registerSelect(program);
|
|
81
|
+
registerInvoke(program);
|
|
82
|
+
registerStoreInspect(program);
|
|
83
|
+
registerCheck(program);
|
|
84
|
+
registerProbe(program);
|
|
85
|
+
registerCapture(program, getAdapter);
|
|
64
86
|
program.parseAsync().catch((err) => {
|
|
65
87
|
console.error(err instanceof Error ? err.message : String(err));
|
|
66
88
|
process.exitCode = 1;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 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