tauri-agent-tools 0.7.0 → 0.8.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 +50 -13
- package/.agents/skills/tauri-bridge-setup/SKILL.md +5 -3
- package/.agents/skills/tauri-debug-quickstart/SKILL.md +9 -6
- package/AGENTS.md +13 -3
- package/README.md +26 -5
- package/dist/bridge/client.d.ts +8 -0
- package/dist/bridge/client.js +20 -0
- package/dist/bridge/client.js.map +1 -1
- package/dist/bridge/tokenDiscovery.js +29 -29
- package/dist/bridge/tokenDiscovery.js.map +1 -1
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/bundle.d.ts +2 -0
- package/dist/commands/bundle.js +251 -0
- package/dist/commands/bundle.js.map +1 -0
- package/dist/commands/capabilitiesAudit.js +14 -1
- package/dist/commands/capabilitiesAudit.js.map +1 -1
- package/dist/commands/capture.js +1 -1
- package/dist/commands/health.js +19 -1
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/invoke.js +14 -4
- package/dist/commands/invoke.js.map +1 -1
- package/dist/commands/ipcMonitor.d.ts +3 -0
- package/dist/commands/ipcMonitor.js +60 -14
- package/dist/commands/ipcMonitor.js.map +1 -1
- package/dist/commands/logs.d.ts +2 -0
- package/dist/commands/logs.js +193 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/pageState.d.ts +1 -0
- package/dist/commands/pageState.js +2 -2
- package/dist/commands/pageState.js.map +1 -1
- package/dist/commands/processTree.js +116 -4
- package/dist/commands/processTree.js.map +1 -1
- package/dist/commands/shared.d.ts +31 -0
- package/dist/commands/shared.js +52 -1
- package/dist/commands/shared.js.map +1 -1
- package/dist/commands/snapshot.js +1 -1
- package/dist/commands/webviewAttach.js +17 -1
- package/dist/commands/webviewAttach.js.map +1 -1
- package/dist/platform/macos.js +35 -15
- package/dist/platform/macos.js.map +1 -1
- package/dist/util/logMerge.d.ts +42 -0
- package/dist/util/logMerge.js +133 -0
- package/dist/util/logMerge.js.map +1 -0
- package/dist/util/mergeByTimestamp.d.ts +18 -0
- package/dist/util/mergeByTimestamp.js +30 -0
- package/dist/util/mergeByTimestamp.js.map +1 -0
- package/dist/util/psTree.d.ts +28 -0
- package/dist/util/psTree.js +76 -0
- package/dist/util/psTree.js.map +1 -0
- package/examples/tauri-bridge/src/dev_bridge.rs +112 -32
- package/package.json +1 -1
- package/rust-bridge/README.md +10 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tauri-agent-tools
|
|
3
|
-
description: CLI for inspecting and interacting with Tauri desktop apps — DOM queries, screenshots, interaction (click/type/scroll), IPC monitoring, store inspection, structured assertions, plus bridge-free diagnostics (OS logs, app paths, sidecar NDJSON tap/replay, forensic bundles) and the `diagnose` super-
|
|
4
|
-
version: 0.
|
|
5
|
-
tags: [tauri, desktop, debugging, screenshot, dom, inspection, diff, mutations, snapshot, interaction, click, type, scroll, invoke, probe, capture, check, store-inspect, forensics, os-logs, app-paths, sidecar, config-inspect, diagnose]
|
|
3
|
+
description: CLI for inspecting and interacting with Tauri desktop apps — DOM queries, screenshots, interaction (click/type/scroll), IPC monitoring, store inspection, structured assertions, plus bridge-free diagnostics (unified cross-layer logs, deep OS process trees, OS logs, app paths, sidecar NDJSON tap/replay, forensic bundles) and the `diagnose`/`bundle` super-commands for one-shot triage. Works against older/vendored bridges by degrading gracefully.
|
|
4
|
+
version: 0.8.0
|
|
5
|
+
tags: [tauri, desktop, debugging, screenshot, dom, inspection, diff, mutations, snapshot, interaction, click, type, scroll, invoke, probe, capture, check, store-inspect, logs, bundle, process-tree, forensics, os-logs, app-paths, sidecar, config-inspect, diagnose]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# tauri-agent-tools
|
|
@@ -33,13 +33,16 @@ 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`, `click`, `type`, `scroll`, `focus`, `navigate`, `select`, `invoke`, `capture`, `check`, `store-inspect
|
|
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
|
+
|
|
38
|
+
**Bridge-enriched, but degrade gracefully** (use a v0.7+ bridge for full output; otherwise emit a clear note instead of failing — pass `--strict` to fail loudly):
|
|
39
|
+
`capabilities audit`, `webview attach`, `health` *(richer with bridge v0.7+)*
|
|
37
40
|
|
|
38
41
|
**Standalone** (no bridge needed):
|
|
39
|
-
`screenshot --title` (full window only), `wait --title`, `list-windows`, `info`, `diff`, `app-paths`, `config inspect`, `os-logs`, `sidecar tap`, `sidecar replay`, `forensics`
|
|
42
|
+
`screenshot --title` (full window only), `wait --title`, `list-windows`, `info`, `diff`, `logs`, `app-paths`, `config inspect`, `os-logs`, `sidecar tap`, `sidecar replay`, `forensics`
|
|
40
43
|
|
|
41
|
-
**Optional bridge
|
|
42
|
-
`probe` (
|
|
44
|
+
**Optional bridge** (work standalone, richer with a bridge):
|
|
45
|
+
`probe`, `process-tree` (use `--deep` for a bridge-free OS walk), `logs` (merges on-disk files alone, or also drains the bridge ring buffer), `bundle`, `diagnose`
|
|
43
46
|
|
|
44
47
|
The bridge auto-discovers via token files in `/tmp/tauri-dev-bridge-*.token`. No manual port/token configuration needed.
|
|
45
48
|
|
|
@@ -144,14 +147,38 @@ tauri-agent-tools rust-logs --source sidecar --duration 10000 --json
|
|
|
144
147
|
tauri-agent-tools rust-logs --source sidecar:ffmpeg --duration 5000 --json
|
|
145
148
|
```
|
|
146
149
|
|
|
147
|
-
###
|
|
150
|
+
### Merge scattered logs into one timeline (`logs`)
|
|
148
151
|
|
|
149
|
-
|
|
152
|
+
A real app spreads logs across the bridge ring buffer, the webview console, an on-disk `tauri-plugin-log` file, and sidecar output. `logs` discovers what's available, normalizes every source, and emits one **timestamp-ordered** stream (NDJSON by default; `--pretty` for humans). Works with no bridge.
|
|
150
153
|
|
|
151
154
|
```bash
|
|
152
|
-
#
|
|
155
|
+
# Merge the on-disk log dir (auto-resolved from tauri.conf.json) + the bridge ring buffer
|
|
156
|
+
tauri-agent-tools logs --config ./src-tauri --pretty
|
|
157
|
+
|
|
158
|
+
# No source tree handy? Locate the OS log dir from a bundle id; skip the bridge
|
|
159
|
+
tauri-agent-tools logs --identifier com.example.app --no-bridge
|
|
160
|
+
|
|
161
|
+
# Point at explicit files / a custom dir; filter + infer correlation ids (run_id, requestId…)
|
|
162
|
+
tauri-agent-tools logs --log-dir ~/Library/Logs/com.example.app --level warn --correlate
|
|
163
|
+
tauri-agent-tools logs --log-file /path/a.log --log-file /path/b.log --filter "block_id=42"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Each entry is `{ts, level, source, subsystem, message, origin}` (+ `correlation` with `--correlate`). `source` is `rust` / `sidecar:<name>` (bridge) or `file:<basename>` (disk). Timezone-less timestamps are read as UTC so ordering is host-independent.
|
|
167
|
+
|
|
168
|
+
### Bridge-extended diagnostics (process tree, capabilities, devtools, health)
|
|
169
|
+
|
|
170
|
+
These commands prefer richer endpoints on a v0.7+ bridge but **degrade gracefully** against older/vendored bridges: each calls `GET /version` first to feature-detect, and when an endpoint is missing it emits a clear `note:` (and falls back where it can) instead of failing. Pass `--strict` to make a missing endpoint a hard error instead.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Tauri PID + registered sidecars (uses /process on a v0.7+ bridge).
|
|
174
|
+
# On older bridges it degrades to an OS walk when the app PID is resolvable.
|
|
153
175
|
tauri-agent-tools process-tree --json
|
|
154
176
|
|
|
177
|
+
# Walk the REAL OS descendant tree — sidecar children, MCP servers, ML workers —
|
|
178
|
+
# without the bridge at all (great for unregistered grandchildren):
|
|
179
|
+
tauri-agent-tools process-tree --deep --json
|
|
180
|
+
tauri-agent-tools process-tree --deep --pid 12345 # no bridge needed with an explicit PID
|
|
181
|
+
|
|
155
182
|
# Devtron-style live capability audit (uses /capabilities)
|
|
156
183
|
tauri-agent-tools capabilities audit --json
|
|
157
184
|
# findings[] flag wildcard "*", over-broad shell:/fs:/http: scopes,
|
|
@@ -166,7 +193,7 @@ tauri-agent-tools webview attach --open # launch in default browser
|
|
|
166
193
|
tauri-agent-tools health --json
|
|
167
194
|
```
|
|
168
195
|
|
|
169
|
-
Sidecars only appear in `process-tree`
|
|
196
|
+
Sidecars only appear in the bridge's `/process` view (`process-tree` without `--deep`, and `health`) if integrators register them — by passing `Some(®istry)` to `dev_bridge::spawn_sidecar_monitored` or calling `dev_bridge::register_sidecar`. **`process-tree --deep` needs none of that** — it reads the live OS process table, so it surfaces unregistered children and grandchildren regardless.
|
|
170
197
|
|
|
171
198
|
### Bridge-free diagnostics (post-mortem & sidecar workflows)
|
|
172
199
|
|
|
@@ -196,6 +223,13 @@ tauri-agent-tools sidecar replay /tmp/run.ndjson --to-exec node my-sidecar.js --
|
|
|
196
223
|
tauri-agent-tools forensics --config ./src-tauri -o ./forensics-out
|
|
197
224
|
# → ./forensics-out/{summary.md,summary.json,project.json,app-log-tail.txt,live-os-log.ndjson}
|
|
198
225
|
# summary.md includes detected panic markers + suggested next commands.
|
|
226
|
+
|
|
227
|
+
# One-shot SHAREABLE incident bundle: merges logs + deep process tree + app-paths +
|
|
228
|
+
# forensics (+ optional UI capture) into one redacted directory and a .tar.gz.
|
|
229
|
+
tauri-agent-tools bundle --config ./src-tauri -o ./triage
|
|
230
|
+
# → ./triage/{logs.ndjson,process-tree.json,app-paths.json,forensics/,summary.md} + ./triage.tar.gz
|
|
231
|
+
tauri-agent-tools bundle --config ./src-tauri --with-capture -o ./triage # also screenshot + DOM (needs bridge)
|
|
232
|
+
# Secrets (token/api_key/password/…) are redacted from text artifacts on write.
|
|
199
233
|
```
|
|
200
234
|
|
|
201
235
|
### Watch DOM mutations
|
|
@@ -296,7 +330,7 @@ tauri-agent-tools eval "document.title" --window-label overlay --json
|
|
|
296
330
|
| `wait` | `--selector <css>`, `--eval <js>`, `--title <regex>`, `--timeout <ms>` | selector/eval: yes | Wait for a condition |
|
|
297
331
|
| `list-windows` | `--tauri`, `--json` | no | List visible windows |
|
|
298
332
|
| `info` | `--title <regex>`, `--json` | no | Window geometry and display info |
|
|
299
|
-
| `ipc-monitor` | `--filter <cmd>`, `--duration <ms>`, `--json` | yes | Monitor Tauri IPC calls |
|
|
333
|
+
| `ipc-monitor` | `--filter <cmd>`, `--duration <ms>`, `--slow <ms>`, `--stats`, `--json` | yes | Monitor Tauri IPC calls; flag slow calls + per-command latency summary |
|
|
300
334
|
| `console-monitor` | `--level <lvl>`, `--filter <regex>`, `--duration <ms>`, `--json` | yes | Monitor console output |
|
|
301
335
|
| `rust-logs` | `--level <lvl>`, `--target <regex>`, `--source <src>`, `--duration <ms>`, `--json` | yes | Monitor Rust logs and sidecar output |
|
|
302
336
|
| `storage` | `--type <local\|session\|cookies\|all>`, `--key <name>`, `--json` | yes | Inspect browser storage |
|
|
@@ -321,11 +355,13 @@ tauri-agent-tools eval "document.title" --window-label overlay --json
|
|
|
321
355
|
| `sidecar tap` | `-- <cmd...>`, `--schema <path>`, `--record <path>`, `--raw`, `--json` | no | Wrap-and-run a sidecar, frame NDJSON, validate envelopes |
|
|
322
356
|
| `sidecar replay` | `<file>`, `--to-exec <cmd>`, `--rate <lps>`, `--loop` | no | Replay a recorded NDJSON sidecar stream |
|
|
323
357
|
| `forensics` | `--config <path>`, `--identifier <id>`, `-o <dir>`, `--since <dur>`, `--json` | no | One-shot forensic bundle (works on dead apps) |
|
|
324
|
-
| `
|
|
358
|
+
| `logs` | `--config <path>`, `--identifier <id>`, `--log-dir <path>`, `--log-file <path>`, `--level <lvl>`, `--source <re>`, `--filter <re>`, `--correlate`, `--no-bridge`, `--pretty` | optional | Merge on-disk log files + bridge ring buffer into one timestamp-ordered stream |
|
|
359
|
+
| `process-tree` | `--deep`, `--pid <n>`, `--json` | optional | Tauri PID + sidecars (bridge /process); `--deep` walks the full OS descendant tree without the bridge |
|
|
325
360
|
| `capabilities audit` | `--json` | yes (v0.7+) | Live Devtron-style audit of declared Tauri capabilities |
|
|
326
361
|
| `webview attach` | `--print-url`, `--open`, `--json` | yes (v0.7+) | Print webview inspector URL or platform hint |
|
|
327
362
|
| `health` | `--json` | yes (v0.7+) | Uptime + webview/sidecar liveness (exit non-zero if unhealthy) |
|
|
328
363
|
| `diagnose` | `--config <path>`, `-o <dir>`, `--since <dur>`, `--no-bridge`, `--json` | optional | Best-effort super-bundle (forensics + live bridge enrichment) |
|
|
364
|
+
| `bundle` | `--config <path>`, `-o <dir>`, `--with-capture`, `--no-archive`, `--json` | optional | Shareable incident bundle: logs + deep process tree + app-paths + forensics → redacted dir + .tar.gz |
|
|
329
365
|
|
|
330
366
|
## Targeting Flags
|
|
331
367
|
|
|
@@ -333,6 +369,7 @@ All bridge-dependent commands support these flags:
|
|
|
333
369
|
- `--port <n>` / `--token <s>` — explicit bridge config (skips auto-discovery)
|
|
334
370
|
- `--pid <n>` — target a specific app by PID
|
|
335
371
|
- `--window-label <label>` — target a specific webview window (default: main)
|
|
372
|
+
- `--strict` — for v0.7-endpoint commands, fail with an upgrade error instead of degrading when the bridge is too old
|
|
336
373
|
|
|
337
374
|
## Important Notes
|
|
338
375
|
|
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
tags: [tauri, rust, bridge, setup, integration, multi-window, process-tree, capabilities, devtools, health]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -11,9 +11,9 @@ Add the dev bridge to a Tauri app so `tauri-agent-tools` can inspect DOM, evalua
|
|
|
11
11
|
|
|
12
12
|
The bridge runs **only in debug builds** and is stripped from release builds automatically.
|
|
13
13
|
|
|
14
|
-
## Re-copying for v0.7
|
|
14
|
+
## Re-copying for v0.7 (optional enrichment — not required)
|
|
15
15
|
|
|
16
|
-
> **Upgrading from v0.6:** The bridge surface grew with four new endpoints (`/process`, `/capabilities`, `/devtools`, `/health`) and `start_bridge` now returns a third tuple element (the sidecar registry).
|
|
16
|
+
> **Upgrading from v0.6:** The bridge surface grew with four new endpoints (`/process`, `/capabilities`, `/devtools`, `/health`) and `start_bridge` now 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 via `GET /version` and **degrade gracefully** against an older/vendored bridge — they emit a clear `note:` (and fall back to an OS/eval path where possible) instead of failing. So you are **not forced to re-sync** `dev_bridge.rs` just to keep using the CLI. To unlock the richer structured output, **re-copy `dev_bridge.rs` from the latest `examples/tauri-bridge/src/dev_bridge.rs`** and adjust your `main.rs` to destructure the new return shape (Step 3). Pass `--strict` to any of those commands to turn a missing endpoint back into a hard error.
|
|
17
17
|
|
|
18
18
|
## Bridge Endpoints
|
|
19
19
|
|
|
@@ -184,6 +184,8 @@ dev_bridge::register_sidecar(
|
|
|
184
184
|
|
|
185
185
|
Then monitor with: `tauri-agent-tools rust-logs --source sidecar --duration 10000`, view the tree with `tauri-agent-tools process-tree`, and check liveness with `tauri-agent-tools health`.
|
|
186
186
|
|
|
187
|
+
> Registration is only needed for the bridge's **named** `/process` view (and `health` liveness). If you just want to *see* the process tree — including children and grandchildren you spawned yourself — `tauri-agent-tools process-tree --deep` reads the live OS process table and needs no registration (or even no bridge, with `--pid`).
|
|
188
|
+
|
|
187
189
|
## Troubleshooting
|
|
188
190
|
|
|
189
191
|
**"No bridge found" error:**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tauri-debug-quickstart
|
|
3
3
|
description: First-30-seconds triage for a broken Tauri desktop app. Pick the right command for the symptom you're seeing, with one-line escalations to deeper skills.
|
|
4
|
-
version: 0.
|
|
5
|
-
tags: [tauri, debugging, triage, quickstart, decision-tree, forensics, diagnose]
|
|
4
|
+
version: 0.8.0
|
|
5
|
+
tags: [tauri, debugging, triage, quickstart, decision-tree, logs, process-tree, bundle, forensics, diagnose]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Tauri Debug Quickstart
|
|
@@ -35,13 +35,16 @@ Pick the row that matches what's broken. Each command works without the bridge u
|
|
|
35
35
|
| Don't know what's wrong | `tauri-agent-tools diagnose -o ./diag` | Everything-bundle; graceful on dead apps |
|
|
36
36
|
| App crashed at startup | `tauri-agent-tools forensics --config ./src-tauri -o ./forensics` | Reads app log + DiagnosticReports without needing a live process |
|
|
37
37
|
| App is running but bridge isn't responding | `tauri-agent-tools probe` | Detects whether the bridge process is up and shows token-file state |
|
|
38
|
-
| App is running, bridge is up, but webview looks wrong | `tauri-agent-tools health --json`
|
|
38
|
+
| App is running, bridge is up, but webview looks wrong | `tauri-agent-tools health --json` | Returns webview_ready + sidecar liveness (richer on bridge v0.7+; degrades to a liveness ping otherwise) |
|
|
39
|
+
| Evidence is scattered across webview/Rust/sidecar logs | `tauri-agent-tools logs --config ./src-tauri --pretty` | Merges on-disk log files + the bridge ring buffer into one timestamp-ordered timeline |
|
|
40
|
+
| What did the sidecar actually spawn (MCP servers, workers)? | `tauri-agent-tools process-tree --deep --json` | Walks the real OS descendant tree, including unregistered grandchildren — no bridge needed |
|
|
41
|
+
| Need one shareable archive of everything for a bug report | `tauri-agent-tools bundle --config ./src-tauri -o ./triage` | Logs + deep process tree + app-paths + forensics → redacted dir + `.tar.gz` |
|
|
39
42
|
| A sidecar process is the suspect | `tauri-agent-tools sidecar tap --schema ./schema.json -- <cmd>` | Wrap-and-run the sidecar standalone; frame NDJSON; validate envelopes |
|
|
40
43
|
| Need to know exactly which files the app touches | `tauri-agent-tools app-paths --config ./src-tauri --exists` | Resolves Tauri 2's per-platform `app_data_dir`/`app_log_dir`/etc. + checks existence |
|
|
41
44
|
| Need to audit Tauri capabilities for over-broad permissions | `tauri-agent-tools config inspect --config ./src-tauri` (static) **or** `tauri-agent-tools capabilities audit` (live, needs bridge v0.7+) | Flags `*`, `fs:allow-all`, `shell:allow-spawn`, etc. |
|
|
42
45
|
| OS-level error visible in Console.app or journalctl | `tauri-agent-tools os-logs --identifier com.example.app --level error --duration 30000` | Filters platform log stream to the Tauri bundle id |
|
|
43
46
|
| Inspector / webview attach | `tauri-agent-tools webview attach` *(needs bridge v0.7+)* | Returns inspector URL or platform-specific hint |
|
|
44
|
-
| What sidecars did this app spawn? | `tauri-agent-tools process-tree --json`
|
|
47
|
+
| What sidecars did this app spawn? | `tauri-agent-tools process-tree --json` (or `--deep`) | Bridge /process lists registered sidecars (v0.7+); `--deep` walks the OS tree with no bridge |
|
|
45
48
|
|
|
46
49
|
## Decision tree
|
|
47
50
|
|
|
@@ -66,8 +69,8 @@ When in doubt, escalate to `diagnose` — its `summary.md` will tell you which d
|
|
|
66
69
|
|
|
67
70
|
- All commands accept `--json` for machine-readable output.
|
|
68
71
|
- Bundle commands (`forensics`, `diagnose`) write a `summary.md` agents can open directly and a `summary.json` agents can parse.
|
|
69
|
-
- Streaming commands (`os-logs`, `rust-logs`, `sidecar tap`) emit one NDJSON envelope per line on stdout.
|
|
70
|
-
- Bridge v0.7+ commands feature-detect via `GET /version` and
|
|
72
|
+
- Streaming commands (`os-logs`, `rust-logs`, `sidecar tap`) and `logs` emit one NDJSON envelope per line on stdout.
|
|
73
|
+
- Bridge v0.7+ commands feature-detect via `GET /version` and **degrade gracefully** (a clear `note:`, plus an OS/eval fallback where possible) against older bridges. Pass `--strict` to turn a missing endpoint into a hard error instead.
|
|
71
74
|
|
|
72
75
|
## When this skill is wrong
|
|
73
76
|
|
package/AGENTS.md
CHANGED
|
@@ -4,12 +4,13 @@ CLI tool for agent-driven inspection and interaction with Tauri desktop applicat
|
|
|
4
4
|
|
|
5
5
|
## Agent Skills
|
|
6
6
|
|
|
7
|
-
This package includes
|
|
7
|
+
This package includes three [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 all
|
|
11
|
+
| `tauri-agent-tools` | `.agents/skills/tauri-agent-tools/SKILL.md` | Using all 38 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
|
+
| `tauri-debug-quickstart` | `.agents/skills/tauri-debug-quickstart/SKILL.md` | First-30-seconds triage — pick the right command for the symptom |
|
|
13
14
|
|
|
14
15
|
## Quick Reference
|
|
15
16
|
|
|
@@ -20,11 +21,20 @@ This package includes two [Agent Skills](https://agentskills.io):
|
|
|
20
21
|
**Standalone commands** (no bridge needed):
|
|
21
22
|
`list-windows`, `info`, `screenshot --title`, `wait --title`, `diff`
|
|
22
23
|
|
|
24
|
+
**Bridge-free diagnostics** (work on release builds, dead apps, and sidecars — no bridge required):
|
|
25
|
+
`app-paths`, `config inspect`, `os-logs`, `sidecar tap`, `sidecar replay`, `forensics`, `logs` (also reads the live bridge ring buffer when present), `process-tree --deep` (walks the full OS descendant tree)
|
|
26
|
+
|
|
23
27
|
**Bridge-required commands** (Tauri app must have dev bridge running):
|
|
24
28
|
`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
29
|
|
|
30
|
+
**Bridge-extending diagnostics** (require bridge v0.7+; degrade gracefully against older/vendored bridges, or pass `--strict` to fail):
|
|
31
|
+
`process-tree`, `capabilities audit`, `webview attach`, `health`
|
|
32
|
+
|
|
33
|
+
**Super-commands** (best-effort, compose the above):
|
|
34
|
+
`diagnose` (one-shot triage report), `bundle` (shareable, redacted incident archive → directory + `.tar.gz`)
|
|
35
|
+
|
|
26
36
|
**Optional bridge:**
|
|
27
|
-
`probe` (works standalone to discover bridges, richer output with bridge)
|
|
37
|
+
`probe` (works standalone to discover bridges, richer output with bridge), `logs` (on-disk only with `--no-bridge`)
|
|
28
38
|
|
|
29
39
|
**Multi-app targeting:** Use `--pid <n>` to target a specific app. Use `--window-label <label>` for multi-window apps.
|
|
30
40
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Agent-driven inspection toolkit for Tauri desktop apps**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
38 commands to screenshot, inspect, interact with, monitor, post-mortem, audit, and diagnose 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)
|
|
@@ -161,7 +161,7 @@ List all visible windows, marking Tauri apps.
|
|
|
161
161
|
|
|
162
162
|
### `ipc-monitor`
|
|
163
163
|
|
|
164
|
-
Monitor Tauri IPC calls in real-time (read-only). Monkey-patches `window.__TAURI__.core.invoke` to capture calls, then polls and restores on exit.
|
|
164
|
+
Monitor Tauri IPC calls in real-time (read-only). Monkey-patches Tauri's invoke API (`window.__TAURI_INTERNALS__.invoke`, falling back to `window.__TAURI__.core.invoke`) to capture calls, then polls and restores on exit.
|
|
165
165
|
|
|
166
166
|
| Option | Description |
|
|
167
167
|
|--------|-------------|
|
|
@@ -304,8 +304,9 @@ See [`docs/troubleshooting/decision-tree.md`](docs/troubleshooting/decision-tree
|
|
|
304
304
|
Four commands that talk to new dev-bridge endpoints. Each feature-detects via `GET /version` and surfaces an actionable upgrade error when the bridge is older than v0.7.0.
|
|
305
305
|
|
|
306
306
|
```bash
|
|
307
|
-
# Tauri PID + registered sidecars
|
|
307
|
+
# Tauri PID + registered sidecars (--deep walks the full OS descendant tree, no bridge needed)
|
|
308
308
|
tauri-agent-tools process-tree --json
|
|
309
|
+
tauri-agent-tools process-tree --deep --json
|
|
309
310
|
|
|
310
311
|
# Live capability audit (vs. config inspect which reads JSON files)
|
|
311
312
|
tauri-agent-tools capabilities audit --json
|
|
@@ -352,6 +353,25 @@ When to reach for them:
|
|
|
352
353
|
- **A sidecar is the suspect** → run it under `sidecar tap` instead of under Tauri.
|
|
353
354
|
- **You don't have source on hand, just a bundle id** → `app-paths --identifier com.example.app`.
|
|
354
355
|
|
|
356
|
+
## Unified logs and incident bundles (new in 0.8)
|
|
357
|
+
|
|
358
|
+
When you need the *whole* picture — every log line in order, or a single shareable archive of an incident:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# Merge on-disk tauri-plugin-log files + the live bridge /logs ring buffer into one
|
|
362
|
+
# timestamp-ordered stream (UTC-normalized). NDJSON by default; --pretty for humans.
|
|
363
|
+
tauri-agent-tools logs --config ./src-tauri --pretty
|
|
364
|
+
tauri-agent-tools logs --level warn --correlate # filter + infer run_id/requestId ids
|
|
365
|
+
tauri-agent-tools logs --no-bridge # on-disk files only (no running app)
|
|
366
|
+
|
|
367
|
+
# Collect a shareable incident bundle: merged logs + deep process tree + app-paths +
|
|
368
|
+
# forensics (+ optional UI capture) → a redacted directory and a .tar.gz.
|
|
369
|
+
tauri-agent-tools bundle --config ./src-tauri -o ./incident --since 10m
|
|
370
|
+
tauri-agent-tools bundle --with-capture # also snapshot the UI (needs live bridge)
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
`logs` works with no bridge (it reads the on-disk log files); a running bridge just adds the live ring buffer. `bundle` redacts secrets (`token`/`api_key`/`password`/…) from text artifacts on write and degrades cleanly when a phase can't run.
|
|
374
|
+
|
|
355
375
|
## How It Works
|
|
356
376
|
|
|
357
377
|
```
|
|
@@ -417,8 +437,9 @@ This package ships [Agent Skills](https://agentskills.io) so AI coding agents ca
|
|
|
417
437
|
|
|
418
438
|
| Skill | Description |
|
|
419
439
|
|-------|-------------|
|
|
420
|
-
| `tauri-agent-tools` | Using all
|
|
440
|
+
| `tauri-agent-tools` | Using all 38 CLI commands to inspect and interact with Tauri apps |
|
|
421
441
|
| `tauri-bridge-setup` | Adding the Rust dev bridge to a Tauri project |
|
|
442
|
+
| `tauri-debug-quickstart` | First-30-seconds triage — pick the right command for the symptom |
|
|
422
443
|
|
|
423
444
|
<details>
|
|
424
445
|
<summary><strong>Claude Code</strong></summary>
|
|
@@ -471,7 +492,7 @@ Full documentation is available at the [docs site](https://cesarandreslopez.gith
|
|
|
471
492
|
- [Installation](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/installation/) — system requirements and setup
|
|
472
493
|
- [Quick Start](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/quick-start/) — get running in 5 minutes
|
|
473
494
|
- [Bridge Setup](https://cesarandreslopez.github.io/tauri-agent-tools/getting-started/bridge-setup/) — integrate the Rust bridge into your Tauri app
|
|
474
|
-
- [Command Reference](https://cesarandreslopez.github.io/tauri-agent-tools/commands/) — all
|
|
495
|
+
- [Command Reference](https://cesarandreslopez.github.io/tauri-agent-tools/commands/) — all 38 commands with examples
|
|
475
496
|
- [Platform Support](https://cesarandreslopez.github.io/tauri-agent-tools/platform-support/) — X11, Wayland, macOS details
|
|
476
497
|
- [Architecture](https://cesarandreslopez.github.io/tauri-agent-tools/architecture/overview/) — how it works under the hood
|
|
477
498
|
|
package/dist/bridge/client.d.ts
CHANGED
|
@@ -29,6 +29,14 @@ export declare class BridgeClient {
|
|
|
29
29
|
* bridge is too old, with a hint pointing integrators at the example.
|
|
30
30
|
*/
|
|
31
31
|
requireEndpoint(path: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Non-throwing capability check: resolves true iff the running bridge
|
|
34
|
+
* advertises `path` in its `/version` endpoint list. Shares the `/version`
|
|
35
|
+
* cache with {@link requireEndpoint}, so repeated checks cost one roundtrip.
|
|
36
|
+
* Resolves false when the bridge is unreachable or too old to report
|
|
37
|
+
* `/version` — letting callers degrade gracefully instead of throwing.
|
|
38
|
+
*/
|
|
39
|
+
hasEndpoint(path: string): Promise<boolean>;
|
|
32
40
|
process(): Promise<ProcessResponse>;
|
|
33
41
|
capabilities(): Promise<CapabilitiesResponse>;
|
|
34
42
|
devtools(): Promise<DevtoolsResponse>;
|
package/dist/bridge/client.js
CHANGED
|
@@ -217,6 +217,26 @@ export class BridgeClient {
|
|
|
217
217
|
`Re-copy examples/tauri-bridge/src/dev_bridge.rs into your app and rebuild — ` +
|
|
218
218
|
`see rust-bridge/README.md.`);
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Non-throwing capability check: resolves true iff the running bridge
|
|
222
|
+
* advertises `path` in its `/version` endpoint list. Shares the `/version`
|
|
223
|
+
* cache with {@link requireEndpoint}, so repeated checks cost one roundtrip.
|
|
224
|
+
* Resolves false when the bridge is unreachable or too old to report
|
|
225
|
+
* `/version` — letting callers degrade gracefully instead of throwing.
|
|
226
|
+
*/
|
|
227
|
+
async hasEndpoint(path) {
|
|
228
|
+
if (this.versionUnreachable)
|
|
229
|
+
return false;
|
|
230
|
+
if (this.versionCache === null) {
|
|
231
|
+
const v = await this.version();
|
|
232
|
+
if (v === null) {
|
|
233
|
+
this.versionUnreachable = true;
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
this.versionCache = v;
|
|
237
|
+
}
|
|
238
|
+
return this.versionCache.endpoints.includes(path);
|
|
239
|
+
}
|
|
220
240
|
async process() {
|
|
221
241
|
await this.requireEndpoint('/process');
|
|
222
242
|
const res = await this.postAuthed('/process');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/bridge/client.ts"],"names":[],"mappings":"AAC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Q,IAAI,KAAK,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { readdir, readFile, unlink } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
3
4
|
import { TokenFileSchema } from '../schemas/bridge.js';
|
|
4
|
-
const
|
|
5
|
+
const FALLBACK_TOKEN_DIR = '/tmp';
|
|
5
6
|
const TOKEN_PREFIX = 'tauri-dev-bridge-';
|
|
6
7
|
const TOKEN_SUFFIX = '.token';
|
|
7
8
|
function isPidAlive(pid) {
|
|
@@ -13,18 +14,21 @@ function isPidAlive(pid) {
|
|
|
13
14
|
return false;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
function getTokenDirs() {
|
|
18
|
+
return [...new Set([tmpdir(), FALLBACK_TOKEN_DIR])];
|
|
19
|
+
}
|
|
20
|
+
async function scanTokenDir(tokenDir) {
|
|
17
21
|
let files;
|
|
18
22
|
try {
|
|
19
|
-
files = await readdir(
|
|
23
|
+
files = await readdir(tokenDir);
|
|
20
24
|
}
|
|
21
25
|
catch {
|
|
22
|
-
return
|
|
26
|
+
return [];
|
|
23
27
|
}
|
|
24
28
|
const tokenFiles = files.filter((f) => f.startsWith(TOKEN_PREFIX) && f.endsWith(TOKEN_SUFFIX));
|
|
25
|
-
|
|
29
|
+
const found = [];
|
|
26
30
|
for (const file of tokenFiles) {
|
|
27
|
-
const filePath =
|
|
31
|
+
const filePath = join(tokenDir, file);
|
|
28
32
|
try {
|
|
29
33
|
const content = await readFile(filePath, 'utf-8');
|
|
30
34
|
const data = TokenFileSchema.parse(JSON.parse(content));
|
|
@@ -33,9 +37,10 @@ export async function discoverBridge() {
|
|
|
33
37
|
await unlink(filePath).catch(() => { });
|
|
34
38
|
continue;
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
found.push({
|
|
41
|
+
pid: data.pid,
|
|
42
|
+
config: { port: data.port, token: data.token },
|
|
43
|
+
});
|
|
39
44
|
}
|
|
40
45
|
catch {
|
|
41
46
|
// Skip malformed files
|
|
@@ -44,29 +49,24 @@ export async function discoverBridge() {
|
|
|
44
49
|
}
|
|
45
50
|
return found;
|
|
46
51
|
}
|
|
52
|
+
export async function discoverBridge() {
|
|
53
|
+
let first = null;
|
|
54
|
+
for (const tokenDir of getTokenDirs()) {
|
|
55
|
+
const bridges = await scanTokenDir(tokenDir);
|
|
56
|
+
if (!first && bridges.length > 0) {
|
|
57
|
+
first = bridges[0].config;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return first;
|
|
61
|
+
}
|
|
47
62
|
export async function discoverBridgesByPid() {
|
|
48
63
|
const result = new Map();
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
const tokenFiles = files.filter((f) => f.startsWith(TOKEN_PREFIX) && f.endsWith(TOKEN_SUFFIX));
|
|
57
|
-
for (const file of tokenFiles) {
|
|
58
|
-
const filePath = `${TOKEN_DIR}/${file}`;
|
|
59
|
-
try {
|
|
60
|
-
const content = await readFile(filePath, 'utf-8');
|
|
61
|
-
const data = TokenFileSchema.parse(JSON.parse(content));
|
|
62
|
-
if (!isPidAlive(data.pid)) {
|
|
63
|
-
await unlink(filePath).catch(() => { });
|
|
64
|
-
continue;
|
|
64
|
+
for (const tokenDir of getTokenDirs()) {
|
|
65
|
+
const bridges = await scanTokenDir(tokenDir);
|
|
66
|
+
for (const bridge of bridges) {
|
|
67
|
+
if (!result.has(bridge.pid)) {
|
|
68
|
+
result.set(bridge.pid, bridge.config);
|
|
65
69
|
}
|
|
66
|
-
result.set(data.pid, { port: data.port, token: data.token });
|
|
67
|
-
}
|
|
68
|
-
catch {
|
|
69
|
-
continue;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenDiscovery.js","sourceRoot":"","sources":["../../src/bridge/tokenDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,
|
|
1
|
+
{"version":3,"file":"tokenDiscovery.js","sourceRoot":"","sources":["../../src/bridge/tokenDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AACzC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAO9B,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,QAAgB;IAC1C,IAAI,KAAe,CAAC;IACpB,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;IACl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AAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAwB,CAAC;IAE/C,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -40,6 +40,8 @@ import { registerOsLogs } from './commands/osLogs.js';
|
|
|
40
40
|
import { registerSidecarTap } from './commands/sidecarTap.js';
|
|
41
41
|
import { registerSidecarReplay } from './commands/sidecarReplay.js';
|
|
42
42
|
import { registerForensics } from './commands/forensics.js';
|
|
43
|
+
import { registerLogs } from './commands/logs.js';
|
|
44
|
+
import { registerBundle } from './commands/bundle.js';
|
|
43
45
|
import { registerProcessTree } from './commands/processTree.js';
|
|
44
46
|
import { registerCapabilitiesAudit } from './commands/capabilitiesAudit.js';
|
|
45
47
|
import { registerWebviewAttach } from './commands/webviewAttach.js';
|
|
@@ -101,13 +103,15 @@ registerOsLogs(program);
|
|
|
101
103
|
registerSidecarTap(program);
|
|
102
104
|
registerSidecarReplay(program);
|
|
103
105
|
registerForensics(program);
|
|
106
|
+
registerLogs(program);
|
|
104
107
|
// ── Bridge-extending diagnostics (Tier 2 — requires bridge v0.7.0+) ──────────
|
|
105
108
|
registerProcessTree(program);
|
|
106
109
|
registerCapabilitiesAudit(program);
|
|
107
110
|
registerWebviewAttach(program);
|
|
108
111
|
registerHealth(program);
|
|
109
|
-
// ── Tier 3: super-
|
|
112
|
+
// ── Tier 3: super-commands (compose Tier 1 + Tier 2) ─────────────────────────
|
|
110
113
|
registerDiagnose(program);
|
|
114
|
+
registerBundle(program);
|
|
111
115
|
program.parseAsync().catch((err) => {
|
|
112
116
|
console.error(err instanceof Error ? err.message : String(err));
|
|
113
117
|
process.exitCode = 1;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAA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