@petukhovart/agent-view 0.1.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/.claude-plugin/plugin.json +10 -0
- package/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/adapters/browser.d.ts +3 -0
- package/dist/adapters/browser.d.ts.map +1 -0
- package/dist/adapters/browser.js +20 -0
- package/dist/adapters/browser.js.map +1 -0
- package/dist/adapters/electron.d.ts +3 -0
- package/dist/adapters/electron.d.ts.map +1 -0
- package/dist/adapters/electron.js +20 -0
- package/dist/adapters/electron.js.map +1 -0
- package/dist/adapters/registry.d.ts +4 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +13 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/tauri.d.ts +8 -0
- package/dist/adapters/tauri.d.ts.map +1 -0
- package/dist/adapters/tauri.js +32 -0
- package/dist/adapters/tauri.js.map +1 -0
- package/dist/adapters/types.d.ts +8 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/cdp/transport.d.ts +4 -0
- package/dist/cdp/transport.d.ts.map +1 -0
- package/dist/cdp/transport.js +89 -0
- package/dist/cdp/transport.js.map +1 -0
- package/dist/cdp/types.d.ts +37 -0
- package/dist/cdp/types.d.ts.map +1 -0
- package/dist/cdp/types.js +2 -0
- package/dist/cdp/types.js.map +1 -0
- package/dist/cli/client.d.ts +3 -0
- package/dist/cli/client.d.ts.map +1 -0
- package/dist/cli/client.js +89 -0
- package/dist/cli/client.js.map +1 -0
- package/dist/cli/commands/click.d.ts +9 -0
- package/dist/cli/commands/click.d.ts.map +1 -0
- package/dist/cli/commands/click.js +43 -0
- package/dist/cli/commands/click.js.map +1 -0
- package/dist/cli/commands/discover.d.ts +3 -0
- package/dist/cli/commands/discover.d.ts.map +1 -0
- package/dist/cli/commands/discover.js +15 -0
- package/dist/cli/commands/discover.js.map +1 -0
- package/dist/cli/commands/dom.d.ts +9 -0
- package/dist/cli/commands/dom.d.ts.map +1 -0
- package/dist/cli/commands/dom.js +19 -0
- package/dist/cli/commands/dom.js.map +1 -0
- package/dist/cli/commands/fill.d.ts +8 -0
- package/dist/cli/commands/fill.d.ts.map +1 -0
- package/dist/cli/commands/fill.js +39 -0
- package/dist/cli/commands/fill.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +14 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/launch.d.ts +3 -0
- package/dist/cli/commands/launch.d.ts.map +1 -0
- package/dist/cli/commands/launch.js +21 -0
- package/dist/cli/commands/launch.js.map +1 -0
- package/dist/cli/commands/scene.d.ts +11 -0
- package/dist/cli/commands/scene.d.ts.map +1 -0
- package/dist/cli/commands/scene.js +29 -0
- package/dist/cli/commands/scene.js.map +1 -0
- package/dist/cli/commands/screenshot.d.ts +7 -0
- package/dist/cli/commands/screenshot.d.ts.map +1 -0
- package/dist/cli/commands/screenshot.js +20 -0
- package/dist/cli/commands/screenshot.js.map +1 -0
- package/dist/cli/commands/snap.d.ts +9 -0
- package/dist/cli/commands/snap.d.ts.map +1 -0
- package/dist/cli/commands/snap.js +25 -0
- package/dist/cli/commands/snap.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +2 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +22 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/wait.d.ts +9 -0
- package/dist/cli/commands/wait.d.ts.map +1 -0
- package/dist/cli/commands/wait.js +26 -0
- package/dist/cli/commands/wait.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +136 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/manager.d.ts +5 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/manager.js +84 -0
- package/dist/config/manager.js.map +1 -0
- package/dist/config/types.d.ts +13 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/inspectors/dom.d.ts +17 -0
- package/dist/inspectors/dom.d.ts.map +1 -0
- package/dist/inspectors/dom.js +131 -0
- package/dist/inspectors/dom.js.map +1 -0
- package/dist/inspectors/scene/formatter.d.ts +5 -0
- package/dist/inspectors/scene/formatter.d.ts.map +1 -0
- package/dist/inspectors/scene/formatter.js +91 -0
- package/dist/inspectors/scene/formatter.js.map +1 -0
- package/dist/inspectors/scene/index.d.ts +8 -0
- package/dist/inspectors/scene/index.d.ts.map +1 -0
- package/dist/inspectors/scene/index.js +26 -0
- package/dist/inspectors/scene/index.js.map +1 -0
- package/dist/inspectors/scene/pixi.d.ts +3 -0
- package/dist/inspectors/scene/pixi.d.ts.map +1 -0
- package/dist/inspectors/scene/pixi.js +52 -0
- package/dist/inspectors/scene/pixi.js.map +1 -0
- package/dist/inspectors/scene/registry.d.ts +4 -0
- package/dist/inspectors/scene/registry.d.ts.map +1 -0
- package/dist/inspectors/scene/registry.js +13 -0
- package/dist/inspectors/scene/registry.js.map +1 -0
- package/dist/inspectors/scene/types.d.ts +31 -0
- package/dist/inspectors/scene/types.d.ts.map +1 -0
- package/dist/inspectors/scene/types.js +2 -0
- package/dist/inspectors/scene/types.js.map +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +11 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/launcher.d.ts +4 -0
- package/dist/server/launcher.d.ts.map +1 -0
- package/dist/server/launcher.js +43 -0
- package/dist/server/launcher.js.map +1 -0
- package/dist/server/ref-store.d.ts +20 -0
- package/dist/server/ref-store.d.ts.map +1 -0
- package/dist/server/ref-store.js +29 -0
- package/dist/server/ref-store.js.map +1 -0
- package/dist/server/server.d.ts +28 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +444 -0
- package/dist/server/server.js.map +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/package.json +59 -0
- package/skills/verify/SKILL.md +100 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: "Visual verification of desktop app UI after code changes. Use when modifying UI components, fixing visual bugs, testing user interactions, verifying layout, or when any workflow phase needs to inspect the running application. Triggers on: verify, check UI, test how it looks, visual regression, screenshot, inspect DOM."
|
|
4
|
+
allowed-tools: Bash(agent-view *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Visual Verification with agent-view
|
|
8
|
+
|
|
9
|
+
You have access to `agent-view` CLI for inspecting and interacting with desktop applications via Chrome DevTools Protocol.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
The target project must have:
|
|
14
|
+
1. `agent-view.config.json` in project root (run `agent-view init` to generate)
|
|
15
|
+
2. CDP enabled in the app (e.g. `--remote-debugging-port=9222` for Electron)
|
|
16
|
+
|
|
17
|
+
If config is missing, run `agent-view init` first.
|
|
18
|
+
|
|
19
|
+
## Commands Reference
|
|
20
|
+
|
|
21
|
+
### Discovery & Launch
|
|
22
|
+
```bash
|
|
23
|
+
agent-view launch # Start app from config, wait for CDP readiness
|
|
24
|
+
agent-view discover # List windows (JSON) — get window IDs
|
|
25
|
+
agent-view stop # Stop the lazy server
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### DOM Inspection
|
|
29
|
+
```bash
|
|
30
|
+
agent-view dom # DOM accessibility tree (default window)
|
|
31
|
+
agent-view dom --window <id|name> # Specific window
|
|
32
|
+
agent-view dom --filter "button" # Filter by text/role
|
|
33
|
+
agent-view dom --depth 3 # Limit tree depth
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Interaction
|
|
37
|
+
```bash
|
|
38
|
+
agent-view click <ref> # Click element by ref from dom output
|
|
39
|
+
agent-view click --pos 100,200 # Click by coordinates (for canvas)
|
|
40
|
+
agent-view fill <ref> "text" # Type into input field
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Screenshots
|
|
44
|
+
```bash
|
|
45
|
+
agent-view screenshot # Save PNG to temp dir, print path
|
|
46
|
+
agent-view screenshot --window <id> # Specific window
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Canvas / WebGL (only when `webgl` is configured in agent-view.config.json)
|
|
50
|
+
|
|
51
|
+
These commands read the scene graph from canvas-based rendering engines. Skip this section if the project has no `webgl` field in config.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
agent-view scene # Scene graph from configured engine
|
|
55
|
+
agent-view scene --filter "player" # Filter by object name/type
|
|
56
|
+
agent-view scene --verbose # Extended props (scale, alpha, rotation)
|
|
57
|
+
agent-view scene --diff # Changes since last call
|
|
58
|
+
agent-view snap # DOM + Scene combined
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Verification Workflow
|
|
62
|
+
|
|
63
|
+
### Ad-hoc Mode (standalone)
|
|
64
|
+
|
|
65
|
+
After making code changes:
|
|
66
|
+
|
|
67
|
+
1. **Determine affected areas** from git diff
|
|
68
|
+
2. **Ensure app is running**: `agent-view launch` or `agent-view discover`
|
|
69
|
+
3. **Inspect DOM**: `agent-view dom --filter "<area>"` — check structure matches expectations
|
|
70
|
+
4. **Take screenshot**: `agent-view screenshot` — capture visual state
|
|
71
|
+
5. **Interact if needed**: `agent-view click`/`fill` → `agent-view dom` to verify state changed
|
|
72
|
+
6. **For canvas apps**: `agent-view scene --diff` to see what changed
|
|
73
|
+
|
|
74
|
+
### Scenario Execution Mode (from plan)
|
|
75
|
+
|
|
76
|
+
When UI scenarios are pre-generated (e.g., from a plan file with `## UI Scenarios` section):
|
|
77
|
+
|
|
78
|
+
1. **Read scenario steps** with symbolic refs (`$var` notation)
|
|
79
|
+
2. **Resolve each $var**: `agent-view dom --filter "<text>" --depth 3` → map to ref ID
|
|
80
|
+
3. **Execute steps** sequentially: fill, click, dom --filter (verify expected outcome)
|
|
81
|
+
4. **Screenshot**: capture on FAIL and at E2E scenario end — not every step
|
|
82
|
+
5. **Report per-scenario**: PASS / FAIL with reason and evidence
|
|
83
|
+
|
|
84
|
+
This mode works with any workflow that generates plan files with UI scenarios.
|
|
85
|
+
|
|
86
|
+
## Resilience
|
|
87
|
+
|
|
88
|
+
- **Stale refs:** After HMR, navigation, or state change — re-run `dom` for fresh refs before interacting
|
|
89
|
+
- **Element not found:** Wait 2s, retry once (render delay after HMR). If still missing — report FAIL
|
|
90
|
+
- **CDP disconnect:** Run `agent-view discover` to check. If no windows — `agent-view launch`
|
|
91
|
+
- **Max retries per command:** 2. After that — SKIP scenario step with warning
|
|
92
|
+
|
|
93
|
+
## Important Notes
|
|
94
|
+
|
|
95
|
+
- **Refs are session-scoped** — after HMR or navigation, run `dom` again for fresh refs
|
|
96
|
+
- **Multiple windows**: use `--window <id>` from `discover` output when titles overlap
|
|
97
|
+
- **Multiwindow**: all commands support `--window` flag
|
|
98
|
+
- **Output format**: plain text (DOM, scene), JSON (discover only), file path (screenshot)
|
|
99
|
+
- **Lazy server**: auto-starts on first call, shuts down after 5min idle
|
|
100
|
+
- **Token optimization**: always use `dom --filter` with specific text, limit `--depth` to 2-3
|